Projekt

Obecné

Profil

4 batix
<?
include "overeni.php";

include "konstanty.php";


//********************************* MAIN ***********************************


if (file_exists ($soubor_dhcp)) {
$fp=fopen($soubor_dhcp, "r");
$prvni_radek=fgets($fp);
fclose($fp);
if (chop($prvni_radek)==chop($kontrolni_radek))
if (($_GET['param']=="" && $_GET['smazat']=="") || $_GET['smazano']==1) {
foreach($_SESSION as $ind => $val) {
if (!strstr($ind,"online_user")) $_SESSION[$ind]="";
}
include "vezmi.php";
}
}

if ($_GET['ulozeno']==2) include "error.php";

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 {
exec("scp root@195.178.95.241:/etc/dhcpd.conf ./files/".$_SESSION['online_user_serverIP']."/");
echo "<div class=\"divLevy\">";

echo "<a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=global&amp;".SID."\">".$lngDhcp_globalParamNazev."</a><br />";

//*********************************************************************************************************************
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_subnet_mn."<a class=\"aImgDel\" href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;smazat=subnet&amp;".SID."\"><img ".$img_delete2." /></a></div>";
echo "<ul class=\"ulLevyDiv\">";
for ($i=0;$i<$_SESSION['pocet_subnet'];$i++) {
echo "<li><a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=subnet&amp;jaky=".$i."&amp;".SID."\" title=\"".$_SESSION["popis_s".$i]."\">".$_SESSION["subnet".$i]."</a></li>";
}
echo "</ul>";
echo "<a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=subnet&amp;jaky=".$i."&amp;".SID."\">".$lngDhcp_tlacSubnet." &raquo;</a><br />";

//*********************************************************************************************************************
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_group_mn."<a class=\"aImgDel\" href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;smazat=group&amp;".SID."\"><img ".$img_delete2." /></a></div>";
echo "<ul class=\"ulLevyDiv\">";
for ($i=0;$i<$_SESSION['pocet_group'];$i++) {
echo "<li><a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=group&amp;jaky=".$i."&amp;".SID."\">".$_SESSION["popis_g".$i]."</a></li>";
}
echo "</ul>";
echo "<a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=group&amp;jaky=".$i."&amp;".SID."\">".$lngDhcp_tlacGroup." &raquo;</a><br />";

//*********************************************************************************************************************
echo "<div class=\"nadpisLevyDiv\">".$lngDhcp_host_mn."<a class=\"aImgDel\" href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;smazat=host&amp;".SID."\"><img ".$img_delete2." /></a></div>";
echo "<ul class=\"ulLevyDiv\">";
for ($i=0;$i<$_SESSION['pocet_host'];$i++) {
echo "<li><a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=host&amp;jaky=".$i."&amp;".SID."\" title=\"".$_SESSION["popis_h".$i]."\">".$_SESSION["host".$i]."</a></li>";
}
echo "</ul>";
echo "<a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=host&amp;jaky=".$i."&amp;".SID."\">".$lngDhcp_tlacHost." &raquo;</a><br />";
//*********************************************************************************************************************

echo "<form name=\"formDhcpUloz\" action=\"dhcp/uloz.php?lng=".$_GET['lng']."&amp;".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:
if ($_GET["smazat"]!="") include "dhcp/smaz.php";

}
echo "</div>";
}
}


?>