[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Epnadmin-fr] CVS: epnadmin 6cartes.inc.php,1.1,1.2 basdepage.inc.php,1
From: |
Loïc Dayot |
Subject: |
[Epnadmin-fr] CVS: epnadmin 6cartes.inc.php,1.1,1.2 basdepage.inc.php,1.4,1.5 cartes.inc.php,1.2,1.3 configuration.php,1.3,1.4 constantes.inc.php,1.18,1.19 courriel.php,1.8,1.9 entete.inc.php,1.17,1.18 fonctions.inc.php,1.14,1.15 fr.lang.inc.php,1.2,1.3 initiations.php,1.6,1.7 siteweb.inc.php,1.7,1.8 structures.inc.php,1.3,1.4 table_horaire.php,1.10,1.11 table_horaire_session.php,1.14,1.15 themes.php,1.5,1.6 |
Date: |
Tue, 28 Jan 2003 18:13:48 -0500 |
Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv26513/epnadmin
Modified Files:
6cartes.inc.php basdepage.inc.php cartes.inc.php
configuration.php constantes.inc.php courriel.php
entete.inc.php fonctions.inc.php fr.lang.inc.php
initiations.php siteweb.inc.php structures.inc.php
table_horaire.php table_horaire_session.php themes.php
Log Message:
Suite de la modularisation.
Index: 6cartes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/6cartes.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** 6cartes.inc.php 5 Jan 2003 20:34:01 -0000 1.1
--- 6cartes.inc.php 28 Jan 2003 23:13:45 -0000 1.2
***************
*** 20,28 ****
http://epnadmin.pierrefitte93.fr/
! */
// Renommé de 6cartes.php en 6cartes.inc.php
require_once("header.inc.php"); // car confidentiel !
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
--- 20,34 ----
http://epnadmin.pierrefitte93.fr/
! */
// Renommé de 6cartes.php en 6cartes.inc.php
require_once("header.inc.php"); // car confidentiel !
+ if (!defined("FCT_USAGERS"))
+ {
+ echo $fctnonactive;
+ exit;
+ }
+
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 53,55 ****
//require("footer.inc.php");
! ?>
\ No newline at end of file
--- 59,61 ----
//require("footer.inc.php");
! ?>
Index: basdepage.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/basdepage.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** basdepage.inc.php 5 Jan 2003 20:34:01 -0000 1.4
--- basdepage.inc.php 28 Jan 2003 23:13:45 -0000 1.5
***************
*** 3,7 ****
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! EPNadmin - Version 0.1
This program is free software; you can redistribute it and/or modify
--- 3,7 ----
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! EPNadmin - Version 0.6
This program is free software; you can redistribute it and/or modify
***************
*** 43,45 ****
Adresse de ce site : <? echo "http://".$SERVER_NAME.$PHP_SELF; ?> -
<i>Dernière mise à jour : <? if ($datemaj) echo "$datemaj"; else echo
"inconnue"; ?>
! </i></p>
\ No newline at end of file
--- 43,45 ----
Adresse de ce site : <? echo "http://".$SERVER_NAME.$PHP_SELF; ?> -
<i>Dernière mise à jour : <? if ($datemaj) echo "$datemaj"; else echo
"inconnue"; ?>
! </i></p>
Index: cartes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/cartes.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** cartes.inc.php 5 Jan 2003 20:34:01 -0000 1.2
--- cartes.inc.php 28 Jan 2003 23:13:45 -0000 1.3
***************
*** 22,26 ****
*/
! require_once("header.inc.php");
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
--- 22,32 ----
*/
! require_once("header.inc.php");
! if (!defined("FCT_USAGERS"))
! {
! echo $fctnonactive;
! exit;
! }
!
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 36,40 ****
//require_once("parcours.inc.php"); // concernant les parcours
des usagers et leur positionnement
! if($isadmin)
{
header ("Content-type: image/png");
--- 42,46 ----
//require_once("parcours.inc.php"); // concernant les parcours
des usagers et leur positionnement
! if (USAGERS_AUTRES>="w")
{
header ("Content-type: image/png");
***************
*** 102,104 ****
}
//require("footer.inc.php");
! ?>
\ No newline at end of file
--- 108,110 ----
}
//require("footer.inc.php");
! ?>
Index: configuration.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/configuration.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** configuration.php 26 Jan 2003 23:09:59 -0000 1.3
--- configuration.php 28 Jan 2003 23:13:45 -0000 1.4
***************
*** 325,329 ****
// Retrouver la fonctionnalité rendue active
$req4="SELECT * FROM fonctions WHERE id='$suivante'";
! debug($req4);
$res4=executeRequete($req4);
$fctajoutee=mysql_fetch_object($res4);
--- 325,329 ----
// Retrouver la fonctionnalité rendue active
$req4="SELECT * FROM fonctions WHERE id='$suivante'";
! //debug($req4);
$res4=executeRequete($req4);
$fctajoutee=mysql_fetch_object($res4);
Index: constantes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/constantes.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** constantes.inc.php 26 Jan 2003 23:09:59 -0000 1.18
--- constantes.inc.php 28 Jan 2003 23:13:45 -0000 1.19
***************
*** 67,71 ****
// et des domaines de
courriels
// utilisé dans courriel.(inc.)php et siteweb.(inc.)php
! $ip_serveur="192.168.0.253"; // sert dans courriel.inc.php
// constantes
--- 67,71 ----
// et des domaines de
courriels
// utilisé dans courriel.(inc.)php et siteweb.(inc.)php
! $ip_serveur="127.0.0.1"; // sert dans courriel.inc.php
// constantes
Index: courriel.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/courriel.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** courriel.php 5 Jan 2003 20:34:01 -0000 1.8
--- courriel.php 28 Jan 2003 23:13:45 -0000 1.9
***************
*** 23,26 ****
--- 23,32 ----
require_once("header.inc.php"); // C'est dans header.inc.php que sont
retrouvés les droits issus de la table droits
+ if (!defined("FCT_COURRIELS"))
+ {
+ echo $fctnonactive;
+ exit;
+ }
+
require_once("constantes.inc.php"); // définition des constantes
require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 45,49 ****
$titr = "Gestion de compte de courriel";
! $datemaj="05 janvier 2003";
require("entete.inc.php");
--- 51,55 ----
$titr = "Gestion de compte de courriel";
! $datemaj="27 janvier 2003";
require("entete.inc.php");
***************
*** 53,58 ****
function form_sousdomaine($operation, $id_sousdomaine=0, $id_domaine=1)
{
! global $isadmin, $id_structure, $id_usager, $PHP_SELF;
! echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
<tr><th align=center>";
switch ($operation)
--- 59,64 ----
function form_sousdomaine($operation, $id_sousdomaine=0, $id_domaine=1)
{
! global $is_ident, $id_structure, $id_usager, $PHP_SELF;
! echo "<table align=center bgColor=\"".COULEUR_COURRIELS."\">
<tr><th align=center>";
switch ($operation)
***************
*** 105,114 ****
{
case 10 : // Liste de tous les sous-domaines de courriels
! if ($isadmin!="super")
{
! echo "<p>Le chemin des enfers n'est pas par là, Orphée...</p>\n";
break;
}
! echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
<tr><th align=center colspan=2>Liste des sous-domaines de courriels
hébergés localement</th></tr>
<tr><td>\n<table border=1>
--- 111,120 ----
{
case 10 : // Liste de tous les sous-domaines de courriels
! if (COURRIELS_AUTRES<"r")
{
! echo $pasledroit;
break;
}
! echo "<table align=center bgColor=\"".COULEUR_COURRIELS."\">
<tr><th align=center colspan=2>Liste des sous-domaines de courriels
hébergés localement</th></tr>
<tr><td>\n<table border=1>
***************
*** 120,138 ****
while ($sousdomaine=mysql_fetch_object($res))
{
! if ( $sousdomaine->id_structure!=$idstranc
! || $sousdomaine->id_usager!=$idusaanc)
{
if ($coul=="#80FF80")
! $coul=COULEUR_COURRIEL;
else
$coul="#80FF80";
$idstranc=$sousdomaine->id_structure;
- $idusaanc=$sousdomaine->id_usager;
}
echo "<tr><td bgcolor=\"$coul\">";
! if ($sousdomaine->id_structure)
! echo structure($sousdomaine->id_structure);
! else
! echo usager($sousdomaine->id_usager);
echo "</td><td>";
if ($sousdomaine->type=="courriel")
--- 126,139 ----
while ($sousdomaine=mysql_fetch_object($res))
{
! if ($sousdomaine->id_structure!=$idstranc)
{
if ($coul=="#80FF80")
! $coul=COULEUR_COURRIELS;
else
$coul="#80FF80";
$idstranc=$sousdomaine->id_structure;
}
echo "<tr><td bgcolor=\"$coul\">";
! echo structure($sousdomaine->id_structure);
echo "</td><td>";
if ($sousdomaine->type=="courriel")
***************
*** 142,172 ****
if ($sousdomaine->type=="aliascourriel")
echo " -> $sousdomaine->login";
! echo "</td><td><a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=";
! if ($sousdomaine->id_structure) echo "50"; else echo "51";
! echo "\">$info paramètres</a> ";
! /*if ($sousdomaine->id_structure) // pas encore pret
! echo "<br><a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=40\">$modifier
changer mot-de-passe</a>"; */
! if ($isadmin)
! {
! echo "<br><a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=";
! if ($sousdomaine->id_structure) echo "30"; else echo "31";
! echo "\">$supprimer supprimer</a>";
! }
echo "</td></tr>\n";
}
echo "</table>\n</td></tr></table>\n";
! echo "<p><a href=\"$PHP_SELF?operation=20\">Créer un nouveau sous-domaine
de courriels</a></p>\n";
! echo "<p><a href=\"$PHP_SELF?operation=22\">Créer un nouvel alias
sous-domaine de courriels</a></p>\n";
break;
case 11 : // Liste des domaines de courriels
! if (!$id_structure && !$id_usager)
{
! echo "<p>La sortie n'est pas par là...</p>\n";
break;
}
! if (!$isadmin || !$id_stru) $id_stru=$id_structure;
! echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
<tr><th align=center colspan=2>Liste des ";
echo "sous-domaine de courriels gérés par ".structure($id_stru);
--- 143,173 ----
if ($sousdomaine->type=="aliascourriel")
echo " -> $sousdomaine->login";
! echo "</td><td>";
! if (($sousdomaine->id_structure==$id_structure && COURRIELS_MOI>="r") ||
COURRIELS_AUTRES>="r")
! echo "<a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=50\">$info
paramètres</a> "; //"
! if (($sousdomaine->id_structure==$id_structure && COURRIELS_MOI>="w") ||
COURRIELS_AUTRES>="w")
! echo " - <a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=40\">$modifier
changer mot-de-passe</a>";
! if (COURRIELS_AUTRES>="w")
! echo " - <a
href=\"$PHP_SELF?id_sousdomaine=$sousdomaine->id&operation=30\">$supprimer
supprimer</a>";
echo "</td></tr>\n";
}
echo "</table>\n</td></tr></table>\n";
! /* Reporté en bas de page...
! if (($sousdomaine->id_structure==$id_structure && COURRIELS_MOI>="w") ||
COURRIELS_AUTRES>="w")
! {
! echo "<p><a href=\"$PHP_SELF?operation=20\">Créer un nouveau sous-domaine
de courriels</a></p>\n";
! echo "<p><a href=\"$PHP_SELF?operation=22\">Créer un nouvel alias
sous-domaine de courriels</a></p>\n";
! } */
break;
case 11 : // Liste des domaines de courriels
! if (COURRIELS<="~")
{
! echo $pasledroit;
break;
}
! if (COURRIELS_AUTRES>="r" || !$id_stru) $id_stru=$id_structure;
! echo "<table align=center bgColor=\"".COULEUR_COURRIELS."\">
<tr><th align=center colspan=2>Liste des ";
echo "sous-domaine de courriels gérés par ".structure($id_stru);
***************
*** 187,215 ****
if ($sousdomaine->type=="aliascourriel")
echo " -> $sousdomaine->login";
! echo "</td><td>
! <a href=\"$PHP_SELF?operation=";
! if ($sousdomaine->id_structure) echo "50"; else echo "51";
! echo "&id_sousdomaine=$sousdomaine->id\">$info paramètres</a> ";
! if ($sousdomaine->id_structure && $sousdomaine->type!="aliascourriel")
! echo " - <a
href=\"$PHP_SELF?operation=40&id_sousdomaine=$sousdomaine->id\">$modifier
changer mot-de-passe</a>";
! echo " - <a href=\"$PHP_SELF?operation=";
! if ($sousdomaine->id_structure) echo "30"; else echo "31";
! echo "&id_sousdomaine=$sousdomaine->id\">$supprimer
supprimer</a></td></tr>\n";
}
echo "</table>\n</td></tr></table>\n";
! echo "<p><a href=\"$PHP_SELF?operation=20\">Créer un nouveau sous-domaine
de courriels</a></p>\n";
! echo "<p><a href=\"$PHP_SELF?operation=22\">Créer un nouvel alias
sous-domaine de courriels</a></p>\n";
break;
case 20 : // Créer un nouveau domaine courriel
! form_sousdomaine(201);
break;
case 22 : // Créer un alias de domaine courriel
! form_sousdomaine(221);
break;
case 201 : // Après saisie d'un nouveau domaine courriel
// Vérification des informations
$mes="";
--- 188,231 ----
if ($sousdomaine->type=="aliascourriel")
echo " -> $sousdomaine->login";
! echo "</td><td>";
! if (($sousdomaine->id_structure==$id_structure && COURRIELS_MOI>="r") ||
COURRIELS_AUTRES>="r")
! echo "<a
href=\"$PHP_SELF?operation=50&id_sousdomaine=$sousdomaine->id\">$info
paramètres</a> ";
! if (COURRIELS_MOI>="w" || COURRIELS_AUTRES>="w")
! {
! if ($sousdomaine->id_structure && $sousdomaine->type!="aliascourriel")
! echo " - <a
href=\"$PHP_SELF?operation=40&id_sousdomaine=$sousdomaine->id\">$modifier
changer mot-de-passe</a>";
! echo " - <a
href=\"$PHP_SELF?operation=30&id_sousdomaine=$sousdomaine->id\">$supprimer
supprimer</a></td></tr>\n";
! }
}
echo "</table>\n</td></tr></table>\n";
! /* Reporté en bas de page
! if (($sousdomaine->id_structure==$id_structure && COURRIELS_MOI>="w") ||
COURRIELS_AUTRES>="w")
! {
! echo "<p><a href=\"$PHP_SELF?operation=20\">Créer un nouveau sous-domaine
de courriels</a></p>\n";
! echo "<p><a href=\"$PHP_SELF?operation=22\">Créer un nouvel alias
sous-domaine de courriels</a></p>\n";
! } */
break;
case 20 : // Créer un nouveau domaine courriel
! if (COURRIELS_MOI>="w" || COURRIELS_AUTRES>="w")
! form_sousdomaine(201);
! else
! echo $pasledroit;
break;
case 22 : // Créer un alias de domaine courriel
! if (COURRIELS_MOI>="w" || COURRIELS_AUTRES>="w")
! form_sousdomaine(221);
! else
! echo $pasledroit;
break;
case 201 : // Après saisie d'un nouveau domaine courriel
+ if ((COURRIELS_MOI<"w" || $id_stru!=$id_structure) && COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
// Vérification des informations
$mes="";
***************
*** 262,265 ****
--- 278,286 ----
case 221 : // Après saisie d'un nouvel alias de site web
+ if ((COURRIELS_MOI<"w" || $id_stru!=$id_structure) && COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
// Vérification des informations
$mes="";
***************
*** 306,310 ****
if (!$id_structure)
{
! echo "<p>Encore par monts et par vaux...</p>\n";
break;
}
--- 327,331 ----
if (!$id_structure)
{
! echo $pasledroit;
break;
}
***************
*** 316,320 ****
break;
}
! echo "<table align=center bgColor=\"".COULEUR_COURRIEL."\">
<tr><th align=center>Paramètre pour le sous-domaine de courriel :
$sousdomaine->sousdomaine</th></tr>
<tr><td><table border=1>";
--- 337,346 ----
break;
}
! if ((COURRIELS_MOI<"w" || $sousdomaine->id_structure!=$id_structure) &&
COURRIELS_AUTRES<"w")
! {
! echo $pasledroit;
! break;
! }
! echo "<table align=center bgColor=\"".COULEUR_COURRIELS."\">
<tr><th align=center>Paramètre pour le sous-domaine de courriel :
$sousdomaine->sousdomaine</th></tr>
<tr><td><table border=1>";
***************
*** 356,361 ****
break;
}
! if ($isadmin=='super')
{
$req = "DELETE FROM hebergements WHERE id=$id_sousdomaine";
--- 382,392 ----
break;
}
+ if ((COURRIELS_MOI<"w" || $sousdomaine->id_structure!=$id_structure) &&
COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
! if (COURRIELS_AUTRES<"w")
{
$req = "DELETE FROM hebergements WHERE id=$id_sousdomaine";
***************
*** 383,387 ****
}
else
! echo "<p>Pas le droit, demande envoyée !</p>";
// Envoi d'un courriel pour demande la suppression du site
--- 414,419 ----
}
else
! echo "<p>Vous n'avez pas le droit de faire automatiquement cette
opération.
! Votre demande a été envoyée à l'administrateur !</p>";
// Envoi d'un courriel pour demande la suppression du site
***************
*** 392,395 ****
--- 424,428 ----
case 40 : // Changer de mot de passe pour un site (structure uniquement)
+ echo "<p>Pas encore implémenté</p>\n";
break;
***************
*** 407,410 ****
--- 440,448 ----
break;
}
+ if ((COURRIELS_MOI<"r" || $sousdomaine->id_structure!=$id_structure) &&
COURRIELS_AUTRES<"r")
+ {
+ echo $pasledroit;
+ break;
+ }
$res=recherche("domaines", "id", $sousdomaine->id_domaine);
$domaine=mysql_fetch_object($res);
***************
*** 417,421 ****
echo "<tr><td align=center>Domaine alias :
$alias->sousdomaine</td></tr>\n";
! echo "<tr><td><table border=1>";
echo "<tr><td>Structure gérante :</td>";
echo "<td>".structure($sousdomaine->id_structure);
--- 455,459 ----
echo "<tr><td align=center>Domaine alias :
$alias->sousdomaine</td></tr>\n";
! echo "<tr><td><table border=1 bgcolor=\"".COULEUR_COURRIELS."\">";
echo "<tr><td>Structure gérante :</td>";
echo "<td>".structure($sousdomaine->id_structure);
***************
*** 429,433 ****
<tr><td>Par le navigateur :</td>
<td><a
href=\"http://courriel.pierrefitte93.fr/admin\">http://courriel.pierrefitte93.fr/admin</a>
! </td></tr>";
echo "<tr><td>Identifiant :</td><td>$sousdomaine->login</td></tr>";
echo "<tr><td>Domaine :</td><td>$sousdomaine->sousdomaine</td></tr>\n";
--- 467,471 ----
<tr><td>Par le navigateur :</td>
<td><a
href=\"http://courriel.pierrefitte93.fr/admin\">http://courriel.pierrefitte93.fr/admin</a>
! </td></tr>"; //"
echo "<tr><td>Identifiant :</td><td>$sousdomaine->login</td></tr>";
echo "<tr><td>Domaine :</td><td>$sousdomaine->sousdomaine</td></tr>\n";
***************
*** 447,459 ****
case 60 : // Modifier le site par défaut
break;
case 70 : // Créer une adresse de courriel pour un usager
// choix de l'usager
! echo "<table align=center>
<tr><th align=center>Création de compte de courriel (1)</th></tr>
</table>\n";
! if ($isadmin)
{
if ($code_barre!="" & $id=="")
--- 485,503 ----
case 60 : // Modifier le site par défaut
+ echo "<p>Pas encore implémenté</p>\n";
break;
case 70 : // Créer une adresse de courriel pour un usager
+ if ((COURRIELS_MOI<"w" || $is_ident!="usager") && COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
// choix de l'usager
! echo "<table align=center border=1 bgcolor=\"".COULEUR_COURRIELS."\">
<tr><th align=center>Création de compte de courriel (1)</th></tr>
</table>\n";
! if (USAGERS_AUTRES>="r")
{
if ($code_barre!="" & $id=="")
***************
*** 464,472 ****
case 71 : // Créer une adresse de courriel pour un usager
// choix de l'adresse
$res=recherche("usagers", "id", $id_usager);
$usager=mysql_fetch_object($res);
$adresse=strtolower("$usager->prenom.$usager->nom");
! echo "<table align=center>
<tr><th align=center>Formulaire de création de compte de courriel
(2)</th></tr>
<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">";
--- 508,521 ----
case 71 : // Créer une adresse de courriel pour un usager
+ if ((COURRIELS_MOI<"w" || $is_ident!="usager") && COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
// choix de l'adresse
$res=recherche("usagers", "id", $id_usager);
$usager=mysql_fetch_object($res);
$adresse=strtolower("$usager->prenom.$usager->nom");
! echo "<table align=center border=1 bgcolor=\"".COULEUR_COURRIELS."\">
<tr><th align=center>Formulaire de création de compte de courriel
(2)</th></tr>
<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">";
***************
*** 500,506 ****
case 72 : // Créer une adresse de courriel
// Enregistrement de la demande et création réelle.
! if (!$isadmin)
{
! echo "<p>La création de compte de courriel n'est pas encore autorisée
pour les usagers.</p>\n";
break;
}
--- 549,555 ----
case 72 : // Créer une adresse de courriel
// Enregistrement de la demande et création réelle.
! if ((COURRIELS_MOI<"w" || $is_ident!="usager") && COURRIELS_AUTRES<"w")
{
! echo $pasledroit;
break;
}
***************
*** 536,542 ****
case 80 : // Créer une adresse de courriel sans qu'il y ait d'usager
// choix de l'adresse
$adresse="";
! echo "<table align=center>
<tr><th align=center>Formulaire de création de compte de courriel
(1)</th></tr>
<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">";
--- 585,596 ----
case 80 : // Créer une adresse de courriel sans qu'il y ait d'usager
+ if ((COURRIELS_MOI<"w" || $is_ident!="structure") && COURRIELS_AUTRES<"w")
+ {
+ echo $pasledroit;
+ break;
+ }
// choix de l'adresse
$adresse="";
! echo "<table align=center border=1 bgcolor=\"".COULEUR_COURRIELS."\">
<tr><th align=center>Formulaire de création de compte de courriel
(1)</th></tr>
<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">";
***************
*** 558,567 ****
case 82 : // Créer une adresse de courriel
! // Enregistrement de la demande et création réelle de compte de courriel
(sans usager).
! if (!$isadmin)
{
! echo "<p>La création de compte de courriel n'est pas encore autorisée
pour les usagers.</p>\n";
break;
}
$mes="";
if (!$mdp1 || !$mdp2 || $mdp1.$mdp2=="" || $mdp1!=$mdp2)
--- 612,621 ----
case 82 : // Créer une adresse de courriel
! if ((COURRIELS_MOI<"w" || $is_ident!="structure") && COURRIELS_AUTRES<"w")
{
! echo $pasledroit;
break;
}
+ // Enregistrement de la demande et création réelle de compte de courriel
(sans usager).
$mes="";
if (!$mdp1 || !$mdp2 || $mdp1.$mdp2=="" || $mdp1!=$mdp2)
***************
*** 571,577 ****
$res=recherche("hebergements", "id", $id_sousdomaine);
if(!$sousdomaine=mysql_fetch_object($res))
! $mes.="Le sous-domaine n'a pas été retrouvé.<br>";
! $domaine=$sousdomaine->sousdomaine;
! $courriel="address@hidden";
if ($mes!="")
{
--- 625,631 ----
$res=recherche("hebergements", "id", $id_sousdomaine);
if(!$sousdomaine=mysql_fetch_object($res))
! $mes.="Le sous-domaine n'a pas été retrouvé.<br>";
! if (COURRIELS_AUTRES<"w" && $sousdomaine->id_structure!=$id_structure)
! $mes.=$pasledroit;
if ($mes!="")
{
***************
*** 579,582 ****
--- 633,638 ----
break;
}
+ $domaine=$sousdomaine->sousdomaine;
+ $courriel="address@hidden";
$comm="sudo vadduser -q 5m $courriel $mdp1";
$retour=executecommande($comm);
***************
*** 590,597 ****
case 51 : // Afficher les paramètre courriel perso
default :
! if (!$id_structure)
{ // Il s'agit d'un usager individuel
$usager=trouveUsager($id_usager);
! echo "<table align=center bgcolor=\"".COULEUR_COURRIEL."\">
<tr><td colspan=2 align=center><h1 align=center>Mon adresse de
courriel</h1></td></tr>\n";
$trouve=false;
--- 646,653 ----
case 51 : // Afficher les paramètre courriel perso
default :
! if ($is_ident=="usager" && COURRIELS_MOI>="r")
{ // Il s'agit d'un usager individuel
$usager=trouveUsager($id_usager);
! echo "<table align=center bgcolor=\"".COULEUR_COURRIELS."\">
<tr><td colspan=2 align=center><h1 align=center>Mon adresse de
courriel</h1></td></tr>\n";
$trouve=false;
***************
*** 614,619 ****
--- 670,697 ----
echo "<p>Votre courriel n'est pas hébergé sur le serveur.</p>\n";
}
+
}
+ if ($is_ident=="usager" && COURRIELS_MOI>="r")
+ echo "<p><a href=\"$PHP_SELF?operation=51\">Afficher les paramètres de
mon courriel personnel</a></p>\n";
+
+ if (COURRIELS_AUTRES>="w" && USAGERS_AUTRES>="w")
+ echo "<p><a href=\"$PHP_SELF?operation=70\">Créer un compte de courriel à
un usager</a></p>\n";
+
+ if (COURRIELS_MOI>="w" || COURRIELS_AUTRES>="w")
+ echo "<p><a href=\"$PHP_SELF?operation=80\">Créer un compte de
courriel</a></p>\n";
+
+ if (COURRIELS>="~")
+ echo "<p><a href=\"$PHP_SELF?operation=11\">Afficher la liste mes
sous-domaines de courriel</a></p>\n";
+
+ if (COURRIELS_AUTRES>="r")
+ echo "<p><a href=\"$PHP_SELF?operation=10\">Afficher la liste de tous les
sous-domaines de courriel</a></p>\n";
+
+ if (COURRIELS_MOI>="w" || COURRIELS_AUTRES>="w")
+ {
+ echo "<p><a href=\"$PHP_SELF?operation=20\">Créer un nouveau sous-domaine
de courriel</a></p>\n";
+ echo "<p><a href=\"$PHP_SELF?operation=22\">Créer un nouvel alias pour un
sous-domaine de courriel</a></p>\n";
+ }
+
// Fin de la page
***************
*** 621,623 ****
echo "</body></html>";
require("footer.inc.php");
! ?>
\ No newline at end of file
--- 699,701 ----
echo "</body></html>";
require("footer.inc.php");
! ?>
Index: entete.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/entete.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** entete.inc.php 26 Jan 2003 23:09:59 -0000 1.17
--- entete.inc.php 28 Jan 2003 23:13:45 -0000 1.18
***************
*** 326,329 ****
--- 326,332 ----
{
echo "
+ <tr>
+ <td valign=\"top\" rowspan=\"1\" colspan=\"2\" height=\"5\"></td>
+ </tr>
<tr>
<td align=\"center\" valign=\"top\" rowspan=\"1\" colspan=\"2\"
bgcolor=\"$cfond\"><font color=\"$ctitre\"><b>
Index: fonctions.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fonctions.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** fonctions.inc.php 5 Jan 2003 20:34:01 -0000 1.14
--- fonctions.inc.php 28 Jan 2003 23:13:45 -0000 1.15
***************
*** 51,56 ****
function executecommande($cmd)
{
! global $isadmin, $EXECUTION_COMMANDES_BASH;
! if (!$isadmin) exit;
$resulat[0]="Commandes";
echo "<p><font size=\"-1\" color=\"#0000FF\" face=\"Courier New, Courier,
mono\">";
--- 51,56 ----
function executecommande($cmd)
{
! global $EXECUTION_COMMANDES_BASH;
! //if ($isadmin) return;
$resulat[0]="Commandes";
echo "<p><font size=\"-1\" color=\"#0000FF\" face=\"Courier New, Courier,
mono\">";
Index: fr.lang.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fr.lang.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** fr.lang.inc.php 26 Jan 2003 23:09:59 -0000 1.2
--- fr.lang.inc.php 28 Jan 2003 23:13:45 -0000 1.3
***************
*** 67,73 ****
// Toutes ou beaucoup
! $pasledroit="<p>Vous n'avez pas les autorisations suffisantes pour accéder à
ce service.
! Adressez-vous à votre administrateur si vous pensez que c'est
une erreur.</p>
<p><a href=\"/\">Retour</a></p>\n";
$fctnonactive="<p>La fonctionnalité gérée dans cette écran a été
désactivée.</p>
<p><a href=\"/\">Retour</a></p>\n";
--- 67,86 ----
// Toutes ou beaucoup
! srand((float) microtime()*1000000);
! $pasledroit="<p>";
! switch (rand())
! {
! case 0 : $pasledroit.="Encore fourvoyé(e), ce n'est pas un endroit pour toi...
! Demande à l'administrateur si tu n'est pas d'accord."; break;
! case 1 : $pasledroit.="La sortie n'est pas par là...
! Adressez-vous à votre administrateur si vous pensez que c'est
une erreur."; break;
! case 2 : $pasledroit.="Encore par monts et par vaux...
! Adressez-vous à votre administrateur si vous pensez que c'est
une erreur."; break;
! case 3 : $pasledroit.="Vous n'avez pas les autorisations suffisantes pour
accéder à ce service.
! Adressez-vous à votre administrateur si vous pensez que c'est
une erreur."; break;
! }
! $pasledroit.="</p>
<p><a href=\"/\">Retour</a></p>\n";
+
$fctnonactive="<p>La fonctionnalité gérée dans cette écran a été
désactivée.</p>
<p><a href=\"/\">Retour</a></p>\n";
Index: initiations.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/initiations.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** initiations.php 26 Jan 2003 23:09:59 -0000 1.6
--- initiations.php 28 Jan 2003 23:13:45 -0000 1.7
***************
*** 48,52 ****
$titr = $stitreinitiations;
! $datemaj="26 janvier 2003";
require("entete.inc.php");
--- 48,52 ----
$titr = $stitreinitiations;
! $datemaj="27 janvier 2003";
require("entete.inc.php");
***************
*** 55,59 ****
case 11 : // confirmation d'ajout ou mise à jour
case 21 :
! if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
{
echo $pasledroit;
--- 55,59 ----
case 11 : // confirmation d'ajout ou mise à jour
case 21 :
! if (PEDAGOGIE_AUTRES<"w")
{
echo $pasledroit;
***************
*** 127,131 ****
case 2 : // formulaire d'édition
// Saisie pour modification d'un enregistrement
! if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
{
echo $pasledroit;
--- 127,131 ----
case 2 : // formulaire d'édition
// Saisie pour modification d'un enregistrement
! if (PEDAGOGIE_AUTRES<"w")
{
echo $pasledroit;
***************
*** 139,143 ****
case 1 : // formulaire d'ajout
// Début du fomulaire de saisie d'enregistrement d'initiation
! if (!defined("INITIATIONS") || INITIATIONS<"20")
{
echo $pasledroit;
--- 139,143 ----
case 1 : // formulaire d'ajout
// Début du fomulaire de saisie d'enregistrement d'initiation
! if (PEDAGOGIE_AUTRES<"w" && PEDAGOGIE_MOI<"w")
{
echo $pasledroit;
***************
*** 298,302 ****
case 3 : // formulaire de suppression
! if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
{
echo $pasledroit;
--- 298,302 ----
case 3 : // formulaire de suppression
! if (PEDAGOGIE_AUTRES<"w")
{
echo $pasledroit;
***************
*** 311,315 ****
case 31 : // confirmation de suppression
! if (!defined("PEDAGOGIE") || PEDAGOGIE<"40")
{
echo $pasledroit;
--- 311,315 ----
case 31 : // confirmation de suppression
! if (PEDAGOGIE_AUTRES<"w")
{
echo $pasledroit;
***************
*** 323,327 ****
case 5 :
// Affichage de la liste des initiations
! if (defined("PEDAGOGIE") && PEDAGOGIE>="10")
{
echo "<table>\n";
--- 323,327 ----
case 5 :
// Affichage de la liste des initiations
! if (PEDAGOGIE>"~")
{
echo "<table>\n";
***************
*** 345,354 ****
echo "<td width=80 nowrap>$initiation->niveau</td>\n";
echo "<td><b>$initiation->initiation</b></td>\n";
! echo "<td width=21><a
href=\"initiations.php?id_initiation=$initiation->id&$idu\">$info</a></td>\n";
! if (PEDAGOGIE>="20")
! echo "<td width=21><a
href=\"initiations.php?operation=2&id_initiation=$initiation->id&$idu\">$modifier</a></td>\n";
! if (PEDAGOGIE>="40")
! echo "<td width=21><a
href=\"initiations.php?operation=3&id_initiation=$initiation->id&$idu\">$supprimer</a></td>\n";
! echo "<td width=21><a
href=\"questions.php?id_initiation=$initiation->id&$idu\">$sQuestions</a></td>\n";
$aucun=false;
echo "</tr>\n";
--- 345,354 ----
echo "<td width=80 nowrap>$initiation->niveau</td>\n";
echo "<td><b>$initiation->initiation</b></td>\n";
! echo "<td width=21><a
href=\"initiations.php?id_initiation=$initiation->id\">$info</a></td>\n";
! if (PEDAGOGIE_AUTRES>="w")
! echo "<td width=21><a
href=\"initiations.php?operation=2&id_initiation=$initiation->id\">$modifier</a></td>\n";
! if (PEDAGOGIE_AUTRES>="w")
! echo "<td width=21><a
href=\"initiations.php?operation=3&id_initiation=$initiation->id\">$supprimer</a></td>\n";
! echo "<td width=21><a
href=\"questions.php?id_initiation=$initiation->id\">$sQuestions</a></td>\n";
$aucun=false;
echo "</tr>\n";
***************
*** 365,373 ****
default : // affichage détails
! if ($id_initiation)
{
afficheInitiation($id_initiation);
echo "<table align=center border=1><tr>\n";
! if (defined("PEDAGOGIE") && PEDAGOGIE>="40")
echo "<td width=21><a
href=\"initiations.php?operation=2&id_initiation=$id_initiation\">$modifier</a></td>
<td width=21><a
href=\"initiations.php?operation=3&id_initiation=$id_initiation\">$supprimer</a></td>\n";
--- 365,373 ----
default : // affichage détails
! if ($id_initiation && PEDAGOGIE>"~")
{
afficheInitiation($id_initiation);
echo "<table align=center border=1><tr>\n";
! if (PEDAGOGIE_AUTRES>="w")
echo "<td width=21><a
href=\"initiations.php?operation=2&id_initiation=$id_initiation\">$modifier</a></td>
<td width=21><a
href=\"initiations.php?operation=3&id_initiation=$id_initiation\">$supprimer</a></td>\n";
***************
*** 381,389 ****
} // switch
! if (defined("PEDAGOGIE"))
{
! if (PEDAGOGIE>"10")
echo "<p><a href=\"initiations.php?operation=1\">$sajoutinit</a>.</p>\n";
! if (PEDAGOGIE>"00")
echo "<p><a
href=\"initiations.php?operation=5\">$svoirlisteinit</a>.</p>\n";
}
--- 381,389 ----
} // switch
! if (PEDAGOGIE>"~")
{
! if (PEDAGOGIE_MOI>="w" || PEDAGOGIE_AUTRES>="w")
echo "<p><a href=\"initiations.php?operation=1\">$sajoutinit</a>.</p>\n";
! if (PEDAGOGIE>"~")
echo "<p><a
href=\"initiations.php?operation=5\">$svoirlisteinit</a>.</p>\n";
}
Index: siteweb.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/siteweb.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** siteweb.inc.php 5 Jan 2003 20:34:01 -0000 1.7
--- siteweb.inc.php 28 Jan 2003 23:13:45 -0000 1.8
***************
*** 87,95 ****
function choix_sousdomaine($id_sousdomaine, $champ="id_sousdomaine",
$type="siteweb")
{
! global $isadmin, $id_structure;
echo "<select name=\"$champ\"><option>\n";
$req="SELECT * FROM hebergements
WHERE type=\"$type\"";
! if ($isadmin!='super')
$req.=" AND id_structure=$id_structure";
$req.=" ORDER BY id_structure, sousdomaine";
--- 87,95 ----
function choix_sousdomaine($id_sousdomaine, $champ="id_sousdomaine",
$type="siteweb")
{
! global $id_structure;
echo "<select name=\"$champ\"><option>\n";
$req="SELECT * FROM hebergements
WHERE type=\"$type\"";
! if (COURRIELS_AUTRES<"w" && SITES_AUTRES<"w")
$req.=" AND id_structure=$id_structure";
$req.=" ORDER BY id_structure, sousdomaine";
***************
*** 124,126 ****
}
! ?>
\ No newline at end of file
--- 124,126 ----
}
! ?>
Index: structures.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/structures.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** structures.inc.php 5 Jan 2003 20:34:01 -0000 1.3
--- structures.inc.php 28 Jan 2003 23:13:45 -0000 1.4
***************
*** 77,85 ****
echo "<td><select name=\"lieuv\">\n";
echo "<option value=\"*\">n'importe où</option>\n";
! $req="SELECT * FROM localisations
LEFT JOIN structures ON localisations.id_structure=structures.id
ORDER BY structures.ville, structures.structure";
$res = executeRequete($req);
! $ville_prec=$struct_prec="";
while ($lieux = mysql_fetch_object($res))
--- 77,85 ----
echo "<td><select name=\"lieuv\">\n";
echo "<option value=\"*\">n'importe où</option>\n";
! $req="SELECT *, localisations.id AS id_localisation FROM localisations
LEFT JOIN structures ON localisations.id_structure=structures.id
ORDER BY structures.ville, structures.structure";
$res = executeRequete($req);
! $ville_prec=$struct_prec=$local_prec="";
while ($lieux = mysql_fetch_object($res))
***************
*** 101,104 ****
--- 101,112 ----
$struct_prec=$lieux->id_structure;
+ if ($local_prec != $lieux->id_localisation)
+ {
+ echo "<option value=\"L$lieux->id_localisation\"";
+ if ($structure == "L".$lieux->id_localisation) echo " selected";
+ echo ">$lieux->ville : $lieux->structure : $lieux->salle </option>";
+ }
+ $local_prec=$lieux->id_localisation;
+
//debug("$lieux->id_localisation");
}
***************
*** 128,130 ****
}
! ?>
\ No newline at end of file
--- 136,138 ----
}
! ?>
Index: table_horaire.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** table_horaire.php 5 Jan 2003 20:34:01 -0000 1.10
--- table_horaire.php 28 Jan 2003 23:13:45 -0000 1.11
***************
*** 22,26 ****
*/
! require_once("header.inc.php");
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
--- 22,32 ----
*/
! require_once("header.inc.php");
! if (!defined("FCT_UTILISATIONS"))
! {
! echo $fctnonactive;
! exit;
! }
!
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 43,47 ****
<?
$titr = "Gestion du planning de l'utilisation des postes";
! $datemaj="5 janvier 2003";
require("entete.inc.php");
--- 49,53 ----
<?
$titr = "Gestion du planning de l'utilisation des postes";
! $datemaj="27 janvier 2003";
require("entete.inc.php");
***************
*** 49,53 ****
function AfficheDisponibilitésPostes($lieuv, $datev, $usagev, $combienv,
$sens, $operation)
{
! global $idu, $id_usager,$isadmin, $info, $programmer, $deprogrammer,
$unitehoraire;
--- 55,59 ----
function AfficheDisponibilitésPostes($lieuv, $datev, $usagev, $combienv,
$sens, $operation)
{
! global $is_ident, $id_usager, $id_structure, $info, $programmer,
$deprogrammer,
$unitehoraire;
***************
*** 56,66 ****
structures.structure AS structure,
localisations.salle AS salle,
! localisations.id AS id_localisation
FROM localisations
LEFT JOIN structures ON structures.id=localisations.id_structure
LEFT JOIN calendrier ON
calendrier.id_localisation=localisations.id
WHERE ((\"$lieuv\"=\"*\") OR
! (CONCAT(\"V\",structures.ville)=\"$lieuv\") OR
! (CONCAT(\"S\",localisations.id_structure)=\"$lieuv\"))
AND (calendrier.date=\"$datev\")
AND (ouverture=\"accès individuels\")
--- 62,74 ----
structures.structure AS structure,
localisations.salle AS salle,
! localisations.id AS id_localisation,
! structures.id AS id_structure
FROM localisations
LEFT JOIN structures ON structures.id=localisations.id_structure
LEFT JOIN calendrier ON
calendrier.id_localisation=localisations.id
WHERE ((\"$lieuv\"=\"*\") OR
! (CONCAT(\"V\",ville)=\"$lieuv\") OR
! (CONCAT(\"S\",id_structure)=\"$lieuv\") OR
! (CONCAT(\"L\",id_localisation)=\"$lieuv\"))
AND (calendrier.date=\"$datev\")
AND (ouverture=\"accès individuels\")
***************
*** 72,75 ****
--- 80,87 ----
while ($reponse = mysql_fetch_object($res))
{ // Il y a sans doute des accès individuels possibles.
+ // Regardons si c'est chez nous
+ if (($reponse->id_structure==$id_structure && UTILISATIONS_MOI>="r")
+ || UTILISATIONS_AUTRES>="r" || $is_ident!="structure")
+ {
$unlieu=true;
echo "<hr>\n";
***************
*** 117,128 ****
$tableau[$i][$j]["contenu"]= date("H", strtotime($heure))."h";
$j++;
- /* for ($o=$nbcolparheure; $o>1; $o--)
- {
- $tableau[$i][$j]["contenu"]= "*";
- $j++;
- } */
- /*echo "<td colspan=\"".$nbcolparheure."\">";
- echo date("H", strtotime($heure))."h";
- echo "</td>\n";*/
}
$i++; $j=0;
--- 129,132 ----
***************
*** 143,148 ****
{
$unposte=true;
! $tableau[$i][$j]["contenu"]="<a
href=\"materiels.php?id_materiel=$poste->id\">$poste->materiel</a>
($poste->specificite)";
! //echo "<tr><td><a
href=\"materiels.php?id_materiel=$poste->id\">$poste->materiel</a>
($poste->specificite)</td>";
$j++;
// Il va falloir construire la ligne des horaires en tenant compte des
horaires et des réservations
--- 147,155 ----
{
$unposte=true;
! if (PARC_AUTRES>="r")
! $tableau[$i][$j]["contenu"]="<a
href=\"materiels.php?id_materiel=$poste->id\">$poste->materiel</a>
($poste->specificite)";
! else
! $tableau[$i][$j]["contenu"]="$poste->materiel ($poste->specificite)";
!
$j++;
// Il va falloir construire la ligne des horaires en tenant compte des
horaires et des réservations
***************
*** 176,191 ****
{ // pas de réservation
// On regarde s'il est encore temps
! // debug (strtotime($datev." ".$heure)." <>
".strtotime(date("Y-m-d H:i:00", strtotime("+ 1 hour"))));
! if (strtotime($datev." ".$heure) >= strtotime("+ 1 hour") ||
$isadmin)
{
! $tableau[$i][$j]["contenu"]="<a
href=\"reservations.php?operation=3&id_materiel=$poste->id&datev=$datev&debutv=$heure&usagev=$usagev\">
$programmer</a>";
! $tableau[$i][$j]["param"]="
bgColor=\"".COULEUR_ACCES_INDIVIDUEL."\"";
! /*echo "<td><a
href=\"reservations.php?operation=3&id_materiel=$poste->id&datev=$datev&debutv=$heure&usagev=$usagev\">
! $programmer</a></td>\n";*/
}
else
$tableau[$i][$j]["param"]=" bgcolor=\"#B3B3B3\"";
- //echo "<td bgcolor=\"#B3B3B3\"></td>\n";
$j++;
$heure=date("H:i:00", strtotime("+".$unitehoraire." minutes",
strtotime($heure)));
--- 183,197 ----
{ // pas de réservation
// On regarde s'il est encore temps
! if (strtotime($datev." ".$heure) >= strtotime("+ 1 hour") ||
($is_structure && UTILISATIONS>"~"))
{
! if (UTILISATIONS_AUTRES>="w" || UTILISATIONS_MOI>="w")
! $tableau[$i][$j]["contenu"]="<a
href=\"reservations.php?operation=3&id_materiel=$poste->id&datev=$datev&debutv=$heure&usagev=$usagev\">
$programmer</a>";
! else
! $tableau[$i][$j]["contenu"]="libre";
! $tableau[$i][$j]["param"]=" align=center valign=middle
bgColor=\"".COULEUR_UTILISATIONS."\"";
}
else
$tableau[$i][$j]["param"]=" bgcolor=\"#B3B3B3\"";
$j++;
$heure=date("H:i:00", strtotime("+".$unitehoraire." minutes",
strtotime($heure)));
***************
*** 196,202 ****
+
(date("i",strtotime($reservation->fin))-date("i",strtotime($reservation->debut)));
$nbuniteres = $nbminres / $unitehoraire;
! $tableau[$i][$j]["param"]=" colspan=$nbuniteres align=center
bgcolor=\"#B3B3B3\"";
// est-on admin ?
! if ($isadmin)
{ // oui, on est administrateur
$usager=trouveusager($reservation->id_usager);
--- 202,208 ----
+
(date("i",strtotime($reservation->fin))-date("i",strtotime($reservation->debut)));
$nbuniteres = $nbminres / $unitehoraire;
! $tableau[$i][$j]["param"]=" colspan=$nbuniteres align=center
valign=middle bgcolor=\"#B3B3B3\"";
// est-on admin ?
! if (UTILISATIONS_AUTRES>="r")
{ // oui, on est administrateur
$usager=trouveusager($reservation->id_usager);
***************
*** 204,209 ****
if ($usager->credit_acces_individuel<="01:00:00")
$tableau[$i][$j]["contenu"].="<table><tr><td
bgcolor=\"".couleurtarif($usager->tarif)."\">";
! $tableau[$i][$j]["contenu"].="<a
href=\"usagers.php?id_usager=$usager->id\">
$usager->prenom $usager->nom</a>";
if ($usager->credit_acces_individuel<="01:00:00")
$tableau[$i][$j]["contenu"].="</td></tr></table>";
--- 210,220 ----
if ($usager->credit_acces_individuel<="01:00:00")
$tableau[$i][$j]["contenu"].="<table><tr><td
bgcolor=\"".couleurtarif($usager->tarif)."\">";
!
! if (USAGERS_AUTRES>="r")
! $tableau[$i][$j]["contenu"].="<a
href=\"usagers.php?id_usager=$usager->id\">
$usager->prenom $usager->nom</a>";
+ else
+ $tableau[$i][$j]["contenu"].="usager";
+
if ($usager->credit_acces_individuel<="01:00:00")
$tableau[$i][$j]["contenu"].="</td></tr></table>";
***************
*** 213,224 ****
$tableau[$i][$j]["contenu"]=" (avec ";
$usager=trouveUsager($reservation->id_usager2);
! $tableau[$i][$j]["contenu"].="<a
href=\"usagers.php?operation=5&id_usager=$usager->id\">$usager->prenom
$usager->nom</a>)";
}
- /*else
- $tableau[$i][$j]["contenu"].=" (seul)"; */
$usage=trouveUsage($reservation->id_usage);
$tableau[$i][$j]["contenu"].=" ($usage->nom)";
! $tableau[$i][$j]["contenu"].=" <a
href=\"reservations.php?id_utilisation=$reservation->id\">$info</a>";
! } //
reservations.php?operation=3&id_materiel=$poste->id&datev=$datev&debutv=$heure&usagev=$usagev
else
if ($reservation->id_usager==$id_usager) // Il faut regarder
qui est l'usager
--- 224,240 ----
$tableau[$i][$j]["contenu"]=" (avec ";
$usager=trouveUsager($reservation->id_usager2);
!
! if (USAGERS_AUTRES>="r")
! $tableau[$i][$j]["contenu"].="<a
href=\"usagers.php?operation=5&id_usager=$usager->id\">$usager->prenom
$usager->nom</a>)";
! else
! $tableau[$i][$j]["contenu"].="usager)";
}
$usage=trouveUsage($reservation->id_usage);
$tableau[$i][$j]["contenu"].=" ($usage->nom)";
! if (UTILISATIONS_AUTRES>="r")
! $tableau[$i][$j]["contenu"].=" <a
href=\"reservations.php?id_utilisation=$reservation->id\">$info</a>";
! if (UTILISATIONS_AUTRES>="w")
! $tableau[$i][$j]["contenu"].=" <a
href=\"reservations.php?operation=2&id_utilisation=$reservation->id\">$deprogrammer</a>";
! }
else
if ($reservation->id_usager==$id_usager) // Il faut regarder
qui est l'usager
***************
*** 235,249 ****
$usage=trouveUsage($reservation->id_usage);
$tableau[$i][$j]["contenu"].=" pour $usage->nom";
! $tableau[$i][$j]["contenu"].=" <a
href=\"reservations.php?operation=2&id_utilisation=$reservation->id\">$deprogrammer</a>";
}
else
$tableau[$i][$j]["contenu"]="réservé";
$j++;
- /*for ($o=$nbuniteres; $o>1; $o--)
- {
- $tableau[$i][$j]["contenu"]= "*";
- $j++;
- } */
- //echo "<td colspan=$nbuniteres align=center
bgcolor=\"#B3B3B3\">réservé</td>\n";
$heure=date("H:i:00", strtotime("+".$nbminres." minutes",
strtotime($heure)));
}
--- 251,260 ----
$usage=trouveUsage($reservation->id_usage);
$tableau[$i][$j]["contenu"].=" pour $usage->nom";
! if (UTILISATIONS_MOI>="w")
! $tableau[$i][$j]["contenu"].=" <a
href=\"reservations.php?operation=2&id_utilisation=$reservation->id\">$deprogrammer</a>";
}
else
$tableau[$i][$j]["contenu"]="réservé";
$j++;
$heure=date("H:i:00", strtotime("+".$nbminres." minutes",
strtotime($heure)));
}
***************
*** 252,256 ****
} // while $heure
- //echo "</tr>";
$i++; $j=0;
} // while poste
--- 263,266 ----
***************
*** 264,268 ****
if (!$unposte)
echo "<p align=center>Désolé, aucun poste disponible ce jour là
!</p>\n";
!
} // while reponse;
mysql_free_result($res);
--- 274,278 ----
if (!$unposte)
echo "<p align=center>Désolé, aucun poste disponible ce jour là
!</p>\n";
! } // on est usager ou chez nous
} // while reponse;
mysql_free_result($res);
***************
*** 350,362 ****
if($datev=="")
$datev = date("Y-m-d");
! if ($usagev=="" && $isadmin)
$usagev=1;
! if ($lieuv=="" && $isadmin)
$lieuv="*";
! if ($combienv=="" && $isadmin)
$combienv="oui";
! if ($operation==1 || $isadmin)
{ // affichage du planning des postes du jour
if ($usagev!="")
--- 360,372 ----
if($datev=="")
$datev = date("Y-m-d");
! if ($usagev=="" && UTILISATIONS_AUTRES>="r")
$usagev=1;
! if ($lieuv=="" && UTILISATIONS_AUTRES>="r")
$lieuv="*";
! if ($combienv=="" && UTILISATIONS_AUTRES>="r")
$combienv="oui";
! if ($operation==1 || UTILISATIONS_AUTRES>="r")
{ // affichage du planning des postes du jour
if ($usagev!="")
Index: table_horaire_session.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/table_horaire_session.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** table_horaire_session.php 5 Jan 2003 20:34:01 -0000 1.14
--- table_horaire_session.php 28 Jan 2003 23:13:45 -0000 1.15
***************
*** 22,26 ****
*/
! require_once("header.inc.php");
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
--- 22,33 ----
*/
! require_once("header.inc.php");
! if (!defined("FCT_UTILISATIONS"))
! {
! echo $fctnonactive;
! exit;
! }
!
!
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 43,47 ****
<?
$titr = "Planning d'utilisation des salles";
! $datemaj="5 janvier 2003";
require("entete.inc.php");
--- 50,54 ----
<?
$titr = "Planning d'utilisation des salles";
! $datemaj="27 janvier 2003";
require("entete.inc.php");
***************
*** 49,53 ****
function infoReservation($reservation)
{ // $reservation est un objet enregistrement de la table session
! global $isadmin, $id_structure;
if ($reservation->nom_session>"")
{ // il s'agit d'une session exceptionnelle
--- 56,60 ----
function infoReservation($reservation)
{ // $reservation est un objet enregistrement de la table session
! global $id_structure;
if ($reservation->nom_session>"")
{ // il s'agit d'une session exceptionnelle
***************
*** 64,70 ****
// ou bien si la structure identifiée héberge la session
// ou encore si c'est la structure identifiée qui organise
! if ($isadmin=='super' ||
! $localisation->id_structure==$id_structure ||
! $id_structure==$reservation->id_structure)
$rep.="<a
href=\"session.php?operation=2&id_session=$reservation->id\">$reservation->nom_session</a>
($structure->structure)
<a
href=\"inscription_session.php?id_session=$reservation->id\">bilan</a>";
--- 71,77 ----
// ou bien si la structure identifiée héberge la session
// ou encore si c'est la structure identifiée qui organise
! if (SESSIONS_AUTRES>="r" || (SESSIONS_MOI>="r" &&
! ($localisation->id_structure==$id_structure ||
$id_structure==$reservation->id_structure)
! ))
$rep.="<a
href=\"session.php?operation=2&id_session=$reservation->id\">$reservation->nom_session</a>
($structure->structure)
<a
href=\"inscription_session.php?id_session=$reservation->id\">bilan</a>";
***************
*** 93,99 ****
// ou bien si la structure identifiée héberge la session
// ou encore si c'est la structure identifiée qui organise
! if ($isadmin=='super' ||
! $localisation->id_structure==$id_structure ||
! $reservation->id_structure==$id_structure)
{
// on regarde si le bilan quantitatif a été fait.
--- 100,106 ----
// ou bien si la structure identifiée héberge la session
// ou encore si c'est la structure identifiée qui organise
! if (SESSIONS_AUTRES>="r" || (SESSIONS_MOI>="r" &&
! ($localisation->id_structure==$id_structure ||
$id_structure==$reservation->id_structure)
! ))
{
// on regarde si le bilan quantitatif a été fait.
***************
*** 124,128 ****
function AfficheDisponibilitésSalle($lieuv, $datev, $sens)
{
! global $isadmin, $info, $programmer, $deprogrammer, $modifier, $ajouter,
$unitehoraire, $id_structure;
--- 131,135 ----
function AfficheDisponibilitésSalle($lieuv, $datev, $sens)
{
! global $info, $programmer, $deprogrammer, $modifier, $ajouter,
$unitehoraire, $id_structure;
***************
*** 143,148 ****
LEFT JOIN calendrier ON
calendrier.id_localisation=localisations.id
WHERE ((\"$lieuv\"=\"*\") OR
! (CONCAT(\"V\",structures.ville)=\"$lieuv\") OR
! (CONCAT(\"S\",localisations.id_structure)=\"$lieuv\"))
AND (calendrier.date>=\"$datev\") AND
(calendrier.date<=\"$datef\")
ORDER BY structures.ville, structures.structure,
localisations.salle";
--- 150,156 ----
LEFT JOIN calendrier ON
calendrier.id_localisation=localisations.id
WHERE ((\"$lieuv\"=\"*\") OR
! (CONCAT(\"V\",ville)=\"$lieuv\") OR
! (CONCAT(\"S\",id_structure)=\"$lieuv\") OR
! (CONCAT(\"L\",id_localisation)=\"$lieuv\"))
AND (calendrier.date>=\"$datev\") AND
(calendrier.date<=\"$datef\")
ORDER BY structures.ville, structures.structure,
localisations.salle";
***************
*** 275,280 ****
+
(date("i",strtotime($tranchehoraireouverture->fin))-date("i",strtotime($tranchehoraireouverture->debut)));
$nbuniteres = $nbminres / $unitehoraire;
! $tableau[$i][$j]["param"]=" colspan=$nbuniteres align=center
bgcolor=\"".COULEUR_ACCES_INDIVIDUEL."\""; // vert
! if ($isadmin=="super" || $id_structure==$reponse->id_structure)
$tableau[$i][$j]["contenu"]="<a
href=\"table_horaire.php?datev=$tranchehoraireouverture->date&lieuv=S$reponse->id_structure\">Accès
individuel</a>";
else
--- 283,288 ----
+
(date("i",strtotime($tranchehoraireouverture->fin))-date("i",strtotime($tranchehoraireouverture->debut)));
$nbuniteres = $nbminres / $unitehoraire;
! $tableau[$i][$j]["param"]=" colspan=$nbuniteres align=center
bgcolor=\"".COULEUR_UTILISATIONS."\""; // vert
! if ( UTILISATIONS_AUTRES>="r" || (UTILISATIONS_MOI>="r" &&
$id_structure==$reponse->id_structure) )
$tableau[$i][$j]["contenu"]="<a
href=\"table_horaire.php?datev=$tranchehoraireouverture->date&lieuv=S$reponse->id_structure\">Accès
individuel</a>";
else
***************
*** 293,297 ****
if (! ($reservation = mysql_fetch_object($res5)))
{ // pas de réservation
! $tableau[$i][$j]["param"]=" align=center
bgcolor=\"".COULEUR_SESSION."\""; // bleu
$tableau[$i][$j]["contenu"]="<a
href=\"session.php?operation=1&datev=$datecur&debutv=$heure&id_localisation=$reponse->id_localisation\">
$programmer</a>";
--- 301,305 ----
if (! ($reservation = mysql_fetch_object($res5)))
{ // pas de réservation
! $tableau[$i][$j]["param"]=" align=center
bgcolor=\"".COULEUR_SESSIONS."\""; // bleu
$tableau[$i][$j]["contenu"]="<a
href=\"session.php?operation=1&datev=$datecur&debutv=$heure&id_localisation=$reponse->id_localisation\">
$programmer</a>";
***************
*** 301,305 ****
else
{ // il y a bien une session prévue sur ce créneau là.
! $tableau[$i][$j]["param"]=" bgcolor=\"".COULEUR_SESSION."\"
align=center";
$tableau[$i][$j]["contenu"]=infoReservation($reservation);
$nbminres=60*(date("H",strtotime($reservation->fin))-date("H",strtotime($reservation->debut)))
--- 309,313 ----
else
{ // il y a bien une session prévue sur ce créneau là.
! $tableau[$i][$j]["param"]=" bgcolor=\"".COULEUR_SESSIONS."\"
align=center";
$tableau[$i][$j]["contenu"]=infoReservation($reservation);
$nbminres=60*(date("H",strtotime($reservation->fin))-date("H",strtotime($reservation->debut)))
***************
*** 386,392 ****
}
! if (!$isadmin && !$id_structure)
{
! echo "<p>Encore une égarement ?</p>\n";
exit();
}
--- 394,401 ----
}
!
! if (SESSIONS<="~")
{
! echo $pasledroit;
exit();
}
Index: themes.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/themes.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** themes.php 26 Jan 2003 23:09:59 -0000 1.5
--- themes.php 28 Jan 2003 23:13:45 -0000 1.6
***************
*** 23,27 ****
require_once("header.inc.php");
! if (!defined("FCT_THEME"))
{
echo $fctnonactive;
--- 23,27 ----
require_once("header.inc.php");
! if (!defined("FCT_THEMES"))
{
echo $fctnonactive;
***************
*** 48,61 ****
<?
$titr = "Gestion des thèmes";
! $datemaj="5 janvier 2003";
require("entete.inc.php");
// Début du contenu de la page
! if (defined("THEME") && THEME>="10")
{
switch($operation)
{
case 3 : // Confirmation d'effacement
! if (!defined("THEME") || THEME<"40")
{
echo $pasledroit;
--- 48,61 ----
<?
$titr = "Gestion des thèmes";
! $datemaj="27 janvier 2003";
require("entete.inc.php");
// Début du contenu de la page
! if (THEMES>="~")
{
switch($operation)
{
case 3 : // Confirmation d'effacement
! if (THEMES_AUTRES<"w")
{
echo $pasledroit;
***************
*** 81,85 ****
break;
case 31: // Efface final
! if (!defined("THEME") || THEME<"40")
{
echo $pasledroit;
--- 81,85 ----
break;
case 31: // Efface final
! if (THEMES_AUTRES<"w")
{
echo $pasledroit;
***************
*** 92,96 ****
case 2: // Formulaire modification
! if (!defined("THEME") || THEME<"20")
{
echo $pasledroit;
--- 92,96 ----
case 2: // Formulaire modification
! if (THEMES_AUTRES<"w")
{
echo $pasledroit;
***************
*** 108,112 ****
case 1: // Ajoute d'une nouvelle session
! if (!defined("THEME") || THEME<"20")
{
echo $pasledroit;
--- 108,112 ----
case 1: // Ajoute d'une nouvelle session
! if (THEMES_AUTRES<"w" && THEMES_MOI<"w")
{
echo $pasledroit;
***************
*** 128,132 ****
case 11: // Ajout final
! if (!defined("THEME") || THEME<"20")
{
echo $pasledroit;
--- 128,132 ----
case 11: // Ajout final
! if (THEMES_MOI<"w" && THEMES_AUTRES<"w")
{
echo $pasledroit;
***************
*** 140,144 ****
case 21: // Modif final
! if (!defined("THEME") || THEME<"20")
{
echo $pasledroit;
--- 140,144 ----
case 21: // Modif final
! if (THEMES_AUTRES<"w")
{
echo $pasledroit;
***************
*** 159,168 ****
echo
"<tr><td><b>$u->theme</b></td><td>".nl2br($u->commentaire)."</td>
<td><img src=\"$u->url_image\" height=\"30\"></td>\n";
! if (defined("THEME") && THEME>="20")
! echo "<td><a
href=\"?operation=2&id_theme=$u->id&$idu\">$modifier</a></td>\n";
! if (defined("THEME") && THEME>="40")
! echo "<td><a
href=\"?operation=3&id_theme=$u->id&$idu\">$supprimer</a></td></tr>\n";
}
! if (defined("THEME") && THEME>="20")
echo "<tr><td colspan=5 align=right><a
href=\"?operation=1&$idu\">$ajouter</a></td></tr>\n";
echo "</table>\n";
--- 159,168 ----
echo
"<tr><td><b>$u->theme</b></td><td>".nl2br($u->commentaire)."</td>
<td><img src=\"$u->url_image\" height=\"30\"></td>\n";
! if (THEMES_AUTRES>="w")
! echo "<td><a
href=\"?operation=2&id_theme=$u->id\">$modifier</a></td>\n";
! if (THEMES_AUTRES>="w")
! echo "<td><a
href=\"?operation=3&id_theme=$u->id\">$supprimer</a></td></tr>\n";
}
! if (THEMES_MOI>="w")
echo "<tr><td colspan=5 align=right><a
href=\"?operation=1&$idu\">$ajouter</a></td></tr>\n";
echo "</table>\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Epnadmin-fr] CVS: epnadmin 6cartes.inc.php,1.1,1.2 basdepage.inc.php,1.4,1.5 cartes.inc.php,1.2,1.3 configuration.php,1.3,1.4 constantes.inc.php,1.18,1.19 courriel.php,1.8,1.9 entete.inc.php,1.17,1.18 fonctions.inc.php,1.14,1.15 fr.lang.inc.php,1.2,1.3 initiations.php,1.6,1.7 siteweb.inc.php,1.7,1.8 structures.inc.php,1.3,1.4 table_horaire.php,1.10,1.11 table_horaire_session.php,1.14,1.15 themes.php,1.5,1.6,
Loïc Dayot <=