if (strpos($MM_restrictGoTo, "?")) { $MM_qsChar = "&"; } if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) { $MM_referrer .= "?" . $QUERY_STRING; } $MM_restrictGoTo = $MM_restrictGoTo . $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: " . $MM_restrictGoTo); exit; } $sizeFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $sizeFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } // ** Logout the current user. ** $logoutAction = logOutUser(); if (isset($_POST["MM_insert"]) && $_POST["MM_insert"] == "InsertSize") { $insertSQL = sprintf("INSERT INTO `sizes_article` (`article`, `size`, `quantity`) VALUES (%s, %s, %s)", GetSQLValueString($id, "int"), GetSQLValueString($_POST['Size'], "int"), GetSQLValueString($_POST['Q'], "int")); $Result1 = mysql_query($insertSQL, $padelprivee) or die(mysql_error()); $updateSQL = sprintf("UPDATE `articles` SET `quantity`=%s WHERE `_id` = %s", GetSQLValueString($q + $_POST['Q'], "int"), GetSQLValueString($id)); $Result2 = mysql_query($updateSQL, $padelprivee) or die(mysql_error()); $insertGoTo = "article.php?ID=" . $id; /*if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } */ header(sprintf("Location: %s", $insertGoTo)); } if (isset($_POST["MM_insert"]) && $_POST["MM_insert"] == "UpdateSize") { $insertSQL = sprintf("UPDATE `sizes_article` SET `quantity`=%s, `size`=%s WHERE ((`article`=%s) && (`size`=%s))", GetSQLValueString($_POST['Q'], "int"), GetSQLValueString($_POST['Size'], "int"), GetSQLValueString($id, "int"), GetSQLValueString($_POST['oldS'], "int")); $Result1 = mysql_query($insertSQL, $padelprivee) or die(mysql_error());
@ini_set('session.use_cookies', '1'); @ini_set('session.use_only_cookies', '1'); @header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1. @header('Pragma: no-cache'); // HTTP 1.0. @header('Expires: 0'); // Proxies. @session_name('FWLDBA'); session_start(); // check if membership system exists setupMembership(); ######################################################################## // do we have an admin log out request? if ($_GET['signOut'] == 1) { logOutUser(); ?> <META HTTP-EQUIV="Refresh" CONTENT="0;url=../index.php"><?php exit; } // is there a logged user? if (!($uname = getLoggedAdmin())) { // is there a user trying to log in? if (!checkUser($_POST['username'], $_POST['password'])) { // display login form ?> <META HTTP-EQUIV="Refresh" CONTENT="0;url=../index.php?signIn=1"><?php exit; } else { redirect('admin/pageHome.php'); }
function logOutMember() { logOutUser(); redirect("index.php?signIn=1"); }
function logOut($d, $ip, $token) { return logOutUser($d); }
<?php session_start(); require_once 'Adapter.class.php'; require_once 'functions.inc.php'; $go = $_POST['go']; switch ($go) { case 'login': print loginUser($_POST['un'], $_POST['p']); break; case 'logout': print logOutUser(); break; case 'getcustomers': print getCustomers($_POST); break; case 'addcall': print addCall($_POST); break; case 'getcalls': print getCalls(); break; case 'addcustomer': print addcustomer($_POST); break; }
} else { $echo = "{'status':'invalid' , 'error': '" . $chkUsr['login'] . "' }"; } } if ($cmd == 'makeuser') { if ($chkUsr['signup'] == 'signup') { $userData['password'] = genPassword(); createUser($userData, $dbdriver, $server, $user, $password); $SSID = genSSID($userData, $dbdriver, $server, $user, $password, 'simple3d', 'users'); $echo = "{status:'created','SSID':'{$SSID}'}"; $confaddress = 'http://*****:*****@gmail.com', 'Simple3D Account Creation', "<html><body>{$usrStr}</body></html>"); } else { $echo = "{'status':'invalid' , 'error': '" . $chkUsr['signup'] . "' }"; } } if ($cmd == 'logout') { if ($chkUsr['logout'] == 'logged-in') { $data = logOutUser($userData['SSID'], $dbdriver, $server, $user, $password); $echo = "{status:'logout',data:{$data}}"; } else { $echo = "{status:'invalid',error:{$data}}"; } } echo $echo; }