First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
$ValidAccess = 2010;
|
||||
require_once("include/globals.php");
|
||||
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
logExit("Session is not active",$moduleName);
|
||||
exit();
|
||||
}
|
||||
|
||||
// Set userType
|
||||
$userType = "Parent";
|
||||
if (array_key_exists('type', $_SESSION['UserInfo']) && in_array($_SESSION['UserInfo']['type'],$AllAdminUserTypes)) $userType = "Admin";
|
||||
if ($userType != 'Admin') return;
|
||||
|
||||
|
||||
// Ensure that only valid user types have access to this module
|
||||
if ($userType != 'Admin') {
|
||||
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
||||
logExit($error_message);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// CSRF token validation
|
||||
include "include/ajax.csrfToken.php";
|
||||
|
||||
|
||||
// Set default timezone
|
||||
date_default_timezone_set("Canada/Pacific");
|
||||
$now = date("Y-m-d H:i:s",time());
|
||||
|
||||
$return_data = array();
|
||||
$sequence_flag = 'N';
|
||||
|
||||
$moduleName = "ajax.ResellerRenewal.Update.php";
|
||||
// startLog($moduleName);
|
||||
|
||||
|
||||
unset($template);
|
||||
|
||||
// Get parameters
|
||||
extract($_REQUEST);
|
||||
|
||||
|
||||
// Validate parameters
|
||||
|
||||
|
||||
// Sanitize parameters
|
||||
$rsid = db_escape_string($rsid);
|
||||
$expiry_date = db_escape_string($expiry_date);
|
||||
|
||||
|
||||
// Error logging
|
||||
writeLog("rsid: $table_name\n");
|
||||
writeLog("expiry_date: $expiry_date\n");
|
||||
|
||||
|
||||
$table = new Table("schools");
|
||||
|
||||
$query = "UPDATE schools SET expiry_date = '$expiry_date' WHERE reseller = '$rsid' AND status IN ('Special','Active')";
|
||||
db_query($query);
|
||||
|
||||
|
||||
writeLog("complete\n");
|
||||
|
||||
echo(json_encode($return_data));
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user