[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Epnadmin-fr] CVS: epnadmin animateur.php,1.1,1.2 animateurs-horaires.p
From: |
Loïc Dayot |
Subject: |
[Epnadmin-fr] CVS: epnadmin animateur.php,1.1,1.2 animateurs-horaires.php,1.1,1.2 animateurs.inc.php,1.1,1.2 basdepage.inc.php,1.8,1.9 constantes.inc.php,1.33,1.34 fr.lang.inc.php,1.25,1.26 index.php,1.11,1.12 prets.php,1.5,1.6 |
Date: |
Sat, 24 May 2003 07:58:32 -0400 |
Update of /cvsroot/epnadmin/epnadmin
In directory subversions:/tmp/cvs-serv15103/epnadmin
Modified Files:
animateur.php animateurs-horaires.php animateurs.inc.php
basdepage.inc.php constantes.inc.php fr.lang.inc.php index.php
prets.php
Log Message:
Construction de la gestion des prets (en cours).
Index: animateur.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/animateur.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** animateur.php 7 May 2003 17:30:54 -0000 1.1
--- animateur.php 24 May 2003 11:58:29 -0000 1.2
***************
*** 42,46 ****
echo "<html><head><title>$sanimateurs - epnadmin</title>
! <meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\"><body>";
$titr = $is_ident=="animateur" ? $sanimateurtitre1 : $sanimateurtitre2;
--- 42,46 ----
echo "<html><head><title>$sanimateurs - epnadmin</title>
! <meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\"><body></head>\n";
$titr = $is_ident=="animateur" ? $sanimateurtitre1 : $sanimateurtitre2;
***************
*** 53,57 ****
{
global $sanimateurnouv1,$sNom,$sPrenom,$sconfirmer;
! echo "<form name=\"form_nouvel_animateur\" method=\"post\"
action=\"animateurs.php\">";
echo "<input type=\"hidden\" name=\"operation\" value=\"$operation\">
<table border=\"1\" align=\"center\">
--- 53,57 ----
{
global $sanimateurnouv1,$sNom,$sPrenom,$sconfirmer;
! echo "<form name=\"form_nouvel_animateur\" action=\"animateur.php\">";
echo "<input type=\"hidden\" name=\"operation\" value=\"$operation\">
<table border=\"1\" align=\"center\">
***************
*** 85,98 ****
$credit=$res->fetchrow(DB_FETCHMODE_OBJECT); // si l'animateur est
inconnu, ce sera un formulaire vide*/
! echo "<form name=\"form_animateur\" method=\"post\"
action=\"animateurs.php\">";
if ($animateur)
! echo "<input type=\"hidden\" name=\"id_animateur\"
value=\"$id_animateur\">";
! echo "<input type=\"hidden\" name=\"operation\" value=\"$operation\">
! <table border=\"1\" align=\"center\">
! <tr><td>$sPrenom : </td>
! <td><input tabindex=1 type=\"text\" name=\"prenom\"
value=\"$animateur->prenom$prenom\"></td>
! <td>$sNom :</td>
! <td><input tabindex=2 type=\"text\" name=\"nom\"
value=\"$animateur->nom$nom\"></td></tr>
! <tr><td>$sIdentifiant :<br></td>
<td>";
--- 85,99 ----
$credit=$res->fetchrow(DB_FETCHMODE_OBJECT); // si l'animateur est
inconnu, ce sera un formulaire vide*/
! echo "<form name=\"form_animateur\" action=\"animateur.php\">\n";
if ($animateur)
! echo "<input type=\"hidden\" name=\"id_animateur\"
value=\"$id_animateur\">\n";
! echo "<input type=\"hidden\" name=\"operation\" value=\"$operation\">\n
! <table border=\"1\" align=\"center\">\n
! <tr><td>$sPrenom : </td>\n
! <td><input tabindex=1 type=\"text\" name=\"prenom\"
value=\"$animateur->prenom$prenom\"></td>\n
! <td>$sNom :</td>\n
! <td><input tabindex=2 type=\"text\" name=\"nom\"
value=\"$animateur->nom$nom\"></td>\n
! </tr>\n
! <tr><td>$sIdentifiant :<br></td>\n
<td>";
***************
*** 101,111 ****
else
echo "<input tabindex=3 type=\"text\" name=\"login\"
value=\"$login\">";
! echo "</td>";
if (!$animateur)
echo "<td>$sMotdepasse :
! <br>$sMotdepasse (2) :</td>
<td><input tabindex=4 type=\"password\"
name=\"motdepasse\" value=\"$animateur->motdepasse\" tabindex=1>
<br><input tabindex=5 type=\"password\"
name=\"motdepasse2\" value=\"$animateur->motdepasse\">
! </td>";
else
echo "<td>$sMotdepasse :</td>
--- 102,112 ----
else
echo "<input tabindex=3 type=\"text\" name=\"login\"
value=\"$login\">";
! echo "</td>\n";
if (!$animateur)
echo "<td>$sMotdepasse :
! <br>$sMotdepasse (2) :</td>\n
<td><input tabindex=4 type=\"password\"
name=\"motdepasse\" value=\"$animateur->motdepasse\" tabindex=1>
<br><input tabindex=5 type=\"password\"
name=\"motdepasse2\" value=\"$animateur->motdepasse\">
! </td>\n";
else
echo "<td>$sMotdepasse :</td>
***************
*** 137,141 ****
<td>$sStructuredeprovenance :</td>
<td>";
! choix_structure($animateur->id_structure_provenance,
"id_structure_provenance", "");
echo "</td></tr>";
--- 138,142 ----
<td>$sStructuredeprovenance :</td>
<td>";
! choix_structure($animateur->id_structure, "id_structure", "");
echo "</td></tr>";
***************
*** 147,253 ****
echo "<tr>";
- /* if (defined("FCT_TARIFS"))
- {
- // code tarif
- echo " <td>$starif :</td>
- <td><select tabindex=10 name=\"tarif\"><option
value=\"-1\"></option>\n";
- $t=0;
- while ($tarifs[$t])
- {
- echo "<option value=\"$t\"";
- if ($credit)
- if ($credit->id_tarif==$t)
- echo " SELECTED";
- echo ">".$tarifs[$t]."\n";
- $t++;
- }
- echo "</select></td>\n";
- }
-
// état de la carte d'animateur
echo "<td rowspan=2>$sanimateurcarte :</td>
<td rowspan=2><input tabindex=11 type=\"radio\" name=\"carte\"
value=\"attente\"";
if ($credit->carte=="attente" | !$credit->carte) echo " checked";
! echo ">$sanimateurcarteattente<br>
<input type=\"radio\" name=\"carte\" value=\"prête\"";
if ($credit->carte=="prête") echo "checked";
! echo ">$sanimateurcarteprete<br>
<input type=\"radio\" name=\"carte\" value=\"imprimée\"";
if ($credit->carte=="imprimée") echo " checked";
! echo ">$sanimateurcarteimprimee</select></td>
</tr>\n";
! if (defined("FCT_UTILISATIONS"))
! echo "<tr><td>$sheurereservable :</td>
! <td><input tabindex=12 type=\"text\"
name=\"credit_reservable\"
value=\"".min2h($credit->credit_reservable)."\"></td>";
! echo "</tr>";
!
! // Accès individuels (colonne de gauche) - Activités collectives
(colonne de droite)
!
! // Valeurs par défaut pour l'Arobase EPM. Sans doute à mettre dans le
fichier de configuration.
! if (defined("FCT_CREDITS"))
! {
! if ($credit->credit_reservable=="")
$credit->credit_reservable="03:00";
! if ($credit->credit_acces_individuel=="")
$credit->credit_acces_individuel="10:00";
! if ($credit->credit_activites_collectives=="")
$credit->credit_activites_collectives="05:00";
! if (defined("FCT_UTILISATIONS") || defined("FCT_PARCOURS"))
! {
! echo "<tr>";
! if (defined("FCT_UTILISATIONS"))
! echo "<th colspan=2 align=center
bgcolor='".COULEUR_UTILISATIONS."'>$saccesindividuel</th>";
! if (defined("FCT_PARCOURS"))
! echo "<th colspan=2 align=center
bgcolor='".COULEUR_PARCOURS."'>$sactivcollectives</th>";
! echo "</tr>";
! echo "<tr>";
! if (defined("FCT_UTILISATIONS"))
! echo "<td>$sheurecredit :</td>
! <td><input tabindex=13 type=\"text\"
name=\"credit_acces_individuel\"
!
value=\"".min2h($credit->credit_acces_individuel)."\">
! </td>";
!
//value=\"".datetoheurecourt($credit->credit_acces_individuel)."\">
! if (defined("FCT_PARCOURS"))
! echo "<td>$sheurecredit :</td>
! <td><input tabindex=14 type=\"text\"
name=\"credit_activites_collectives\"
!
value=\"".min2h($credit->credit_activites_collectives)."\">
! </td>";
!
//value=\"".datetoheurecourt($credit->credit_activites_collectives)."\">
! echo "</tr>";
!
! echo "<tr>";
! if (defined("FCT_UTILISATIONS"))
! {
! echo "<td>$sdepartabonnement :</td>
! <td>";
!
choixDate($credit->debut_abonnement_acces_individuel,
"debut_abonnement_acces_individuel");
! echo "</td>";
! }
! if (defined("FCT_PARCOURS"))
! {
! echo "<td>$sdepartabonnement :</td>
! <td>";
!
choixDate($credit->debut_abonnement_activites_collectives,
"debut_abonnement_activites_collectives");
! echo "</td>";
! }
! echo "</tr>";
! echo "<tr>";
! if (defined("FCT_UTILISATIONS"))
! {
! echo "<td>$sfinabonnement :</td>
! <td>";
!
choixDate($credit->fin_abonnement_acces_individuel,
"fin_abonnement_acces_individuel");
! echo "</td>";
! }
! if (defined("FCT_PARCOURS"))
! {
! echo "<td>$sfinabonnement :</td>
! <td>";
!
choixDate($credit->fin_abonnement_activites_collectives,
"fin_abonnement_activites_collectives");
! echo "</td>\n";
! }
! echo "</tr>";
! } // if fct_utilisation ou fct_parcours
! echo "<tr><td>$scommentairecredit :</td>
! <td colspan=3><textarea tabindex=15
name=\"commentaires\" rows=\"3\"
cols=\"60\">$credit->commentaires</textarea></td></tr>\n";
! } // if fct_credits
! echo "<tr><td colspan=4 align=center><input tabindex=16 type=\"submit\"
name=\"Modifier\" value=\"$sconfirmer\"></td>*/
echo " </tr>
</table>
--- 148,164 ----
echo "<tr>";
// état de la carte d'animateur
echo "<td rowspan=2>$sanimateurcarte :</td>
<td rowspan=2><input tabindex=11 type=\"radio\" name=\"carte\"
value=\"attente\"";
if ($credit->carte=="attente" | !$credit->carte) echo " checked";
! echo ">$sanimateurcarteattente</input><br>
<input type=\"radio\" name=\"carte\" value=\"prête\"";
if ($credit->carte=="prête") echo "checked";
! echo ">$sanimateurcarteprete</input><br>
<input type=\"radio\" name=\"carte\" value=\"imprimée\"";
if ($credit->carte=="imprimée") echo " checked";
! echo ">$sanimateurcarteimprimee</input></td>
</tr>\n";
! echo "<tr><td colspan=4 align=center><input tabindex=16 type=\"submit\"
name=\"Modifier\" value=\"$sconfirmer\"></td>";
echo " </tr>
</table>
***************
*** 356,360 ****
if ($animateur=$res->fetchrow(DB_FETCHMODE_OBJECT))
{
! echo "<form name=\"form_mp_animateur\" method=\"post\"
action=\"animateurs.php\">
<input type=\"hidden\" name=\"id_animateur\"
value=\"$id_animateur\">
<input type=\"hidden\" name=\"operation\"
value=\"61\">
--- 267,271 ----
if ($animateur=$res->fetchrow(DB_FETCHMODE_OBJECT))
{
! echo "<form name=\"form_mp_animateur\"
action=\"animateur.php\">
<input type=\"hidden\" name=\"id_animateur\"
value=\"$id_animateur\">
<input type=\"hidden\" name=\"operation\"
value=\"61\">
***************
*** 416,481 ****
$naissancejour;
}
- if (defined("FCT_CREDITS"))
- {
- if (defined("FCT_UTILISATIONS"))
- {
- $debut_abonnement_acces_individuel="";
- if ($debut_abonnement_acces_individuelannee>"" ||
$debut_abonnement_acces_individuelmois>""
- ||
$debut_abonnement_acces_individueljour>"")
- {
- if
(!checkdate($debut_abonnement_acces_individuelmois,
-
$debut_abonnement_acces_individueljour,
-
$debut_abonnement_acces_individuelannee))
-
$mes.="$smanquedatedebabonnementindiv<br>";
- else
-
$debut_abonnement_acces_individuel=$debut_abonnement_acces_individuelannee."-".
-
$debut_abonnement_acces_individuelmois."-".
-
$debut_abonnement_acces_individueljour;
- }
- $fin_abonnement_acces_individuel="";
- if ($fin_abonnement_acces_individuelannee>"" ||
$fin_abonnement_acces_individuelmois>""
- ||
$fin_abonnement_acces_individueljour>"")
- {
- if
(!checkdate($fin_abonnement_acces_individuelmois,
-
$fin_abonnement_acces_individueljour,
-
$fin_abonnement_acces_individuelannee))
-
$mes.="$smanquedatefinabonnementindiv<br>";
- else
-
$fin_abonnement_acces_individuel=$fin_abonnement_acces_individuelannee."-".
-
$fin_abonnement_acces_individuelmois."-".
-
$fin_abonnement_acces_individueljour;
- }
- } // if defined fct_utilisations
- if (defined("FCT_PARCOURS"))
- {
- $debut_abonnement_activites_collectives="";
- if ($debut_abonnement_activites_collectivesannee>"" ||
$debut_abonnement_activites_collectivesmois>""
- ||
$debut_abonnement_activites_collectivesjour>"")
- {
- if
(!checkdate($debut_abonnement_activites_collectivesmois,
-
$debut_abonnement_activites_collectivesjour,
-
$debut_abonnement_activites_collectivesannee))
-
$mes.="$smanquedatedebabonnementcolle<br>";
- else
-
$debut_abonnement_activites_collectives=$debut_abonnement_activites_collectivesannee."-".
-
$debut_abonnement_activites_collectivesmois."-".
-
$debut_abonnement_activites_collectivesjour;
- }
- $fin_abonnement_activites_collectives="";
- if ($fin_abonnement_activites_collectivesannee>"" ||
$fin_abonnement_activites_collectivesmois>""
- ||
$fin_abonnement_activites_collectivesjour>"")
- {
- if
(!checkdate($fin_abonnement_activites_collectivesmois,
-
$fin_abonnement_activites_collectivesjour,
-
$fin_abonnement_activites_collectivesannee))
-
$mes.="$smanquedatefinabonnementcolle<br>";
- else
-
$fin_abonnement_activites_collectives=$fin_abonnement_activites_collectivesannee."-".
-
$fin_abonnement_activites_collectivesmois."-".
-
$fin_abonnement_activites_collectivesjour;
- }
- } // if defined FCT_PARCOURS
- } // if defined FCT_CREDITS
-
if ($mes!="")
{
--- 327,330 ----
***************
*** 487,491 ****
$query = "UPDATE animateurs SET nom=\"$nom\", prenom=\"$prenom\",
naissance='$naissance',
sexe='$sexe', adresse=\"$adresse\", ville='$ville',
!
id_structure_provenance='$id_structure_provenance',
courriel='$courriel',
telephone='$telephone',
commentaire=\"$commentaire\"
--- 336,340 ----
$query = "UPDATE animateurs SET nom=\"$nom\", prenom=\"$prenom\",
naissance='$naissance',
sexe='$sexe', adresse=\"$adresse\", ville='$ville',
!
id_structure='$id_structure',
courriel='$courriel',
telephone='$telephone',
commentaire=\"$commentaire\"
***************
*** 493,541 ****
if (!$result = executeRequete($query))
echo "<p>$spbmajanimateur</p>\n";
-
- if (defined("FCT_CREDITS") || defined("FCT_TARIFS"))
- {
- // on regarde dans la table [crédits] si l'animateur existe ou non
- $req="SELECT * FROM credits WHERE id_animateur=\"$id_animateur\"";
- $res=executeRequete($req);
-
- $credit_acces_individuel=h2min($credit_acces_individuel);
- $credit_activites_collectives=h2min($credit_activites_collectives);
- $credit_reservable=h2min($credit_reservable);
-
- if ($res->fetchrow(DB_FETCHMODE_OBJECT))
- { // L'enregistrement existe, mise à jour de l'enregistrement dans la
table crédits
- $query = "UPDATE credits SET
- id_tarif='$tarif',
credit_acces_individuel=$credit_acces_individuel,
- credit_activites_collectives=$credit_activites_collectives,
- credit_reservable=$credit_reservable,
commentaires=\"$commentaires\",
-
debut_abonnement_acces_individuel='$debut_abonnement_acces_individuel',
-
fin_abonnement_acces_individuel='$fin_abonnement_acces_individuel',
-
debut_abonnement_activites_collectives='$debut_abonnement_activites_collectives',
-
fin_abonnement_activites_collectives='$fin_abonnement_activites_collectives',
- carte=\"$carte\"
- WHERE id_animateur='$id_animateur'";
- }
- else
- // L'enregistrement n'existe pas, insertion dans la table crédits
- $query = "INSERT INTO credits (id_animateur, id_tarif,
credit_acces_individuel,
- credit_activites_collectives,
- credit_reservable, commentaires,
debut_abonnement_acces_individuel,
- fin_abonnement_acces_individuel,
- debut_abonnement_activites_collectives,
- fin_abonnement_activites_collectives,
- carte)
- VALUES
- ('$id_animateur', '$tarif', '$credit_acces_individuel',
- '$credit_activites_collectives',
- '$credit_reservable', \"$commentaires\",
- '$debut_abonnement_acces_individuel',
- '$fin_abonnement_acces_individuel',
- '$debut_abonnement_activites_collectives',
- '$fin_abonnement_activites_collectives',
- \"$carte\")";
- if (! executeRequete($query))
- echo "<p>$spbmajcredit</p>\n";
- } // if fctcredit ou tarifs
echo "<p>Informations mises à jour.</p>";
echo cadre_fin();
--- 342,345 ----
***************
*** 552,556 ****
printf ($sanimateursupprdemandeconf, animateur($id_animateur));
echo "</th></tr>
! <tr><td><form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">
<input type=\"checkbox\" name=\"perso\" checked>
$sanimateursupprepnadmin
<br><input type=\"checkbox\" name=\"credit\" checked>
$sanimateursupprcredit
--- 356,360 ----
printf ($sanimateursupprdemandeconf, animateur($id_animateur));
echo "</th></tr>
! <tr><td><form action=\"$PHP_SELF\" enctype=\"multipart/form-data\">
<input type=\"checkbox\" name=\"perso\" checked>
$sanimateursupprepnadmin
<br><input type=\"checkbox\" name=\"credit\" checked>
$sanimateursupprcredit
***************
*** 725,730 ****
if ($nom=="") $mes .= "$smanquenom<br>";
if ($prenom=="") $mes .= "$manqueprenom<br>";
! if (defined("FCT_TARIFS"))
! if ($tarif==-1) $mes .= "$smanquetarif<br>";
// Mise en condition des heures et des dates
$naissance="";
--- 529,534 ----
if ($nom=="") $mes .= "$smanquenom<br>";
if ($prenom=="") $mes .= "$manqueprenom<br>";
! /* if (defined("FCT_TARIFS"))
! if ($tarif==-1) $mes .= "$smanquetarif<br>";*/
// Mise en condition des heures et des dates
$naissance="";
***************
*** 741,806 ****
$naissancejour;
}
- if (defined("FCT_CREDITS"))
- {
- if (defined("FCT_UTILISATIONS"))
- {
- $debut_abonnement_acces_individuel="";
- if ($debut_abonnement_acces_individuelannee>"" ||
$debut_abonnement_acces_individuelmois>""
- ||
$debut_abonnement_acces_individueljour>"")
- {
- if
(!checkdate($debut_abonnement_acces_individuelmois,
-
$debut_abonnement_acces_individueljour,
-
$debut_abonnement_acces_individuelannee))
-
$mes.="$smanquedatedebabonnementindiv<br>";
- else
-
$debut_abonnement_acces_individuel=$debut_abonnement_acces_individuelannee."-".
-
$debut_abonnement_acces_individuelmois."-".
-
$debut_abonnement_acces_individueljour;
- }
- $fin_abonnement_acces_individuel="";
- if ($fin_abonnement_acces_individuelannee>"" ||
$fin_abonnement_acces_individuelmois>""
- ||
$fin_abonnement_acces_individueljour>"")
- {
- if
(!checkdate($fin_abonnement_acces_individuelmois,
-
$fin_abonnement_acces_individueljour,
-
$fin_abonnement_acces_individuelannee))
-
$mes.="$smanquedatefinabonnementindiv<br>";
- else
-
$fin_abonnement_acces_individuel=$fin_abonnement_acces_individuelannee."-".
-
$fin_abonnement_acces_individuelmois."-".
-
$fin_abonnement_acces_individueljour;
- }
- } // if defined fct_utilisations
- if (defined("FCT_PARCOURS"))
- {
- $debut_abonnement_activites_collectives="";
- if ($debut_abonnement_activites_collectivesannee>"" ||
$debut_abonnement_activites_collectivesmois>""
- ||
$debut_abonnement_activites_collectivesjour>"")
- {
- if
(!checkdate($debut_abonnement_activites_collectivesmois,
-
$debut_abonnement_activites_collectivesjour,
-
$debut_abonnement_activites_collectivesannee))
-
$mes.="$smanquedatedebabonnementcolle<br>";
- else
-
$debut_abonnement_activites_collectives=$debut_abonnement_activites_collectivesannee."-".
-
$debut_abonnement_activites_collectivesmois."-".
-
$debut_abonnement_activites_collectivesjour;
- }
- $fin_abonnement_activites_collectives="";
- if ($fin_abonnement_activites_collectivesannee>"" ||
$fin_abonnement_activites_collectivesmois>""
- ||
$fin_abonnement_activites_collectivesjour>"")
- {
- if
(!checkdate($fin_abonnement_activites_collectivesmois,
-
$fin_abonnement_activites_collectivesjour,
-
$fin_abonnement_activites_collectivesannee))
-
$mes.="$smanquedatefinabonnementcolle<br>";
- else
-
$fin_abonnement_activites_collectives=$fin_abonnement_activites_collectivesannee."-".
-
$fin_abonnement_activites_collectivesmois."-".
-
$fin_abonnement_activites_collectivesjour;
- }
- } // if defined FCT_PARCOURS
- } // if defined FCT_CREDITS
-
if ($mes!="")
{
--- 545,548 ----
***************
*** 816,824 ****
// Insertion dans la table animateurs (informations personnelles)
$query = "INSERT INTO animateurs
(nom,prenom,login,motdepasse,naissance,sexe,
! adresse,ville,telephone, courriel,id_structure_provenance,
commentaire,date)
VALUES
('$nom','$prenom','$login','$motdepasse','$naissance','$sexe',
!
'$adresse','$ville','$telephone','$courriel','$id_structure_provenance',
'$commentaire', NOW())";
if (!$result = executeRequete($query))
{
--- 558,567 ----
// Insertion dans la table animateurs (informations personnelles)
$query = "INSERT INTO animateurs
(nom,prenom,login,motdepasse,naissance,sexe,
! adresse,ville,telephone, courriel,id_structure,
commentaire,date)
VALUES
('$nom','$prenom','$login','$motdepasse','$naissance','$sexe',
! '$adresse','$ville','$telephone','$courriel','$id_structure',
'$commentaire', NOW())";
+ // die ($query);
if (!$result = executeRequete($query))
{
***************
*** 828,859 ****
}
- if (defined("FCT_CREDITS"))
- {
- // retrouver l'id pour s'en servir dans la table [crédits]
- $id_animateur= $db->getOne("SELECT LAST_INSERT_ID()");
- $credit_reservable=h2min($credit_reservable);
- $credit_acces_individuel=h2min($credit_acces_individuel);
- $credit_activites_collectives=h2min($credit_activites_collectives);
- // Insertion dans la table crédits
- $query = "INSERT INTO credits (id_animateur, id_tarif,
credit_acces_individuel,
- credit_activites_collectives,
- credit_reservable, commentaires,
debut_abonnement_acces_individuel,
- fin_abonnement_acces_individuel,
- debut_abonnement_activites_collectives,
- fin_abonnement_activites_collectives,
- carte)
- VALUES
- ('$id_animateur', '$tarif', '$credit_acces_individuel',
- '$credit_activites_collectives',
- '$credit_reservable', \"$commentaires\",
- '$debut_abonnement_acces_individuel',
- '$fin_abonnement_acces_individuel',
- '$debut_abonnement_activites_collectives',
- '$fin_abonnement_activites_collectives',
- \"$carte\")";
- if (!$res=executeRequete($query))
- echo "<p>$spbmajcredit</p>\n";
- } // if defined fct_credit
-
// TODO : vérifier que l'admin est dans une structure qui gère les comptes
locaux sur le serveur
// On crypte le mot de passe pour créer le compte local sous Linux
--- 571,574 ----
***************
*** 941,978 ****
}
echo cadre_fin();
!
! /*if (CREDITS_AUTRES>="r" && ($is_ident=="structure" ||
$is_ident=="animateur"))
! {
! echo "<br>";
! echo cadre_debut($sCredits, "align=center", COULEUR_CREDITS);
! affiche_credit($animateur);
! echo cadre_fin(COULEUR_CREDITS);
! }
!
! if (PARCOURS_AUTRES>="r" && ($is_ident=="structure" ||
$is_ident=="animateur"))
! {
! echo "<br>";
! echo cadre_debut($sParcours, "align=center", COULEUR_PARCOURS);
! if ($id_animateur)
! afficheparcours($id_animateur);
! echo cadre_fin(COULEUR_PARCOURS);
!
! echo cadre_debut($sinitiationsaccessibles, "align=center",
COULEUR_SESSIONS);
! afficheSessionsAccessibles($id_animateur, "accessible");
! echo cadre_fin(COULEUR_SESSIONS);
! }
!
! if (UTILISATIONS_AUTRES>="r" && ($is_ident=="structure" ||
$is_ident=="animateur"))
! {
! echo "<br>";
! echo cadre_debut($saccesindivprevus, "align=center",
COULEUR_UTILISATIONS);
! affiche_utilisations($id_animateur, FUTUR);
! echo cadre_fin(COULEUR_UTILISATIONS);
! echo cadre_debut($saccesindivpasses, "align=center",
COULEUR_UTILISATIONS);
! affiche_utilisations($id_animateur, PASSE);
! echo cadre_fin(COULEUR_UTILISATIONS);
! }
! break;
! */
} // fin du switch
--- 656,660 ----
}
echo cadre_fin();
! liste_animateurs();
} // fin du switch
Index: animateurs-horaires.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/animateurs-horaires.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** animateurs-horaires.php 7 May 2003 17:30:54 -0000 1.1
--- animateurs-horaires.php 24 May 2003 11:58:29 -0000 1.2
***************
*** 23,27 ****
//phpinfo();
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_HORAIRES"))
{
echo $fctnonactive;
--- 23,27 ----
//phpinfo();
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_ANIMATEURS"))
{
echo $fctnonactive;
***************
*** 144,174 ****
break;
$tranchehoraire =
$res3->fetchrow(DB_FETCHMODE_OBJECT);*/
$nbcol++;
! echo "<td";
! /*if ($tranchehoraire->id_localisation)
! {*/
! echo " bgcolor=\"grey\">\n";
! /*}
! else
! {
! echo " bgcolor=\"pink\">\n";
! }*/
echo "<form action=$PHP_SELF#[$indtable]
name=\"localisateur$indi\">";
echo "<select name=\"id_localisation\"
onchange=\"document.localisateur$indi.submit();\"";
$req="select *,localisations.id as
id_localisation from localisations,structures where
structures.id=localisations.id_structure";
$res=executerequete($req);
! $reqvv="select * from animateurs_calendrier
where id_animateur=$id_animateur and date=\"$datecur\" and debut=\"$heure\"";
$resvv=executerequete($reqvv);
$pardefaut=0;
if(!DB::iserror($resvv))
! {
!
$dejaprevu=$resvv->fetchrow(DB_FETCHMODE_OBJECT);
! $pardefaut=1;
! }
echo "<option value=0></option>";
while($listloc=$res->fetchrow(DB_FETCHMODE_OBJECT))
{
! $req3 = "SELECT * FROM calendrier WHERE
date=\"$datecur\" AND debut<=\"$heure\" AND fin>\"$heure\" AND
id_localisation=\"$listloc->id_localisation\"";
! //echo($req3);
$res3 = executeRequete($req3);
if(DB::iserror($res3))
--- 144,174 ----
break;
$tranchehoraire =
$res3->fetchrow(DB_FETCHMODE_OBJECT);*/
+
$nbcol++;
! echo "<td bgcolor=\"grey\">\n";
!
! $reqvv2="select * from disponibilite where
id_animateur=$id_animateur and date=\"$datecur\" and debut<=\"$heure\"";
! $resvv2=executerequete($reqvv2);
! if($resvv2->numrows()>=1)
! {
echo "<form action=$PHP_SELF#[$indtable]
name=\"localisateur$indi\">";
echo "<select name=\"id_localisation\"
onchange=\"document.localisateur$indi.submit();\"";
+
$req="select *,localisations.id as
id_localisation from localisations,structures where
structures.id=localisations.id_structure";
$res=executerequete($req);
! $reqvv="select * from animateurs_calendrier
where id_animateur=$id_animateur and date=\"$datecur\" and debut<=\"$heure\"
and fin>\"$heure\"";
! //die($reqvv);
$resvv=executerequete($reqvv);
$pardefaut=0;
if(!DB::iserror($resvv))
! {
!
$dejaprevu=$resvv->fetchrow(DB_FETCHMODE_OBJECT);
! $pardefaut=1;
! }
echo "<option value=0></option>";
while($listloc=$res->fetchrow(DB_FETCHMODE_OBJECT))
{
! $req3 = "SELECT * FROM calendrier WHERE
date=\"$datecur\" AND debut<=\"$heure\" AND fin>=\"$heure\" AND
id_localisation=\"$listloc->id_localisation\"";
! //die($req3);
$res3 = executeRequete($req3);
if(DB::iserror($res3))
***************
*** 189,196 ****
{}*/
if
($dejaprevu->id_localisation==$listloc->id_localisation)
! {
! echo "<option
selected value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
! $pardefaut=0;
! }
else
echo "<option
value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
--- 189,196 ----
{}*/
if
($dejaprevu->id_localisation==$listloc->id_localisation)
! {
! echo "<option selected
value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
! $pardefaut=0;
! }
else
echo "<option
value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
***************
*** 198,212 ****
else
echo "<option
value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
}
! echo "</select>";
! echo "<input type=\"hidden\" name=\"id_animateur\"
value=\"$id_animateur\"></input>";
! echo "<input type=\"hidden\" name=\"operation\"
value=\"11\"></input>";
! echo "<input type=\"hidden\" name=\"heure\" value=\"" .
h2min($heure) ."\"></input>";
! echo "<input type=\"hidden\" name=\"date\"
value=\"$datecur\"></input>";
! echo "</form>";
! echo "</TD>";
! $res3->free();
! $heure=min2h(h2min($heure) + $unitehoraire);
! } // while $heure
$heure=min2h(h2min($heure) - 4*$unitehoraire);
$heureencours=0;
--- 198,216 ----
else
echo "<option
value=\"$listloc->id_localisation\">$etat
$listloc->structure:$listloc->salle</option>";
+
}
! echo "</select>";
! echo "<input type=\"hidden\"
name=\"id_animateur\" value=\"$id_animateur\"></input>";
! echo "<input type=\"hidden\"
name=\"operation\" value=\"11\"></input>";
! echo "<input type=\"hidden\"
name=\"heure\" value=\"" . h2min($heure) ."\"></input>";
! echo "<input type=\"hidden\"
name=\"date\" value=\"$datecur\"></input>";
! echo "</form>";
! echo "</TD>";
!
! $res3->free();
! }
! $heure=min2h(h2min($heure) +
$unitehoraire);
!
! } // while $heure
$heure=min2h(h2min($heure) - 4*$unitehoraire);
$heureencours=0;
***************
*** 306,320 ****
if (!$tranchehoraire->ouverture)
echo "F ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=51&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">f</a>
\n";
if ($tranchehoraire->ouverture=="accès individuels")
echo "I ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=52&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">i</a>
";
if ($tranchehoraire->ouverture=="activités collectives")
echo "C ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=53&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">c</a>";
--- 310,324 ----
if (!$tranchehoraire->ouverture)
echo "F ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
$id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=51&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">f</a>
\n";
if ($tranchehoraire->ouverture=="accès individuels")
echo "I ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
$id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=52&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">i</a>
";
if ($tranchehoraire->ouverture=="activités collectives")
echo "C ";
! elseif (HORAIRES_AUTRES>="w" || (HORAIRES_MOI>="w" &&
$id_structure==$reponse->id_structure))
echo "<a
href=\"$PHP_SELF?operation=53&id_localisation=$id_localisation&nomjour=$nomjour&debut=$heure\">c</a>";
***************
*** 348,352 ****
}
// On regarde si on a les droits
! if ( !(ANIMATEURS_AUTRES>=$droit || (ANIMATEURS_MOI>=$droit &&
id_structure==$reponse->id_structure)))
{
echo $pasledroit;
--- 352,356 ----
}
// On regarde si on a les droits
! if ( !(ANIMATEURS_AUTRES>=$droit || (ANIMATEURS_MOI>=$droit &&
$id_structure==$reponse->id_structure)))
{
echo $pasledroit;
***************
*** 357,363 ****
// Début du contenu de la page
echo cadre_debut("calendrier de l'animateur");
echo "<form action=\"$PHPSELF?operation=1\" method=\"post\"
name=\"choixanim\">
! <select name=\"id_animateur\"
onchange=\"document.choixanim.submit();\"";
$req="select * from animateurs";
$res=executerequete($req);
--- 361,368 ----
// Début du contenu de la page
+ //fonction de choix d'animateurs
echo cadre_debut("calendrier de l'animateur");
echo "<form action=\"$PHPSELF?operation=1\" method=\"post\"
name=\"choixanim\">
! <select name=\"id_animateur\"
onchange=\"document.choixanim.submit();\">";
$req="select * from animateurs";
$res=executerequete($req);
***************
*** 371,376 ****
}
echo "</select>";
echo "</form>";
! //fonction de choix d'animateurs
echo cadre_fin();
--- 376,382 ----
}
echo "</select>";
+ //choix_animateur($id, "id", "");
echo "</form>";
!
echo cadre_fin();
***************
*** 393,397 ****
// calcul de la fin du créneau
// $heure=$debut;
! $heurefin=date("H:i:00", strtotime("+".$unitehoraire." minutes",
strtotime($heure)));
//debug("$heure à $heurefin");
--- 399,403 ----
// calcul de la fin du créneau
// $heure=$debut;
! $heurefin=min2h(h2min($heure)+60);
//debug("$heure à $heurefin");
***************
*** 399,403 ****
$req = "SELECT * FROM animateurs_calendrier
WHERE jour=\"$nomjour\" AND
id_localisation=\"$id_localisation\"
! AND debut<=\"$heure\" AND \"$heurefin\"<=fin
AND id_animateur=\"$id_animateur\"";
$res = executeRequete($req);
--- 405,409 ----
$req = "SELECT * FROM animateurs_calendrier
WHERE jour=\"$nomjour\" AND
id_localisation=\"$id_localisation\"
! AND debut<=\"$heure\" AND fin=>\"$heurefin\"
AND id_animateur=\"$id_animateur\"";
$res = executeRequete($req);
***************
*** 440,444 ****
$req1 = "UPDATE animateurs_calendrier SET fin=\"$heure\"
WHERE jour=\"$nomjour\" AND
id_localisation=\"$id_localisation\"
! AND debut<=\"$heure\" AND \"$heure\"<=fin
AND id_animateur=\"$id_animateur\"";
$res1 = executeRequete($req1);
--- 446,450 ----
$req1 = "UPDATE animateurs_calendrier SET fin=\"$heure\"
WHERE jour=\"$nomjour\" AND
id_localisation=\"$id_localisation\"
! AND debut<=\"$heure\" AND fin=>\"$heure\"
AND id_animateur=\"$id_animateur\"";
$res1 = executeRequete($req1);
***************
*** 517,546 ****
$heurefin=min2h($heure + $unitehoraire);
$heure=min2h($heure);
! //$heurefin=date("H:i:00", strtotime("+".$unitehoraire." minutes",
strtotime($heure)));
! //debug("$heure à $heurefin");
! // On commence par retirer le créneau ancien s'il existe
! $req = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND debut=\"$heure\"
! AND id_animateur=\"$id_animateur\"";
! $res = executeRequete($req);
! if ($tranche=$res->fetchrow(DB_FETCHMODE_OBJECT))
! { // oui, ça fait partie d'une tranche horaire
$req1 = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND debut=\"$heure\"
! AND id_animateur=\"$id_animateur\"";
$res1 = executeRequete($req1);
}
! // ouf, ça y est, on est sur qu'il n'y a plus de créneau qu'on veut
configurer.
! //debug("$heure à $heurefin");
! // Maintenant, il faut l'ajouter si besoin.
! if ($id_localisation!=0)
{
! $req1 = "INSERT INTO animateurs_calendrier
(id_animateur,id_localisation, date, debut, fin)
! VALUES (\"$id_animateur\",\"$id_localisation\",
\"$date\", \"$heure\", \"$heurefin\")";
$res1 = executeRequete($req1);
! //debug("créneau ajouté");
! } // if $operation!=11
case 1 : // Affichage du animateurs_calendrier d'une salle pour un moi
correpondant à une date (courante)
--- 523,738 ----
$heurefin=min2h($heure + $unitehoraire);
$heure=min2h($heure);
!
!
!
! $req = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut<=\"$heure\" AND fin>=\"$heurefin\"";
! $res = executeRequete($req);
!
! //Supression d'un crenau
! $tranche=$res->fetchrow(DB_FETCHMODE_OBJECT);
! //die($res->numrows(). " " . $presence);
! if ($res->numrows()>=1 & $id_localisation==0)
! {
! //die((h2min($heure) . " " .h2min($tranche->debut)) . " " .
(h2min($heurefin). " " . h2min($tranche->fin)));
! if ((h2min($heure)==h2min($tranche->debut)) &
(h2min($heurefin)==h2min($tranche->fin)))
! {
$req1 = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND debut<=\"$heure\" AND fin>=\"$heurefin\"";
$res1 = executeRequete($req1);
}
! else
! {
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$tranche->id_localisation\",fin=\"$heure\"
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND debut=\"$tranche->debut\"";
! $res1 = executeRequete($req1);
!
! if(h2min($heurefin)!=h2min($tranche->fin))
! {
! $req1 = "insert into animateurs_calendrier
(id_animateur, date, debut, fin,id_localisation)
! VALUES
(\"$id_animateur\",\"$date\",\"$heurefin\",\"$tranche->fin\",\"$tranche->id_localisation\")";
! $res1 = executeRequete($req1);
! }
! }
! afficheCalendrier($id_animateur,$date);
! break;
! }
! elseif ($id_localisation==0)
! break;
! //remplacement d'un crenau
! if ($res->numrows()>=1)
! {
!
! if ((h2min($heure)==h2min($tranche->debut)) &
(h2min($heurefin)==h2min($tranche->fin)))
! {
!
! $i=0;
! $req4 = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND fin=\"$heure\" AND
id_localisation=\"$id_localisation\"";
! $res4 = executeRequete($req4);
! if ($trancheav=$res4->fetchrow(DB_FETCHMODE_OBJECT))
! {
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$id_localisation\",fin=\"$heurefin\"
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND fin=\"$heure\"";
! $res1 = executeRequete($req1);
!
! $req = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut=\"$heure\" AND fin=\"$heurefin\"";
!
! $res = executeRequete($req);
! $i=1;
! }
!
! $req5 = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut=\"$heurefin\" AND
id_localisation=\"$id_localisation\"";
! $res5 = executeRequete($req5);
! if ($trancheap=$res5->fetchrow(DB_FETCHMODE_OBJECT))
! {
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$id_localisation\",fin=\"$trancheap->fin\"
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"";
! if($trancheav->debut)
! $req1 .=" AND
debut=\"$trancheav->debut\"";
! else
! $req1 .=" AND debut=\"$heure\"";
! $res1 = executeRequete($req1);
!
! $req = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND debut=\"$heurefin\"";
! $res = executeRequete($req);
! $i=1;
! }
! if ($i==1)
! {
! afficheCalendrier($id_animateur,$date);
! break;
! }
!
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$id_localisation\"
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut=\"$heure\" AND fin=\"$heurefin\"";
! $res1 = executeRequete($req1);
! //debug("tranche supprimee");
! afficheCalendrier($id_animateur,$date);
! break;
! }
! else
{
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$tranche->id_localisation\",fin=\"$heure\"
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut=\"$tranche->debut\"";
! $res1 = executeRequete($req1);
!
! $req1 = "INSERT INTO animateurs_calendrier
(id_animateur, date, debut, fin,id_localisation)
! VALUES (\"$id_animateur\", \"$date\" , \"$heure\",
\"$heurefin\", \"$id_localisation\")";
! $res1 = executeRequete($req1);
!
! if(h2min($heurefin)!=h2min($tranche->fin))
! {
! $req1 = "insert into animateurs_calendrier
(id_animateur, date, debut, fin,id_localisation)
! VALUES
(\"$id_animateur\",\"$date\",\"$heurefin\",\"$tranche->fin\",\"$tranche->id_localisation\")";
! $res1 = executeRequete($req1);
! }
! afficheCalendrier($id_animateur,$date);
! break;
! }
! }
! else
! { //ajout ou mix d'un crenau
! $req1 = "INSERT INTO animateurs_calendrier (id_animateur, date,
debut, fin, id_localisation)
! VALUES (\"$id_animateur\", \"$date\",
\"$heure\", \"$heurefin\", \"$id_localisation\")";
! $res1 = executeRequete($req1);
! $i=0;
! $req4 = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND fin=\"$heure\" AND id_localisation=\"$id_localisation\"";
!
! $res4 = executeRequete($req4);
! if ($trancheav=$res4->fetchrow(DB_FETCHMODE_OBJECT))
! {
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$id_localisation\",fin=\"$heurefin\"
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND fin=\"$heure\"";
! $res1 = executeRequete($req1);
!
! $req = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND debut=\"$heure\" AND fin=\"$heurefin\"";
!
! $res = executeRequete($req);
! $i=1;
! }
!
! $req5 = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND id_animateur=\"$id_animateur\"
! AND debut=\"$heurefin\" AND
id_localisation=\"$id_localisation\"";
! $res5 = executeRequete($req5);
! if ($trancheap=$res5->fetchrow(DB_FETCHMODE_OBJECT))
! {
! $req1 = "UPDATE animateurs_calendrier SET
id_localisation=\"$id_localisation\",fin=\"$trancheap->fin\"
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"";
! if($trancheav->debut)
! $req1 .=" AND debut=\"$trancheav->debut\"";
! else
! $req1 .=" AND debut=\"$heure\"";
$res1 = executeRequete($req1);
!
! $req = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND
id_animateur=\"$id_animateur\"
! AND debut=\"$heurefin\"";
! $res = executeRequete($req);
! $i=1;
! }
! if ($i==1)
! {
! $req1 = "DELETE FROM animateurs_calendrier
! WHERE id_animateur=\"$id_animateur\" AND date=\"$date\"
AND debut=\"$heure\" AND fin=\"$heurefin\" AND
id_localisation=\"$id_localisation\"";
! $res1 = executeRequete($req1);
! afficheCalendrier($id_animateur,$date);
! break;
! }
! }
! afficheCalendrier($id_animateur,$date);
! break;
!
!
!
!
!
!
!
!
!
!
!
!
!
!
! /* $req = "SELECT * FROM animateurs_calendrier
! WHERE date=\"$date\" AND debut=\"$heure\"
! AND id_animateur=\"$id_animateur\"";
! $res = executeRequete($req);
! if ($tranche=$res->fetchrow(DB_FETCHMODE_OBJECT))
! { // oui, ça fait partie d'une tranche horaire
! $req1 = "DELETE FROM animateurs_calendrier
! WHERE date=\"$date\" AND debut=\"$heure\"
! AND id_animateur=\"$id_animateur\"";
! $res1 = executeRequete($req1);
! }
! if ($id_localisation!=0)
! {
! $req1 = "INSERT INTO animateurs_calendrier
(id_animateur,id_localisation, date, debut, fin)
! VALUES (\"$id_animateur\",\"$id_localisation\",
\"$date\", \"$heure\", \"$heurefin\")";
! $res1 = executeRequete($req1);
! } // if $operation!=11*/
case 1 : // Affichage du animateurs_calendrier d'une salle pour un moi
correpondant à une date (courante)
Index: animateurs.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/animateurs.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** animateurs.inc.php 7 May 2003 17:30:54 -0000 1.1
--- animateurs.inc.php 24 May 2003 11:58:29 -0000 1.2
***************
*** 27,38 ****
require_once("mysql.inc.php"); // concernant mysql
//require_once("sessions.inc.php"); // concernant les sessions et
initiations
! //require_once("usagers.inc.php"); // concernant la gestion des
usagers
! //require_once("reservations.inc.php"); // concernant les
réservations des postes en accès individuel par des usagers
//require_once("tableaux.inc.php"); // Concernant l'affichage
transposé d'un tableau
! //require_once("siteweb.inc.php"); // concernant les pages perso
des usagers et les sites web des structures
//require_once("dateheure.inc.php"); // concernant la manipulation
des heures et des dates, formulaire, conversion...
//require_once("structures.inc.php"); // concernant les structures
//require_once("initiations.inc.php"); // concernant les initiations
et les thèmes
! //require_once("parcours.inc.php"); // concernant les parcours
des usagers et leur positionnement
//
-
--- 27,38 ----
require_once("mysql.inc.php"); // concernant mysql
//require_once("sessions.inc.php"); // concernant les sessions et
initiations
! //require_once("animateurs.inc.php"); // concernant la gestion
des animateurs
! //require_once("reservations.inc.php"); // concernant les
réservations des postes en accès individuel par des animateurs
//require_once("tableaux.inc.php"); // Concernant l'affichage
transposé d'un tableau
! //require_once("siteweb.inc.php"); // concernant les pages perso
des animateurs et les sites web des structures
//require_once("dateheure.inc.php"); // concernant la manipulation
des heures et des dates, formulaire, conversion...
//require_once("structures.inc.php"); // concernant les structures
//require_once("initiations.inc.php"); // concernant les initiations
et les thèmes
! //require_once("parcours.inc.php"); // concernant les parcours
des animateurs et leur positionnement
//
-
***************
*** 47,65 ****
}
! // Partie d'un formulaire proposant la liste déroulante des structures
! function choix_animateur($id_stru, $champ="id_structure", $vide="n'importe
lequel")
{
! echo "<select name=\"$champ\"><option value=\"\">$vide</option>\n";
! $req="SELECT * FROM animateurs ORDER BY nom";
! $res=executeRequete($req);
! while ($structure=$res->fetchrow(DB_FETCHMODE_OBJECT))
{
! echo "<option value=\"$structure->id\"";
! if ($structure->id==$id_stru)
! echo " selected";
! echo ">".substr($structure->ville,0,10)." :
".substr($structure->structure,0,20)."\n";
}
- echo "</select>\n";
}
?>
--- 47,251 ----
}
!
! function affiche_liste_animateurs($id, $login, $nom, $prenom, $tri="nom",
$mode="animateur")
{
! $criteres = "";
! $prem =" WHERE ";
! if ($nom!="") { $criteres .= $prem."nom LIKE '$nom%'"; $prem="
AND "; }
! if ($prenom!="") { $criteres .= $prem."prenom LIKE '$prenom%'"; $prem="
AND "; }
! if ($id!="") { $criteres .= $prem."id='$id'"; $prem="
AND "; }
! if ($login!="") { $criteres .= $prem."login LIKE '$login%'"; $prem="
AND "; }
! $req = "SELECT * FROM animateurs ".$criteres." ORDER BY $tri LIMIT 30";
! $res = executeRequete($req) or exit($req);
! echo "<table border=1 align=center>
! <tr><th>";
! if ($mode=="RESERVATION")
! echo "U1 U2";
! echo "</th>
! <th>No id<br>Code barre</th>
! <th>Identifiant</th>
! <th>Prénom</th>
! <th>Nom</th>
! <th>Autre</th>
! </tr>\n";
! switch ($mode)
! {
! case "RESERVATION" : $rop=3; break;
! case "COURRIEL" : $rop=70; break;
! default : $rop=5;
! }
! formRechercheanimateur($rop, "LIGNE", $mode);
! while ($animateur = $res->fetchrow(DB_FETCHMODE_OBJECT))
{
! if ($couleur=="lightgrey")
! $couleur="";
! else
! $couleur="lightgrey";
! affiche_animateur($animateur, "LISTE", $couleur, $mode);
! }
! echo "</table>\n";
! }
!
!
! // Partie d'un formulaire proposant la liste déroulante des animateurs
! function choix_animateur($id_animateur, $champ="id_animateur",
$vide="n'importe lequel")
! {
! /*echo "<form action=\"$PHPSELF?operation=1\" method=\"post\"
name=\"choixanim\">
! <select name=\"id_animateur\"
onchange=\"document.choixanim.submit();\">";*/
! echo "<select name=\"$champ\"><option value=\"\">$vide</option>\n";
! $req="select * from animateurs";
! $res=executerequete($req);
! while($listanim=$res->fetchrow(DB_FETCHMODE_OBJECT))
! {
! if($listanim->id==$id_animateur)
! echo "<option selected
value=\"$listanim->id\">$listanim->prenom,$listanim->nom</option>";
! else
! echo "<option value=\"$listanim->id\">"
.substr($listanim->prenom,0,10) .substr($listanim->nom,0,20) ."</option>";
! }
! echo "</select>";
! }
!
! function affiche_animateur($animateur, $FORMAT="LISTE", $couleur="#FFFFFF",
$mode="animateur")
! {
! global $tarifs, $couleurtarif, $id_session, $datev, $id_materiel, $id_horaire,
! $usagev, $info, $modifier, $programmer, $supprimer;
! switch ($FORMAT)
! {
! case "LISTE" :
! echo "<tr bgcolor=\"$couleur\">
! <td nowrap>";
! switch ($mode)
! {
! case "animateur" :
! if (ANIMATEURS_AUTRES>="r")
! echo "<a
href=\"animateur.php?id_animateur=$animateur->id\">$info</a> ";
! if (ANIMATEURS_AUTRES>="w")
! {
! echo "<a
href=\"animateur.php?id_animateur=$animateur->id&operation=1\">$modifier</a> ";
! echo "<a
href=\"animateur.php?id_animateur=$animateur->id&operation=2\">$supprimer</a> ";
! }
! break;
! case "SESSION" :
! echo "<a
href=\"inscription_session.php?id_animateur=$animateur->id&operation=3&id_session=$id_session\">$programmer</a>
";
! break;
! case "COURRIEL" :
! echo "<a
href=\"courriel.php?id_animateur=$animateur->id&operation=71\">$programmer</a>
";
! break;
! case "RESERVATION" :
! // Modification du 23 mars 2002
! //echo "<a
href=\"?id_animateur=$animateur->id&operation=31&id_materiel=$id_materiel&datev=$datev&id_horaire=$id_horaire&usagev=$usagev\">$programmer</a>";
! echo "<a href=\"#a\"
onclick=\"document.form2.id_animateur.value=$animateur->id;document.rechercheanimateur.id_animateur.value=$animateur->id;\">$programmer</a>
\n";
! echo "<a href=\"#a\"
onclick=\"document.form2.id_animateur2.value=$animateur->id;document.rechercheanimateur.id_animateur2.value=$animateur->id;\">$programmer</a>
\n";
! case "PARCOURS" :
! break;
! }
! echo "</td>
! <td>$animateur->id</td>
! <td><a
href=\"animateur.php?id_animateur=$animateur->id\">$animateur->login</a>
! </td>
! <td>$animateur->prenom</td><td>$animateur->nom</td>";
! /* <td bgcolor=\"".$couleurtarif[$animateur->id_tarif]."\"><font
size=\"-1\">".$tarifs[$animateur->id_tarif]."</font></td>";
! echo "<td nowrap>I : ";
! if ($animateur->credit_acces_individuel!="00:00")
! echo min2h($animateur->credit_acces_individuel);
! if ($animateur->fin_abonnement_acces_individuel>"1")
! echo
"->".datetodatecourt($animateur->fin_abonnement_acces_individuel);
! echo "<br>C : ";
! if ($animateur->credit_activites_collectives!="00:00")
! echo min2h($animateur->credit_activites_collectives);
! if ($animateur->fin_abonnement_activites_collectives>"1")
! echo
"->".datetodatecourt($animateur->fin_abonnement_activites_collectives);
! echo "</td><td";
! if ($animateur->credit_reservable<=0)
! echo " bgcolor=\"#FF1111\"";
! echo ">";
! if (isset($animateur->credit_reservable))
! echo min2h($animateur->credit_reservable);
! echo datetoheure($animateur->credit_reservable);
! echo "</td>";*/
! if ($mode=="PARCOURS")
! {
! echo "<td><a
href=\"inscription_session.php?id_session=$animateur->id_session\">".datetodate($animateur->date_session)."</a></td>\n";
! echo "<td>$animateur->etat</td>\n";
! }
! else
! {
! echo "<td><font size=\"-1\">";
! if (!$animateur->naissance || $animateur->naissance<="0000-00-00")
! echo "<font color=\"#FF0000\"><b>Date naissance inconnue
!</b></font>";
! if ($animateur->commentaires || $animateur->commentaire)
! echo "$animateur->commentaire<br>
! $animateur->commentaires";
! echo "</font></td></tr>\n";
! }
! break;
! case "SESSION" :
! break;
! case "COMPLET" :
! echo "<table border=1 align=center>
! <tr><td>Prénom
:</td><td><b>$animateur->prenom</b></td></tr>
! <tr><td>Nom :</td><td><b>$animateur->nom</b></td></tr>
! <tr><td>Identifiant :</td><td>$animateur->login</td></tr>\n";
! /* if ($isadmin)
! echo "<tr><td>Mot de passe
:</td><td>$animateur->motdepasse</td></tr>\n"; */
! echo "<tr><td>Date de naissance :</td>";
! if (!$animateur->naissance)
! echo "<td bgcolor=\"black\"><font color=\"#FF0000\"><b>Inconnue
!</b></font>";
! else
! echo "<td>".datetodate($animateur->naissance);
! echo "</td></tr>
! <tr><td>Adresse :</td><td>$animateur->adresse</td></tr>";
! echo "<tr><td>Courriel :</td><td>$animateur->courriel</td></tr>
! <tr><td>Structure de provenance :</td>";
! if ($animateur->id_structure)
! if ($res = recherche("structures", "id", $animateur->id_structure))
! {
! $structure = $res->fetchrow(DB_FETCHMODE_OBJECT);
! echo "<td>$structure->structure</td></tr>\n";
! }
! if (($is_ident=="structure" || $is_ident=="animateur") &&
(ANIMATEURS_AUTRES>="r"))
! echo "<tr><td>Commentaires
:</td><td>$animateur->commentaire</td></tr>";
! echo "</table>\n";
! break;
}
}
+
+ function formRechercheanimateur($operation_retour=0, $format="AUTONOME",
$mode="")
+ {
+ global $usagev, $datev, $debutv, $finv, $id_horaire, $id_materiel,
$id_session,
+ $id_animateur, $id_animateur2, $PHP_SELF;
+ echo "<form name=\"rechercheanimateur\" method=\"post\"
action=\"$PHP_SELF\">
+ <input type=\"hidden\" name=\"operation\"
value=\"$operation_retour\">";
+ if ($datev) echo "<input type=\"hidden\" name=\"datev\" value=\"$datev\">";
+ if ($debutv) echo "<input type=\"hidden\" name=\"debutv\"
value=\"$debutv\">";
+ if ($id_horaire) echo "<input type=\"hidden\" name=\"id_horaire\"
value=\"$id_horaire\">";
+ if ($id_materiel) echo "<input type=\"hidden\" name=\"id_materiel\"
value=\"$id_materiel\">";
+ if ($id_session) echo "<input type=\"hidden\" name=\"id_session\"
value=\"$id_session\">";
+
+ if ($format=="AUTONOME")
+ echo "<table bgcolor=\"#FFF0F0\" align=center border=1>
+ <tr><td></td><td>No
id<br>Code-barre</td><td>Identifiant</td><td>Prénom</td><td>Nom</td></tr>\n";
+ echo "<tr>
+ <td></td>
+ <td><input type=\"text\" name=\"id\" value=\"$id\"
size=10><br><input type=\"text\" name=\"code_barre\" value=\"$code_barre\"
size=10></td>
+ <td><input type=\"text\" name=\"login\" value=\"$login\"
size=10></td>
+ <td><input type=\"text\" name=\"prenom\" value=\"$prenom\"
size=10></td>
+ <td><input type=\"text\" name=\"nom\" value=\"$nom\" size=10></td>
+ <td colspan=3><input type=\"submit\" name=\"Rechercher\"
value=\"Rechercher\"></td><td>";
+
+ if ($mode=="RESERVATION")
+ {
+ echo "<input type=\"text\" name=\"usagev\" value=\"$usagev\"
size=\"3\">";
+ echo "<input type=\"text\" name=\"finv\" value=\"$finv\" size=\"6\">";
+ echo "<input type=\"text\" name=\"id_animateur\"
value=\"$id_animateur\" size=\"4\">";
+ echo "<input type=\"text\" name=\"id_animateur2\"
value=\"$id_animateur2\" size=\"4\">";
+ }
+ elseif ($usagev) echo "<input type=\"hidden\" name=\"usagev\"
value=\"$usagev\">";
+
+ echo"</td></tr>";
+ if ($format=="AUTONOME") echo "</table>\n";
+ echo "</form>\n";
+ }
+
?>
Index: basdepage.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/basdepage.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** basdepage.inc.php 14 May 2003 21:27:55 -0000 1.8
--- basdepage.inc.php 24 May 2003 11:58:29 -0000 1.9
***************
*** 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
--- 3,7 ----
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot
! EPNadmin - Version 0.7
This program is free software; you can redistribute it and/or modify
***************
*** 38,41 ****
--- 38,42 ----
<font size=\"-1\">
<center><a href=\"#\">$sretourhautdepage</a></center>
+
<p align=\"center\">$signature
<br>$signatureoriginale
***************
*** 46,50 ****
--- 47,55 ----
else
echo $sinconnue;
+
echo "</i></p></font>";
+
+ echo "<p align=center><img alt=\"logo PHP\" src=\"images/php-logo.jpg\"
height=\"30\">
+ <img alt=\"logo MySQL\" src=\"images/mysql-logo.png\"
height=\"30\"></p>";
?>
Index: constantes.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/constantes.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** constantes.inc.php 18 May 2003 18:41:40 -0000 1.33
--- constantes.inc.php 24 May 2003 11:58:29 -0000 1.34
***************
*** 35,39 ****
// Paramétrage du serveur de la base de données
if (! $type_base)
! $type_base="mysql"; // type de connexion au serveur de bases de données
if (! $mysql_serveur)
$mysql_serveur="localhost"; // Mettre le bon serveur (localhost)
--- 35,39 ----
// Paramétrage du serveur de la base de données
if (! $type_base)
! $type_base="direct"; // type de connexion au serveur de bases de données
if (! $mysql_serveur)
$mysql_serveur="localhost"; // Mettre le bon serveur (localhost)
***************
*** 119,126 ****
address@hidden</a>";
!
!
!
// Chargement du fichier de langage
require_once($langage.".lang.inc.php");
--- 119,126 ----
address@hidden</a>";
+ if (! $message_demarrage)
+ $message_demarrage="";
!
// Chargement du fichier de langage
require_once($langage.".lang.inc.php");
Index: fr.lang.inc.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/fr.lang.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** fr.lang.inc.php 18 May 2003 12:16:47 -0000 1.25
--- fr.lang.inc.php 24 May 2003 11:58:29 -0000 1.26
***************
*** 21,24 ****
--- 21,25 ----
http://epnadmin.pierrefitte93.fr/
*/
+
require_once("constantes.inc.php");
***************
*** 262,265 ****
--- 263,267 ----
"septembre","octobre","novembre","décembre");
}
+
// entente.inc.php
{
***************
*** 570,573 ****
--- 572,576 ----
$mysqlpbrequete="Problème dans la requête <font size=\"-1\">(%s)</font> :
%s.\n";
}
+
// parcours.php
{
***************
*** 631,634 ****
--- 634,645 ----
}
+ // prêts de matériels
+ {
+ $sprettitre="prêts de matériel";
+ $sprettitrecomplet="Gestion des prêts de matériels";
+ $spretselectionpourdemande="Sélection du matériel pour préparer une demande
d'emprunt";
+
+ }
+
// print.php
{
***************
*** 695,698 ****
--- 706,710 ----
$sresaaccompagnede="Accompagné de";
$sresasonidentifiant="(son identifiant)";
+ $sresagratuit="Utilisation à titre gratuite (sans prendre sur le crédit)";
$sresaconfresa="Je veux confirmer la réservation";
$sresalisteusager="Choix de l'usager qui réserve dans la liste";
Index: index.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/index.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** index.php 18 May 2003 18:41:40 -0000 1.11
--- index.php 24 May 2003 11:58:29 -0000 1.12
***************
*** 3,7 ****
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de
Pierrefitte (93)
! EPNadmin - Version 0.6
This program is free software; you can redistribute it and/or modify
--- 3,7 ----
Copyright (C) 2001, 2002 Bertand Pallie, Loïc Dayot - Mairie de
Pierrefitte (93)
! EPNadmin - Version 0.7
This program is free software; you can redistribute it and/or modify
***************
*** 37,41 ****
echo "<html><head><title>$saccueil - epnadmin</title>
! <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>";
$titr = ($is_ident!="usager" ? $sindextitre1 : $sindextitre2);
--- 37,42 ----
echo "<html><head><title>$saccueil - epnadmin</title>
! <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
! </head>";
$titr = ($is_ident!="usager" ? $sindextitre1 : $sindextitre2);
***************
*** 44,48 ****
require("entete.inc.php");
! if ($id_usager)
{
define("COULEUR", COULEUR_USAGERS);
--- 45,49 ----
require("entete.inc.php");
! if ($is_ident=="usager")
{
define("COULEUR", COULEUR_USAGERS);
***************
*** 65,68 ****
--- 66,86 ----
affiche_utilisations($id_usager, FUTUR);
echo cadre_fin(COULEUR_UTILISATIONS);
+ }
+
+ if ($is_ident=="structure")
+ {
+ define("COULEUR", COULEUR_USAGERS);
+ echo $message_demarrage;
+
+ echo cadre_debut($stitresessions, "align=center", COULEUR_SESSIONS);
+ if (SESSIONS_AUTRES>="r" || SESSIONS_MOI>="r")
+ {
+ printf($svoiplanningsessions, "table_horaire_session.php");
+ printf($svoirlistesessionfutur, "session.php?operation=4");
+ printf($svoirlistesessionpasse, "session.php?operation=5");
+ }
+ if (SESSIONS_AUTRES>="w" || SESSIONS_MOI>="w")
+ printf($sajoutersession, "session.php?operation=1");
+ echo cadre_fin(COULEUR_SESSIONS);
}
Index: prets.php
===================================================================
RCS file: /cvsroot/epnadmin/epnadmin/prets.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** prets.php 6 May 2003 19:31:05 -0000 1.5
--- prets.php 24 May 2003 11:58:29 -0000 1.6
***************
*** 3,7 ****
Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
! EPNadmin - Version 0.6
This program is free software; you can redistribute it and/or modify
--- 3,7 ----
Copyright (C) 2002 Loïc Dayot - Mairie de Pierrefitte (93)
! EPNadmin - Version 0.7
This program is free software; you can redistribute it and/or modify
***************
*** 21,26 ****
--- 21,35 ----
http://epnadmin.pierrefitte93.fr/
*/
+ // TODO : Modifier la fonction sessions.inc.php/nbmaxparticipants()
+ // Modifier table_horaires.php/ligne 130-140
+
require_once("header.inc.php");
+ if (!defined("FCT_PRETS"))
+ {
+ echo $fctnonactive;
+ exit;
+ }
+
require_once("constantes.inc.php"); // définition des constantes
//require_once("fonctions.inc.php"); // concernant des fonctions
transversales inclassables
***************
*** 36,49 ****
//require_once("parcours.inc.php"); // concernant les parcours
des usagers et leur positionnement
! ?>
! <html>
! <head>
! <title>prêt de matériel - epnadmin</title>
! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
! <body>
! <?
! $titr = "Gestion des prêts de matériels";
!
! $datemaj="5 octobre 2002";
require("entete.inc.php");
--- 45,55 ----
//require_once("parcours.inc.php"); // concernant les parcours
des usagers et leur positionnement
! echo "<html><head><title>$sprettitre - epnadmin</title>
! <meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\">
! </head>";
!
! $titr = $sprettitrecomplet;
! define("COULEUR", COULEUR_PRETS);
! $datemaj="18 mai 2003";
require("entete.inc.php");
***************
*** 88,97 ****
// Début de la page
! if (!$id_structure)
! echo "<p>Cette page est réservée aux structures et partenaires.</p>\n";
else
switch ($operation)
{
case 1 : // matériel emprunté (ou en demande) de ma structure
echo "<table bgcolor=\"COULEUR_PARC\" align=center>
<tr><td align=center><h3>Matériel prêté à d'autres
structures</h3></td></tr>
--- 94,104 ----
// Début de la page
! if (PRETS<="~")
! echo $pasledroit;
else
switch ($operation)
{
case 1 : // matériel emprunté (ou en demande) de ma structure
+ {
echo "<table bgcolor=\"COULEUR_PARC\" align=center>
<tr><td align=center><h3>Matériel prêté à d'autres
structures</h3></td></tr>
***************
*** 147,152 ****
--- 154,161 ----
echo "</td></tr></table>";
break;
+ }
case 2 : // matériel emprunté par ma structure
+ {
echo "<table bgcolor=\"COULEUR_PARC\" align=center>
<tr><td align=center><h3>Matériel emprunté par ma
structures</h3></td></tr>
***************
*** 200,205 ****
--- 209,216 ----
echo "</td></tr></table>";
break;
+ }
case 3 : // tout le matériel emprunté
+ {
echo "<table bgcolor=\"COULEUR_PARC\" align=center>
<tr><td align=center><h3>Tout le matériel prêté</h3></td></tr>
***************
*** 254,262 ****
--- 265,353 ----
echo "</td></tr></table>";
break;
+ }
case 4 : // Faire une demande d'emprunt
+ {
+ echo cadre_debut($spretselectionpourdemande);
+ // Présenter la liste des matériels disponibles
+
+ // Construction de la requete
+ $req = "SELECT *, materiels.id AS id, materiels.description AS description
FROM materiels ";
+ $req.=" LEFT JOIN localisations ON localisations.id=id_localisation
+ LEFT JOIN structures ON
structures.id=localisations.id_structure ";
+ $req.=" WHERE (pret_possible='oui') ";
+ if (PARC_AUTRES<"r")
+ $req.=" AND id_structure=\"$id_structure\" ";
+ if ($lieuv>"0" && $lieuv!="*")
+ $req.=" AND ((CONCAT(\"V\",structures.ville)=\"$lieuv\") OR
+ (CONCAT(\"S\",localisations.id_structure)=\"$lieuv\") OR
+ (CONCAT(\"L\",localisations.id)=\"$lieuv\")) ";
+ if ($type>"" && $type!="*")
+ $req.=" AND type=\"$type\"";
+ $req.=" ORDER BY type, id_localisation, materiel,
localisations.description";
+ $res = executeRequete($req);
+
+
+ // Ligne d'entête
+ echo "<table border=1 align=center>
+ <tr><th>$stype";
+ echo
"</th><th>$sLocalisation</th><th>$sAppellation</th><th>$sCommentaire</th><th>$sActions";
+ echo "</th></tr>\n\n";
+ // Ligne pour les critères de sélection.
+ echo "<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">
+ <input type=\"hidden\" name=\"operation\"
value=\"$operation\">
+ <tr><td>";
+ echo " <select name=\"type\"><option value=\"*\">Tous</option>";
+ $reqtype="SELECT type FROM materiels WHERE pret_possible='oui' GROUP BY
type ORDER BY type";
+ $restype=executeRequete($reqtype);
+ while ($enrtype=fetch_object($restype))
+ {
+ echo "<option value=\"$enrtype->type\"";
+ if ($enrtype->type==$type) echo " selected";
+ echo ">$enrtype->type</option>\n";
+ }
+ echo "</select>\n";
+ echo "</td><td>";
+ choix_lieu($lieuv, "lieuv");
+ echo "</td><td></td><td></td><td><input type=\"submit\"
value=\"$srechercher\">";
+ echo "</td></tr>\n</form>\n";
+ $type="";
+ while ($log = fetch_object($res))
+ {
+ echo "<tr>\n";
+ if ($type!=$log->type)
+ {
+ echo "<th>$log->type</th>\n";
+ $type=$log->type;
+ }
+ else
+ echo "<td></td>\n";
+ echo "<td>".localisation($log->id_localisation)."</td>
+ <td><b>$log->materiel</b> ($log->specificite)</td>
+ <td>$log->description</td>
+ <td nowrap><a href=\"materiels.php?id_materiel=$log->id\"
target=\"details\">$info</a>";
+ /* if ((PARC_MOI>="w" && $log->id_structure==$id_structure) ||
PARC_AUTRES>="w")
+ echo "<a
href=\"$PHP_SELF?operation=2&id_materiel=$log->id\">$modifier</a>
+ <a
href=\"$PHP_SELF?operation=3&id_materiel=$log->id\">$supprimer</a>"; */
+ echo "</td></tr>\n";
+ }
+
+ /* if (PARC_MOI>="w" || PARC_AUTRES>="w")
+ echo "<tr><td colspan='4'></td><td><a
href=\"$PHP_SELF?operation=1\">$ajouter</a></td></tr>\n"; */
+ echo "</table>\n";
+
+
+
+
+ // Permettre de sélectionner tels ou tels matériels
+ // Enregistrer la sélection
+ // Remplir la vraie demande
+ // Envoyer un courriel...
+ echo cadre_fin();
break;
+ }
case 5 : // Retour de matériel
+ {
echo "<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">
<input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
***************
*** 280,285 ****
--- 371,378 ----
echo "</table>";
break;
+ }
case 51 : // Enregistrement d'un retour effectif
+ {
$date_retour_effectif=$date_retour_effectifannee."-".
$date_retour_effectifmois."-".
***************
*** 292,297 ****
--- 385,392 ----
echo "<p>La date de retour a bien été enregistrée</p>\n";
break;
+ }
case 6 : // Confirmation de prêt
+ {
echo "<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">
<input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
***************
*** 307,312 ****
--- 402,409 ----
echo "</table>";
break;
+ }
case 61 : // Enregistrement d'un retour effectif
+ {
$req="UPDATE pret_materiel
SET etat=\"prêté\"
***************
*** 346,351 ****
--- 443,450 ----
"From: address@hidden"); */
break;
+ }
case 7 : // Refus de prêt
+ {
echo "<form action=\"$PHP_SELF\" method=\"POST\"
enctype=\"multipart/form-data\">
<input type=\"hidden\" name=\"id_pret\" value=\"$id_pret\">
***************
*** 364,369 ****
--- 463,470 ----
echo "</table>";
break;
+ }
case 71 : // Enregistrement d'un refus de pret
+ {
$req="UPDATE pret_materiel
SET etat=\"refusé\",
***************
*** 403,406 ****
--- 504,508 ----
"From: address@hidden"); */
break;
+ }
case 8 : // Annuler ma demande
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Epnadmin-fr] CVS: epnadmin animateur.php,1.1,1.2 animateurs-horaires.php,1.1,1.2 animateurs.inc.php,1.1,1.2 basdepage.inc.php,1.8,1.9 constantes.inc.php,1.33,1.34 fr.lang.inc.php,1.25,1.26 index.php,1.11,1.12 prets.php,1.5,1.6,
Loïc Dayot <=