1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
<?php
function showUpdateLinkPage()
{
global $myDB;
$myHost = strtoupper(getParameter("host"));
if (empty($myHost))
return;
?>
<script type="text/javascript">
// <![CDATA[
hideLoading();
function cancelButton()
{
if (confirm("Vous confirmez votre choix ?"))
document.location.href="<?php echo $url_path; ?>?page=adminindex";
}
function validButton()
{
//showLoading();
if (confirm("Vous confirmez votre choix ?"))
{
executeScript("<?php echo $url_path; ?>", "<?php echo $temp; ?>" + view_name + "&serverList=" + order, returnToAdminIndex);
return;
}
hideLoading();
}
// ]]>
</script>
<br /><br /><br />
<form method="post" action="?action=updatelink&host=<?php echo $myHost; ?>" >
<div class="hostFound">
<div>Liste des Hosts trouvés :</div>
<hr align="left" size="1px" /><br />
<?php
$myDB->prepareQuery("SELECT * FROM host WHERE NAME='{1}'", $myHost);
$myDB->executeQuery();
while($result = $myDB->dispatchArray())
{
?>
<span class="textSection"><?php echo $result["NAME"]; ?></span><span class="typeSection"><input size="25" type="text" name="<?php echo "host|" . $result["NAME"]; ?>" value="<?php echo str_replace(">", ">", str_replace("<", "<", stripslashes($result["URL"]))); ?>"/></span>
<br /><br /><br />
<?php
}
?>
</div>
<div class="serviceFound">
<div>Liste des services trouvés :</div>
<hr align="left" size="1px" /><br />
<div> Graphiques Détails</div>
<br />
<?php
$myDB->prepareQuery("SELECT s.`NAME`, s.`URL`, sh.`GRAPH` FROM `service` s, `service_host` sh WHERE s.`NAME` = sh.`NAME_SERVICE` AND sh.`NAME_HOST`='{1}'", $myHost);
$myDB->executeQuery();
while($result = $myDB->dispatchArray())
{
$serviceName = str_replace(".", "%2E", $result["NAME"]);
?>
<span class="textSection"><?php echo $result["NAME"]; ?></span> <span class="typeSection"><input size="25" type="text" name="<?php echo "graphique|" . $serviceName; ?>" value="<?php echo str_replace(">", ">", str_replace("<", "<", stripslashes($result["GRAPH"]))); ?>" />
</span> <span class="typeSection">
<input size="25" type="text" name="<?php echo "service|" . $serviceName; ?>" value="<?php echo str_replace(">", ">", str_replace("<", "<", stripslashes($result["URL"]))); ?>" /></span>
<br /><br /><br />
<?php
}
?>
</div>
<span class="validButton"><input type="button" value="Valider" style=" width: 150px" onclick="validButton()" /> <input type="button" value="Annuler" style=" width: 150px" onclick="cancelButton()"/></span>
</form>
<?php
}
?> |