include_once("global.php");
if(empty($_SESSION['adminId'])){
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
die( json_encode( [ 'success' => 'false', 'Auth' => 'fail', 'Msg' => 'Session Expired!' ] ) );
}
header("location:../login.php");
exit();
}
function get_extension($imagetype){
if(empty($imagetype)) return false;
switch($imagetype){
//case 'image/bmp': return '.bmp';
//case 'image/cis-cod': return '.cod';
case 'image/gif': return '.gif';
//case 'image/ief': return '.ief';
case 'image/jpeg': return '.jpg';
//case 'image/pipeg': return '.jfif';
case 'image/tiff': return '.tif';
//case 'image/x-cmu-raster': return '.ras';
//case 'image/x-cmx': return '.cmx';
//case 'image/x-icon': return '.ico';
//case 'image/x-portable-anymap': return '.pnm';
//case 'image/x-portable-bitmap': return '.pbm';
//case 'image/x-portable-graymap': return '.pgm';
//case 'image/x-portable-pixmap': return '.ppm';
//case 'image/x-rgb': return '.rgb';
//case 'image/x-xbitmap': return '.xbm';
//case 'image/x-xpixmap': return '.xpm';
case 'image/x-xwindowdump': return '.xwd';
case 'image/png': return '.png';
case 'image/x-jps': return '.jps';
//case 'image/x-freehand': return '.fh';
default: return false;
}
}
/*
if(!function_exists("CHECK_PERMISSION"))
{
function CHECK_PERMISSION($feature_id,$level="")
{
if(isset($_SESSION['permissions']) && !empty($_SESSION['permissions']) )
{
$permissions = $_SESSION['permissions'];
if (in_array($feature_id,$permissions)) {
return true;
}
else{
return false;
}
}
else{
return false;
}
}
}*/
?>error_reporting(E_ALL);
ini_set ("display_errors", "1");
?>
Warning: Undefined array key "roleId" in /home/u819251188/domains/lumisun.pk/public_html/major_files/functions.php on line 8
Warning: Undefined array key "adminId" in /home/u819251188/domains/lumisun.pk/public_html/major_files/functions.php on line 9
Warning: Undefined variable $row in /home/u819251188/domains/lumisun.pk/public_html/dashboard/main.php on line 9
Warning: Trying to access array offset on value of type null in /home/u819251188/domains/lumisun.pk/public_html/dashboard/main.php on line 9
Warning: Undefined variable $row in /home/u819251188/domains/lumisun.pk/public_html/dashboard/main.php on line 10
Warning: Trying to access array offset on value of type null in /home/u819251188/domains/lumisun.pk/public_html/dashboard/main.php on line 10
Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given in /home/u819251188/domains/lumisun.pk/public_html/major_files/functions.php:265
Stack trace:
#0 /home/u819251188/domains/lumisun.pk/public_html/major_files/functions.php(265): mysqli_query()
#1 /home/u819251188/domains/lumisun.pk/public_html/dashboard/main.php(15): get_expenses()
#2 /home/u819251188/domains/lumisun.pk/public_html/index.php(6): include_once('/home/u81925118...')
#3 {main}
thrown in /home/u819251188/domains/lumisun.pk/public_html/major_files/functions.php on line 265