【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-05 9dc0d99742f5526321e1b5fdb0dec10e6725415e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php include "../inc/odbc.php"; ?>
<?php
$UserID    = empty($_REQUEST['UserID'])!=false ? "" : $_REQUEST['UserID'];
$Openid    = empty($_REQUEST['Openid'])!=false ? "" : $_REQUEST['Openid'];
 
if ($Openid=="undefined") {
    echo "请使用微信小程序打开!!";exit;
}elseIf (empty($UserID)==false and empty($Openid)==false) {
    $sql="insert into API_Json (method,Json) values ('UserAdminlogin','UserID=".$UserID."&Openid=".$Openid."')";
    //$UPsql = sqlsrv_query($conn,$sql);
    $sql="select ToUserID from weixinOpenID where OpenID='".$Openid."' and ToUserID=$UserID";
    $data = sqlsrv_query($conn,$sql);
    if($data == true){
        if (sqlsrv_rows_affected($data)!=0) {
            while($rs = sqlsrv_fetch_array($data) ) {
                $UserID    = $rs['ToUserID'];
                setrawcookie("AdminUserID",$UserID,time()+3600*24,"/");
                setrawcookie("AdminOpenid",$Openid,time()+3600*24,"/");
            }
        }else{
            echo "非法操作2!!";exit;
        }
    }
}Else{
    echo "非法操作1!!";exit;
}
 
 
header("Location: UserOrderList.php"); exit;
?>