Beispiel #1
0
// if(!isset($_SESSION['logged_in'])) {
// 	header("Location: http://localhost:9000/login.html");
// }
//get the user object from the session
//$user = unserialize($_SESSION['user']);
//Get userID and token to know if have valid session
//
//token=f766a167-9f28-4088-94c4-886fc98b2758
$userTools = new UserTools();
$userId = $_GET['userId'];
$token = $_GET['token'];
$username = $_GET['username'];
$orderId = $_GET['order'];
$orders = array();
if ($token != '' && $userId != '') {
    if ($userTools->checkSession($userId, $token)) {
        //get the orders/ all orders
        $orderTool = new OrderTool();
        $orders = $orderTool->getOrder($orderId);
        // <script type="text/javascript">
        // 	jsFunction();
        // </script>
    } else {
        //header("Location: login.php");
        header("Location: 404.php");
    }
} else {
    header("Location: 404.php");
}
?>