Merge
This commit is contained in:
commit
fe8cb3595a
46 changed files with 680 additions and 600 deletions
|
@ -36,6 +36,11 @@ class Helpers {
|
|||
$smarty -> caching = false;
|
||||
$smarty -> cache_lifetime = 5;
|
||||
|
||||
if (function_exists('apc_cache_info')) {
|
||||
// production
|
||||
$smarty->compile_check = false;
|
||||
}
|
||||
|
||||
// needed by smarty.
|
||||
helpers :: create_folders ();
|
||||
global $FORCE_INGAME;
|
||||
|
|
|
@ -143,7 +143,7 @@ function api_key_management_hook_store_db()
|
|||
// redirect to the the main page with success code
|
||||
// 1 refers to the successfull addition of key to the database
|
||||
header( "Location: index.php?page=layout_plugin&&name=API_key_management&&success=1" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ function api_key_management_hook_update_db()
|
|||
// redirecting to the API_key_management plugins template with success code
|
||||
// 2 refers to the succssfull delete condition
|
||||
header( "Location: index.php?page=layout_plugin&&name=API_key_management&&success=2" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,13 +33,6 @@ CREATE TABLE IF NOT EXISTS `ams_querycache` (
|
|||
`db` varchar(80) NOT NULL
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dumping data for table `ams_querycache`
|
||||
--
|
||||
|
||||
INSERT INTO `ams_querycache` (`SID`, `type`, `query`, `db`) VALUES
|
||||
(1, 'createUser', '["admin","WyId5UERpuB4U","localhost@localhost"]', 'shard');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
@ -298,13 +291,6 @@ CREATE TABLE IF NOT EXISTS `ticket_user` (
|
|||
`ExternId` int(10) unsigned NOT NULL
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Dumping data for table `ticket_user`
|
||||
--
|
||||
|
||||
INSERT INTO `ticket_user` (`TUserId`, `Permission`, `ExternId`) VALUES
|
||||
(1, 3, 1);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
|
|
|
@ -21,21 +21,24 @@ function activate_plugin() {
|
|||
if ( $result )
|
||||
{
|
||||
// if result is successfull it redirects and shows success message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=3" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if result is unsuccessfull it redirects and throws error
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=4" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//if $_GET variable is not set it redirects and shows error
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=4" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ function add_sgroup(){
|
|||
require($SITEBASE . '/inc/sgroup_list.php');
|
||||
$result= array_merge($result, sgroup_list());
|
||||
return $result;
|
||||
header("Cache-Control: max-age=1");
|
||||
/*if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=sgroup_list");
|
||||
}else{
|
||||
|
@ -40,13 +41,15 @@ function add_sgroup(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,22 +36,26 @@ function add_user_to_sgroup(){
|
|||
//$result= array_merge($result, show_sgroup());
|
||||
//helpers :: loadtemplate( 'show_sgroup', $result);
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$id);
|
||||
}else{
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$WEBPATH."?page=show_sgroup&id=".$id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -97,29 +97,32 @@ function change_info(){
|
|||
global $INGAME_WEBPATH;
|
||||
$result['ingame_webpath'] = $INGAME_WEBPATH;
|
||||
helpers :: loadtemplate( 'settings', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
//ERROR: permission denied!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: The form was not filled in correclty
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=settings");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: user is not logged in
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ function change_password(){
|
|||
$succresult['username'] = $_SESSION['user'];
|
||||
$succresult['target_id'] = $_POST['target_id'];
|
||||
helpers :: loadtemplate( 'settings', $succresult);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
|
||||
|
@ -65,31 +65,34 @@ function change_password(){
|
|||
|
||||
$result = array_merge($result,$settings);
|
||||
helpers :: loadtemplate( 'settings', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: permission denied!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: The form was not filled in correclty
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=settings");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: user is not logged in
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,34 +23,39 @@ function change_receivemail(){
|
|||
WebUsers::setReceiveMail($user_id, $receiveMail);
|
||||
}
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$INGAME_WEBPATH."?page=settings&id=".$user_id);
|
||||
}else{
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$WEBPATH."?page=settings&id=".$user_id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
//ERROR: permission denied!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: The form was not filled in correclty
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=settings");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: user is not logged in
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,36 +31,42 @@ function create_ticket(){
|
|||
$ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST);
|
||||
//redirect to the new ticket.
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id);
|
||||
}else{
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//ERROR: LIB DB is not online!
|
||||
print_r($e);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: permission denied!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: The form was not filled in correclty
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=create_ticket");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: user is not logged in
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,22 +22,26 @@ function deactivate_plugin() {
|
|||
if ( $result )
|
||||
{
|
||||
// if result is successfull it redirects and shows success message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=5" );
|
||||
exit;
|
||||
|
||||
throw new SystemExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
// if result is unsuccessfull it redirects and shows success message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=6" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//if $_GET variable is not set it redirects and shows error
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=6" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,23 +29,26 @@ function delete_plugin() {
|
|||
$db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" );
|
||||
|
||||
//if result successfull redirect and show success message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=2" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// if result unsuccessfull redirect and show error message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=0" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if result unsuccessfull redirect and show error message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=0" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ function forgot_password(){
|
|||
$result['EMAIL_ERROR'] = 'TRUE';
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'forgot_password', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
$webUser = new WebUsers($target_id);
|
||||
$target_username = $webUser->getUsername();
|
||||
|
@ -44,7 +44,7 @@ function forgot_password(){
|
|||
$result['prevEmail'] = $email;
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'forgot_password', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
|
||||
}
|
|
@ -59,17 +59,17 @@ function install_plugin() {
|
|||
if ( $x == '1' )
|
||||
{
|
||||
echo "update found";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
else if ( $x == '2' )
|
||||
{
|
||||
echo "Plugin already exists with same name .";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
else if ( $x == '3' )
|
||||
{
|
||||
echo "Update info is not present in the update";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,18 +80,18 @@ function install_plugin() {
|
|||
{
|
||||
if ( move_uploaded_file( $fileTmpLoc, $temp_path . "/" . $fileName ) ) {
|
||||
echo "$fileName upload is complete.</br>" . "<button type='submit' class='btn btn-primary' style='margin-left:5px; margin-top:10px;' name='install_plugin'>Install Plugin</button></br>";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error in uploading file.";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Please select a file with .zip extension to upload.";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -125,29 +125,32 @@ function install_plugin() {
|
|||
$dbr -> insert( "plugins", $install_result );
|
||||
|
||||
// if everything is successfull redirecting to the plugin template
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=1" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
// file .info not exists
|
||||
rmdir( $target_path );
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=install_plugin&result=2" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
// extraction failed
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=install_plugin&result=0" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Please Browse for a file before clicking the upload button";
|
||||
exit();
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +282,7 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath )
|
|||
if ( pluginUpdateExists( $info['Id'], $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip" ) )
|
||||
{
|
||||
echo "Update already exists";
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
else {
|
||||
// removing the preivous update
|
||||
|
@ -293,8 +296,9 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath )
|
|||
$update['UpdatePath'] = $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip";
|
||||
$update['UpdateInfo'] = json_encode( $result );
|
||||
$dbr -> insert( "updates", $update );
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=7" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,26 +33,27 @@ function login(){
|
|||
|
||||
|
||||
//go back to the index page.
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header( 'Location: '. $INGAME_WEBPATH . $GETString);
|
||||
}else{
|
||||
header( 'Location: '. $WEBPATH . $GETString);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}else{
|
||||
//handle login failure
|
||||
$result = Array();
|
||||
$result['login_error'] = 'TRUE';
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'login', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//go to error page or something, because can't access website db
|
||||
print_r($e);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,23 +44,26 @@ function modify_email_of_sgroup(){
|
|||
//require_once($SITEBASE . 'inc/show_sgroup.php');
|
||||
//$result= array_merge($result, show_sgroup());
|
||||
//helpers :: loadtemplate( 'show_sgroup', $result);
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$sgroupid);
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=show_sgroup&id=".$sgroupid);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -41,30 +41,33 @@ function reply_on_ticket(){
|
|||
$newPriority = filter_var($_POST['ChangePriority'], FILTER_SANITIZE_NUMBER_INT);
|
||||
Ticket::updateTicketStatusAndPriority($ticket_id,$newStatus, $newPriority, $author);
|
||||
}
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id);
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}catch (PDOException $e) {
|
||||
//ERROR: LIB DB is not online!
|
||||
print_r($e);
|
||||
//header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -24,7 +24,7 @@ function reset_password(){
|
|||
}
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'reset_success', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
$GETString = "";
|
||||
foreach($_GET as $key => $value){
|
||||
|
@ -38,7 +38,7 @@ function reset_password(){
|
|||
$result['prevConfirmNewPass'] = $confirmpass;
|
||||
$result['no_visible_elements'] = 'TRUE';
|
||||
helpers :: loadtemplate( 'reset_password', $result);
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
}
|
|
@ -30,8 +30,9 @@ function update_plugin() {
|
|||
$db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" );
|
||||
|
||||
// if update is installed succesffully redirect to show success message
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=plugins&result=8" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,36 +22,40 @@ function change_permission(){
|
|||
|
||||
//execute change.
|
||||
Ticket_User::change_permission(Ticket_User::constr_ExternId($user_id)->getTUserId(), $value);
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id);
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=show_user&id=".$user_id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
|
||||
}else{
|
||||
//ERROR: GET PARAMS not given or trying to change admin
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id);
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=show_user&id=".$user_id);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,9 @@ function createticket(){
|
|||
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}else{
|
||||
//if user_id is given, then set it as the target_id
|
||||
|
@ -47,8 +48,9 @@ function createticket(){
|
|||
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -29,15 +29,17 @@ function dashboard(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,12 +17,13 @@ function login() {
|
|||
$_SESSION['id'] = WebUsers::getId($result['name']);
|
||||
$_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id']));
|
||||
//go back to the index page.
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header('Location: ' . $INGAME_WEBPATH);
|
||||
} else {
|
||||
header('Location: ' . $WEBPATH);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||
|
|
|
@ -32,8 +32,9 @@ function plugins()
|
|||
} else {
|
||||
// ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=error" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ function plugins_update()
|
|||
} else {
|
||||
// ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header( "Location: index.php?page=error" );
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ function reset_password(){
|
|||
}else{
|
||||
global $WEBPATH;
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ".$WEBPATH."?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -12,8 +12,9 @@ function settings(){
|
|||
if(($_GET['id'] != $_SESSION['id']) && (!Ticket_User::isMod(unserialize($_SESSION['ticket_user']))) ){
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}else{
|
||||
$webUser = new Webusers($_GET['id']);
|
||||
$result = $webUser->getInfo();
|
||||
|
@ -47,7 +48,8 @@ function settings(){
|
|||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
header("Cache-Control: max-age=1");
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +16,13 @@ function sgroup_list(){
|
|||
if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){
|
||||
$delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$result['delete'] = Support_Group::deleteSupportGroup( $delete_id);
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=sgroup_list");
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=sgroup_list");
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
if(Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){
|
||||
$result['isAdmin'] = "TRUE";
|
||||
|
@ -33,13 +34,15 @@ function sgroup_list(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -148,20 +148,23 @@ function show_queue(){
|
|||
|
||||
//ERROR: Doesn't exist!
|
||||
$_SESSION['error_code'] = "404";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ams?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -43,12 +43,14 @@ function show_reply(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -20,12 +20,13 @@ function show_sgroup(){
|
|||
if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){
|
||||
$delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$result['delete'] = Support_Group::deleteUserOfSupportGroup( $delete_id, $result['target_id'] );
|
||||
header("Cache-Control: max-age=1");
|
||||
if (Helpers::check_if_game_client()) {
|
||||
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=" . $result['target_id']);
|
||||
}else{
|
||||
header("Location: ".$WEBPATH."?page=show_sgroup&id=" . $result['target_id']);
|
||||
}
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
|
||||
}
|
||||
|
||||
|
@ -64,20 +65,23 @@ function show_sgroup(){
|
|||
|
||||
//ERROR: No page specified!
|
||||
$_SESSION['error_code'] = "404";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: ams?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
}
|
|
@ -82,12 +82,14 @@ function show_ticket(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -49,12 +49,14 @@ function show_ticket_info(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -67,12 +67,14 @@ function show_ticket_log(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -41,12 +41,14 @@ function show_user(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}else{
|
||||
//ERROR: not logged in!
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ function syncing(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
|
@ -30,7 +30,8 @@ function userlist(){
|
|||
}else{
|
||||
//ERROR: No access!
|
||||
$_SESSION['error_code'] = "403";
|
||||
header("Cache-Control: max-age=1");
|
||||
header("Location: index.php?page=error");
|
||||
exit;
|
||||
throw new SystemExit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,10 +14,14 @@
|
|||
// load required pages and turn error reporting on/off
|
||||
error_reporting( E_ALL );
|
||||
ini_set( 'display_errors', 'on' );
|
||||
|
||||
class SystemExit extends Exception {}
|
||||
try {
|
||||
|
||||
if (!file_exists( '../is_installed')) {
|
||||
header("Cache-Control: max-age=1");
|
||||
header('Location: ../setup', true, 303);
|
||||
die();
|
||||
throw new SystemExit();
|
||||
}
|
||||
|
||||
require( '../config.php' );
|
||||
|
@ -129,3 +133,6 @@ foreach( $hook_content as $key => $value )
|
|||
|
||||
// load the template with the variables in the $return array
|
||||
helpers :: loadTemplate( $page , $return );
|
||||
|
||||
}
|
||||
catch (SystemExit $e) { /* do nothing */ }
|
||||
|
|
|
@ -101,7 +101,7 @@ function ryzom_app_authenticate(&$user, $ask_login=true, $welcome_message='', $w
|
|||
$c .= '<div style="text-align: center"><strong style="color: #FF5555">'._t($user['message']).'</strong></div><br />';
|
||||
$c .= ryzom_render_login_form($name, false);
|
||||
echo ryzom_app_render(_t('app_'.APP_NAME), $c);
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -328,10 +328,10 @@ function ryzom_redirect($url, $group='', $extra_lua='') {
|
|||
$lua .= 'getUI("ui:interface:'.$group.':content:html"):browse("'.str_replace('&', '&', $url).'")';
|
||||
}
|
||||
echo '<lua>'.$lua.'</lua>';
|
||||
exit();
|
||||
die();
|
||||
} else {
|
||||
header('Location: '.$url);
|
||||
exit();
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
$MY_PATH = dirname(__FILE__);
|
||||
|
||||
if(file_exists("parser.stop")) {
|
||||
exit(0);
|
||||
die();
|
||||
}
|
||||
|
||||
require_once("class/mySQL_class.php");
|
||||
|
@ -360,5 +360,5 @@ for($dtrun=0;$dtrun<2;$dtrun++) {
|
|||
|
||||
#$log->logf("Run complete; exiting...");
|
||||
$log->close();
|
||||
exit(0);
|
||||
die();
|
||||
?>
|
|
@ -37,5 +37,5 @@
|
|||
|
||||
echo "</ryzom_progress>";
|
||||
|
||||
exit(0);
|
||||
die();
|
||||
?>
|
|
@ -109,5 +109,5 @@
|
|||
|
||||
echo "</ryzom_achievements>";
|
||||
|
||||
exit(0);
|
||||
die();
|
||||
?>
|
|
@ -63,14 +63,14 @@ if ( isset( $_GET['search'] ) && isset( $_GET['format'] ) )
|
|||
$response = $c;
|
||||
// sending the response
|
||||
echo( $response );
|
||||
exit;
|
||||
die();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Invalid response';
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ function joinShardFromId( $userId, $domainId, $destSessionId )
|
|||
// Note: the answer is a joinSessionResult message
|
||||
echo "No response from server, joinShard failed<br>";
|
||||
}
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,7 +166,7 @@ function getShardList($userId, $domainId)
|
|||
{
|
||||
echo "No response from server, getShards failed<br>";
|
||||
}
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,7 +211,7 @@ function displayAllShards(&$onlineShardsBySessionId)
|
|||
|
||||
//echo "<input type='submit' name='button' value='Teleport' />";
|
||||
//echo "</form></font>";
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue