$cnct = new cnct_class(); $cnct->cnct(); //************************************* check if the user control_p_group allow him to enter this page ******* $path_parts = pathinfo(__FILE__); $page = $path_parts['filename']; $data['control_p_privilege'] = $page; $data['control_p_group_id'] = $_SESSION['control_p_group_id']; if (!$index->isAllowed($data)) { //if(strpos($_SERVER["HTTP_REFERER"],'?')===false) $char='?' ; else $char='&'; header('Location:'.$_SERVER["HTTP_REFERER"].$char.'note=No Permition'); //if(strpos($_SERVER["HTTP_REFERER"],'?')===false) { $char='?' ; } else { $char='&'; } echo '<script language="javascript" > window.location="'.$_SERVER["HTTP_REFERER"].$char.'note=No Permition"; </script>'; } //************************************* check if the user control_p_group allow him to enter this page ******* //******************************************* constants ***************************************** $mainTable = strtolower(substr($page, 6)); //get the name of the table from the file name $Table = $index->capitalize($mainTable); //******************************************* constants end ************************************* //******************************************************** sub menu ***************************** $data['page'] = $page; $menu = $index->getMenuList($data); //********************************************************* get folder uploaded to ************************************ if (isset($_GET['table']) && isset($_GET['id'])) { $T = $_GET['table']; $I = $_GET['id']; } elseif (isset($_GET['table']) && !isset($_GET['id']) && isset($_SESSION['context'][$_GET['table']])) { $T = $_GET['table']; $I = $_SESSION['context'][$_GET['table']]; } else { if (strpos($_SERVER["HTTP_REFERER"], '?') === false) { $char = '?'; } else {
<?php session_start(); require_once "../connection/connect.php"; require_once "../../models/index/index.php"; require_once "../../models/index/simpleImage.php"; $cnct = new cnct_class(); $cnx = $cnct->cnct(); $index_data['cnx'] = $cnx; $index = new index($index_data); $image = new simpleImage($index_data); $table = $_GET['table']; $Table = $index->capitalize($table); $id = $_GET['id']; $file = $_GET['file']; if ($index->deleteFile($table . '/' . $id . '/' . $file)) { header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '¬e=' . $index->toView($Table) . ' File Deleted'); } else { header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '¬e=' . $index->toView($Table) . ' File Not Deleted,Please Try Again'); }
<?php require_once '../public/configuration.php'; require_once '../public/layouts/theme_1/_header.html'; require_once "../models/index/index.php"; $index = new index(); $cnct = new cnct_class(); $cnct->cnct(); $table = $_GET['table']; $TABLE = $index->capitalize($table); $selecBoxName = 'company_username'; $Table = $index->toView($table); $cols = $index->getGeneralColums($table); $keys = $cols['keys']; $PRI = $cols['primaryKeys']; $PRI = $PRI[0]; if (isset($_GET[$PRI])) { if ($_GET[$PRI] != '0') { $selectedItemId = $_GET[$PRI]; if (!$index->checkIdIfExist($selectedItemId, $table)) { header('Location:index.php?note=Invalid Inputs'); } $Aitm = $index->getGeneralItemById($selectedItemId, $table); $itm = $Aitm[$selectedItemId]; } } ?> <div id="body"> <div id="firstColumn" > <div >