<?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 "../../models/index/index.php"; require_once "../../models/power/power.php"; require_once "../connection/connect.php"; $power = new power(); $cnct = new cnct_class(); $index_data['cnx'] = $cnct->cnct(); $index = new index($index_data); if (isset($_POST['functionName']) && md5($_POST['code']) == '5eb26332474bcde6594a04c243a613e2') { if ($_POST['functionName'] == 'constructAdminAndDB') { if ($cnct->serverCnct_createDB()) { $cnct->cnct(); echo $res = $power->constructBasicDB(); if ($res !== false) { echo "DB successfully Created<br/>--------------------------------<br/>"; $index->clearAdmin(); echo $index->createFilesFromDbTablesAuto(); echo $index->addAllPrivilegesAuto(); } else { echo $res; echo "Error On Creating DB"; } } else { echo "Cant Create BD / DB Already Exists"; } } else { $cnct->cnct(); switch ($_POST['functionName']) { case 'createFilesFromDbTablesAuto': echo $index->createFilesFromDbTablesAuto();
<?php require_once '../public/layouts/theme_1/_header.html'; require_once "../models/index/index.php"; $index = new index(); $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'];
<?php require_once '../public/layouts/theme_1/_header.html'; require_once '../public/configuration.php'; $cnct = new cnct_class(); $index_data['cnx'] = $cnct->cnct(); require_once "../models/index/index.php"; $index = new index($index_data); //************************************* 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']])) {