//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Pierre LEMMET 2005
// Web: http://ocsinventory.sourceforge.net
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
//Modified on 7/7/2005
include ('fichierConf.class.php');
include('req.class.php');
if($_GET["suppAcc"]) {
dbconnect();
@mysql_query("DELETE FROM operators WHERE id='".$_GET["suppAcc"]."'");
echo "
". $_GET["suppAcc"] ." ".$l->g(245)."
";
}
if($_POST["nom"])
{
switch($_POST["type"]) {
case $l->g(242): $suff = "1"; break;
case $l->g(243): $suff = "2"; break;
}
$query = "INSERT INTO operators(id,passwd,accesslvl) VALUES('".$_POST["nom"]."','".md5( $_POST["pass"])."', '$suff')";
@mysql_query($query);
echo "
". $_POST["nom"] ." ".$l->g(234)."
";
}//fin if
?>
printEntete($l->g(244));
echo "
";
printEntete($l->g(233));
echo "
";
$reqAc = mysql_query("SELECT id,accesslvl FROM operators ORDER BY accesslvl,id ASC") or die(mysql_error());
echo "";
echo "".$l->g(49)." | ".$l->g(66)." |
";
while($row=mysql_fetch_array($reqAc)) {
$x++;
echo ""; // on alterne les couleurs de ligne
echo "".$row["id"]." | ".($row["accesslvl"]==1?$l->g(242):$l->g(243))." |
|
";
}
echo "
";
?>