コード例 #1
0
// }
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// require_once('QueryConstants.php');
// require_once('PDOConfig.php');
// require_once('TempStock.php');
require_once 'libs.php';
require_once 'includes/class.compras.php';
error_reporting(E_ALL);
ini_set('display_errors', 'On');
if (!Usuario::sCheckPoints()) {
    @header('Location: carrito.php');
    exit;
}
$checkVencimiento = new TempStock();
$can = $checkVencimiento->fechaVencimiento($_SESSION['MM_IdUsuario']);
if ($can) {
    echo '<script>window.location.href="catalogo.php";</script>';
}
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup)
{
    // For security, start by assuming the visitor is NOT authorized.
    $isValid = False;
    // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
    // Therefore, we know that a user is NOT logged in if that Session variable is blank.
    if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
コード例 #2
0
<?php

session_start();
require_once 'TempStock.php';
if (isset($_POST['check'])) {
    $x = new TempStock();
    $result = $x->fechaVencimiento($_SESSION['MM_IdUsuario']);
    echo $result ? "true" : "false";
}