Example #1
0
function getArrayInf($array)
{
    $s = '{';
    foreach ($array as $k => $v) {
        $s .= $k . ': ';
        if (is_array($v)) {
            $s = $s . getArrayInf($v);
        } else {
            $s .= $v . ',';
        }
    }
    $s = trim($s, ',');
    return $s . '}';
}
Example #2
0
     pdoInsert('favorite_tbl', array('c_id' => $_SESSION['customerId'], 'g_id' => $_POST['g_id']), 'ignore');
     echo 'ok';
     exit;
 }
 if (isset($_POST['deletFav'])) {
     pdoDelete('favorite_tbl', array('g_id' => $_POST['g_id'], 'c_id' => $_SESSION['customerId']));
     echo 'ok';
     exit;
 }
 if (isset($_POST['changePart'])) {
     if ($_POST['mode'] == 'true') {
         unset($_SESSION['buyNow']['partsList'][$_POST['part_id']]);
     } else {
         $_SESSION['buyNow']['partsList'][$_POST['part_id']] = $_POST['number'];
     }
     mylog(getArrayInf($_SESSION['buyNow']['partsList']));
     echo 'ok';
     exit;
 }
 if (isset($_POST['buyNow'])) {
     //        pdoQuery('g_inf_tbl',null,array('sc_id'=>'5','id'=>array('4','5')),null);
     //        pdoQuery('g_inf_tbl',null,array('sc_id'=>5,'id'=>array(4,5)),null);
     //        pdoQuery('g_inf_tbl',null,array('sc_id'=>'5','id'=>array(4,5)),null);
     exit;
 }
 if (isset($_POST['userRemark'])) {
     $_SESSION['customer_remark'] = html(trim($_POST['remark']));
     echo 'ok';
     exit;
 }
 if (isset($_POST['submitReview'])) {
Example #3
0
<?php

include_once '../includePackage.php';
session_start();
mylog('jump');
if (isset($_GET['createOrder'])) {
    mylog('set');
    $query = pdoQuery('order_tbl', null, array('id' => $_GET['orderId'], 'stu' => '0'), ' limit 1');
    if ($orderInf = $query->fetch()) {
        mylog(getArrayInf($orderInf));
        //        echo 'ok';
        include 'view/index.html.php';
        exit;
    } else {
        echo 'error';
        exit;
    }
}