コード例 #1
0
                die(json_encode(array('status' => 'error', 'content' => $content)));
            }
        }
    }
    die(json_encode(array('status' => 'error exit', 'content' => '')));
}
/**
  $arr=array(
 'error0'=>'参数不对,或者没通过校验',
 'error40'=>'订单号不存在',
 'error20'=>'发货日期,跟踪单号为空',
 'error50'=>'订单状态不连续',
 'error30'=>'未知处理错误',
  );
 /**/
if (!isValidRequest()) {
    die(json_encode(array('status' => 'failure', 'content' => 'error0')));
}
//!empty($orderId) && !empty($check) &&!empty($statusId)
if (!empty($orderId) && !empty($check) && !empty($statusId)) {
    if (!orderExists($orderId)) {
        //检查订单号是否存在
        die(json_encode(json_encode(array('status' => 'failure', 'content' => 'error40'))));
    }
    if ($statusId == 4 || $statusId == 5) {
        //已经发货或者部分发货
        if (allowUpdateCheck(3, $orderId)) {
            /**  单独设置
            			if(empty($shippingDate) || empty($trackingNumber)){//发货日期,跟踪单号是必须的
            				die(json_encode(array('status'=>'failure','content'=>'error20')));
            			}
コード例 #2
0
ファイル: add_url.php プロジェクト: nicolaes/WatchMyStuff
// Descrierea tabelelor din baza de date
include 'includes/functions/db.functions.php';
// Functii pentru baza de date
include 'includes/functions/functions.php';
include 'simplehtmldom/simple_html_dom.php';
connect();
// Conectare la baza de date
//==========================================================================
// Try to store the $_GET params in the $_SESSION for further reference
storeSessionParams();
if (!isLogged() && !tokenLogin()) {
    //header('Location: '.$websiteURL.'login.php');
    var_dump($_GET['token']);
    var_dump($_SESSION);
    exit;
}
if (!checkSessionParams()) {
    header('Location: ' . $websiteURL . 'index.php');
}
if (isSetDetails()) {
    if (isValidRequest()) {
        insertUserData();
    } else {
        // Eroare
    }
    header('Location: ' . $websiteURL . 'index.php');
} else {
    $error = "Te rugam sa completezi campurile. ";
}
// Se include pagina
include 'pages/set_stuff_details.php';