\n";
if ($_POST['mode'] == 'ping_ip') {
$resultat = fping($_POST['ip']);
if ($resultat) {
//echo "";
//echo "";
$nom_machine = isset($_POST['nom_machine']) ? $_POST['nom_machine'] : NULL;
$parc = isset($_POST['parc']) ? $_POST['parc'] : NULL;
if ((isset($nom_machine)) && (isset($parc))) {
//echo gettext($action_parc['msgStationIsOn']),
echo ""
. "\n";
} else {
echo "";
}
} else {
//echo "";
//echo "";
$nom_machine = isset($_POST['nom_machine']) ? $_POST['nom_machine'] : NULL;
$parc = isset($_POST['parc']) ? $_POST['parc'] : NULL;
if ((isset($nom_machine)) && (isset($parc))) {
echo ""
. ""
. "\n";
} else {
echo "";
}
}
} elseif ($_POST['mode'] == 'session') {
$session = get_smbsess($_POST['nom_machine']);
echo $session['html'];
} elseif ($_POST['mode'] == 'wake_shutdown_or_reboot') {
wake_shutdown_or_reboot($_POST['ip'], $_POST['nom'], $_POST['wake'], $_POST['shutdown_reboot']);
} elseif ($_POST['mode'] == 'test_logon') {
$machine = $_POST['nom_machine'];
if (is_dir('/home/netlogon/machine/' . $machine)) {
if (is_file('/home/netlogon/machine/' . $machine . '/gpt.ini')) {
echo "";
} else {
echo "";
}
} else {
$session = get_smbsess($machine);
if ($session['login']) {
echo "";
} elseif (fping($_POST['ip'])) {
unset($texte);
exec("sudo /usr/share/se3/scripts/force_gpo.sh " . $machine . " " . $_POST['ip'], $texte, $ret);
if ($ret) {
// afficher les codes d'erreur en fonction des r�sultats du script
echo "";
}
echo "\"/>";
} else {
echo "";
}
} else {
echo "";
}
}
} elseif ($_POST['mode'] == 'ts_vnc') {
$resultat = fping($_POST['ip']);
if ($resultat) {
$ts = ts($_POST['ip']);
$vnc = vnc($_POST['ip']);
if ($ts) {
echo $ts;
}
if ($vnc) {
echo $vnc;
}
if ((!$ts) and (!$vnc)) {
$ret = ""
. "\n";
echo($ret);
}
} else {
$ret = "" .
""
. "\n";
echo($ret);
}
}
?>