<?php
error_reporting(0);
isset($_COOKIE['uid'])?$uid=$_COOKIE['uid']:$uid='admin';//获取会员的ID，否则默认为管理员ID
isset($_GET['uid'])?$union=$_GET['uid']:$union="0";//获取会员的ID，否则默认为管理员ID
isset($_COOKIE['username'])?$username=$_COOKIE['username']:$username=null;//获取会员的账号
if($username != null){
    header("location:menber.php");
    exit;
}
setcookie("union_id",$union,time()+3600*24,'/');
require_once("core/setting.php");
$login = $setting['login'];
if($login=="1"){
    header("location:wxlogin/index.php");
    exit;
}
?>
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="style/reg.css" rel="stylesheet" />
<script src="js/jquery-1.11.1.min.js"></script>
<script src="jquerymoblie/jquery.mobile-1.4.1.min.js"></script>
<link rel="stylesheet" href="jquerymoblie/jquery.mobile-1.4.1.min.css"/>
<script src="js/reg.js"></script>
</head>
<title><?php echo $setting['title'];?></title>
<div id="head">
<div class="logo" onclick="location.href='index.php'"><?php echo $setting['title'];?></div>
<div class="login"><a onclick="location.href='login.php'">登录</a> |<a onclick="location.href='reg.php'">注册</a> </div>
</div>
<div id="banner"><img src="images/banner.jpg" /></div>
<div id="head2">
<ul>
<li class="reg">注册</li>
<li class="login">登录</li>
</ul>
</div>
<div id="main">

<div class="mainreg">
        <fieldset data-role="controlgroup">
        <legend>填写注册资料  <span style="color: #FF0000;">(注册后赠送 1 元人民币)</span></legend>
        <input type="text" id="username" placeholder="输入手机号码"/>
        <input type="password" id="userpass" id="fname" placeholder="请输入登录密码"/>
        <input type="password" id="userpass2" id="fname" placeholder="再次输入登录密码"/>
        <input type="text" id="nicheng" placeholder="请输入您的昵称"/>
        <input type="hidden" id="union" value="<?php echo $union;?>" />
        <input type="submit" id="regsubmit" value="创建账户并登录"/>
        </fieldset>
</div>

<div class="mainlogin">
        <fieldset data-role="controlgroup">
        <legend>登录后立即赚钱</legend>
        <input type="text" id="loginusername" placeholder="手机号码"/>
        <input type="password" id="loginuserpass" placeholder="登录密码"/>
        <input type="submit" id="loginsubmit" value="登录我的账户"/>
        </fieldset>
</div>

</div>

</div>


<div style="display: none;">统计代码</div>