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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
<?php
// Recherche d'une session existante
session_start();
// Si pas de session ouverte, tentative d'intrusion
if(!$_SESSION['prénom'])
{
echo '<h1>Voyou ! Vous n\'êtes pas authentifié.</h1>';
?>
<!-- on renvoie automatiquement à la page de login -->
<script language="javascript">
//<![CDATA[
function redirect() {
document.location.href= '../../administration/';
}
setTimeout('redirect()',3000);
//]]>
</script>
<?php
}
// Si session ouverte, déroulement de la page
else
{
/// Listing des classes disponibles ////////////////////////////////////////////////////////////////////////////////////////
$scripts = array();
$i = 0;
foreach(glob('../../administration/moygen/scripts/inlinemod.class.*.js') as $fichier)
{
$scripts[$i] = $fichier;
$i++;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
?>
<html>
<head>
<title>General Management </title>
<style type="text/css" media="screen">
@import url("../../styles/style.css");
</style>
<style type="text/css">
#main {width: 100%; text-align: left; border: none; left: 10px;}
#users {border: 1; font-size: 11px; width: 98%; }
#erreur {color: #F00; font-weight: bold; border: none; width: 100%; height: 20px;}
td.numeros {text-align: center; cursor: pointer;}
img {border: none;}
a:link {color: #005da8; font-weight: normal;}
a:visited {color: #005da8; font-weight: normal;}
a:hover {color: #ff4500; font-weight: normal;}
th {line-height: 2; text-align: center; font-weight: bold; font-size: 1.5em;}
tr {line-height: 2;}
td.cellule{cursor: pointer;}
thead,tfoot {background: #c0c0c0;}
input {background: #fff; width: 100%; font-size: 10px;}
</style>
<script type="text/javascript" src="../../administration/moygen/scripts/utils.js"></script>
<?php
//Inclusion des fichiers javascript de classes
foreach($scripts as $script)
{
print '<script type="text/javascript" src="' . $script . '"></script>';
}
?>
<script type="text/javascript" src="../../administration/moygen/scripts/inlinemod.js"></script>
</head>
<body>
<?php
// Script de contrôle du site
require_once('../../ip.php');
// Fonction pour alterner la couleur de fond des lignes du tableau
require('../../genfun.php');
?>
<div id="header">
<h1><a id="alegal" href="../../administration/moygen/" target="_self">Online General Management Tools</a> | Phone Book </h1>
</div>
<br />
<h2>Gestion de l'Annuaire des collaborateurs Single Risk</h2><br />
<!-- Div qui affiche les messages d'erreur de saisie ou de résultat -->
<div id="erreur"></div><br />
<div id="main">
<!-- Tableau affichant les infos des collaborateurs Single Risk -->
<table id="users">
<!-- Entête de tableau -->
<thead>
<tr>
<th>Nom</th>
<th>Prénom</th>
<th>Fonction</th>
<th>Département</th>
<th>Tel. #1</th>
<th>Tel. #2</th>
<th>Fax</th>
<th>Email</th>
<th>Site</th>
<th>Bureau</th>
</tr>
</thead>
<?php
// Script pour afficher un tableau des données de l'annuaire
//Paramètres de connexion
require_once('../../functions.php');
// Requête MySQL
$sql = "SELECT * FROM $mytab5 ORDER BY name";
$request = mysql_query($sql,$link) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
// Boucle sur les lignes de la db
while($data = mysql_fetch_assoc($request))
{ ?>
<!-- Appel de la fonction de colorisation alternée des lignes du tableau -->
<tr bgcolor="<?php echo switchcolor(); ?>">
<td id="name-<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'name', 'Texte')">
<?php echo$data['name'] ;?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'forname', 'Texte')">
<?php echo $data['forname']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'function', 'Texte')">
<?php echo $data['function']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'department', 'Texte')">
<?php echo $data['department']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="numeros" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'tel', 'Texte')">
<?php echo $data['tel']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="numeros" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'tel2', 'Texte')">
<?php echo $data['tel2']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="numeros" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'fax', 'Texte')">
<?php echo $data['fax']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'email', 'Texte')">
<?php echo $data['email']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'place', 'Texte')">
<?php echo $data['place']; ?>
</td>
<td id="<?php echo $data['INDEX']; ?>" class="cellule" onclick="inlineMod(<?php echo $data['INDEX']; ?>, this, 'office', 'Texte')">
<?php echo $data['office']; ?>
</td>
</tr>
<?php
}
?>
<!-- Affichage d'un pied de tableau -->
<tfoot>
<tr>
<th>Nom</th>
<th>Prénom</th>
<th>Fonction</th>
<th>Département</th>
<th>Tel. #1</th>
<th>Tel. #2</th>
<th>Fax</th>
<th>Email</th>
<th>Site</th>
<th>Bureau</th>
</tr>
</tfoot>
</table>
</div>
<br />
</body>
</html>
<?php
// On est poli et on ferme la porte
mysql_close();
}
?> |
Partager