sourceforge/nodemin/trunk/dhcp/dhcp.php @ 522
4 | batix | <?
|
|
include "overeni.php";
|
|||
include "konstanty.php";
|
|||
//********************************* MAIN ***********************************
|
|||
if ($_GET['ulozeno']==1) {
|
|||
echo "<br /><div align=\"center\">
|
|||
<div class=\"divUlozeno\">".$lngDhcp_ulozeno."</div>";
|
|||
include "menu_seznam.php";
|
|||
echo "</div>";
|
|||
}
|
|||
//******************** zobrazeni dhcp modulu, rozdeleni na levy a pravy div, v levem menu, v pravem obsah *********************
|
|||
else {
|
|||
if ($sekce[$_GET['id']]=="lock") include "lock_info.php";
|
|||
else {
|
|||
10 | batix | if ($_GET['stahni']==1)
|
|
exec("scp root@".$_SESSION['online_user_serverIP'].":/etc/dhcpd.conf ./files/".$_SESSION['online_user_serverIP']."/");
|
|||
4 | batix | ||
if (($_GET['param']=="" && $_GET['smazat']=="") || $_GET['smazano']==1) {
|
|||
foreach($_SESSION as $ind => $val) {
|
|||
if (!strstr($ind,"online_user")) $_SESSION[$ind]="";
|
|||
}
|
|||
}
|
|||
if (file_exists ($soubor_dhcp)) {
|
|||
$fp=fopen($soubor_dhcp, "r");
|
|||
$prvni_radek=fgets($fp);
|
|||
fclose($fp);
|
|||
8 | batix | if (chop($prvni_radek)==chop($kontrolni_radek) && ($_GET['stahni']==1 || $_GET['smazano']==1)) include "vezmi.php";
|
|
4 | batix | }
|
|
echo "<div class=\"divLevy\">";
|
|||
echo "<a href=\"?id=dhcp&lng=".$_GET['lng']."&param=global&ss=".$_GET["ss"]."&".SID."\">".$lngDhcp_globalParamNazev."</a><br />";
|
|||
//*********************************************************************************************************************
|
|||
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_subnet_mn."<a class=\"aImgDel\" href=\"?id=dhcp&lng=".$_GET['lng']."&smazat=subnet&ss=".$_GET["ss"]."&".SID."\"><img ".$img_delete2." /></a></div>";
|
|||
echo "<ul class=\"ulLevyDiv\">";
|
|||
for ($i=0;$i<$_SESSION['pocet_subnet'];$i++) {
|
|||
echo "<li><a href=\"?id=dhcp&lng=".$_GET['lng']."&param=subnet&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\" title=\"".$_SESSION["popis_s".$i]."\">".$_SESSION["subnet".$i]."</a></li>";
|
|||
}
|
|||
echo "</ul>";
|
|||
echo "<a href=\"?id=dhcp&lng=".$_GET['lng']."&param=subnet&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\">".$lngDhcp_tlacSubnet." »</a><br />";
|
|||
//*********************************************************************************************************************
|
|||
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_group_mn."<a class=\"aImgDel\" href=\"?id=dhcp&lng=".$_GET['lng']."&smazat=group&ss=".$_GET["ss"]."&".SID."\"><img ".$img_delete2." /></a></div>";
|
|||
echo "<ul class=\"ulLevyDiv\">";
|
|||
for ($i=0;$i<$_SESSION['pocet_group'];$i++) {
|
|||
echo "<li><a href=\"?id=dhcp&lng=".$_GET['lng']."&param=group&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\">".$_SESSION["popis_g".$i]."</a></li>";
|
|||
}
|
|||
echo "</ul>";
|
|||
echo "<a href=\"?id=dhcp&lng=".$_GET['lng']."&param=group&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\">".$lngDhcp_tlacGroup." »</a><br />";
|
|||
//*********************************************************************************************************************
|
|||
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_host_mn."<a class=\"aImgDel\" href=\"?id=dhcp&lng=".$_GET['lng']."&smazat=host&ss=".$_GET["ss"]."&".SID."\"><img ".$img_delete2." /></a></div>";
|
|||
echo "<ul class=\"ulLevyDiv\">";
|
|||
for ($i=0;$i<$_SESSION['pocet_host'];$i++) {
|
|||
echo "<li><a href=\"?id=dhcp&lng=".$_GET['lng']."&param=host&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\" title=\"".$_SESSION["popis_h".$i]."\">".$_SESSION["host".$i]."</a></li>";
|
|||
}
|
|||
echo "</ul>";
|
|||
echo "<a href=\"?id=dhcp&lng=".$_GET['lng']."&param=host&jaky=".$i."&ss=".$_GET["ss"]."&".SID."\">".$lngDhcp_tlacHost." »</a><br />";
|
|||
//*********************************************************************************************************************
|
|||
echo "<form name=\"formDhcpUloz\" action=\"dhcp/uloz.php?lng=".$_GET['lng']."&ss=".$_GET["ss"]."&".SID."\" method=\"post\" enctype=\"multipart/form-data\">
|
|||
<input type=\"hidden\" name=\"po_odeslani_formu\" value=\"1\" />";
|
|||
echo "<br /><div align=\"center\"><input class=\"inputUlozit\" type=\"submit\" name=\"zobrazit_nahled\" value=\"".$lng_tlacNahled."\" /><br />
|
|||
<input class=\"inputUlozit\" type=\"submit\" name=\"ulozeno\" value=\"".$lng_tlacSave."\" />
|
|||
</div>
|
|||
</form>";
|
|||
echo "</div>";
|
|||
echo "<div class=\"divPravy\">";
|
|||
include "dhcp/info_divy.php";
|
|||
switch ($_GET['param']) {
|
|||
case "global":
|
|||
include "form_global.php";
|
|||
break;
|
|||
case "subnet":
|
|||
include "form_subnet.php";
|
|||
break;
|
|||
case "group":
|
|||
include "form_group.php";
|
|||
break;
|
|||
case "host":
|
|||
include "form_host.php";
|
|||
break;
|
|||
default:
|
|||
8 | batix | if ($_GET["smazat"]!="") include "dhcp/smaz_form.php";
|
|
4 | batix | ||
}
|
|||
echo "</div>";
|
|||
}
|
|||
}
|
|||
?>
|