Aucune interface ne correspond à cet identifiant
\n"; include "inc/inc.footer.php"; exit(); } if($_POST['num'] != "") { $r = pg_query("SELECT MAX(idaction) FROM action"); if($am = pg_fetch_array($r)) $newid = $am[0]+1; else $newid = 1; $num = pg_escape_string($_POST['num']); $opt = iconv("UTF-8", "ASCII//TRANSLIT", $_POST['opt']); if($num == -1) { pg_query("INSERT INTO action VALUES($newid, $id, 0, '$opt')"); pg_query("INSERT INTO action VALUES($newid+1, $id, 1, '$opt')"); } elseif($num == 73) { pg_query("INSERT INTO action VALUES($newid, $id, 7, 3)"); } elseif($num == 7964) { pg_query("INSERT INTO action VALUES($newid, $id, 7, 964)"); } else { pg_query("INSERT INTO action VALUES($newid, $id, $num, '$opt')"); } // Logging actions $r = pg_query("SELECT MAX(idlog) FROM action_log"); if($am = pg_fetch_array($r)) $newid = $am[0]+1; else $newid = 1; if($num == -1) { pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 0, ${a[7]})"); pg_query("INSERT INTO action_log VALUES($newid+1, '$auth_user', ".time().", $id, 1, ${a[7]})"); } elseif($num == 73) { $oldopt = $a[10]; pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 7, '$oldopt', 3)"); } elseif($num == 7964) { $oldopt = $a[10]; pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 7, '$oldopt', 964)"); } else { switch($num) { case 0: case 1: $oldopt = $a[7]; break; case 2: $oldopt = $a[4]; break; case 3: $oldopt = $a[19]; break; default: $oldopt = ''; break; } pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, $num, '$oldopt', '$opt')"); } } function DisplayActions() { global $id; $r = pg_query("SELECT numaction, option FROM action WHERE idinterface = $id ORDER BY idaction"); if($a = pg_fetch_array($r)) { ?>Les modifications effectuées ici prendront effet dans un délai maximum de 10 minutes.
Cette interface est en isolement. Il y a surement une raison à cela…";} //empêche toutes les actions sauf sur les chambres correctement inscrites $forbidden = 1; if (! $not_a_room) { $r2 = pg_query("SELECT idroom, datedeco, certif, iduser FROM user_pac WHERE idroom = ".$aroom[0]); if($a2 = pg_fetch_array($r2)) { if(strtotime(date("Y-m", strtotime($a2['datedeco']." +1 month"))) < time()) { echo "détails techniquesMatéreil connecté sur cette interface
".($a[3]==$datelast?"":"")."${a[1]} / ${a[2]}"; echo ($a[3]==$datelast?"":"")." (".date("D d/m/Y H:i", $a[3]).")\n"; $a = pg_fetch_array($r); } } ?>