" . gettext("$action_parc[pageTitre]") . ""; //*****************cas des parcs delegues***********************************/ if ((is_admin("computers_is_admin", $login) == "N") and ((is_admin("parc_can_view", $login) == "Y") or (is_admin("parc_can_manage", $login) == "Y"))) { echo "

" . gettext($action_parc['msgDelegationAccept']) . "

"; $acces_restreint = 1; $list_delegate = list_parc_delegate($login); if (count($list_delegate) > 0) { $delegate = "yes"; } else { echo "
"; echo $action_parc['msgNoDelegation']; echo "
\n"; exit; } } /* * *********************** Declaration des variables *********************************** */ $action = $_POST['action']; if (!$action) { $action = $_GET['action']; } $parc = $_POST['parc']; if (!$parc) { $parc = $_GET['parc']; } if ($action == "") { $action = "detail"; } if ($action == "choix_time") { $action = "detail"; } switch ($action) { case "detail": $list_parcs = search_machines("objectclass=groupOfNames", "parcs"); if (count($list_parcs) > 0) { sort($list_parcs); echo "
"; echo "
\n"; echo "  \n"; echo "\"help\" "; // echo "\n"; echo "
\n"; echo "
\n"; echo "
"; } else { echo "
"; echo gettext($action_parc['msgNoParc']); echo "
\n"; } if (($parc != "") && ($parc != "SELECTIONNER")) { // smbstatus(); echo "
\n"; echo ""; echo ""; //=================================== echo ""; //=================================== // Test le niveau de delegation // manage ou view // Si manage on peut aller sur programmer $niveau_delegation = niveau_parc_delegate($login, $parc); if ($niveau_delegation != "view") { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; // echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "
\n"; echo "
\n"; echo ""; echo ""; echo "
\n"; echo "
\n"; echo "
\n"; echo ""; echo ""; echo ""; echo ""; echo "\n"; echo "
\n"; echo "
\n"; require_once ("printers.inc.php"); global $smbversion; echo "\n
\n
\n"; echo "\n\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $mp_all = gof_members($parc, "parcs", 1); // Filtrage selon critere if ("$filtrecomp" == "") { $mp = $mp_all; } else { $lmloop = 0; $mpcount = count($mp_all); for ($loop = 0; $loop < count($mp_all); $loop++) { $mach = $mp_all[$loop]; if (preg_match("/$filtrecomp/", $mach)) { $mp[$lmloop++] = $mach; } } } if (count($mp) > 0) { sort($mp); for ($loop = 0; $loop < count($mp); $loop++) { $mpenc = urlencode($mp[$loop]); $mp_en_cours = urldecode($mpenc); $mp_curr = search_machines("(&(cn=$mp_en_cours)(objectClass=ipHost))", "computers"); // Test si on a une imprimante ou une machine $resultat = search_imprimantes("printer-name=$mp_en_cours", "printers"); $suisje_printer = "0"; for ($loopp = 0; $loopp < count($resultat); $loopp++) { if ($mp_en_cours == $resultat[$loopp]['printer-name']) { $suisje_printer = "1"; continue; } } // On teste si la machine a des connexions actives // en fonction de la version de samba // On ne rentre dedans que si on est pas une imprimante if ($suisje_printer != "1") { // Inventaire //$sessid=session_id(); if (file_exists("/var/www/se3/includes/dbconfig.inc.php")) { include_once "fonc_outils.inc.php"; $sessid=session_id(); $systemid=avoir_systemid($mpenc); } // Affichage du tableau echo "\n"; // Affichage de l'icone informatique echo "\n"; } else { echo "\"Ordinateur\""; //echo "\"Station\"\n"; } echo "\n"; $iphost = $mp_curr[0]["ipHostNumber"]; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; } } } echo "
\n"; if (isset($systemid)) { // Type d'icone en fonction de l'OS - modif keyser $retourOs = type_os($mpenc); if($retourOs == "0") { $icone="computer_disable.png"; } elseif($retourOs == "Linux") { $icone="linux.png"; } elseif($retourOs == "XP") { $icone="winxp.png"; } elseif($retourOs == "7") { $icone="win7.png"; } elseif($retourOs == "98") { $icone="win.png"; } else { $icone="computer_disable.png"; } $ip=avoir_ip($mpenc); echo "\"$retourOs\""; //echo "\"Station\"$mp_en_cours$iphost\n"; //$etat echo "
\n"; echo "\n"; echo "
\n"; //$etat_session echo "
\n"; echo "\n"; echo "
"; echo "
\n"; echo "\n"; echo "
"; echo "
\n"; echo "\n"; echo "
\n"; echo "
\n"; echo "
"; detail_parc_printer($parc); //$heure_act=date("H"); $nomjour = date("l"); // echo $nomjour; } switch ($nomjour) { case "Monday": $nomjour = "l"; break; case "Tuesday": $nomjour = "ma"; break; case "Wednesday": $nomjour = "me"; break; case "Thursday": $nomjour = "j"; break; case "Friday": $nomjour = "v"; break; case "Saturday": $nomjour = "s"; break; case "Sunday": $nomjour = "d"; break; } $resultf = mysql_query("select heure,action from actionse3 where parc='$parc' and jour='$nomjour' ;", $authlink) or die("Impossible d'effectuer la requete"); if ($resultf) { if (mysql_num_rows($resultf) > 0) { while ($row = mysql_fetch_row($resultf)) { if ($row[1] == "wol") { echo "

" . gettext($action_parc['msgPoweronAction']) . " $row[0] " . gettext("ce jour") . "

"; } if ($row[1] == "stop") { echo "

" . gettext($action_parc['msgShutdownAction']) . " $row[0] " . gettext("ce jour") . "

"; } } } else { if (($parc != "") && ($parc != "SELECTIONNER")) { echo "

" . gettext($action_parc['msgNoActions']) . " $parc

"; } } } break; } // echo ""; } require ("pdp2.inc.php"); ?>