g(107)); $lesEdits = array("IPDISCOVER_MAX_ALIVE","DOWNLOAD_CYCLE_LATENCY","DOWNLOAD_FRAG_LATENCY","DOWNLOAD_PERIOD_LATENCY", "DOWNLOAD_PERIOD_LENGTH","DOWNLOAD_TIMEOUT","PROLOG_FREQ"); if( isset($_POST["FREQUENCY"] ) ) { switch($_POST["FREQUENCY"]) { case "NEVER" : setOpt("FREQUENCY", -1); break; case "ALWAYS": setOpt("FREQUENCY", 0); break; default: setOpt("FREQUENCY", $_POST["FREQUENCY_edit"]); } switch($_POST["IPDISCOVER"]) { case "OFF": setOpt("IPDISCOVER", 0); break; default: setOpt("IPDISCOVER", $_POST["IPDISCOVER_edit"]); } $autoDupLvl = isset($_POST["AUTO_DUPLICATE_LVL_serial"])?$_POST["AUTO_DUPLICATE_LVL_serial"]:0; $autoDupLvl += isset($_POST["AUTO_DUPLICATE_LVL_host"])?$_POST["AUTO_DUPLICATE_LVL_host"]:0; $autoDupLvl += isset($_POST["AUTO_DUPLICATE_LVL_mac"])?$_POST["AUTO_DUPLICATE_LVL_mac"]:0; setOpt("AUTO_DUPLICATE_LVL", $autoDupLvl); $lesOnOff = array("REGISTRY","UPDATE","DEPLOY","TRACE_DELETED","LOGLEVEL","DOWNLOAD","INVENTORY_DIFF","INVENTORY_TRANSACTION"); foreach($lesOnOff as $oo) setOpt($oo, ($_POST[$oo]=="ON"?1:0)); foreach($lesEdits as $ee) setOpt($ee, $_POST[$ee."_edit"]); } ?>
$nbr = 0; $trad = array("REGISTRY"=>412,"UPDATE"=>413,"DEPLOY"=>414,"TRACE_DELETED"=>415,"LOGLEVEL"=>416,"DOWNLOAD"=>417,"INVENTORY_DIFF"=>418, "IPDISCOVER_MAX_ALIVE"=>419,"DOWNLOAD_CYCLE_LATENCY"=>420,"DOWNLOAD_FRAG_LATENCY"=>421,"DOWNLOAD_PERIOD_LATENCY"=>422, "DOWNLOAD_PERIOD_LENGTH"=>423,"DOWNLOAD_TIMEOUT"=>424,"IPDISCOVER"=>425,"FREQUENCY"=>426,"AUTO_DUPLICATE_LVL"=>427); $resConf = mysql_query("SELECT NAME,IVALUE FROM config WHERE NAME<>'GUI_VERSION' ORDER BY NAME", $_SESSION["readServer"]) or die(mysql_error()); $decal = "   "; $ligne = 0; while( $conf = mysql_fetch_array($resConf) ) { $title = " title=\"".htmlspecialchars($l->g($trad[$conf["NAME"]]))."\" "; echo ""; //case 1 echo "$decal".$conf["NAME"].""; //case 2 echo ""; showOption( $conf["NAME"], $conf["IVALUE"] ); echo ""; //separator echo ""; if( ! $conf = mysql_fetch_array($resConf) ) break; $title = " title=\"".strtr($l->g($trad[$conf["NAME"]]), "\"","'")."\" "; //case 3 echo "$decal".$conf["NAME"].""; //case 4 echo ""; showOption( $conf["NAME"], $conf["IVALUE"] ); echo ""; $ligne++; } echo "
g(49); ?>g(224); ?>   g(49); ?>g(224); ?> echo $l->g(51);
 
"; echo "

"; function showOption($nme, $val) { switch($nme) { case "REGISTRY": case "UPDATE": case "DEPLOY": case "TRACE_DELETED": case "LOGLEVEL": case "DOWNLOAD": case "INVENTORY_DIFF": case "INVENTORY_TRANSACTION": echo "
ON
OFF
"; break; case "AUTO_DUPLICATE_LVL": echo "
Serial
hostname
macaddress
"; break; case "IPDISCOVER": echo "
ON".edit($nme,$val)."
OFF
"; break; case "FREQUENCY": echo "
ALWAYS".edit($nme,$val)."
NEVER
0?"checked":"")." type='radio' name='$nme' value='CUSTOM' OnClick=\"active('{$nme}_div',1);\">CUSTOM
"; break; default: echo edit($nme,$val); break; } } function edit($nme, $val) { $enabled = true; $valInit = $val; if( $nme == "FREQUENCY" && $val < 1 ) { $enabled = false; $valInit = 1; } else if( $nme == "IPDISCOVER" && $val <= 0 ) $enabled = false; return "
+
-
"; } function setOpt($nme, $ivalue) { mysql_query("UPDATE config SET IVALUE=$ivalue WHERE name='$nme'", $_SESSION["writeServer"]) or die(mysql_error()); }