$v) { $lesCol[] = $k; } $requeteSQL = "UPDATE accountinfo SET "; $indexType=0; foreach ($_POST as $kp => $vp) { if(!in_array($kp,$lesCol)) continue; $indexType++; if(mysql_field_type($resultAcc,$indexType)=="date") { if($vp) $vp = dateToMysql($vp); } $requeteSQL.="$kp='$vp',"; } $requeteSQL = substr($requeteSQL,0,strlen($requeteSQL)-1); $requeteSQL.=" WHERE hardware_id=$systemid"; // Exécution de la requête SQL if( lock($systemid) ) { $resultat = mysql_query( $requeteSQL, $_SESSION["writeServer"] ); unlock($systemid); } else errlock(); return; } if ($action_form == 'modifier') { $systemid = $_POST["systemid"]; MAJ_Inventory($systemid); echo "\n"; } echo ""; echo ""; echo ""; echo ""; echo "
".$l->g(56)."
"; $queryAcInf = "SELECT * FROM accountinfo WHERE hardware_id=$systemid"; $resultAcInf = mysql_query($queryAcInf, $_SESSION["readServer"] ) or die(mysql_error($_SESSION["readServer"])); $item=mysql_fetch_array($resultAcInf,MYSQL_ASSOC); //******************************************************************** //* FORMULAIRE DE SAISIE * //******************************************************************** echo "
\n"; echo "\n"; $indexType = -1; foreach ($item as $k=>$v) { $indexType++; $kaff = $k; if($k == "DEVICEID" || $k == "UNITID" || $k == "HARDWARE_ID") continue; if($k == "TAG") $kaff = TAG_LBL; if(mysql_field_type($resultAcInf,$indexType)=="date") echo "\n"; else echo "\n"; } // les dates echo "
$kaff: ".datePick($k). "  
$kaff:

\n"; echo ""; echo "\n"; echo "
\n"; echo "          \n"; echo "\n"; echo ""; echo ""; echo "
\n"; if ($action == "ajouter_donnees") { echo "\n"; } elseif ($action == "MAJ_donnees") { echo "\n"; } echo "\n"; echo "
\n"; echo ""; echo ""; ?>