Création de @js/dragndrop.js à terminer, inclusion des scripts sql
This commit is contained in:
parent
4489e41ed8
commit
786ec088d6
|
@ -1,6 +1,7 @@
|
|||
/* STYLE "BASIC" DES TABLEAUX */
|
||||
table.basic{
|
||||
/* position */
|
||||
width: calc( 100% - 2*1em );
|
||||
margin: 2em 1em;
|
||||
|
||||
/* border */
|
||||
|
|
|
@ -52,6 +52,15 @@ body{
|
|||
font: 16px 'Ubuntu', 'Open Sans', 'Helvetica Neue', 'Arial', 'sans-serif';
|
||||
}
|
||||
|
||||
#DRAGNDROP{
|
||||
/* position */
|
||||
display: block;
|
||||
position: fixed;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
||||
/* background */
|
||||
}
|
||||
|
||||
|
||||
#WRAPPER{
|
||||
|
|
|
@ -59,9 +59,12 @@ $notifNotifNum = 5;
|
|||
<script type='text/javascript' src='API.js' ></script> <!-- Gestion des raccourcis clavier -->
|
||||
<script type='text/javascript' src='js/pageManager.js' ></script> <!-- Gestion des raccourcis clavier -->
|
||||
<script type='text/javascript' src='js/shortcut.js' ></script> <!-- Gestion des raccourcis clavier -->
|
||||
<script type='text/javascript' src='js/dragndrop.js' ></script> <!-- Gestion des raccourcis clavier -->
|
||||
|
||||
</head>
|
||||
<body><!-- CORPS DE LA PAGE -->
|
||||
|
||||
<div id='DRAGNDROP'></div>
|
||||
|
||||
|
||||
<div id='WRAPPER'>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
function DragnDrop(){};
|
||||
|
||||
/**
|
||||
* Retourne les offsets absolues (par rapport à l'écran)
|
||||
* @param <Element>element L'élément duquel on veut les données
|
||||
*
|
||||
* @return <Object>offset objet contenant les attributs {top, left, width, height}
|
||||
*/
|
||||
DragnDrop.prototype.absoluteOffset = function(element){
|
||||
if( element != document.body ){
|
||||
var parent = this.absoluteOffset(element.parentNode);
|
||||
return {
|
||||
top: element.offsetTop+parent.top,
|
||||
left: element.offsetLeft+parent.left
|
||||
};
|
||||
}else
|
||||
return {top: 0, left: 0};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Définit un élément comme apte à être "draggé"
|
||||
* @param <Element>element Element auquel s'applique l'autorisation de déplacement
|
||||
*/
|
||||
DragnDrop.prototype.setDraggable = function(element){
|
||||
console.log('ok');
|
||||
};
|
|
@ -112,7 +112,7 @@ if( $_SESSION['username'] != null && $_SESSION['permissions'] == 'student' ){ //
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
echo "<table class='basic'>";
|
||||
|
||||
echo '<thead><tr>';
|
||||
echo "<thead class='active'><tr>";
|
||||
echo '<th colspan=5>Groupe '.$monGroupe.'</th>';
|
||||
echo '</tr></thead>';
|
||||
|
||||
|
@ -127,7 +127,7 @@ if( $_SESSION['username'] != null && $_SESSION['permissions'] == 'student' ){ //
|
|||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '<tr><td colspan=5 class=more></td></tr>';
|
||||
// echo '<tr><td colspan=5 class=more></td></tr>';
|
||||
|
||||
echo '</tbody>';
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/*************************************************/
|
||||
/*** AFFICHE LES LIENS ENTRE TOUTES LES TABLES ***/
|
||||
/*************************************************/
|
||||
SELECT DISTINCT util.pseudo as pseudo, g.nom as groupe, m.identifiant as module, u.nom as UE, s.nom as semestre, s.annee as annee
|
||||
FROM utilisateurs as util, groupes as g, association_utilisateur_groupe as asso1, modules as m, ue as u, semestre as s, association_module_semestre_ue as asso2
|
||||
WHERE asso2.id_module = m.id_module
|
||||
AND asso2.id_ue = u.id_ue
|
||||
AND asso2.id_semestre = s.id_semestre
|
||||
|
||||
AND asso1.id_groupe = g.id_groupe
|
||||
AND asso1.id_semestre = s.id_semestre
|
||||
AND asso1.id_utilisateur = util.id_utilisateur
|
||||
|
||||
ORDER BY g.nom, util.pseudo ASC;
|
||||
|
||||
|
||||
|
||||
/**********************************/
|
||||
/*** AFFICHE LES MODULES PAR UE ***/
|
||||
/**********************************/
|
||||
SELECT DISTINCT u.nom as UE, m.identifiant as module
|
||||
FROM modules as m, ue as u, association_module_semestre_ue as asso
|
||||
WHERE asso.id_module = m.id_module
|
||||
AND asso.id_ue = u.id_ue
|
||||
ORDER BY u.nom, m.identifiant ASC;
|
||||
|
||||
|
||||
/************************************/
|
||||
/*** AFFICHE LES UE PAR SEMESTRES ***/
|
||||
/************************************/
|
||||
SELECT DISTINCT s.nom as semestre, u.nom as UE
|
||||
FROM ue as u, semestre as s, association_module_semestre_ue as asso
|
||||
WHERE asso.id_ue = u.id_ue
|
||||
AND asso.id_semestre = s.id_semestre
|
||||
ORDER BY s.nom, u.nom ASC;
|
||||
|
||||
|
||||
|
||||
/****************************************/
|
||||
/*** AFFICHE LES MODULES PAR SEMESTRE ***/
|
||||
/****************************************/
|
||||
SELECT DISTINCT s.nom as semestre, m.identifiant as module
|
||||
FROM modules as m, semestre as s, association_module_semestre_ue as asso
|
||||
WHERE asso.id_module = m.id_module
|
||||
AND asso.id_semestre = s.id_semestre
|
||||
ORDER BY s.nom, m.identifiant ASC;
|
||||
|
||||
|
||||
/******************************************/
|
||||
/*** AFFICHE LES ETUDIANTS PAR SEMESTRE ***/
|
||||
/******************************************/
|
||||
SELECT DISTINCT s.nom as semestre, u.pseudo as etudiant
|
||||
FROM utilisateurs as u, semestre as s, association_utilisateur_groupe as asso
|
||||
WHERE asso.id_utilisateur = u.id_utilisateur
|
||||
AND asso.id_semestre = s.id_semestre
|
||||
ORDER BY s.nom, u.pseudo ASC;
|
332
xdoc/sid.sql
332
xdoc/sid.sql
|
@ -3,7 +3,7 @@
|
|||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Client: localhost
|
||||
-- Généré le: Dim 25 Octobre 2015 à 17:53
|
||||
-- Généré le: Dim 25 Octobre 2015 à 19:39
|
||||
-- Version du serveur: 5.5.44-0ubuntu0.14.04.1
|
||||
-- Version de PHP: 5.5.9-1ubuntu4.13
|
||||
|
||||
|
@ -24,20 +24,57 @@ USE `sid`;
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `association_module_semestre_ue`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `association_module_semestre_ue` (
|
||||
`id_module` int(11) NOT NULL,
|
||||
`id_ue` int(11) NOT NULL,
|
||||
`id_semestre` int(11) NOT NULL,
|
||||
KEY `id_module` (`id_module`,`id_ue`,`id_semestre`),
|
||||
KEY `id_ue` (`id_ue`),
|
||||
KEY `id_semestre` (`id_semestre`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- RELATIONS POUR LA TABLE `association_module_semestre_ue`:
|
||||
-- `id_semestre`
|
||||
-- `semestre` -> `id_semestre`
|
||||
-- `id_module`
|
||||
-- `modules` -> `id_module`
|
||||
-- `id_ue`
|
||||
-- `ue` -> `id_ue`
|
||||
--
|
||||
|
||||
--
|
||||
-- Contenu de la table `association_module_semestre_ue`
|
||||
--
|
||||
|
||||
INSERT INTO `association_module_semestre_ue` (`id_module`, `id_ue`, `id_semestre`) VALUES
|
||||
(1, 1, 1),
|
||||
(2, 2, 2),
|
||||
(3, 3, 3),
|
||||
(4, 4, 4),
|
||||
(5, 1, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `association_utilisateur_groupe`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `association_utilisateur_groupe`;
|
||||
CREATE TABLE IF NOT EXISTS `association_utilisateur_groupe` (
|
||||
`id_utilisateur` int(11) NOT NULL,
|
||||
`id_groupe` int(11) NOT NULL,
|
||||
`id_semestre` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id_utilisateur`,`id_groupe`),
|
||||
UNIQUE KEY `id_utilisateur` (`id_utilisateur`,`id_groupe`),
|
||||
UNIQUE KEY `id_utilisateur_2` (`id_utilisateur`,`id_groupe`),
|
||||
UNIQUE KEY `id_utilisateur_3` (`id_utilisateur`,`id_groupe`),
|
||||
UNIQUE KEY `id_utilisateur_4` (`id_utilisateur`,`id_groupe`),
|
||||
KEY `asso_groupe_utilisateur-foreign_groupe` (`id_groupe`)
|
||||
KEY `asso_groupe_utilisateur-foreign_groupe` (`id_groupe`),
|
||||
KEY `id_semestre` (`id_semestre`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
|
@ -52,110 +89,110 @@ CREATE TABLE IF NOT EXISTS `association_utilisateur_groupe` (
|
|||
-- Contenu de la table `association_utilisateur_groupe`
|
||||
--
|
||||
|
||||
INSERT INTO `association_utilisateur_groupe` (`id_utilisateur`, `id_groupe`) VALUES
|
||||
(68, 1),
|
||||
(70, 1),
|
||||
(73, 1),
|
||||
(87, 1),
|
||||
(95, 1),
|
||||
(99, 1),
|
||||
(107, 1),
|
||||
(119, 1),
|
||||
(122, 1),
|
||||
(137, 1),
|
||||
(154, 1),
|
||||
(155, 1),
|
||||
(15, 2),
|
||||
(42, 2),
|
||||
(61, 2),
|
||||
(63, 2),
|
||||
(64, 2),
|
||||
(65, 2),
|
||||
(67, 2),
|
||||
(69, 2),
|
||||
(79, 2),
|
||||
(88, 2),
|
||||
(94, 2),
|
||||
(100, 2),
|
||||
(105, 2),
|
||||
(110, 2),
|
||||
(114, 2),
|
||||
(123, 2),
|
||||
(124, 2),
|
||||
(125, 2),
|
||||
(126, 2),
|
||||
(127, 2),
|
||||
(128, 2),
|
||||
(134, 2),
|
||||
(136, 2),
|
||||
(143, 2),
|
||||
(57, 3),
|
||||
(71, 3),
|
||||
(77, 3),
|
||||
(81, 3),
|
||||
(98, 3),
|
||||
(101, 3),
|
||||
(104, 3),
|
||||
(109, 3),
|
||||
(120, 3),
|
||||
(121, 3),
|
||||
(130, 3),
|
||||
(131, 3),
|
||||
(135, 3),
|
||||
(138, 3),
|
||||
(140, 3),
|
||||
(147, 3),
|
||||
(149, 3),
|
||||
(150, 3),
|
||||
(153, 3),
|
||||
(60, 4),
|
||||
(66, 4),
|
||||
(76, 4),
|
||||
(78, 4),
|
||||
(82, 4),
|
||||
(83, 4),
|
||||
(86, 4),
|
||||
(89, 4),
|
||||
(102, 4),
|
||||
(111, 4),
|
||||
(115, 4),
|
||||
(118, 4),
|
||||
(129, 4),
|
||||
(142, 4),
|
||||
(144, 4),
|
||||
(148, 4),
|
||||
(13, 5),
|
||||
(14, 5),
|
||||
(59, 5),
|
||||
(72, 5),
|
||||
(74, 5),
|
||||
(84, 5),
|
||||
(92, 5),
|
||||
(93, 5),
|
||||
(106, 5),
|
||||
(108, 5),
|
||||
(116, 5),
|
||||
(141, 5),
|
||||
(145, 5),
|
||||
(58, 7),
|
||||
(62, 7),
|
||||
(75, 7),
|
||||
(80, 7),
|
||||
(85, 7),
|
||||
(90, 7),
|
||||
(91, 7),
|
||||
(96, 7),
|
||||
(97, 7),
|
||||
(103, 7),
|
||||
(112, 7),
|
||||
(113, 7),
|
||||
(117, 7),
|
||||
(132, 7),
|
||||
(133, 7),
|
||||
(139, 7),
|
||||
(146, 7),
|
||||
(151, 7),
|
||||
(152, 7);
|
||||
INSERT INTO `association_utilisateur_groupe` (`id_utilisateur`, `id_groupe`, `id_semestre`) VALUES
|
||||
(13, 5, 1),
|
||||
(14, 5, 1),
|
||||
(15, 2, 1),
|
||||
(42, 2, 1),
|
||||
(57, 3, 1),
|
||||
(58, 7, 1),
|
||||
(59, 5, 1),
|
||||
(60, 4, 1),
|
||||
(61, 2, 1),
|
||||
(62, 7, 1),
|
||||
(63, 2, 1),
|
||||
(64, 2, 1),
|
||||
(65, 2, 1),
|
||||
(66, 4, 1),
|
||||
(67, 2, 1),
|
||||
(68, 1, 1),
|
||||
(69, 2, 1),
|
||||
(70, 1, 1),
|
||||
(71, 3, 1),
|
||||
(72, 5, 1),
|
||||
(73, 1, 1),
|
||||
(74, 5, 1),
|
||||
(75, 7, 1),
|
||||
(76, 4, 1),
|
||||
(77, 3, 1),
|
||||
(78, 4, 1),
|
||||
(79, 2, 1),
|
||||
(80, 7, 1),
|
||||
(81, 3, 1),
|
||||
(82, 4, 1),
|
||||
(83, 4, 1),
|
||||
(84, 5, 1),
|
||||
(85, 7, 1),
|
||||
(86, 4, 1),
|
||||
(87, 1, 1),
|
||||
(88, 2, 1),
|
||||
(89, 4, 1),
|
||||
(90, 7, 1),
|
||||
(91, 7, 1),
|
||||
(92, 5, 1),
|
||||
(93, 5, 1),
|
||||
(94, 2, 1),
|
||||
(95, 1, 1),
|
||||
(96, 7, 1),
|
||||
(97, 7, 1),
|
||||
(98, 3, 1),
|
||||
(99, 1, 1),
|
||||
(100, 2, 1),
|
||||
(101, 3, 1),
|
||||
(102, 4, 1),
|
||||
(103, 7, 1),
|
||||
(104, 3, 1),
|
||||
(105, 2, 1),
|
||||
(106, 5, 1),
|
||||
(107, 1, 1),
|
||||
(108, 5, 1),
|
||||
(109, 3, 1),
|
||||
(110, 2, 1),
|
||||
(111, 4, 1),
|
||||
(112, 7, 1),
|
||||
(113, 7, 1),
|
||||
(114, 2, 1),
|
||||
(115, 4, 1),
|
||||
(116, 5, 1),
|
||||
(117, 7, 1),
|
||||
(118, 4, 1),
|
||||
(119, 1, 1),
|
||||
(120, 3, 1),
|
||||
(121, 3, 1),
|
||||
(122, 1, 1),
|
||||
(123, 2, 1),
|
||||
(124, 2, 1),
|
||||
(125, 2, 1),
|
||||
(126, 2, 1),
|
||||
(127, 2, 1),
|
||||
(128, 2, 1),
|
||||
(129, 4, 1),
|
||||
(130, 3, 1),
|
||||
(131, 3, 1),
|
||||
(132, 7, 1),
|
||||
(133, 7, 1),
|
||||
(134, 2, 1),
|
||||
(135, 3, 1),
|
||||
(136, 2, 1),
|
||||
(137, 1, 1),
|
||||
(138, 3, 1),
|
||||
(139, 7, 1),
|
||||
(140, 3, 1),
|
||||
(141, 5, 1),
|
||||
(142, 4, 1),
|
||||
(143, 2, 1),
|
||||
(144, 4, 1),
|
||||
(145, 5, 1),
|
||||
(146, 7, 1),
|
||||
(147, 3, 1),
|
||||
(148, 4, 1),
|
||||
(149, 3, 1),
|
||||
(150, 3, 1),
|
||||
(151, 7, 1),
|
||||
(152, 7, 1),
|
||||
(153, 3, 1),
|
||||
(154, 1, 1),
|
||||
(155, 1, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -163,7 +200,6 @@ INSERT INTO `association_utilisateur_groupe` (`id_utilisateur`, `id_groupe`) VAL
|
|||
-- Structure de la table `groupes`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `groupes`;
|
||||
CREATE TABLE IF NOT EXISTS `groupes` (
|
||||
`id_groupe` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`nom` varchar(20) NOT NULL,
|
||||
|
@ -184,11 +220,79 @@ INSERT INTO `groupes` (`id_groupe`, `nom`) VALUES
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `modules`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `modules` (
|
||||
`id_module` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`identifiant` varchar(5) NOT NULL,
|
||||
`nom` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id_module`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
|
||||
|
||||
--
|
||||
-- Contenu de la table `modules`
|
||||
--
|
||||
|
||||
INSERT INTO `modules` (`id_module`, `identifiant`, `nom`) VALUES
|
||||
(1, 'M1001', 'Module S1 numéro 1'),
|
||||
(2, 'M2001', 'Module S2 numéro 1'),
|
||||
(3, 'M3001', 'Module S3 numéro 1'),
|
||||
(4, 'M4001', 'Module S4 numéro 1'),
|
||||
(5, 'M1002', 'Module S1 numéro 2');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `semestre`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `semestre` (
|
||||
`id_semestre` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`nom` varchar(50) NOT NULL,
|
||||
`annee` year(4) NOT NULL,
|
||||
PRIMARY KEY (`id_semestre`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
|
||||
|
||||
--
|
||||
-- Contenu de la table `semestre`
|
||||
--
|
||||
|
||||
INSERT INTO `semestre` (`id_semestre`, `nom`, `annee`) VALUES
|
||||
(1, 'S1', 2015),
|
||||
(2, 'S2', 2015),
|
||||
(3, 'S3', 2015),
|
||||
(4, 'S4', 2015);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `ue`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ue` (
|
||||
`id_ue` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`nom` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id_ue`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
|
||||
|
||||
--
|
||||
-- Contenu de la table `ue`
|
||||
--
|
||||
|
||||
INSERT INTO `ue` (`id_ue`, `nom`) VALUES
|
||||
(1, 'UE1'),
|
||||
(2, 'UE2'),
|
||||
(3, 'UE3'),
|
||||
(4, 'UE4');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `utilisateurs`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `utilisateurs`;
|
||||
CREATE TABLE IF NOT EXISTS `utilisateurs` (
|
||||
`id_utilisateur` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pseudo` varchar(50) NOT NULL,
|
||||
|
@ -315,6 +419,14 @@ INSERT INTO `utilisateurs` (`id_utilisateur`, `pseudo`, `prenom`, `nom`, `email`
|
|||
-- Contraintes pour les tables exportées
|
||||
--
|
||||
|
||||
--
|
||||
-- Contraintes pour la table `association_module_semestre_ue`
|
||||
--
|
||||
ALTER TABLE `association_module_semestre_ue`
|
||||
ADD CONSTRAINT `association_module_semestre_ue-foreign_semestre` FOREIGN KEY (`id_semestre`) REFERENCES `semestre` (`id_semestre`),
|
||||
ADD CONSTRAINT `association_module_semestre_ue-foreign_module` FOREIGN KEY (`id_module`) REFERENCES `modules` (`id_module`),
|
||||
ADD CONSTRAINT `association_module_semestre_ue-foreign_ue` FOREIGN KEY (`id_ue`) REFERENCES `ue` (`id_ue`);
|
||||
|
||||
--
|
||||
-- Contraintes pour la table `association_utilisateur_groupe`
|
||||
--
|
||||
|
@ -324,4 +436,4 @@ ALTER TABLE `association_utilisateur_groupe`
|
|||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
Loading…
Reference in New Issue