예제 #1
0
if (!$index->isAllowed($data)) {
    //if(strpos($_SERVER["HTTP_REFERER"],'?')===false) $char='?' ; else $char='&'; echo  '<script language="javascript" > window.location="'.$_SERVER["HTTP_REFERER"].$char.'note=No Permition"; </script>';
    //die('Please enable JavaScript To Continue');
}
//************************************* check if the user control_p_group allow him to enter this page *******
//******************************************* constants *****************************************
$table = strtolower(substr($page, 6));
//get the name of the table from the file name
$Table = $index->capitalize($table);
//******************************************* constants end *************************************
//******************************************************** sub menu *****************************
$data['page'] = $page;
$menu = $index->getMenuList($data);
//********************************************************* get folder uploaded to ************************************
if (isset($_GET['table']) && isset($_GET['id'])) {
    if ($index->hasFiles($_GET['table']) && $index->checkIdIfExist($_GET['id'], $_GET['table'])) {
        $T = $_GET['table'];
        $I = $_GET['id'];
    } else {
        if (strpos($_SERVER["HTTP_REFERER"], '?') === false) {
            $char = '?';
        } else {
            $char = '&';
        }
        echo '<script language="javascript" > window.location="' . $_SERVER["HTTP_REFERER"] . $char . 'note=Not Exist"; </script>';
        die('Please enable JavaScript To Continue');
    }
} elseif (isset($_GET['table']) && !isset($_GET['id']) && isset($_SESSION['context'][$_GET['table']])) {
    if ($index->hasFiles($_GET['table']) && $index->checkIdIfExist($_SESSION['context'][$_GET['table']], $_GET['table'])) {
        $T = $_GET['table'];
        $I = $_SESSION['context'][$_GET['table']];