Projekt

Obecné

Profil

<?
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 {
if ($_GET['stahni']==1)
exec("scp root@".$_SESSION['online_user_serverIP'].":/etc/dhcpd.conf ./files/".$_SESSION['online_user_serverIP']."/");
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);
if (chop($prvni_radek)==chop($kontrolni_radek) && ($_GET['stahni']==1 || $_GET['smazano']==1)) include "vezmi.php";
}
echo "<div class=\"divLevy\">";

echo "<a href=\"?id=dhcp&amp;lng=".$_GET['lng']."&amp;param=global&amp;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&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;ss=".$_GET["ss"]."&amp;".SID."\">".$lngDhcp_tlacHost." &raquo;</a><br />";
//*********************************************************************************************************************

echo "<form name=\"formDhcpUloz\" action=\"dhcp/uloz.php?lng=".$_GET['lng']."&amp;ss=".$_GET["ss"]."&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_form.php";
}
echo "</div>";
}
}


?>

(1-1/13)