| Server IP : 104.21.21.239 / Your IP : 216.73.217.143 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/mitzvahm/planner/admin/mod/ |
Upload File : |
<?php
//error_reporting(E_ALL);
//error_reporting(0);
header("HTTP/1.1 202 Accepted");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, proxy-revalidate, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Cache-Control: max-age=10000000, s-maxage=1000000");
header("Pragma: no-cache");
// Block Firefox link prefetch requests.
if ((isset($_SERVER['HTTP_X_MOZ'])) && ($_SERVER['HTTP_X_MOZ'] == 'prefetch')) :
header('HTTP/1.0 403 Forbidden');
echo '403: Forbidden<br><br>Prefetching not allowed here.';
die();
endif;
session_start();
define('TIMEZONE', 'America/New_York');
date_default_timezone_set(TIMEZONE);
include('db_conn.php');
$con = mysqli_connect($db_server,$db_user,$db_pwd, $GLOBALS["db_name"]);
if (!$con)
{
die('Could not connect: ' . mysqli_error($GLOBALS['con']));
}
else
{
mysqli_set_charset($con, "UTF8");
$sql_tz = "SET time_zone = 'America/Chicago'";
mysqli_query($GLOBALS['con'], $sql_tz);
}
include('mod/_functions.php');
//var_dump($_SERVER);
//echo 'Location: http://'.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'].'?IX=login';
//echo 'Page allowed: '.page_allowed($_GET['IX']);
if (!page_allowed($_GET['IX']))
{
if ($_SESSION['admin_logged_in'] == 1)
{
$redirect_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?IX=dashboard";
}
else
{
$redirect_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']."?IX=login";
}
//echo curr_page_url();
//echo $redirect_url;
if (strtoupper(curr_page_url()) != strtoupper($redirect_url))
{
header("Location: ".$redirect_url);
exit();
}
}
?>