<?php defined('APP_NAME') || exit('Access Denied'); 
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo(isset($pp['titles']) ? $pp['titles'] : ''); ?> - <?php echo(isset($pp['webname']) ? $pp['webname'] : ''); ?></title>
<meta name="keywords" content="<?php echo(isset($pp['seo_keywords']) ? $pp['seo_keywords'] : ''); ?>" />
<meta name="description" content="<?php echo(isset($pp['seo_description']) ? $pp['seo_description'] : ''); ?>" />
<link rel="stylesheet" href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/css/bootstrap.min.css" />
<link rel="stylesheet" href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/css/me.css" />
<link rel="stylesheet" href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/icomoon/style.css" />
<script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/js/jquery.js"></script>
<script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/js/bootstrap.min.js"></script>
<script>var webdir = '<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>' , weburl = '<?php echo(isset($pp['weburl']) ? $pp['weburl'] : ''); ?>', memurl = '<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member';</script>
<script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/js/layer/layer.js"></script>
<script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/js/all.js"></script>
<!--[if lt IE 9]>
  <script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/js/html5.js"></script>
  <script src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container bg-white">
	<div class="row">
		<div class="col-sm-6 hidden-xs">
			<a class="nopadding" href="<?php echo(isset($pp['weburl']) ? $pp['weburl'] : ''); ?>"><img src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/img/logo2.png" alt="<?php echo(isset($pp['webname']) ? $pp['webname'] : ''); ?>"/></a>
		</div>
		<div class="col-xs-12 col-sm-6 text-right" id="memnav">
			<?php if (!empty($user)) { ?>
			<a href="javascript:;">您好，<strong><?php echo(isset($user['username']) ? $user['username'] : ''); ?></strong> </a>
			<a href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/"><span class="icon-users"></span>管理中心</a>
			<a href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=public-logout"><span class="icon-switch"></span> 退出</a>
			<?php }else{ ?>
			<a href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=public-register" rel="nofollow"><span class="icon-pencil"></span> 注册</a>
			<a href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=public-login" rel="nofollow"><span class="icon-users"></span> 登录</a>
			<?php if (!empty($pp['qq_login']['off'])) { ?><a href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=qq-login" rel="nofollow" target="_blank"><span class="icon-qq"></span> QQ登陆</a><?php } ?>
			<?php } ?>
		</div>
	</div>
</div>
<nav class="navbar mr0 mb0 bg-header" id="navbar">
	<div class="container">
		<div class="navbar-header visible-xs">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topnav" aria-expanded="false"><span class="sr-only">Toggle navigation</span> <span class="icon-circle-down"></span></button>
			<a class="navbar-brand nopadding" href="<?php echo(isset($pp['weburl']) ? $pp['weburl'] : ''); ?>"><img src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>static/default/img/logo.png" alt="<?php echo(isset($pp['webname']) ? $pp['webname'] : ''); ?>"/></a>
		</div>
		<div class="collapse navbar-collapse" id="topnav">
			<ul class="nav navbar-nav" id="navbar-nav">
				<li class="<?php if (empty($pp_var['topcid'])) { ?>active<?php } ?>"><a href="<?php echo(isset($pp['weburl']) ? $pp['weburl'] : ''); ?>"><span class="icon-home"></span> 网站首页</a></li>
				<?php if (!empty($pp_nav)) { ?>
				<?php if(isset($pp_nav) && is_array($pp_nav)) { foreach($pp_nav as &$v) { ?>
				<?php if (!empty($v['son'])) { ?>
				<li class="dropdown <?php if ($pp_var['topcid'] == $v['cid'] && empty($v['is_remote'])) { ?>active<?php } ?>" >
					<a data-target="#" href="<?php echo(isset($v['url']) ? $v['url'] : ''); ?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo(isset($v['name']) ? $v['name'] : ''); ?> <span class="caret"></span></a>
					<ul class="dropdown-menu">
						<?php if(isset($v['son']) && is_array($v['son'])) { foreach($v['son'] as &$v2) { ?><li><a href="<?php echo(isset($v2['url']) ? $v2['url'] : ''); ?>" target="<?php echo(isset($v2['target']) ? $v2['target'] : ''); ?>"><?php echo(isset($v2['name']) ? $v2['name'] : ''); ?></a><li><?php }} ?>
					</ul>
				</li>
				<?php }else{ ?>
				<li class="<?php if (($pp_var['topcid'] == $v['cid'] || $pp_var['cid']==$v['cid']) && empty($v['is_remote'])) { ?>active<?php } ?>"><a href="<?php echo(isset($v['url']) ? $v['url'] : ''); ?>" target="<?php echo(isset($v['target']) ? $v['target'] : ''); ?>"><?php echo(isset($v['name']) ? $v['name'] : ''); ?></a></li>
				<?php } ?>
				<?php }} ?>
				<?php } ?>
			</ul>
			<form role="search" class="navbar-form navbar-right search hidden-xs" method="GET" action="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>index.php" id="search_form">
				<div class="input-group">
					<input class="form-control" id="search_keyword" type="text" name="keyword" value="<?php echo(isset($keyword) ? $keyword : ''); ?>" aria-describedby="submitso" />
					<input type="hidden" name="mid" value="2" />
					<input type="hidden" name="u" value="search-index" />
					<span class="input-group-btn"><button class="btn btn-default" type="submit"><i class="icon-search"></i></button></span>
				</div>
			</form>
		</div>
	</div>
</nav>
<div class="container mt20">
<div class="row clearfix" style="padding-bottom:20px;">
	<div class="col-sm-2 mt20 mb20">
		<?php if (isset($user)) { ?>
			<div class="list-group">
				<a href="#" class="list-group-item active disabled">管理导航</a>
				<a class="list-group-item <?php if ($navkey=='index-index') { ?> list-group-item-info<?php } ?>" href="index.php?u=index-index"><span class="icon-home"></span> 会员首页</a>
				<?php if(isset($_navs[0]) && is_array($_navs[0])) { foreach($_navs[0] as $pKey=>&$name) { ?>
					<a class="list-group-item" href="javascript:;" style="display:;height:5px;padding:0;background:#eee">&nbsp;</a>
					<?php if(isset($_navs[1][$pKey]) && is_array($_navs[1][$pKey])) { foreach($_navs[1][$pKey] as $url=>&$arr) { ?>
						<a class="list-group-item <?php if ($navkey==$arr['key']) { ?> list-group-item-info<?php } ?>" href="<?php echo(isset($arr['url']) ? $arr['url'] : ''); ?>"><span class="<?php echo(isset($arr['class']) ? $arr['class'] : ''); ?>"></span>  <?php echo(isset($arr['name']) ? $arr['name'] : ''); ?></a>
					<?php }} ?>
				<?php }} ?>
				<a class="list-group-item" href="javascript:;" style="display:;height:5px;padding:0;background:#eee">&nbsp;</a>
				<a class="list-group-item" href="index.php?u=public-logout"><span class="icon-exit"></span> 安全退出</a>
			</div>
			<div class="input-group hidden-xs">
				<span class="input-group-addon"><span class="icon-yen text-success"></span></span>
				<input class="form-control" type="text" value="<?php echo(isset($user['money']) ? $user['money'] : ''); ?>" />
			</div>
		<?php }else{ ?>
			<div class="list-group hidden-xs">
				<a href="#" class="list-group-item active disabled">管理导航</a>
				<a class="list-group-item" href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=public-register"><span class="icon-pencil"></span> 会员注册</a>
				<a class="list-group-item" href="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>member/index.php?u=public-login"><span class="icon-enter"></span> 会员登陆</a>
				<a class="list-group-item" href="javascript:;" style="display:;height:5px;padding:0;background:#eee">&nbsp;</a>
				<a class="list-group-item" href="javascript:;"><span class="icon-exit"></span> 安全退出</a>
			</div>
		<?php } ?>
	</div>
	<div class="col-sm-10 mt20">
<?php if (!empty($pp['user']['gift'])) { ?>
<div class="alert alert-info">
<span class="icon-bullhorn"></span> 　好消息：新用户注册立即赠送<strong><?php echo(isset($pp['user']['gift']) ? $pp['user']['gift'] : ''); ?>元</strong><br />
<?php if (!empty($pp['user']['gift_mobi_off'])) { ?>1、绑定手机<?php } if (!empty($pp['user']['gift_email_off'])) { ?>2、绑定邮箱<?php } ?>
</div>
<?php } ?>
<div class="panel panel-default">
	<div class="panel-heading">会员注册</div>
	<div class="panel-body">
		<form action="index.php?u=public-register" method="post" id="regform" class="form-horizontal">
		<input type="hidden" name="FORM_HASH" value="<?php echo(isset($pp['FORM_HASH']) ? $pp['FORM_HASH'] : ''); ?>" />
		<div class="row">
			<div class="col-sm-4 text-center">
				<span class="icon-users text-ddd" style="font-size:128px;"></span>
			</div>
			<div class="col-sm-5">
				<div>
					<div class="form-group">
						<label for="recipient-name" class="col-sm-3 control-label">用户名：</label>
						<div class="col-sm-9">
							<input type="text" class="form-control required" id="username" name="username" validata-options="validType:'Require',msg:'不能为空'" />
						</div>
					</div>
					<div class="form-group">
						<label for="message-text" class="col-sm-3 control-label">密　码：</label>
						<div class="col-sm-9">
							<input type="password" class="form-control required" id="password" name="password" validata-options="validType:'Require',msg:'不能为空'" onblur="pwStrength(this.value)" onkeyup="pwStrength(this.value)" />
						</div>
					</div>
					<div class="form-group">
						<label for="message-text" class="col-sm-3 control-label">确　认：</label>
						<div class="col-sm-9">
							<input type="password" class="form-control required" id="repassword" name="repassword" validata-options="validType:'Require',msg:'不能为空'" />
						</div>
					</div>
					<div class="form-group">
						<label for="message-text" class="col-sm-3 control-label">验证码：</label>
						<div class="col-sm-9">
							<div class="input-group">
							<input maxlength="4" type="text" size="4" id="regcode" name="code" class="form-control required" style="height:39px;"  validata-options="validType:'Require',msg:'不能为空'" />
							<span class="input-group-addon">
								<img border="0" id="verifyImg" alt="如果您无法识别验证码，请点图片更换" style="cursor:pointer;" src="<?php echo(isset($pp['webdir']) ? $pp['webdir'] : ''); ?>index.php?u=public-verify-name-regcode" onclick='this.src=this.src+"&"+Math.random()'>点击更换
							</span>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label" for="submit"></label>
						<div class="col-sm-9">
							<input type="submit" class="btn btn-primary" id="submit" value="提交注册" /> <span class="text-warning" id="reg_warning"></span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label" for="reg"></label>
						<div class="col-sm-9">
							<a href="index.php?u=public-login"><span class="icon-user"></span>  已注册，立即登陆</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		</form>
	</div>
</div>
<script>
$(document).ready(function(){
	ppAjax.submit("#regform", function(data){
		ppAjax.alert(data);
		if(window.ppData.err==0) {
			layer.msg(window.ppData.msg, {icon: 1,time: 2000,shade: 0.6}, function(){window.location = memurl;});
		}else{
			layer.msg(window.ppData.msg, function(){});
		}
	});
});
</script>
		</div>
	</div>
</div>
<footer class="footer mt20">
	<div class="container">
		<p class="text-center small">
			Copyright &copy; <?php echo date('Y'); ?> <a href="<?php echo(isset($pp['weburl']) ? $pp['weburl'] : ''); ?>"><?php echo(isset($pp['webname']) ? $pp['webname'] : ''); ?></a> ALL RIGHT RESERVED
		</p>
	</div>
</footer>
</body>
</html>