Example #1
0
     $params = array(array($_SESSION["uid"], SQLSRV_PARAM_IN), array($_SESSION["cid"], SQLSRV_PARAM_IN));
     sp_execute("{call app_del_car(?,?)}", $params);
     $status = "ok";
     $info = "删除车辆成功";
 } else {
     if ($action == "user_login") {
         try {
             $username = $_REQUEST["username"];
             $password = $_REQUEST["password"];
             $remember = $_REQUEST["remember"];
             $verify = $_REQUEST["verify"];
             //记住密码
             if ($remember == 1) {
                 $time = time() + 3600 * 24 * 7;
                 setcookie("canteen_login_uname", simple_encode($username), $time, "/");
                 setcookie("canteen_login_pwd", simple_encode($password), $time, "/");
             } else {
                 unset($_COOKIE["canteen_login_uname"]);
                 unset($_COOKIE["canteen_login_pwd"]);
             }
             //
             $res = "                    ";
             $params = array(array($username, SQLSRV_PARAM_IN), array($password, SQLSRV_PARAM_IN), array($res, SQLSRV_PARAM_OUT));
             /*
             $rs = sp_execute("{call web_admin_login(?,?,?)}", $params);
             $row = $rs[0];
             //登录成功
             if($res=="ok")
             {
                 $_SESSION["uname"] = $row["uname"];
                 $_SESSION["roleid"] = $row["roleid"];
Example #2
0
            fail: function (res) {
            }
        });

        // 2.2 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
        wx.onMenuShareTimeline({
            title: '分享车辆【<?php 
    echo $_SESSION["carnum"];
    ?>
】',
            desc: '<?php 
    echo $nickname;
    ?>
分享了车辆的行驶信息,点击查看。',
            link: '<?php 
    echo CFG_HTTP . "mobile/share_message.php?carnum=" . simple_encode($_SESSION["carnum"], CFG_CAR_ED_KEY) . "&verticket={$verticket}";
    ?>
',
            imgUrl: '<?php 
    echo strlen($picurl) > 0 ? CFG_HTTP . "upload/car/{$picurl}" : CFG_HTTP . CFG_CAR_DEFAULT;
    ?>
',
            trigger: function (res) {
            },
            success: function (res) {
            },
            cancel: function (res) {
            },
            fail: function (res) {
            }
        });