Jump to content

serican

New Members
  • Posts

    1
  • Joined

  • Last visited

serican's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Notice: Undefined index: location in /storage/h5/444/813444/public_html/index.php on line 6 PHP 5.4 server im getting this error above... script is as below:- pls help anyone? <?php $GLOBALS['key'] = "thisisapasswordkeytoprotectmarketingplan"; $GLOBALS['expiry'] = 5*60; // in seconds if ($_GET['location'] == 'viewMarketingPlan' && strlen($_GET['key']) > 0 && $_GET['view'] == 'true') { $key = $GLOBALS['key']; $data = trim($_GET['key']); $data = base64_decode(strtr($data, '-_,', '+/=')); $decoded = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), $data, MCRYPT_MODE_CBC, md5(md5($key))), "\0"); $decoded = explode("|SEAN|", $decoded); list($code, $race, $country, $expiry) = $decoded; if ($expiry >= (time()+$GLOBALS['expiry'])) exit; if ($country == "IN") { $file = "mp-india"; } else if ($race == "M") { $file = "mp-malaysia-ms"; } else { $file = "mp-malaysia-en"; } $filepath = "../../marketing-plans/{$file}.pdf"; header('Content-type: application/pdf'); //header('Content-Disposition: attachment; filename="Tasly-Marketing-Plan.pdf"'); @readfile(realpath($filepath)); exit; } require_once 'functions.php'; session_start(); if (isset($_SESSION['user'])) { if ($_SESSION['status'] == 'Active') { // force auto logout if inacrive for more than 1 hour if (strlen($_SESSION['lastActive']) > 0 && ($_SESSION['lastActive']+(1*60*60)) <= time()) { header("Location: logout.php"); } $_SESSION['lastActive'] = time(); $location=$_GET['location']; if (empty($location)) $location='index'; changelocation($location); } else { //the status session variable isn't registered and not equal to active, send them back to the inactive page. /* $host = $_SERVER["HTTP_HOST"]; ` $uri = rtrim(dirname($_SERVER["PHP_SELF"]), "{\\}"); $extra = "inactiveDist.php"; */ header("Location: inactiveDist.php"); } } else { //the session variable isn't registered, send them back to the login page /* $host = $_SERVER["HTTP_HOST"]; $uri = rtrim(dirname($_SERVER["PHP_SELF"]), "{\\}"); $extra = "login.php"; */ header("Location: login.php"); } function changelocation($location) { $user=$_SESSION["user"]; $post=$_SESSION["post"]; $name=$_SESSION["name"]; require_once "dbconnect.php"; include ('header.php'); echo '<table cols="3" border="0" cellpadding="10" cellspacing="0" align="center" width="100%">'; echo '<tr>'; echo '<td width="20%" bgcolor="" valign="top" rowspan="4">'; include('navbar.php'); echo '</td>'; echo '<td bgcolor="" valign="top">'; $locations = array('viewInfo', 'changePass', 'netListing', 'detailNetListing', 'PGS', 'monthPGS', 'downDetail', 'histBonusSum', 'bonusSum', 'periodInq', 'networkbns', 'Inquiry2', 'Inquiry', 'periodActlines', 'periodActlines2', 'ActDownlines', 'ActDownlines2', 'estTotalSales', 'newPromo', 'newProducts', 'productPricing', 'Greenair', 'Pillow', 'viewMarketingPlan'); if (in_array($location, $locations)) { // marketPlan2-13 //substr($location,0,10) == 'marketPlan' && substr($location,10,strlen($location)) >= 2 && substr($location,10,strlen($location)) <= 13) { require_once "{$location}.php"; } else if (in_array($location, array('index', 'importantNotice'))) { require_once "main.php"; } echo '</td></tr></table>'; include ('footer.php'); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.