Beispiel #1
0
     if ($cookie == "yes") {
         //自动登录
         setcookie("QIYUUSER", $rows['user_account'], time() + 60 * 60 * 24 * 7);
         setcookie("QIYUVERD", $pwd, time() + 60 * 60 * 24 * 7);
     } else {
         setcookie("QIYUCHECK", 'no', time() + 60 * 60 * 24 * 7);
     }
     if ($re_name == "yes") {
         //记住帐号
         setcookie("QIYUCHECK", 'yes', time() + 60 * 60 * 24 * 7);
         setcookie("QIYUUSER", $rows['user_account'], time() + 60 * 60 * 24 * 7);
     }
     //记录Session
     $_SESSION['qiyu_uid'] = $rows['user_id'];
     //alertInfo("登录成功","index.php",0);
     $geturl = getDefaultAddress($rows['user_id']);
     $cName = getCircleByID($geturl['circle']);
     if (!empty($p)) {
         Header("Location: userorder.php?shopID=" . $shopID . "&shopSpot=" . $shopSpot . "&circleID=" . $shopCircle);
     } else {
         if ($cName == '大望路') {
             Header("Location: spot.php?spotID=" . $geturl['spot'] . "&circleID=" . $geturl['circle']);
         } else {
             if (empty($loginUrl)) {
                 Header("Location: index.php");
             } else {
                 Header("Location: " . $loginUrl);
             }
         }
     }
 } else {
Beispiel #2
0
<?php

require_once "include/dbconn.php";
$loginUrl = empty($_SESSION['login_url']) ? '' : $_SESSION['login_url'];
$geturl = getDefaultAddress($_SESSION['qiyu_uid']);
$cName = getCircleByID($geturl['circle']);
$p = empty($_GET['p']) ? '' : sqlReplace(trim($_GET['p']));
//从订单页来的标示
$shopID = empty($_GET['shopID']) ? '0' : sqlReplace(trim($_GET['shopID']));
$shopSpot = empty($_GET['shopSpot']) ? '0' : sqlReplace(trim($_GET['shopSpot']));
$shopCircle = empty($_GET['shopCircle']) ? '0' : sqlReplace(trim($_GET['shopCircle']));
if (!empty($p)) {
    Header("Location: userorder.php?shopID=" . $shopID . "&shopSpot=" . $shopSpot . "&circleID=" . $shopCircle);
    exit;
} else {
    if ($cName == '大望路') {
        $url = "spot.php?spotID=" . $geturl['spot'] . "&circleID=" . $geturl['circle'];
    } else {
        if (empty($loginUrl)) {
            $url = "index.php";
        } else {
            $url = $loginUrl;
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css"/>