|
<?
|
|
//kontrola, zda ma uzivatel dostatecna prava pristupovat k jednotlivym modulum
|
|
|
|
if ($_SESSION['online_user']=="" || $_GET['id']=="") exit;
|
|
$povoleno=0;
|
|
$nazvy_v_menu=file("menu.dat");
|
|
for ($i=0;$i<sizeof($nazvy_v_menu);$i++) {
|
|
if (strstr($nazvy_v_menu[$i],"*")) {
|
|
$nazvy_v_menu[$i]=chop(str_replace("*","",$nazvy_v_menu[$i]));
|
|
$menu_system1[strtolower($nazvy_v_menu[$i])]=chop($nazvy_v_menu[$i]);
|
|
}
|
|
$nazvy_v_menu[$i]=chop($nazvy_v_menu[$i]);
|
|
$nazvy_v_menu_male[$i]=strtolower($nazvy_v_menu[$i]);
|
|
if ($_GET['id']==$nazvy_v_menu_male[$i])
|
|
if (strstr($_SESSION['online_user_prava'],".".$nazvy_v_menu[$i].".|")) {
|
|
$povoleno=1;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if ($povoleno!=1) {
|
|
echo "nemate dostatecna opravneni";
|
|
echo "\n</div>\n</div>\n</body>\n</html>";
|
|
exit;
|
|
}
|
|
|
|
//foreach ($menu_system1 as $ind => $val) echo $ind." - ".$val."<br />";
|
|
if ($_GET['id']!="" && $_SESSION['online_user_serverIP']=="" && !strstr($_SESSION['online_user_prava'],".".$menu_system1[$_GET['id']].".|")) {
|
|
echo "nevybrali jste server!";
|
|
echo "\n</div>\n</div>\n</body>\n</html>";
|
|
//header ("Location: index.php?lng=".$_GET['lng']."&zobraz=vyber&".SID."");
|
|
exit;
|
|
}
|
|
|
|
?>
|