1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| <?
//*************************************************************
// Auteur :
// Nom : annuaire.php
// Description => Affichage de l'annuaire
//
// Pg origine : pagegauche.php
//*************************************************************
// Inclusion de la bibliothèque des fonctions
include("../lib/fonctions.php");
// contrôles sécurité session
ctrl_session();
// Inclusion de l'entete de page
include("../entetepied/hautpage.php");
// Connection base
$base = connectdb();
// Titre page
$ret.="<div style='position:absolute; left:112px; top:121px; width:800;'>";
$ret.="<table align='right' width='800' border='0' cellpadding='0' cellspacing='0'>";
$ret.="<tr>";
$ret.="<td colspan='4' width='800' height='40' align='center' class='titre7'>Gestion de l'annuaire</td>";
$ret.="</tr>";
$ret.="<tr>";
$ret.="<td colspan='4' width='800' height='40' align='center' class='titre7'>Critère de recherche : <input type='input' name='recherche' size='15' value=''></td>";
$ret.="</tr>";
// Ouverture de la base
$base = connectdb();
$ret.='<input name="submit" type="hidden" value="1">';
// Récupération des informations annuaire de la base
$requete = 'SELECT annu_nom,annu_prenom,annu_service FROM annuaire ORDER BY annu_nom,annu_prenom';
$resultat = mysql_query($requete,$base);
if(controle_table($resultat,$requete))
{
$x=0;
$ret.='<tr><td colspan="2" width="180" height="20" align="center" class="titre6"><input type="text" name="tri_nom" value="Nom" onclick=></td>';
$ret.='<td width="150" height="20" class="titre6" align="center">Prenom</td>';
$ret.='<td width="470" height="20" class="titre6" align="center">Service</td></tr>';
while ($annuaire = mysql_fetch_array($resultat))
{
$nom = conver_base_chaine($annuaire[annu_nom]);
$prenom = conver_base_chaine($annuaire[annu_prenom]);
$service = conver_base_chaine($annuaire[annu_service]);
// Affichage des données
$ret.='<tr><td width="30" height="20">';
$ret.='<form name="select_nom" action="/admin/annuaire.php" method="post">';
$ret.='<input type="hidden" size="8" name="ij_date" value="'.$infojour[0].'"\><input type="hidden" size="70" name="ij_titre" value="'.conver_guillemet($titre).'"><input type="hidden" name="ij_id" value="'.$infojour[ij_id].'"\><input name="ij_pijid" type="hidden" value="'.$admin_id.'"><input type="hidden" name="ij_texte" value="'.conver_guillemet($texte).'"\><input type="hidden" name="ij_ligne" value="'.$infojour[ij_ligne].'">';
$ret.='<input type="image" src="/images/modif.gif" width="20" height="20" onmouseover="this.src=\'/images/modif_over.gif\'" onmouseout="this.src=\'/images/modif.gif\'" alt="Détail"></td>';
$ret.='<td width="150" height="20" class="normal7">'.$nom.'</td>';
$ret.='<td width="150" height="20" class="normal7">'.$prenom.'</td>';
$ret.='<td width="470" height="20" class="normal7" align="left">'.$service.'</td>';
$ret.='</form>';
$ret.='</tr>';
}
// Bouton nouveau : création d'un nouvel agent
$ret.='<tr><td colspan="4" width="800" height="30" align="right">';
$ret.='<input type="submit" name="nouveau" class="nouveau" onclick="javascript:location.replace(\'/admin/annuaire.php?\')" onmousedown="this.className=\'nouveau_on\'" onmouseup="this.className=\'nouveau\'" title="Créer un nouvel agent" value=" "></td></tr>';
}
$ret.="</table>";
$ret.="</div>";
// Fermeture connexion base
mysql_close($base);
$ret.="</body>";
$ret.="</html>";
echo $ret;
?> |