<repo_name>TTFlyzebra/phpxinyi<file_sep>/Apps/Admin/Controller/AjaxController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class AjaxController extends Controller {
    public function index(){
    	echo  __ACTION__;
    }
    
    public function log(){
    	if (!IS_POST) $this->error("页面不存在！");
    	$data = $_POST;
    	if ($data['shopname'] == "") die("no shopname！");
    	$user = M ( 'shop' )->where(array('shopname'=>$data['shopname']))->find();
    	if(!$user) die ( '用户未注册！' );
    	if ($data['loginword'] == "") die("no loginword！");
    	if ($user['loginword']!=md5($data['loginword'])) die("密码错误！");
    }
    
    public function reg(){
    	if (!IS_POST) $this->error("页面不存在！");
    	$data = $_POST;
    	if ($data['shopname'] == "") die("no shopname！");
    	$count = M ( 'shop' )->where(array('shopname'=>$data['shopname']))->find();
    	if ($count) die ( '商店名称已注册，请尝试在商店名称前加上地址信息以区分！' );
    }
    
}<file_sep>/Apps/Admin/Public/js/admin-product.js
$(document).ready(function() {
	$('#addproduct').click(function() {
		if ($('#ptype_name').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#ptype_name').focus();
			return false;
		}

//		if ($("input[name='pattr_id[]']:checked").length == 0) {
//			$('#checkbox_css').focus().css({
//				boxShadow : "0 0 3px #0000ef"
//
//			});
//			return false;
//		} else {
//			$('#checkbox_css').focus().css({
//				boxShadow : "0 0 0px #0000ef"
//			});
//		}

		if ($('#name').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#name').focus();
			return false;
		}
		if ($('#price').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#price').focus();
			return false;
		}
		
		//检查输入是否为数字
		if (isNaN($('#price').val())) {
			$('#price').focus();
			return false;
		}
		
		//检查输入的小数不能超过2位
		if ($('#price').val().split(".").length > 1
				&& $('#price').val().split(".")[1].length > 2) {
			$('#price').focus();
			return false
		}

		if ($('#proimg1').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#proimg1').focus();
			return false;
		}
//		if ($('#proimg2').val() == "") {
//			// alert("请选择分类！");
//			// document.getElementById("message").innerHTML = "名称不能为空！";
//			$('#proimg2').focus();
//			return false;
//		}
//		if ($('#proimg3').val() == "") {
//			// alert("请选择分类！");
//			// document.getElementById("message").innerHTML = "名称不能为空！";
//			$('#proimg3').focus();
//			return false;
//		}
		if ($('#describe').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#describe').focus();
			return false;
		}
		$('#addFrom').submit();
	});
});
<file_sep>/Apps/Admin/Controller/NodeController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class NodeController extends AuthController {
	
	/**
	 * 显示节点管理页面
	 */
	public function index() {
		$node = M ( 'node' )->select ();
// 		$showArray = array();
// 		foreach($node as $temp){
			
// 		}
// 		$this->showdata = $node;
		$node=node_merge($node);
		$this->node=$node;
		$this->display ();
	}
	
	
	/**
	 * 添加节点
	 */
	public function add() {
		if (! IS_POST)$this->error ( "页面不存在！" );
		if ($_POST ['node_name'] == null 
				|| $_POST ['node_status'] == null 
				|| $_POST ['node_remark'] == null
				|| $_POST ['node_pid'] == null
				|| $_POST ['node_level'] == null) {
			$this->error ( "传入参数错误！" );
		}
		$node = array (
				'name' => $_POST ['node_name'],
				'status' => $_POST ['node_status'],
				'remark' => $_POST ['node_remark'],
				'pid' => $_POST ['node_pid'],
				'level' => $_POST ['node_level']
		);
		if (M ( 'node' )->add ( $node )) {
			$this->redirect ( "/Admin/node" );
		} else {
			$this->error ( "添加节点错误！" );
		}
	}
	
	
	/**
	 * 修改节点
	 */
	public function edit() {
		if (! IS_POST)$this->error ( "页面不存在！" );
		if ($_POST ['node_id'] == null
				||$_POST ['node_name'] == null
				|| $_POST ['node_status'] == null
				|| $_POST ['node_remark'] == null
				|| $_POST ['node_pid'] == null
				|| $_POST ['node_level'] == null) {
					$this->error ( "传入参数错误！" );
				}
				$node = array (
						'id'=>$_POST ['node_id'],
						'name' => $_POST ['node_name'],
						'status' => $_POST ['node_status'],
						'remark' => $_POST ['node_remark'],
						'pid' => $_POST ['node_pid'],
						'level' => $_POST ['node_level']
				);
				if (M ( 'node' )->save ( $node )) {
					$this->redirect ( "/Admin/node" );
				} else {
					$this->error ( "修改结点失败！" );
				}
	}
	
	
	/**
	 * 删除节点
	 */
	public function del() {
		if (! IS_POST)	$this->error ( "页面不存在！" );
		$node = array (
				'id' => $_POST ['id'],
				'name' => $_POST ['name'],
				'status' => $_POST ['status'],
				'remark' => $_POST ['remark'],
		);
		M ( 'node' )->where (array($node ))->delete ();
	}
	
	
	/**
	 * 修改节点状态
	 */
	public function status() {
		if (! IS_POST)	$this->error ( "页面不存在！" );
		$node = array (
				'id' => $_POST ['id'],
				'name' => $_POST ['name'],
				'status' => $_POST ['status'],
				'remark' => $_POST ['remark'],
		);
		M ( 'node' )->where($node)->save(array('status'=>!$node['status']));
	}
	
}<file_sep>/Apps/Home/Controller/WeixinPayController.class.php
<?php

namespace Home\Controller;

use Think\Controller;

class WeixinPayController extends Controller {
	public function index() {
		header('Content-Type: text/xml');
		$postData = "<xml>
				<appid>wxb4ba3c02aa476ea1</appid>
				<attach>支付测试</attach>
				<body>APP支付测试</body>
				<mch_id>1305176001</mch_id>
				<nonce_str>1add1a30ac87aa2db72f57a2375d8fec</nonce_str>
				<notify_url>http://wxpay.weixin.qq.com/pub_v2/pay/notify.v2.php</notify_url>
				<out_trade_no>1415659990</out_trade_no>
				<spbill_create_ip>192.168.3.11</spbill_create_ip>
				<total_fee>1</total_fee>
				<trade_type>APP</trade_type>
				<sign>ce187ed67e05c2d8879bf66bbfdfc8b9</sign>
				</xml> ";
		$data = vpost ("https://api.mch.weixin.qq.com/pay/unifiedorder", $postData);
// 		$data = vpost ("https://flyzebra.wicp.net/xinyi/API/Product", "");
		echo $data;
	}
}<file_sep>/Apps/Common/Model/ShopRoleModel.class.php
<?php
namespace Common\Model;
use Think\Model\RelationModel;
class ShopRoleModel extends RelationModel{
	//定义主表
	protected $tableName = 'shop';
	
	//定义关联关系
	protected $_link = array(
		'role'=>array(
				'mapping_type' => self::MANY_TO_MANY,
				'class_name'  =>  'role',
				'foreign_key'=>'user_id',
				'relation_key'=>'role_id',
				'relation_table'=>'fz_role_user',
				'mapping_fields'=>'id,remark'
		)	
	);
}<file_sep>/Runtime/Cache/Admin/831ccbd780db7bbeb6d94534274f2132.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript">
	var ajaxadd = '<?php echo U("/Admin/HomeShop/add");?>'
	var ajaxdel = '<?php echo U("/Admin/HomeShop/del");?>'
</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-homeshop.js"></script>
</head>
<body>
	<div class="crumb-wrap">
		<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> <span class="crumb-step">&gt; <a href="#">首页推荐商店设置</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<table class="admin-tab" width="100%">
				<tbody align="right">
					<tr style="background:#00e8e8">
						<th colspan="7">首页展示商店</th>
					</tr>
					<tr style="background:#e8e8e8">
						<th width="14%">商店名称</th>
						<th width="8%">店长姓名</th>
						<th width="10%">店长电话</th>
						<th width="10%">商店电话</th>
						<th width="13%">注册时间</th>
						<th >商店地址</th>
						<th width="12%">执行操作</th>
					</tr>
					<?php if(is_array($shops)): foreach($shops as $key=>$v): if($v['show'] == 1): ?><tr>
						<td><?php echo ($v["shopname"]); ?></td>
						<th><?php echo ($v["peoplename"]); ?></th>
						<th><?php echo ($v["peoplephone"]); ?></th>
						<th><?php echo ($v["shopphone"]); ?></th>
						<th><?php echo (date("Y-m-d H:i",$v["regtime"])); ?></th>
						<td><?php echo ($v["address"]); ?></td>
						<th><a href="javascript:delShow('<?php echo ($v["id"]); ?>');"><i class="btn btn-primary">取消展示</i></a></th>
					</tr><?php endif; endforeach; endif; ?>
				</tbody>
			</table>
			<br>
			<!--input class="common-text" placeholder="商店名称" name="keywords" size="40" value="" id="" type="text">
			<input class="btn btn-primary btn2" name="sub" value="搜索商店" type="submit"-->
			<table class="admin-tab" width="100%">
				<tbody align="right">
					<tr style="background:#00e8e8">
						<th colspan="7">首页未展示商店</th>
					</tr>
					<tr style="background:#e8e8e8">
						<th width="14%">商店名称</th>
						<th width="8%">店长姓名</th>
						<th width="10%">店长电话</th>
						<th width="10%">商店电话</th>
						<th width="13%">注册时间</th>
						<th >商店地址</th>
						<th width="12%">执行操作</th>
					</tr>
					<?php if(is_array($shops)): foreach($shops as $key=>$v): if($v['show'] != 1): ?><tr>
						<td><?php echo ($v["shopname"]); ?></td>
						<th><?php echo ($v["peoplename"]); ?></th>
						<th><?php echo ($v["peoplephone"]); ?></th>
						<th><?php echo ($v["shopphone"]); ?></th>
						<th><?php echo (date("Y-m-d H:i",$v["regtime"])); ?></th>
						<td><?php echo ($v["address"]); ?></td>
						<th><a href="javascript:addShow('<?php echo ($v["id"]); ?>');"><i class="btn btn-primary">首页展示</i></a></th>
					</tr><?php endif; endforeach; endif; ?>
				</tbody>
			</table>
		</div>
	</div>
	<div class="dlg-mask"></div>
	<!-- 添加菜单 Start-->
	<div class="dlg-content">正在向服务器提交请求.....</div>
</body>
</html><file_sep>/Apps/Admin/Controller/AccessController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;
/**
 * 配置角色节点
 * @author FlyZebra
 *
 */
class AccessController extends AuthController {
	
	/**
	 * 配置角色页面
	 */
	public function index() {
		$r_id = I('pid');
		$this->r_id = $r_id;
		$access = M('access')->where(array('role_id'=>$r_id))->getField('node_id',true);
		$node = M ( 'node' )->select ();
		$node = node_merge($node,$access);
		$this->node = $node;
		$this->role = M ( 'role' )->select ();
		$this->access = M ( 'access' )->select ();
		$this->display ();
	}
	
	/**
	 * 配置角色节点
	 */
	public function setAccess(){
		$role_id = $_POST['pid'];
		$data = array();
		foreach ($_POST['nodeid'] as $v){
			$tmp = explode('_', $v);
			$data[] = array(
					'role_id'=>$role_id,
					'node_id'=>$tmp[0],
					'level'=>$tmp[1]
			);
		}
		$db= M('access');
		$db->where(array('role_id'=>$role_id))->delete();
		if($data==null){
			$this->redirect("/Admin/Access/index",array('pid' =>$role_id));
		}else if($db->addAll($data)){
			$this->redirect("/Admin/Access/index",array('pid' =>$role_id));
		}else{
			$this->error($db->getError());
		}
	
	}
}<file_sep>/Runtime/Cache/Admin/0804f70153bdcb52986c9e16a1d6ea93.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript"> var ajaxurl= '<?php echo U("/Admin/Attr/del","","");?>'</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-attr.js"></script>
</head>
<body>
<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">商品属性</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<table class="admin-tab" width="900px">
				<tbody align="right">
					<tr style="background:#e8e8e8">
						<th width="30%">属性名称</th>
						<th width="30%">加亮颜色</th>
						<th width="30%">执行操作</th>
					</tr>
					<?php if(is_array($pattr)): foreach($pattr as $key=>$v): ?><tr>
						<th><?php echo ($v["name"]); ?></th>
						<th><div style="margin-left: 135px;vertical-align:middle;width:20px;height:20px;background:<?php echo ($v["color"]); ?>"></div></th>
						<th><a href="javascript:postdel('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["color"]); ?>');"><i class="icon-font">&#xe037;删除</i></a></th>
					</tr><?php endforeach; endif; ?>
				</tbody>
			</table>
			<br>
			<form name="addform" id="addform" accept-charset="utf-8" action="<?php echo U('/Admin/Attr/add');?>" method="post">
				<table class="admin-tab" width="900px">
					<tbody>
						<tr>
							<th style="background:#e8e8e8" colspan="2">添加属性</th>
						</tr>
						<tr>
							<th width = "200px"><span class="require-red">*</span>属性名称：</th>
							<td>
								<input class="common-text" id="name" name="name" size="40" value="" type="text">
							</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>属性颜色：</th>
							<td>
								<input class="common-text" id="color" name="color" size="15" value="#FF0000" type="text">&emsp;以#开头的6位16进制
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input type="submit"class="btn btn-primary btn6 mr10" value="添加" id="add"> 
								<input type="reset"	class="btn btn-primary btn6 mr10" value="重置">
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html><file_sep>/Apps/Admin/Controller/VerifyController.class.php
<?php
namespace Admin\Controller;

use Think\Controller;

/**
 * 申核权限
 * @author FlyZebra
 *
 */
class VerifyController extends AuthController {
	
	/**
	 * 申核权限页面
	 */
	public function index() {
		$userArr=D('ShopRole')->field('loginword',true)->relation('role')->select();
		foreach ( $userArr as $user ) {
			$user['role_id'] = $user['role'][0]['id'];
			$user['role_remark'] = $user['role'][0]['remark'];
			unset($user['role']);
			$data[]=$user;
		}
		$this->shop=$data;
		$this->role=M('role')->select();
		$this->display ();
	}
	
	/**
	 * 修改用户权限
	 */
	public function verify(){
		$data = $_POST;
		$db = M('role_user');
		$db->where(array('user_id'=>$data['user_id']))->delete();
		if($data['role_id']==null) die("no role_id");
		if($db->add($data)){
			die("succeed");
		}else{
			die("failed");
		}
	}
	
}<file_sep>/Apps/Common/Conf/config.php
<?php
return array (
		// 数据库配置信息
		'DB_TYPE' => 'mysql', // 数据库类型
		'DB_HOST' => '127.0.0.1', // 服务器地址
		'DB_NAME' => 'xinyi', // 数据库名
		'DB_USER' => 'root', // 用户名
		'DB_PWD' => '<PASSWORD>', // 密码
		'DB_PORT' => 3306, // 端口
		'DB_PREFIX' => 'fz_', // 数据库表前缀
		'DB_CHARSET' => 'utf8', // 字符集
		
		//其它配置
		'DEFAULT_MODULE' => 'Home',// 默认模块
		'URL_MODEL' => '2', // URL模式
		'SESSION_AUTO_START' => true, // 是否开启session
		'URL_CASE_INSENSITIVE' => false,  //false为默认项，表示URL访问区分大小写
// 		'MODULE_ALLOW_LIST' => array('Home','Admin','API'),//允许访问的模块
		'URL_HTML_SUFFIX' => '',//修改伪.html后缀
				
		
		//Cookie设置
		
// 		'COOKIE_EXPIRE'         =>  0,    // Cookie有效期
// 		'COOKIE_DOMAIN'         =>  '',      // Cookie有效域名
// 		'COOKIE_PATH'           =>  '/',     // Cookie路径
// 		'COOKIE_PREFIX'         =>  '',      // Cookie前缀 避免冲突
// 		'COOKIE_HTTPONLY'       =>  '',     // Cookie的httponly属性 3.2.2新增
		
// 		//数据缓存设置		
// 		'DATA_CACHE_TIME'       =>  0,      // 数据缓存有效期 0表示永久缓存
// 		'DATA_CACHE_COMPRESS'   =>  false,   // 数据缓存是否压缩缓存
// 		'DATA_CACHE_CHECK'      =>  false,   // 数据缓存是否校验缓存
// 		'DATA_CACHE_PREFIX'     =>  '',     // 缓存前缀
// 		'DATA_CACHE_TYPE'       =>  'File',  // 数据缓存类型,支持:File|Db|Apc|Memcache|Shmop|Sqlite|Xcache|Apachenote|Eaccelerator
// 		'DATA_CACHE_PATH'       =>  TEMP_PATH,// 缓存路径设置 (仅对File方式缓存有效)
// 		'DATA_CACHE_SUBDIR'     =>  false,    // 使用子目录缓存 (自动根据缓存标识的哈希创建子目录)
// 		'DATA_PATH_LEVEL'       =>  1,        // 子目录缓存级别
);	
?><file_sep>/Apps/Home/Controller/LoginController.class.php
<?php

namespace Home\Controller;

use Think\Controller;

class LoginController extends Controller {
	public function index() {
		$this->display ();
	}
	
	/**
	 * 注册用户
	 */
	public function register() {
		if (! IS_POST) $this->error("页面不存在！");
		
		//如果传入的参数没有帐号和密码这两个参数，直接结束。
		if($_POST['loginname']==""&&$_POST['loginword']=="") $this->error("传入参数不正确！");
		
		//导入自定义User处理类
		import("Cls.User",APP_PATH);
		//用户名已存在返回错误信息。
		if(\User::verifyName("user", $_POST['loginname'])) die("该用户名已注册！");
		
		//向数据表插入新用户数据。
		$data=\User::insertUser("user", $_POST);
		if(!$data) $this->error("注册帐号失败，请重试！");
		
		//插入成功，更新用户登陆信息
		$log=\User::insertLog("user_log", $data["id"]);
		if(!$log) $this->success("注册帐号成功，请登陆！");
		//缓存用户信息
		\User::saveSession($data, $log);		
		//跳转到主页
		$this->redirect("/");		
	}
	
	/**
	 * 验证登陆信息
	 */
	public function login() {
		if (! IS_POST) $this->error("页面不存在！");
		
		//如果传入的参数没有帐号和密码这两个参数，直接结束。
		if($_POST['loginname']==""&&$_POST['loginword']=="") $this->error("传入参数不正确！");
		
		//导入自定义User处理类
		import("Cls.User",APP_PATH);
		$data = \User::verifyUser("user", $_POST['loginname'], $_POST['loginword']);
		if($data == -1) $this->error("登陆帐号未注册！");
		if($data == 0) $this->error("用户名密码错误！");
		
		//验证通过，更新用度等级//因为用用户登陆次数来判断用户等级
		if (!(\User::upUserLevel ('user', $data)))	$this->error ("更新数户数据出错，请重试！");
		
		// 更新用户登陆信息
		$log = \User::insertLog ( "user_log", $data ["id"] );
		if (! $log)	$this->success ( "更新用户信息出错，可能服务器连接超时，请重试！" );
		// 缓存用户信息
		\User::saveSession ( $data, $log );
		// 跳转到主页
		$this->redirect ( "/" );
	}
	
	public function ajax(){
		if (!IS_POST) return;
		if ($_POST['loginname'] == "") die();
		import("Cls.User",APP_PATH);
		if ($_POST['loginword'] != "") {
			//导入自定义User处理类
			$data = \User::verifyUser("user", $_POST['loginname'], $_POST['loginword']);
			if ($data==-1) 	die ( '该用户尚未注册！' );
			if ($data==0) die ( '密码输入错误！' );
		} else {
			if(\User::verifyName("user", $_POST['loginname'])) die("该用户名已注册！");
		}
	}
}<file_sep>/Apps/Common/Model/ShopAllModel.class.php
<?php
namespace Common\Model;
use Think\Model\RelationModel;
class ShopAllModel extends RelationModel{
	//定义主表
	protected $tableName = 'shop';
	
	//定义关联关系
	protected $_link = array(
		'imgurl' => array(    
				'mapping_type'  => self::HAS_ONE,   
				'class_name'    => 'shop_imgurl', 			//要关联的模型类名  
				'foreign_key'   => 'shop_id',    			//关联的外键名称
// 				'mapping_name'  => 'articles',
				'mapping_name'  => 'imgurl',
// 				'mapping_fields'=> 'imageurl',
				'as_fields'=>'imgurl',
		),	
			
		'show'=>array(
				'mapping_type' => self::HAS_ONE,
				'class_name'    => 'shop_home', 			//要关联的模型类名
				'foreign_key'   => 'shop_id',    			//关联的外键名称
				'mapping_fields'=> 'show',
				'as_fields'=>'show',
		)
	);
}<file_sep>/Runtime/Cache/Admin/14138ae9c908269cc95601fd8f3b9987.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/md5.js"></script>
<script type="text/javascript"> var ajaxurl= '<?php echo U("/Admin/Ajax/reg");?>'</script>
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/admin.css" />
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-register.js"></script>
</head>
<body>
	<div class="crumb-wrap">
		<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> <span class="crumb-step">&gt; <a href="#">注册商店</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<form action="<?php echo U('/Admin/Register/register');?>" method="post" id="registerFrom" name="registerFrom" enctype="multipart/form-data">
				<div id="message" class="msg">注册提示信息！</div>
				<table class="insert-tab" width="100%">
					<tbody>
						<tr>
							<th width="120"><span class="require-red">*</span>商店名称：</th>
							<td><input class="common-text" id="shopname" name="shopname" size="50" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>店主姓名：</th>
							<td><input class="common-text" id="peoplename" name="peoplename" size="20" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>密&emsp;&emsp;码：</th>
							<td><input class="common-text" id="loginword" name="loginword" size="20" value="" type="password"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>确认密码：</th>
							<td><input class="common-text" id="loginword2" size="20" value="" type="password"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>店主手机：</th>
							<td><input class="common-text" id="peoplephone" name="peoplephone" size="20" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商店电话：</th>
							<td><input class="common-text" id="shopphone" name="shopphone" size="20" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商店地址：</th>
							<td><input class="common-text" id="address" name="address" size="100" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>展示图像1：</th>
							<td><input class="common-text" name="proimg1" id="proimg1" type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span></td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>展示图像2：</th>
							<td><input class="common-text" name="proimg2" id="proimg2" type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span></td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>展示图像3：</th>
							<td><input class="common-text" name="proimg3" id="proimg3" type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>备注信息：</th>
							<td><textarea class="common-textarea" name="describe" id="describe" cols="30" style="width: 98%;" rows="10"></textarea></td>
						</tr>
						<tr>
							<th></th>
							<td><input type="button" class="btn btn-primary btn6 mr10" value="注册" id="register"> <input type="reset" class="btn btn-primary btn6 mr10" value="重置"></td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html><file_sep>/Runtime/Cache/Admin/ff90e9603868abd64cf17bfaf5ea9be9.php
<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/node.css" />
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript">
	var ajaxurl = '<?php echo U("/Admin/Access");?>'
</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-access.js"></script>
</head>
<body>
	<div class="crumb-wrap">
		<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> <span class="crumb-step">&gt; <a href="#">权限设置</a></span>
	</div>
	<form name="saveForm" id="saveForm" accept-charset="utf-8" action="<?php echo U('/Admin/Access/setAccess');?>" method="post">
		<div class="main-wrap">
			<div class="result-wrap">
				<div class="apps-title">
					<div class="prm-save">
						网站目录
						<select name="pid" id="pid" class="select-role">
							<option value="">请选择角色</option>
							<!-- 确定哪一项被选中 -->
							<?php if(is_array($role)): foreach($role as $key=>$v): if($v['id'] == $r_id): ?><option value="<?php echo ($v["id"]); ?>" selected="selected"><?php echo ($v["remark"]); ?></option>
							<?php else: ?>
							<option value="<?php echo ($v["id"]); ?>"><?php echo ($v["remark"]); ?></option><?php endif; endforeach; endif; ?>
						</select>
						<input type="submit" class="btn btn-primary" value="保存设置" id="save">
					</div>
					<?php if(is_array($node)): foreach($node as $key=>$v): ?><div class="apps">
						<div class="app">
							<?php echo ($v["remark"]); ?>
							<?php if($v["access"]): ?><input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($v["id"]); ?>_1" id="1" checked="checked"> 
							<?php else: ?>
								<input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($v["id"]); ?>_1" id="1"><?php endif; ?>
						</div>
						<?php if(is_array($v["child"])): foreach($v["child"] as $key=>$c): ?><div class="controls">
							<div class="control">
								<?php echo ($c["remark"]); ?>
								<?php if($c["access"]): ?><input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($c["id"]); ?>_1" id="2" checked="checked"> 
								<?php else: ?>
									<input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($c["id"]); ?>_1" id="2"><?php endif; ?>
							</div>
							<?php if(is_array($c["child"])): foreach($c["child"] as $key=>$m): ?><div class="method">
								<?php echo ($m["remark"]); ?>
								<?php if($m["access"]): ?><input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($m["id"]); ?>_1" id="3" checked="checked"> 
								<?php else: ?>
									<input class="checkbox1" type="checkbox" name="nodeid[]" value="<?php echo ($m["id"]); ?>_1" id="3"><?php endif; ?>
							</div><?php endforeach; endif; ?>
						</div><?php endforeach; endif; ?>
					</div><?php endforeach; endif; ?>
				</div>
			</div>
		</div>
	</form>
</body>
</html><file_sep>/Apps/Admin/Controller/RegisterController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class RegisterController extends AuthController {
	public function index() {
		$this->display ();
		// $this->display ( "Register/register" );
	}
	public function register() {
		if (! IS_POST)	$this->error ( "页面不存在！" );
			
			// 注册用户
		$upload = new \Think\Upload (); // 实例化上传类
		$upload->maxSize = 3145728; // 设置附件上传大小
		$upload->exts = array (	'jpg','png'); // 设置附件上传类型
		$upload->rootPath = './UpLoads/';
		$upload->savePath = '/shop/images/'; // 设置附件上传目录
		$data = $_POST;
		$data ['regtime'] = time (); // 添加注册时间
		$data ['regIP'] = get_client_ip ();
		$data ['loginword'] = md5 ( $data ['loginword'] ); // 密码MD5加密
		$db = M ( 'shop' );
		if ($shop_id = $db->add ( $data )) {
			// 接受上传的图像文件
			$info = $upload->upload ();
			if (! $info) { // 上传错误提示错误信息
				$this->error ( "帐号已注册成功，上传图像文件失败，可登陆再修改！" );
			} else {
				// 更新product_imgurl(产品图像)表
				$product_imgurlDao = M ( 'shop_imgurl' );
				foreach ( $info as $file ) {
					$imgurl = '/UpLoads' . $file ['savepath'] . $file ['savename'];
					if (! $product_imgurlDao->add ( array (
							'shop_id' => $shop_id,
							'imgurl' => $imgurl  
					) )) {
						$this->error ( "帐号已注册成功，添加图像文件失败，可登陆再修改！！" );
					} else {
						import ( "Fly.MyImage", "." );
						\MyImage::thumb ( "." . $imgurl, 480, 320);
					}
				}
				// 处理图像.....图像是上传后处理成统一格式还是显示的时候处理
			}
			$this->success ( "注册成功！" );
		} else {
			$this->error ( "注册失败！" );
		}
	}
}<file_sep>/Apps/Admin/Public/js/admin-attr.js
$(document).ready(function() {
	$('#add').click(function() {
		if ($('#name').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#name').focus();
			return false;
		}
		if ($('#color').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#color').focus();
			return false;
		}
		$('#addfrom').submit();
	});
});

function postdel(param1,param2,param3) {
	$.ajax({
		url: ajaxurl,
		type: 'post',
		data: "id="+param1+"&name="+param2+"&color="+param3,
		success: function(){
			parent.location.reload();
			window.location.reload();
		},
		dataType: 'html'
	});
}


<file_sep>/xinyi.sql
-- phpMyAdmin SQL Dump
-- version 4.6.0
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2018-03-18 05:35:03
-- 服务器版本： 5.5.42
-- PHP Version: 5.6.20

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `xinyi`
--

-- --------------------------------------------------------

--
-- 表的结构 `fz_access`
--

CREATE TABLE `fz_access` (
  `role_id` smallint(6) UNSIGNED NOT NULL,
  `node_id` smallint(6) UNSIGNED NOT NULL,
  `level` tinyint(1) NOT NULL,
  `module` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_access`
--

INSERT INTO `fz_access` (`role_id`, `node_id`, `level`, `module`) VALUES
(19, 123, 1, NULL),
(19, 122, 1, NULL),
(19, 121, 1, NULL),
(19, 120, 1, NULL),
(19, 119, 1, NULL),
(19, 118, 1, NULL),
(19, 117, 1, NULL),
(19, 116, 1, NULL),
(19, 124, 1, NULL),
(19, 114, 1, NULL),
(19, 113, 1, NULL),
(19, 112, 1, NULL),
(19, 111, 1, NULL),
(19, 110, 1, NULL),
(19, 109, 1, NULL),
(19, 108, 1, NULL),
(19, 107, 1, NULL),
(19, 106, 1, NULL),
(19, 105, 1, NULL),
(19, 104, 1, NULL),
(19, 103, 1, NULL),
(19, 102, 1, NULL),
(19, 101, 1, NULL),
(19, 100, 1, NULL),
(19, 99, 1, NULL),
(19, 98, 1, NULL),
(19, 97, 1, NULL),
(19, 96, 1, NULL),
(19, 95, 1, NULL),
(20, 93, 1, NULL),
(20, 94, 1, NULL),
(20, 95, 1, NULL),
(20, 109, 1, NULL),
(20, 110, 1, NULL),
(20, 111, 1, NULL),
(20, 116, 1, NULL),
(20, 117, 1, NULL),
(20, 118, 1, NULL),
(20, 119, 1, NULL),
(20, 120, 1, NULL),
(20, 121, 1, NULL),
(20, 122, 1, NULL),
(20, 123, 1, NULL),
(21, 114, 1, NULL),
(21, 113, 1, NULL),
(21, 112, 1, NULL),
(21, 95, 1, NULL),
(21, 94, 1, NULL),
(21, 93, 1, NULL),
(21, 124, 1, NULL),
(19, 94, 1, NULL),
(19, 93, 1, NULL);

-- --------------------------------------------------------

--
-- 表的结构 `fz_cart`
--

CREATE TABLE `fz_cart` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `addtime` int(11) NOT NULL,
  `addIP` int(11) NOT NULL,
  `remark` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `fz_node`
--

CREATE TABLE `fz_node` (
  `id` smallint(6) UNSIGNED NOT NULL,
  `name` varchar(20) NOT NULL,
  `title` varchar(50) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0',
  `remark` varchar(255) DEFAULT NULL,
  `sort` smallint(6) UNSIGNED DEFAULT NULL,
  `pid` smallint(6) UNSIGNED NOT NULL,
  `level` tinyint(1) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_node`
--

INSERT INTO `fz_node` (`id`, `name`, `title`, `status`, `remark`, `sort`, `pid`, `level`) VALUES
(93, 'Admin', NULL, 1, '后台应用', NULL, 0, 1),
(94, 'Index', NULL, 1, '后台主页', NULL, 93, 2),
(95, 'index', NULL, 1, '后台主页页面', NULL, 94, 3),
(96, 'Role', NULL, 1, '角色管理', NULL, 93, 2),
(97, 'index', NULL, 1, '角色管理页面', NULL, 96, 3),
(98, 'add', NULL, 1, '添加管理角色', NULL, 96, 3),
(99, 'del', NULL, 1, '删除管理角色', NULL, 96, 3),
(100, 'status', NULL, 1, '改变角色状态', NULL, 96, 3),
(101, 'Node', NULL, 1, '节点管理', NULL, 93, 2),
(102, 'index', NULL, 1, '节点管理页面', NULL, 101, 3),
(103, 'add', NULL, 1, '添加网站节点', NULL, 101, 3),
(104, 'del', NULL, 1, '删除网站节点', NULL, 101, 3),
(105, 'edit', NULL, 1, '修改网站节点', NULL, 101, 3),
(106, 'Access', NULL, 1, '权限设置', NULL, 93, 2),
(107, 'index', NULL, 1, '权限设置页面', NULL, 106, 3),
(108, 'setAccess', NULL, 1, '设置角色权限', NULL, 106, 3),
(109, 'Verify', NULL, 1, '申述用户权限', NULL, 93, 2),
(110, 'index', NULL, 1, '申核用户权限页面', NULL, 109, 3),
(111, 'verify', NULL, 1, '申核用户权限', NULL, 109, 3),
(112, 'Product', NULL, 1, '商品管理', NULL, 93, 2),
(113, 'index', NULL, 1, '商品管理页面', NULL, 112, 3),
(114, 'add', NULL, 1, '添加商品', NULL, 112, 3),
(116, 'Attr', NULL, 1, '商品属性', NULL, 93, 2),
(117, 'index', NULL, 1, '商品属性页面', NULL, 116, 3),
(118, 'add', NULL, 1, '添加商品属性', NULL, 116, 3),
(119, 'del', NULL, 1, '删除商品属性', NULL, 116, 3),
(120, 'Type', NULL, 1, '商品分类', NULL, 93, 2),
(121, 'index', NULL, 1, '商品分类页面', NULL, 120, 3),
(122, 'add', NULL, 1, '添加商品分类', NULL, 120, 3),
(123, 'del', NULL, 1, '删除商品分类', NULL, 120, 3),
(124, 'find', NULL, 1, '查找商品', NULL, 112, 3),
(125, 'Home', NULL, 1, '前台应用', NULL, 0, 1);

-- --------------------------------------------------------

--
-- 表的结构 `fz_pattr`
--

CREATE TABLE `fz_pattr` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  `color` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_pattr`
--

INSERT INTO `fz_pattr` (`id`, `name`, `color`) VALUES
(47, '热销', '#FF0000'),
(48, '包邮', '#2F9F00'),
(49, '7天退货', '#0000FF'),
(51, '8折', '#FF00FF');

-- --------------------------------------------------------

--
-- 表的结构 `fz_product`
--

CREATE TABLE `fz_product` (
  `id` int(11) UNSIGNED NOT NULL,
  `ptype_id` int(11) UNSIGNED NOT NULL,
  `name` varchar(50) NOT NULL,
  `price` float NOT NULL,
  `describe` text NOT NULL,
  `addtime` int(11) NOT NULL,
  `shopcount` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `shopname` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_product`
--

INSERT INTO `fz_product` (`id`, `ptype_id`, `name`, `price`, `describe`, `addtime`, `shopcount`, `shop_id`, `shopname`) VALUES
(57, 28, '宏碁V5-552G笔记本', 2988, '宏碁 V5-552G四核独显笔记本电脑宏碁 V5-552G四核独显笔记本电脑宏碁 V5-552G四核独显笔记本电脑宏碁 V5-552G四核独显笔记本电脑宏碁 V5-552G四核独显笔记本电脑宏碁 V5-552G四核独显笔记本电脑', 1462902306, 0, 26, '华翔宏基专卖店'),
(58, 29, '宏基超薄显示器', 1088, '宏基超薄显示器', 1462902496, 0, 26, '华翔宏基专卖店'),
(59, 26, '华硕P8H61PLUS', 279, 'Asus/华硕P8H61PLUS电脑主板LGA1155主板拼H61M H67 全国包邮 ', 1463146784, 0, 26, '华翔宏基专卖店'),
(60, 26, '技嘉 B85M-D3V-A', 429, 'Gigabyte/技嘉 B85M-D3V-A台式机B85电脑主板支持I3 4170 I5 4590 ', 1463149497, 0, 26, '华翔宏基专卖店'),
(61, 26, '技嘉 GA-F2A78M-DS2 FM2', 379, 'Gigabyte/技嘉 GA-F2A78M-DS2 FM2+主板 全固态电容 支持FM2 FM2+ ', 1463149609, 0, 26, '华翔宏基专卖店'),
(62, 26, '七彩虹 C.H81M V23', 259, 'Colorful/七彩虹 C.H81M V23 升级为V24 全固态小主板 支持G3260 全日系 固态电容\r\n', 1463149744, 0, 26, '华翔宏基专卖店'),
(63, 26, '华擎科技 Z170 Pro4S 1151', 699, 'ASROCK/华擎科技 Z170 Pro4S 1151主板 6400T非K版超频 十项供电 顺丰包邮 数字供 电，大板 双卡交火\r\n', 1463149857, 0, 26, '华翔宏基专卖店'),
(64, 27, '精影 GTX650 1G', 388, '精影 GTX650 1G高端电脑显卡D5高频比R7-350 HD6850强 促销抢购! 高频高性能 稳定低功耗 高性价比\r\n', 1463150057, 0, 26, '华翔宏基专卖店');

-- --------------------------------------------------------

--
-- 表的结构 `fz_product_imgurl`
--

CREATE TABLE `fz_product_imgurl` (
  `product_id` int(11) NOT NULL,
  `imgurl` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_product_imgurl`
--

INSERT INTO `fz_product_imgurl` (`product_id`, `imgurl`) VALUES
(52, '/UpLoads/product/images/2016-05-05/572a4eb87c6b7.jpg'),
(53, '/UpLoads/product/images/2016-05-05/572a50593da2c.jpg'),
(54, '/UpLoads/product/images/2016-05-05/572b1172825e0.jpg'),
(55, '/UpLoads/product/images/2016-05-05/572b1b8b3e74e.jpg'),
(56, '/UpLoads/product/images/2016-05-05/572b1bcbf30c5.jpg'),
(57, '/UpLoads/product/images/2016-05-11/57321e2280412.jpg'),
(58, '/UpLoads/product/images/2016-05-11/57321ee01f896.jpg'),
(59, '/UpLoads/product/images/2016-05-13/5735d9208ec5d.png'),
(60, '/UpLoads/product/images/2016-05-13/5735e3b9cfb9a.jpg'),
(61, '/UpLoads/product/images/2016-05-13/5735e4296426e.jpg'),
(62, '/UpLoads/product/images/2016-05-13/5735e4b016716.jpg'),
(63, '/UpLoads/product/images/2016-05-13/5735e521489b5.jpg'),
(64, '/UpLoads/product/images/2016-05-13/5735e5e96ecce.jpg');

-- --------------------------------------------------------

--
-- 表的结构 `fz_product_pattr`
--

CREATE TABLE `fz_product_pattr` (
  `product_id` int(11) DEFAULT NULL,
  `pattr_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_product_pattr`
--

INSERT INTO `fz_product_pattr` (`product_id`, `pattr_id`) VALUES
(57, 49),
(57, 47),
(58, 47),
(58, 48),
(58, 49),
(58, 51),
(65, 49),
(59, 47),
(59, 48),
(59, 51),
(60, 48),
(60, 51),
(61, 47),
(61, 49),
(62, 47),
(62, 48),
(62, 49),
(63, 47),
(63, 48),
(63, 51),
(64, 47),
(64, 48);

-- --------------------------------------------------------

--
-- 表的结构 `fz_ptype`
--

CREATE TABLE `fz_ptype` (
  `id` int(11) UNSIGNED NOT NULL,
  `pid` int(11) NOT NULL DEFAULT '0',
  `ptype_name` varchar(20) NOT NULL,
  `order` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_ptype`
--

INSERT INTO `fz_ptype` (`id`, `pid`, `ptype_name`, `order`) VALUES
(26, 0, '主板', 100),
(27, 0, '显卡', 100),
(28, 0, '笔记本', 100),
(29, 0, '显示器', 100),
(30, 0, '内存条', 100),
(31, 0, '网络设备', 100);

-- --------------------------------------------------------

--
-- 表的结构 `fz_role`
--

CREATE TABLE `fz_role` (
  `id` smallint(6) UNSIGNED NOT NULL,
  `name` varchar(20) NOT NULL,
  `pid` smallint(6) DEFAULT NULL,
  `status` tinyint(1) UNSIGNED DEFAULT NULL,
  `remark` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_role`
--

INSERT INTO `fz_role` (`id`, `name`, `pid`, `status`, `remark`) VALUES
(19, 'admin', NULL, 1, '超级管理员'),
(20, 'HQ', NULL, 1, '总店管理员'),
(21, 'ST', NULL, 1, '分店管理员');

-- --------------------------------------------------------

--
-- 表的结构 `fz_role_user`
--

CREATE TABLE `fz_role_user` (
  `role_id` mediumint(9) UNSIGNED DEFAULT NULL,
  `user_id` char(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_role_user`
--

INSERT INTO `fz_role_user` (`role_id`, `user_id`) VALUES
(20, '18'),
(19, '19'),
(20, '20'),
(21, '21'),
(21, '24'),
(21, '22'),
(21, '25'),
(21, '26'),
(21, '27'),
(21, '28'),
(21, '29'),
(21, '30');

-- --------------------------------------------------------

--
-- 表的结构 `fz_shop`
--

CREATE TABLE `fz_shop` (
  `id` int(11) UNSIGNED NOT NULL,
  `shopname` varchar(255) NOT NULL,
  `peoplename` varchar(20) NOT NULL,
  `loginword` varchar(255) NOT NULL,
  `peoplephone` varchar(11) NOT NULL,
  `shopphone` varchar(11) NOT NULL,
  `address` varchar(255) NOT NULL,
  `regtime` int(11) NOT NULL,
  `regIP` varchar(255) NOT NULL,
  `countshop` bigint(11) DEFAULT NULL,
  `countmoney` bigint(11) DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `describe` text NOT NULL,
  `lock` tinyint(1) DEFAULT '1',
  `type` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_shop`
--

INSERT INTO `fz_shop` (`id`, `shopname`, `peoplename`, `loginword`, `peoplephone`, `shopphone`, `address`, `regtime`, `regIP`, `countshop`, `countmoney`, `level`, `token`, `describe`, `lock`, `type`) VALUES
(18, 'flyzebra', 'flyzebra', '10e208ffd957f5488f795e555f483af8', '13520989725', '13520989725', '广西桂林资源县', 1462386990, '192.168.1.88', NULL, NULL, NULL, NULL, '总店管理号。', 1, 0),
(19, 'admin', 'admin', '10e208ffd957f5488f795e555f483af8', '13520989725', '13520989725', '1', 1462388077, '192.168.1.88', NULL, NULL, NULL, NULL, '1', 1, 0),
(20, 'hq', 'hq', '10e208ffd957f5488f795e555f483af8', '13520989725', '13520989725', 'hq', 1462388281, '192.168.1.88', NULL, NULL, NULL, NULL, 'hq', 1, 0),
(21, 'st', 'st', '10e208ffd957f5488f795e555f483af8', '13520989725', '13520989725', 'st', 1462388307, '192.168.1.88', NULL, NULL, NULL, NULL, 'st', 1, 0),
(26, '华翔宏基专卖店', '张三', '10e208ffd957f5488f795e555f483af8', '13912345678', '13912345678', '1391234567813912345678139123456781391234567813912', 1462814854, '192.168.1.88', NULL, NULL, NULL, NULL, '139123456781391234567813912345678139123456781391234', 1, 1),
(27, '卓越联想品牌店', '李四', '10e208ffd957f5488f795e555f483af8', '13912345678', '13912345678', '13912345678139123456781391234567813912345678139123', 1462814942, '192.168.1.88', NULL, NULL, NULL, NULL, '1391234567813912345678139123456781391234567813', 1, 1),
(28, '联想笔记本专卖店', '王五', '10e208ffd957f5488f795e555f483af8', '13812345678', '13812345678', '1381234567813812345678138123456781381234567813812345678', 1462817151, '192.168.1.88', NULL, NULL, NULL, NULL, '138123456781381234567813812345678138123456', 1, 1),
(29, '新艺华硕专卖店旗舰店', '赵六', '10e208ffd957f5488f795e555f483af8', '13512345678', '13512345678', '1351234567813512345678135123456781351234567813512345678', 1462871674, '192.168.1.88', NULL, NULL, NULL, NULL, '13512345678135123456781351234567813512345678135123456781351234567813512345678', 1, 1),
(30, '飞马Dell专卖店', '飞马', '10e208ffd957f5488f795e555f483af8', '13612345678', '13612345678', '13612345678136123456781361234567813612345678', 1462871887, '192.168.1.88', NULL, NULL, NULL, NULL, '13612345678136123456781361234567813612345678136123456781361234567813612345678', 1, 1);

-- --------------------------------------------------------

--
-- 表的结构 `fz_shop_home`
--

CREATE TABLE `fz_shop_home` (
  `shop_id` int(10) UNSIGNED NOT NULL,
  `show` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_shop_home`
--

INSERT INTO `fz_shop_home` (`shop_id`, `show`) VALUES
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1);

-- --------------------------------------------------------

--
-- 表的结构 `fz_shop_imgurl`
--

CREATE TABLE `fz_shop_imgurl` (
  `shop_id` int(11) NOT NULL,
  `imgurl` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_shop_imgurl`
--

INSERT INTO `fz_shop_imgurl` (`shop_id`, `imgurl`) VALUES
(26, '/UpLoads/shop/images/2016-05-10/5730c886e6755.jpg'),
(27, '/UpLoads/shop/images/2016-05-10/5730c8dec92b0.jpg'),
(28, '/UpLoads/shop/images/2016-05-10/5730d17fd3fee.jpg'),
(29, '/UpLoads/shop/images/2016-05-10/5731a67a6e31e.jpg'),
(30, '/UpLoads/shop/images/2016-05-10/5731a74f58058.jpg');

-- --------------------------------------------------------

--
-- 表的结构 `fz_shop_log`
--

CREATE TABLE `fz_shop_log` (
  `shop_id` int(11) NOT NULL,
  `loginIP` varchar(32) NOT NULL,
  `logintime` int(11) NOT NULL DEFAULT '0',
  `gps` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_shop_log`
--

INSERT INTO `fz_shop_log` (`shop_id`, `loginIP`, `logintime`, `gps`) VALUES
(18, '192.168.1.88', 1462855612, NULL),
(18, '192.168.1.88', 1462870725, NULL),
(18, '192.168.1.88', 1462871038, NULL),
(18, '192.168.1.88', 1462871164, NULL),
(18, '192.168.1.88', 1462871165, NULL),
(26, '192.168.1.88', 1462899294, NULL),
(26, '192.168.1.88', 1462899305, NULL),
(18, '192.168.1.88', 1462899314, NULL),
(26, '192.168.1.88', 1462899355, NULL),
(26, '192.168.1.88', 1462900958, NULL),
(18, '192.168.1.88', 1462901013, NULL),
(26, '192.168.1.88', 1462902179, NULL),
(18, '192.168.1.88', 1462902416, NULL),
(26, '192.168.1.88', 1462902432, NULL),
(26, '192.168.1.88', 1463039178, NULL),
(26, '192.168.1.88', 1463062535, NULL),
(18, '192.168.1.88', 1463063644, NULL),
(18, '192.168.1.88', 1463120986, NULL),
(18, '192.168.1.88', 1463127837, NULL),
(26, '192.168.1.88', 1463146379, NULL),
(26, '192.168.1.88', 1463337194, NULL),
(18, '192.168.1.88', 1463337202, NULL),
(26, '192.168.1.88', 1463380320, NULL),
(18, '192.168.1.88', 1463926825, NULL),
(18, '192.168.1.88', 1466081243, NULL),
(18, '192.168.1.88', 1466228749, NULL),
(18, '192.168.1.88', 1466262514, NULL),
(18, '192.168.1.88', 1468335507, NULL),
(18, '192.168.1.88', 1494329341, NULL),
(18, '192.168.1.188', 1521349635, NULL),
(18, '192.168.1.188', 1521349655, NULL);

-- --------------------------------------------------------

--
-- 表的结构 `fz_user`
--

CREATE TABLE `fz_user` (
  `id` int(11) UNSIGNED NOT NULL,
  `loginname` varchar(20) DEFAULT NULL,
  `nickname` varchar(20) NOT NULL,
  `loginword` varchar(255) DEFAULT NULL,
  `telephone` varchar(20) DEFAULT NULL,
  `openid` varchar(255) DEFAULT NULL,
  `loginwith` varchar(10) DEFAULT NULL,
  `pictureurl` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `level` int(11) NOT NULL,
  `logincount` int(11) NOT NULL,
  `regtime` int(11) NOT NULL,
  `token` varchar(255) DEFAULT NULL,
  `lock` tinyint(4) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_user`
--

INSERT INTO `fz_user` (`id`, `loginname`, `nickname`, `loginword`, `telephone`, `openid`, `loginwith`, `pictureurl`, `address`, `level`, `logincount`, `regtime`, `token`, `lock`) VALUES
(112, 'flyzebra', 'flyzebra', '<PASSWORD>', NULL, NULL, NULL, NULL, NULL, 10, 56, 1462379129, NULL, 1),
(113, 'flyzebraa', 'flyzebraa', '10e208ffd957f5488f795e555f483af8', NULL, NULL, NULL, NULL, NULL, 1, 1, 1462384698, NULL, 1),
(114, NULL, 'FlyZebra', NULL, NULL, '7DDCD68540AA1B4D3C02FF65D8A0935F', 'QQ', 'http://q.qlogo.cn/qqapp/1105211644/7DDCD68540AA1B4D3C02FF65D8A0935F/100', NULL, 10, 57, 1462392826, NULL, 1),
(115, NULL, '尋找紅葉', NULL, NULL, '252027078', 'BAIDU', 'http://himg.bdimg.com/sys/portraitn/item/5a70e5b08be689bee7b485e89189214f.jpg', NULL, 12, 93, 1462392844, NULL, 1),
(116, 'ff', 'ff', '83be264eb452fcf0a1c322f2c7cbf987', NULL, NULL, NULL, NULL, NULL, 3, 6, 1462642658, NULL, 1),
(117, NULL, '宇翔科技', 'd41d8cd98f00b204e9800998ecf8427e', NULL, '2035EB7D382C45688D1AB390F199F9D2', 'QQ', 'http://q.qlogo.cn/qqapp/1105211644/2035EB7D382C45688D1AB390F199F9D2/100', NULL, 9, 46, 1462644768, NULL, 1),
(118, 'tsy', 'tsy', '<PASSWORD>', NULL, NULL, NULL, NULL, NULL, 11, 73, 1463055990, NULL, 1),
(119, 'tyty', 'tyty', '<PASSWORD>', NULL, NULL, NULL, NULL, NULL, 8, 33, 1463227403, NULL, 1);

-- --------------------------------------------------------

--
-- 表的结构 `fz_user_car`
--

CREATE TABLE `fz_user_car` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `addtime` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `fz_user_copy`
--

CREATE TABLE `fz_user_copy` (
  `id` int(11) UNSIGNED NOT NULL,
  `loginname` varchar(20) DEFAULT NULL,
  `nickname` varchar(20) NOT NULL,
  `loginword` varchar(255) DEFAULT NULL,
  `telephone` varchar(20) DEFAULT NULL,
  `openid` varchar(255) DEFAULT NULL,
  `loginwith` varchar(10) DEFAULT NULL,
  `pictureurl` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `level` int(11) NOT NULL,
  `logincount` int(11) NOT NULL,
  `regtime` int(11) NOT NULL,
  `token` varchar(255) DEFAULT NULL,
  `lock` tinyint(4) DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_user_copy`
--

INSERT INTO `fz_user_copy` (`id`, `loginname`, `nickname`, `loginword`, `telephone`, `openid`, `loginwith`, `pictureurl`, `address`, `level`, `logincount`, `regtime`, `token`, `lock`) VALUES
(112, 'flyzebra', 'flyzebra', '<PASSWORD>', NULL, NULL, NULL, NULL, NULL, 10, 56, 1462379129, NULL, 1),
(113, 'flyzebraa', 'flyzebraa', '10e208ffd957f5488f795e555f483af8', NULL, NULL, NULL, NULL, NULL, 1, 1, 1462384698, NULL, 1),
(114, NULL, 'FlyZebra', NULL, NULL, '7DDCD68540AA1B4D3C02FF65D8A0935F', 'QQ', 'http://q.qlogo.cn/qqapp/1105211644/7DDCD68540AA1B4D3C02FF65D8A0935F/100', NULL, 10, 57, 1462392826, NULL, 1),
(115, NULL, '尋找紅葉', NULL, NULL, '252027078', 'BAIDU', 'http://himg.bdimg.com/sys/portraitn/item/5a70e5b08be689bee7b485e89189214f.jpg', NULL, 12, 93, 1462392844, NULL, 1),
(116, 'ff', 'ff', '83be264eb452fcf0a1c322f2c7cbf987', NULL, NULL, NULL, NULL, NULL, 3, 6, 1462642658, NULL, 1),
(117, NULL, '宇翔科技', 'd41d8cd98f00b204e9800998ecf8427e', NULL, '2035EB7D382C45688D1AB390F199F9D2', 'QQ', 'http://q.qlogo.cn/qqapp/1105211644/2035EB7D382C45688D1AB390F199F9D2/100', NULL, 9, 46, 1462644768, NULL, 1),
(118, 'tsy', 'tsy', 'b5d2099e49bdb07b8176dff5e23b3c14', NULL, NULL, NULL, NULL, NULL, 11, 73, 1463055990, NULL, 1),
(119, 'tyty', 'tyty', 'b5d2099e49bdb07b8176dff5e23b3c14', NULL, NULL, NULL, NULL, NULL, 8, 33, 1463227403, NULL, 1);

-- --------------------------------------------------------

--
-- 表的结构 `fz_user_log`
--

CREATE TABLE `fz_user_log` (
  `user_id` int(11) NOT NULL,
  `loginIP` varchar(32) NOT NULL,
  `logintime` int(11) NOT NULL,
  `gps` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_user_log`
--

INSERT INTO `fz_user_log` (`user_id`, `loginIP`, `logintime`, `gps`) VALUES
(112, '192.168.1.88', 1462379129, NULL),
(112, '192.168.1.88', 1462381561, NULL),
(112, '192.168.1.88', 1462381873, NULL),
(112, '192.168.1.88', 1462382000, NULL),
(112, '192.168.1.88', 1462382067, NULL),
(112, '192.168.1.88', 1462382107, NULL),
(112, '192.168.1.88', 1462382116, NULL),
(112, '192.168.1.88', 1462382250, NULL),
(112, '192.168.1.88', 1462383068, NULL),
(112, '192.168.1.88', 1462383080, NULL),
(112, '192.168.1.88', 1462383203, NULL),
(112, '192.168.1.88', 1462383208, NULL),
(112, '192.168.1.88', 1462383275, NULL),
(112, '192.168.1.88', 1462383310, NULL),
(112, '192.168.1.88', 1462383404, NULL),
(112, '192.168.1.88', 1462384471, NULL),
(113, '192.168.1.88', 1462384698, NULL),
(112, '192.168.1.88', 1462436330, NULL),
(115, '192.168.1.105', 1462636116, NULL),
(115, '192.168.1.105', 1462636569, NULL),
(115, '192.168.1.105', 1462638400, NULL),
(115, '192.168.1.105', 1462638415, NULL),
(115, '192.168.1.105', 1462638437, NULL),
(115, '192.168.1.105', 1462638547, NULL),
(115, '192.168.1.105', 1462638591, NULL),
(115, '192.168.1.105', 1462638608, NULL),
(115, '192.168.1.105', 1462639984, NULL),
(115, '192.168.1.105', 1462642638, NULL),
(116, '192.168.1.105', 1462642658, NULL),
(116, '192.168.1.105', 1462643677, NULL),
(114, '192.168.1.105', 1462643687, NULL),
(114, '192.168.1.105', 1462643707, NULL),
(116, '192.168.1.105', 1462643722, NULL),
(116, '192.168.1.105', 1462643882, NULL),
(114, '192.168.1.105', 1462643923, NULL),
(114, '192.168.1.105', 1462643929, NULL),
(114, '192.168.1.105', 1462644574, NULL),
(114, '192.168.1.105', 1462644638, NULL),
(114, '192.168.1.105', 1462644647, NULL),
(114, '192.168.1.105', 1462644674, NULL),
(114, '192.168.1.105', 1462644710, NULL),
(115, '192.168.1.105', 1462644738, NULL),
(115, '192.168.1.105', 1462644749, NULL),
(115, '192.168.1.105', 1462644754, NULL),
(117, '192.168.1.105', 1462644768, NULL),
(116, '192.168.1.105', 1462644872, NULL),
(116, '192.168.1.105', 1462645351, NULL),
(117, '192.168.1.105', 1462645363, NULL),
(117, '192.168.1.105', 1462645375, NULL),
(117, '192.168.1.105', 1462645592, NULL),
(117, '192.168.1.105', 1462653702, NULL),
(117, '192.168.1.105', 1462683891, NULL),
(117, '192.168.1.105', 1462691821, NULL),
(117, '192.168.1.105', 1462701610, NULL),
(117, '192.168.1.105', 1462701881, NULL),
(117, '192.168.1.105', 1462702014, NULL),
(117, '192.168.1.105', 1462702854, NULL),
(117, '192.168.1.105', 1462703582, NULL),
(117, '192.168.1.105', 1462703609, NULL),
(117, '192.168.1.105', 1462703928, NULL),
(117, '192.168.1.105', 1462703965, NULL),
(117, '192.168.1.105', 1462704003, NULL),
(117, '192.168.1.105', 1462704062, NULL),
(117, '192.168.1.105', 1462705214, NULL),
(117, '192.168.1.105', 1462705455, NULL),
(117, '192.168.1.105', 1462716437, NULL),
(117, '192.168.1.105', 1462717249, NULL),
(117, '192.168.1.105', 1462718674, NULL),
(117, '192.168.1.105', 1462718720, NULL),
(117, '192.168.1.105', 1462718919, NULL),
(117, '192.168.1.105', 1462719153, NULL),
(117, '192.168.1.105', 1462719513, NULL),
(117, '192.168.1.105', 1462725445, NULL),
(117, '192.168.1.105', 1462783214, NULL),
(117, '192.168.1.105', 1462793501, NULL),
(117, '192.168.1.105', 1462794686, NULL),
(117, '192.168.1.105', 1462794711, NULL),
(117, '192.168.1.105', 1462795640, NULL),
(117, '192.168.1.105', 1462798778, NULL),
(117, '192.168.1.105', 1462812393, NULL),
(117, '192.168.1.105', 1462812596, NULL),
(117, '192.168.1.105', 1462812800, NULL),
(117, '192.168.1.105', 1462812918, NULL),
(117, '192.168.1.105', 1462813635, NULL),
(115, '192.168.1.105', 1462813694, NULL),
(115, '192.168.1.105', 1462859183, NULL),
(115, '192.168.1.105', 1462873631, NULL),
(115, '192.168.1.105', 1462874227, NULL),
(115, '192.168.1.105', 1462874791, NULL),
(115, '192.168.1.105', 1462875466, NULL),
(115, '192.168.1.105', 1462875511, NULL),
(115, '192.168.1.105', 1462875530, NULL),
(115, '192.168.1.105', 1462875666, NULL),
(115, '192.168.1.105', 1462875926, NULL),
(115, '192.168.1.105', 1462876170, NULL),
(115, '192.168.1.105', 1462876216, NULL),
(117, '192.168.1.105', 1463055885, NULL),
(117, '192.168.1.105', 1463055961, NULL),
(118, '192.168.1.105', 1463055990, NULL),
(118, '192.168.1.105', 1463057803, NULL),
(118, '192.168.1.105', 1463059265, NULL),
(118, '192.168.1.105', 1463059426, NULL),
(118, '192.168.1.105', 1463059824, NULL),
(118, '192.168.1.105', 1463059917, NULL),
(118, '192.168.1.105', 1463061938, NULL),
(118, '192.168.1.105', 1463062255, NULL),
(118, '192.168.1.105', 1463062366, NULL),
(118, '192.168.1.105', 1463062466, NULL),
(118, '192.168.1.105', 1463062693, NULL),
(118, '192.168.1.105', 1463062799, NULL),
(118, '192.168.1.105', 1463063003, NULL),
(118, '192.168.1.105', 1463063218, NULL),
(118, '192.168.1.105', 1463063319, NULL),
(118, '192.168.1.105', 1463063506, NULL),
(118, '192.168.1.105', 1463063789, NULL),
(118, '192.168.1.105', 1463063937, NULL),
(118, '192.168.1.105', 1463063991, NULL),
(118, '192.168.1.105', 1463064050, NULL),
(118, '192.168.1.105', 1463064474, NULL),
(118, '192.168.1.105', 1463065025, NULL),
(118, '192.168.1.105', 1463065466, NULL),
(118, '192.168.1.105', 1463065489, NULL),
(118, '192.168.1.105', 1463065948, NULL),
(118, '192.168.1.105', 1463065962, NULL),
(118, '192.168.1.105', 1463065977, NULL),
(118, '192.168.1.105', 1463066003, NULL),
(118, '192.168.1.105', 1463067759, NULL),
(118, '192.168.1.105', 1463069517, NULL),
(118, '192.168.1.105', 1463071182, NULL),
(118, '192.168.1.105', 1463073300, NULL),
(118, '192.168.1.105', 1463117814, NULL),
(118, '192.168.1.105', 1463118837, NULL),
(118, '192.168.1.105', 1463118877, NULL),
(118, '192.168.1.105', 1463119907, NULL),
(118, '192.168.1.105', 1463121048, NULL),
(118, '192.168.1.105', 1463121450, NULL),
(118, '192.168.1.105', 1463122154, NULL),
(118, '192.168.1.105', 1463124426, NULL),
(118, '192.168.1.105', 1463124497, NULL),
(118, '192.168.1.105', 1463124703, NULL),
(118, '192.168.1.105', 1463125825, NULL),
(118, '192.168.1.105', 1463127486, NULL),
(118, '192.168.1.105', 1463127552, NULL),
(118, '192.168.1.105', 1463127578, NULL),
(118, '192.168.1.105', 1463127744, NULL),
(118, '192.168.1.105', 1463127910, NULL),
(118, '192.168.1.105', 1463127992, NULL),
(118, '192.168.1.105', 1463128150, NULL),
(118, '192.168.1.105', 1463129210, NULL),
(118, '192.168.1.105', 1463129379, NULL),
(118, '192.168.1.105', 1463129478, NULL),
(118, '192.168.1.105', 1463129581, NULL),
(118, '192.168.1.105', 1463129761, NULL),
(118, '192.168.1.105', 1463130136, NULL),
(118, '192.168.1.105', 1463130164, NULL),
(118, '192.168.1.105', 1463130341, NULL),
(118, '192.168.1.105', 1463130600, NULL),
(118, '192.168.1.105', 1463130707, NULL),
(118, '192.168.1.105', 1463131024, NULL),
(118, '192.168.1.105', 1463131152, NULL),
(118, '192.168.1.105', 1463131217, NULL),
(118, '192.168.1.105', 1463131529, NULL),
(118, '192.168.1.105', 1463131780, NULL),
(118, '192.168.1.105', 1463131843, NULL),
(118, '192.168.1.105', 1463132001, NULL),
(118, '192.168.1.105', 1463132032, NULL),
(118, '192.168.1.105', 1463132103, NULL),
(118, '192.168.1.105', 1463132268, NULL),
(118, '192.168.1.105', 1463132370, NULL),
(118, '192.168.1.105', 1463132503, NULL),
(118, '192.168.1.105', 1463132633, NULL),
(117, '192.168.1.105', 1463158561, NULL),
(117, '192.168.1.105', 1463158580, NULL),
(117, '192.168.1.105', 1463158597, NULL),
(117, '192.168.1.105', 1463158930, NULL),
(117, '192.168.1.105', 1463158999, NULL),
(115, '192.168.1.105', 1463159089, NULL),
(115, '192.168.1.105', 1463159114, NULL),
(115, '192.168.1.105', 1463159375, NULL),
(115, '192.168.1.105', 1463159537, NULL),
(115, '192.168.1.105', 1463159709, NULL),
(115, '192.168.1.105', 1463159761, NULL),
(115, '192.168.1.105', 1463160048, NULL),
(115, '192.168.1.105', 1463160394, NULL),
(115, '192.168.1.105', 1463160654, NULL),
(115, '192.168.1.105', 1463160844, NULL),
(115, '192.168.1.105', 1463161449, NULL),
(115, '192.168.1.105', 1463161518, NULL),
(115, '192.168.1.105', 1463161584, NULL),
(115, '192.168.1.105', 1463161687, NULL),
(115, '192.168.1.105', 1463162601, NULL),
(115, '192.168.1.105', 1463168996, NULL),
(115, '192.168.1.105', 1463169033, NULL),
(115, '192.168.1.105', 1463197217, NULL),
(115, '192.168.1.105', 1463197277, NULL),
(115, '192.168.1.105', 1463197468, NULL),
(115, '192.168.1.105', 1463202042, NULL),
(115, '192.168.1.105', 1463202707, NULL),
(115, '192.168.1.105', 1463203925, NULL),
(115, '192.168.1.105', 1463206311, NULL),
(115, '192.168.1.105', 1463208996, NULL),
(115, '192.168.1.105', 1463218119, NULL),
(115, '192.168.1.105', 1463218128, NULL),
(115, '192.168.1.105', 1463218676, NULL),
(115, '192.168.1.105', 1463218797, NULL),
(115, '192.168.1.105', 1463218873, NULL),
(115, '192.168.1.105', 1463219009, NULL),
(115, '192.168.1.105', 1463219063, NULL),
(115, '192.168.1.105', 1463219653, NULL),
(115, '192.168.1.105', 1463220188, NULL),
(115, '192.168.1.105', 1463220338, NULL),
(115, '192.168.1.105', 1463220482, NULL),
(115, '192.168.1.105', 1463220571, NULL),
(115, '192.168.1.105', 1463223075, NULL),
(115, '192.168.1.105', 1463223375, NULL),
(115, '192.168.1.105', 1463223410, NULL),
(115, '192.168.1.105', 1463223439, NULL),
(115, '192.168.1.105', 1463223774, NULL),
(115, '192.168.1.105', 1463223997, NULL),
(115, '192.168.1.105', 1463224435, NULL),
(115, '192.168.1.105', 1463225079, NULL),
(115, '192.168.1.105', 1463226578, NULL),
(115, '192.168.1.105', 1463226824, NULL),
(115, '192.168.1.105', 1463226832, NULL),
(115, '192.168.1.105', 1463226853, NULL),
(115, '192.168.1.105', 1463227153, NULL),
(115, '192.168.1.105', 1463227171, NULL),
(117, '192.168.1.105', 1463227184, NULL),
(112, '192.168.1.105', 1463227238, NULL),
(112, '192.168.1.105', 1463227263, NULL),
(112, '192.168.1.105', 1463227305, NULL),
(112, '192.168.1.105', 1463227328, NULL),
(112, '192.168.1.105', 1463227360, NULL),
(112, '192.168.1.105', 1463227380, NULL),
(119, '192.168.1.105', 1463227403, NULL),
(119, '192.168.1.105', 1463227422, NULL),
(119, '192.168.1.105', 1463228161, NULL),
(119, '192.168.1.105', 1463228196, NULL),
(119, '192.168.1.105', 1463228228, NULL),
(119, '192.168.1.105', 1463228299, NULL),
(119, '192.168.1.105', 1463228330, NULL),
(119, '192.168.1.105', 1463228631, NULL),
(119, '192.168.1.105', 1463229157, NULL),
(119, '192.168.1.105', 1463230653, NULL),
(119, '192.168.1.105', 1463230964, NULL),
(119, '192.168.1.105', 1463230984, NULL),
(119, '192.168.1.105', 1463231412, NULL),
(119, '192.168.1.105', 1463231542, NULL),
(119, '192.168.1.105', 1463231781, NULL),
(119, '192.168.1.105', 1463232382, NULL),
(119, '192.168.1.105', 1463232521, NULL),
(119, '192.168.1.105', 1463232801, NULL),
(119, '192.168.1.105', 1463232885, NULL),
(119, '192.168.1.105', 1463232954, NULL),
(119, '192.168.1.105', 1463233126, NULL),
(119, '192.168.1.105', 1463233157, NULL),
(119, '192.168.1.105', 1463233255, NULL),
(119, '192.168.1.105', 1463233809, NULL),
(119, '192.168.1.105', 1463234504, NULL),
(119, '192.168.1.105', 1463234516, NULL),
(119, '192.168.1.105', 1463234570, NULL),
(119, '192.168.1.105', 1463235243, NULL),
(119, '192.168.1.105', 1463235995, NULL),
(119, '192.168.1.105', 1463236097, NULL),
(119, '192.168.1.105', 1463236165, NULL),
(119, '192.168.1.105', 1463236276, NULL),
(119, '192.168.1.105', 1463236533, NULL),
(114, '192.168.1.105', 1463236614, NULL),
(114, '192.168.1.105', 1463236937, NULL),
(114, '192.168.1.105', 1463242771, NULL),
(112, '192.168.1.88', 1463245811, NULL),
(114, '192.168.1.105', 1463245900, NULL),
(112, '192.168.1.88', 1463246030, NULL),
(112, '192.168.1.88', 1463246186, NULL),
(112, '192.168.1.88', 1463246213, NULL),
(112, '192.168.1.88', 1463246339, NULL),
(114, '192.168.1.105', 1463246351, NULL),
(114, '192.168.1.105', 1463246359, NULL),
(112, '192.168.1.88', 1463246381, NULL),
(112, '192.168.1.88', 1463246395, NULL),
(112, '192.168.1.88', 1463246449, NULL),
(112, '192.168.1.88', 1463246682, NULL),
(112, '192.168.1.88', 1463246775, NULL),
(112, '192.168.1.88', 1463246839, NULL),
(112, '192.168.1.88', 1463246965, NULL),
(112, '192.168.1.88', 1463246981, NULL),
(112, '192.168.1.88', 1463247004, NULL),
(112, '192.168.1.88', 1463247023, NULL),
(112, '192.168.1.88', 1463247046, NULL),
(112, '192.168.1.88', 1463247133, NULL),
(112, '192.168.1.88', 1463247214, NULL),
(114, '192.168.1.105', 1463247361, NULL),
(114, '192.168.1.105', 1463247371, NULL),
(114, '192.168.1.105', 1463250533, NULL),
(114, '192.168.1.105', 1463250723, NULL),
(114, '192.168.1.105', 1463250951, NULL),
(114, '192.168.1.105', 1463251027, NULL),
(114, '192.168.1.105', 1463251086, NULL),
(114, '192.168.1.105', 1463251144, NULL),
(114, '192.168.1.105', 1463277686, NULL),
(114, '192.168.1.105', 1463277753, NULL),
(112, '192.168.1.88', 1463279765, NULL),
(112, '192.168.1.88', 1463279912, NULL),
(114, '192.168.1.105', 1463279982, NULL),
(114, '192.168.1.105', 1463280067, NULL),
(114, '192.168.1.105', 1463280098, NULL),
(114, '192.168.1.105', 1463280492, NULL),
(114, '192.168.1.105', 1463280626, NULL),
(112, '192.168.1.88', 1463280704, NULL),
(112, '192.168.1.88', 1463281017, NULL),
(112, '192.168.1.88', 1463281074, NULL),
(112, '192.168.1.88', 1463281153, NULL),
(114, '192.168.1.105', 1463281243, NULL),
(112, '192.168.1.88', 1463281299, NULL),
(114, '192.168.1.105', 1463281311, NULL),
(112, '192.168.1.88', 1463281351, NULL),
(114, '192.168.1.105', 1463281526, NULL),
(114, '192.168.1.105', 1463281596, NULL),
(112, '192.168.1.88', 1463282162, NULL),
(112, '192.168.1.88', 1463282260, NULL),
(112, '192.168.1.88', 1463282512, NULL),
(112, '192.168.1.88', 1463282618, NULL),
(112, '192.168.1.88', 1463282697, NULL),
(112, '192.168.1.88', 1463282785, NULL),
(114, '192.168.1.105', 1463282844, NULL),
(114, '192.168.1.105', 1463284093, NULL),
(114, '192.168.1.105', 1463284251, NULL),
(114, '192.168.1.105', 1463284355, NULL),
(114, '192.168.1.105', 1463286034, NULL),
(114, '192.168.1.105', 1463286194, NULL),
(114, '192.168.1.105', 1463287077, NULL),
(114, '192.168.1.105', 1463287266, NULL),
(114, '192.168.1.105', 1463288123, NULL),
(114, '192.168.1.105', 1463288452, NULL),
(114, '192.168.1.105', 1463291157, NULL),
(114, '192.168.1.105', 1463292627, NULL),
(114, '192.168.1.105', 1463292656, NULL),
(114, '192.168.1.105', 1463301487, NULL),
(114, '192.168.1.105', 1463308124, NULL),
(114, '192.168.1.105', 1463312644, NULL),
(114, '192.168.1.105', 1463319647, NULL),
(114, '192.168.1.105', 1463322407, NULL),
(115, '192.168.1.105', 1463477354, NULL),
(115, '192.168.1.105', 1463477464, NULL),
(115, '192.168.1.105', 1463477528, NULL),
(115, '192.168.1.105', 1463477602, NULL),
(115, '192.168.1.105', 1463477617, NULL),
(115, '192.168.1.105', 1463477800, NULL),
(115, '192.168.1.105', 1463477872, NULL),
(115, '192.168.1.105', 1463477934, NULL),
(115, '192.168.1.105', 1463477951, NULL),
(115, '192.168.1.105', 1463478186, NULL),
(115, '192.168.1.105', 1463479911, NULL),
(115, '192.168.1.105', 1463481011, NULL),
(112, '192.168.1.88', 1468028383, NULL),
(112, '192.168.1.88', 1468028415, NULL);

-- --------------------------------------------------------

--
-- 表的结构 `fz_welcome`
--

CREATE TABLE `fz_welcome` (
  `id` int(10) UNSIGNED NOT NULL,
  `imageurl` varchar(255) NOT NULL,
  `show` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `fz_welcome`
--

INSERT INTO `fz_welcome` (`id`, `imageurl`, `show`) VALUES
(35, '/UpLoads/welcome/images/2016-05-10/5730befdbf790.jpg', 1),
(36, '/UpLoads/welcome/images/2016-05-10/5730bf15ca8cf.jpg', 1),
(37, '/UpLoads/welcome/images/2016-05-10/5730bf3d625df.jpg', 1),
(38, '/UpLoads/welcome/images/2016-05-10/5730bf4ba287f.jpg', 1),
(40, '/UpLoads/welcome/images/2016-05-10/5730bf8944e8b.jpg', 1),
(41, '/UpLoads/welcome/images/2016-05-10/573169d431643.jpg', 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `fz_access`
--
ALTER TABLE `fz_access`
  ADD KEY `groupId` (`role_id`),
  ADD KEY `nodeId` (`node_id`);

--
-- Indexes for table `fz_cart`
--
ALTER TABLE `fz_cart`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_node`
--
ALTER TABLE `fz_node`
  ADD PRIMARY KEY (`id`),
  ADD KEY `level` (`level`),
  ADD KEY `pid` (`pid`),
  ADD KEY `status` (`status`),
  ADD KEY `name` (`name`);

--
-- Indexes for table `fz_pattr`
--
ALTER TABLE `fz_pattr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_product`
--
ALTER TABLE `fz_product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_ptype`
--
ALTER TABLE `fz_ptype`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pid` (`pid`);

--
-- Indexes for table `fz_role`
--
ALTER TABLE `fz_role`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pid` (`pid`),
  ADD KEY `status` (`status`);

--
-- Indexes for table `fz_role_user`
--
ALTER TABLE `fz_role_user`
  ADD KEY `group_id` (`role_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `fz_shop`
--
ALTER TABLE `fz_shop`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_shop_home`
--
ALTER TABLE `fz_shop_home`
  ADD PRIMARY KEY (`shop_id`);

--
-- Indexes for table `fz_user`
--
ALTER TABLE `fz_user`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_user_copy`
--
ALTER TABLE `fz_user_copy`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fz_welcome`
--
ALTER TABLE `fz_welcome`
  ADD PRIMARY KEY (`id`);

--
-- 在导出的表使用AUTO_INCREMENT
--

--
-- 使用表AUTO_INCREMENT `fz_cart`
--
ALTER TABLE `fz_cart`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `fz_node`
--
ALTER TABLE `fz_node`
  MODIFY `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;
--
-- 使用表AUTO_INCREMENT `fz_pattr`
--
ALTER TABLE `fz_pattr`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;
--
-- 使用表AUTO_INCREMENT `fz_product`
--
ALTER TABLE `fz_product`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;
--
-- 使用表AUTO_INCREMENT `fz_ptype`
--
ALTER TABLE `fz_ptype`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
--
-- 使用表AUTO_INCREMENT `fz_role`
--
ALTER TABLE `fz_role`
  MODIFY `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- 使用表AUTO_INCREMENT `fz_shop`
--
ALTER TABLE `fz_shop`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;
--
-- 使用表AUTO_INCREMENT `fz_user`
--
ALTER TABLE `fz_user`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=120;
--
-- 使用表AUTO_INCREMENT `fz_user_copy`
--
ALTER TABLE `fz_user_copy`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=120;
--
-- 使用表AUTO_INCREMENT `fz_welcome`
--
ALTER TABLE `fz_welcome`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<file_sep>/Apps/Admin/Controller/RoleController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class RoleController extends AuthController {
	
	/**
	 * 显示角色管理页面
	 */
	public function index() {
		$this->role = M ( 'role' )->select ();
		$this->display ();
	}
	
	/**
	 * 添加角色
	 */
	public function add() {
		if (! IS_POST)
			$this->error ( "页面不存在！" );
		if ($_POST ['role_name'] == null || $_POST ['role_status'] == null || $_POST ['role_remark'] == null) {
			$this->error ( "传入参数错误！" );
		}
		$role = array (
				'name' => $_POST ['role_name'],
				'status' => $_POST ['role_status'],
				'remark' => $_POST ['role_remark'] 
		);
		if (M ( 'role' )->add ( $role )) {
			$this->redirect ( "/Admin/Role" );
		} else {
			$this->error ( "添加角色错误！" );
		}
	}
	
	/**
	 * 删除角色
	 */
	public function del() {
		if (! IS_POST)	$this->error ( "页面不存在！" );
		$role = array (
				'id' => $_POST ['id'],
				'name' => $_POST ['name'],
				'status' => $_POST ['status'],
				'remark' => $_POST ['remark'] 
		);
		M ( 'role' )->where (array($role ))->delete ();
	}
	
	
	/**
	 * 改变角色状态
	 */
	public function status() {
		if (! IS_POST)	$this->error ( "页面不存在！" );
		$role = array (
				'id' => $_POST ['id'],
				'name' => $_POST ['name'],
				'status' => $_POST ['status'],
				'remark' => $_POST ['remark']
		);
		M ( 'role' )->where($role)->save(array('status'=>!$role['status']));
	}
}<file_sep>/Apps/API/Controller/WelcomeController.class.php
<?php

namespace API\Controller;

use Think\Controller\RestController;

class WelcomeController extends RestController {
	protected $allowMethod    = array('get','post','put','delete'); // REST允许的请求类型列表
	protected $allowType      = array('json'); // REST允许请求的资源类型列表
	public function index() {
		header ( 'Cache-Control:max-age=0' );
		header ( 'Content-Type:text/html;charset=utf-8 ', true );
		header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT', true );
		switch ($this->_method) {
			case 'get' : // get请求处理代码
				if(!$_GET){
					$data = M('welcome')->select();
				}else{
					$data = M('welcome')->where(array('id'=>$_GET['id']))->find();
				}
				$this->response($data,'json');
				break;
			case 'put' : // put请求处理代码
				break;
			case 'post' : // post请求处理代码
				break;
			case 'delete' : // delete请求处理代码
				break;
		}
	}
}<file_sep>/Apps/Common/Model/RolePathModel.class.php
<?php
namespace Common\Model;

use Think\Model\RelationModel;

class RolePathModel extends RelationModel{
	//定义主表
	protected $tableName = 'role';
	
	//定义关联关系
	protected $_link = array(
			'node'=>array(
					'mapping_type' => self::MANY_TO_MANY,
					'class_name'  =>  'node',
					'foreign_key'=>'role_id',
					'relation_key'=>'node_id',
					'relation_table'=>'fz_access',
					'mapping_fields'=>'id,name,pid'
			)
			
	);
}<file_sep>/Apps/Admin/Controller/LoginController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class LoginController extends Controller {
	public function index() {
		$this->display ();
	}
	
	public function login(){
		if(!IS_POST) $this->error("页面不存在！");
		$db = M('shop');
		$data = $db->where(array('shopname'=>$_POST['shopname'],'loginword'=>md5($_POST['password'])))->find();
		if($data==null) $this->error("用户名密码错误!");
		//添加记录登陆信息代码；
		import("Cls.User",APP_PATH);
		$log = \User::insertLog('shop_log',$data['id'],'shop_id');
		
		if(!$log) $this->error("更新登陆信息失败！");
		//session
		session(C('USER_AUTH_KEY'),$data['id']);
		session('shopname',$data['shopname']);
		session('loginIP',$log['loginIP']);
		session('logtime',$log['logintime']);
		//如果是超级管理员，不需要认证
		if($data['shopname']==C('RBAC_SUPERADMIN')){
			session(C('ADMIN_AUTH_KEY'),true);
		}
		
		//RBAC
		\Org\Util\Rbac::saveAccessList();
// 		dump($_SESSION);
// 		die();
		
		//其它需要的操作
		$this->redirect("/Admin");//跳转到主页
	}
	
	public function logout(){
		session_unset();
		session_destroy();
		$this->redirect("/Admin/Login");
	}
	
}<file_sep>/index.php
<?php

// define('BIND_MODULE','Admin');

// define('BUILD_CONTROLLER_LIST','Admin');

// define('BUILD_MODEL_LIST','Home','API','Admin');

define ( 'APP_DEBUG', TRUE ); // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false

define ( 'APP_PATH', './Apps/' ); // 定义应用目录

define ( 'RUNTIME_PATH', './Runtime/' ); // 定义运行时目录

require './ThinkPHP/ThinkPHP.php'; // 引入ThinkPHP入口文件

?>
<file_sep>/Apps/Admin/Controller/HomeShopController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class HomeShopController extends AuthController {
    public function index(){
    	$shops = D('ShopAll')->field('loginword,token,describe,regIP,describe,countshop,countmoney,level,lock,type',true)
    	->where(array('type'=>1))
    	->relation('show')
    	->select();
    	$this->shops=$shops;
//     	dump($shops);
    	$this->display();
    }
    
    public function add(){
    	if(!IS_POST) die();
    	M('shop_home')->add(array('shop_id'=>I('shop_id'),'show'=>1));
    }
    
    public function del(){
    	if(!IS_POST) die();
    	M('shop_home')->where(array('shop_id'=>I('shop_id')))->delete();
    	
    }
    
}<file_sep>/Apps/Admin/Public/js/admin-node.js
$(document).ready(function() {
	$('#add').click(function() {
		if ($('#node_name').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#node_name').focus();
			return false;
		}
		if ($('#node_remark').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#node_remark').focus();
			return false;
		}
		$('#addfrom').submit();
	});
});

function closeAddDlg(s1, s2, s3, s4, s5, s6) {
	$('.node-dlg-add').fadeOut(100);
	$('.node-mask').fadeOut(100);
}

function addDlg(s1, s2, s3) {
	$('.node-dlg-add').fadeIn(100);
	$('.node-mask').fadeIn(100);
	// 设置初始值
	document.getElementById("parent_name1").value = s1;
	document.getElementById("node_pid").value = s2;
	document.getElementById("node_level").value = s3;
}

function closeEditDlg(s1, s2, s3, s4, s5, s6) {
	$('.node-dlg-edit').fadeOut(100);
	$('.node-mask').fadeOut(100);
}

function editDlg(s1, s2, s3, s4, s5, s6,s7) {
	$('.node-dlg-edit').fadeIn(100);
	$('.node-mask').fadeIn(100);
	// 设置初始值
	document.getElementById("edit_id").value = s1;
	document.getElementById("edit_name").value = s2;
	document.getElementById("edit_remark").value = s3;
	document.getElementById("edit_status").value = s4;
	document.getElementById("edit_pid").value = s5;
	document.getElementById("edit_level").value = s6;
	document.getElementById("parent_name2").value = s7;
}

function delDlg(s1, s2, s3, s4, s5, s6) {
	$.ajax({
		url : delurl,
		type : 'post',
		data : "id=" + s1 + "&name=" + s2 + "&remark=" + s3 + "&status=" + s4
				+ "&pid=" + s5 + "&level=" + s6,
		success : function() {
			parent.location.reload();
			window.location.reload();
		},
		dataType : 'html'
	});
}<file_sep>/Apps/Admin/Controller/AuthController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;
/**
 * Rbac认证基类，所有需要认证的控制器必须继续此类
 * @author Administrator
 *
 */
class AuthController extends Controller {
	public function _initialize() {
		$this->username=$_SESSION ['shopname'];
		//不需要认证的控制器
		$notModel = in_array(CONTROLLER_NAME,explode(',',C('NOT_AUTH_CONTROLLER')));
// 		if($notModel) {
// 			$this->display ( "Auth/index" );
// 			return ;
// 		}
		//不需要认证的方法
		
		//没有登陆跳转到登陆界面
		if (! isset ( $_SESSION [C ( 'USER_AUTH_KEY' )] )&&!$notModel) {
			$this->redirect ( "/Admin/Login" );
		}
		
		//没有访问权限返回原来目录
		if(C('USER_AUTH_ON')&&!$notModel){
			\Org\Util\Rbac::AccessDecision()||$this->error("没有访问权限");
		}
		
		//找出登陆用户可以访问的所有路径确定哪些菜单可以显示
		$id = $_SESSION [C ( 'USER_AUTH_KEY' )] ;
		$user = M('role_user')->where(array('user_id'=>$id))->find();
		$data=D('RolePath')->relation(true)->field('id')->where(array('id'=>$user['role_id']))->find();
		$this->paths=path_merge($data['node']);
		
		//如果是超级用户，显示所有菜单
		$this->super=$_SESSION [C ( 'ADMIN_AUTH_KEY' )]!=null;
		$this->display ( "Auth/index" );
	}
	
}<file_sep>/Apps/Admin/Conf/config.php
<?php
return array (
		// '配置项'=>'配置值'
		//---RBAC配置-----/
		// 超级管理员名称
		'RBAC_SUPERADMIN' => 'flyzebra',
		// 超级管理员识别
		'ADMIN_AUTH_KEY' => 'superman',
		// 是否开启验证
		'USER_AUTH_ON' => true,
		// 验证类型（1：登陆验证，2：实时验证）
		'USER_AUTH_TYPE' => 2,
		// 用户认证识别号
		'USER_AUTH_KEY' => 'uid',
		// 无需认证的控制器
		'NOT_AUTH_CONTROLLER' => 'Register,Index',
		// 无需认证的动作方法
// 		'NOT_AUTH_ACTION' => 'login,logout,register',
		// 角色表名称
		'RBAC_ROLE_TABLE' => 'fz_role',
		// 角色与用户的中间表名称
		'RBAC_USER_TABLE' => 'fz_role_user',
		// 权限表名称
		'RBAC_ACCESS_TABLE' => 'fz_access',
		// 节点表名称
		'RBAC_NODE_TABLE' => 'fz_node', 
		//---RBAC配置-----/
		
		//配置__PUBLIC__
		'TMPL_PARSE_STRING'=>array(
				// 站点资源文件目录
				'__PUBLIC__' => __ROOT__.'/Apps/Admin/Public',
		),
		//默认错误跳转对应的模板文件
		'TMPL_ACTION_ERROR' => 'JumpHtml:error',//默认成功跳转对应的模板文件
		'TMPL_ACTION_SUCCESS' => 'JumpHtml:success',
);<file_sep>/Apps/Admin/Controller/TypeController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class TypeController extends AuthController {
	/**
	 * 商品分类管理
	 */
	public function index() {
		$this->ptype=M('ptype')->select();
		$this->display();
	}
	
	/**
	 * 添加商品分类
	 */
	public function add(){
		if(!IS_POST) $this->error("页面不存在！");
		if($_POST['pid']==null||$_POST['ptype_name']==null||$_POST['order']==null){
			$this->error("传入参数错误！");
		}
		$ptypDao = M('ptype');
		if($ptypDao->add($_POST)){
			$this->redirect("/Admin/Type");
		}else{
			$this->error($ptypDao->getDbError());
		}
	}
	/**
	 * 删除商品分类
	 */
	public function del(){
		if (! IS_POST) $this->error("页面不存在！");
		$ptypDao = M('ptype');
		if($ptypDao->where(array($_POST))->delete()){
			$this->redirect("/Admin/Type");
		}else{
			$this->error($ptypDao->getError());
		}
	}
}<file_sep>/Apps/API/Controller/IndexController.class.php
<?php

namespace API\Controller;

use Think\Controller;

class IndexController extends Controller {
	public function index() {
		header ( 'Cache-Control:max-age=600' );
		header ( 'Content-Type:text/html;charset=utf-8 ', true );
		header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT', true );
		echo 'Content-Type:text/html;charset=utf-8 <br>';
		echo 'Cache-Control, max-age=600<br>';
		echo 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT<br>';
		echo __ACTION__ . "<hr>";
	}
}<file_sep>/Apps/Admin/Controller/ProductController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class ProductController extends AuthController {
	
	/**
	 * 显示添加商品页面
	 */
    public function index(){
    	$this->pattr=M('pattr')->select();
    	$this->ptype=M('ptype')->select();
    	$this->shopname = $_SESSION['shopname'];
    	$this->shop_id = $_SESSION[C('USER_AUTH_KEY')];
    	$this->display();
    }
    
    /**
     * 添加商品
     */
    public function add(){
    	if(!IS_POST) $this->error ("页面不存在！");
		$product = $_POST;
		$upload = new \Think\Upload (); // 实例化上传类
		$upload->maxSize = 3145728; // 设置附件上传大小
		$upload->exts = array (	'jpg','png'); // 设置附件上传类型
		$upload->rootPath = './UpLoads/';
		$upload->savePath = '/product/images/'; // 设置附件上传目录
			                                 
		// 更新product(产品)表
		//检测数据完整性
		$product['shopcount'] = 0;
		$pattr_ids = $product['pattr_id'];
		unset($product['pattr_id']);
		$product['addtime'] = time();
		$proinfoDao = M('product');
		$product_id = $proinfoDao->add($product);
		if(!$product_id) $this->error ("添加商品失败！");
		
		//更新pattr(产品属性)表
		$product_pattrDao = M('product_pattr');
		foreach ( $pattr_ids as $pattr_id ) {
			if(!$product_pattrDao->add(array('product_id'=>$product_id,'pattr_id'=>$pattr_id))){
				$this->error("添加商品属性失败！"); 
			}
		}
		                                               
		// 接受上传的图像文件
		$info = $upload->upload ();
		
		if (! $info) { // 上传错误提示错误信息
			$this->error ("上传图像文件失败！");
		} else {
			//更新product_imgurl(产品图像)表
			$product_imgurlDao = M('product_imgurl');
			foreach ( $info as $file ) {
				$imgurl = '/UpLoads'.$file ['savepath'] . $file ['savename'];
				
				//处理图像.....图像是上传后处理成统一格式还是显示的时候处理
				import ( "Fly.MyImage", "." );
				\MyImage::thumb ( "." . $imgurl, 400, 400);
				
				
				if(!$product_imgurlDao->add(array('product_id'=>$product_id,'imgurl'=>$imgurl))){
					$this->error("添加图像文件失败！");
				}
			}
			
			
		}
		$this->success("添加商品成功");
	}
	
	public function find(){
		$this->display('Product/find');
	}
    
}<file_sep>/Apps/Admin/Public/js/admin-register.js
$(document).ready(function() {
	$('#register').click(function() {
		if ($('#shopname').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#shopname').focus();
			return false;
		}
		
		if ($('#peoplename').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#peoplename').focus();
			return false;
		}
		if ($('#loginword').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#loginword').focus();
			return false;
		}
		
		if ($('#loginword2').val() != $('#loginword').val()) {
			$('#message').html("<font color='red'><b>两次输入密码不一致！</b></font>");
			$('#loginword2').focus();
			return false;
		}
		
		if ($('#peoplephone').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#peoplephone').focus();
			return false;
		}
		
		if ($('#shopphone').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#shopphone').focus();
			return false;
		}
		
		if ($('#address').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#address').focus();
			return false;
		}
		
		if ($('#proimg1').val() == "") {
			$('#proimg1').focus();
			return false;
		}
//		if ($('#proimg2').val() == "") {
//			$('#proimg2').focus();
//			return false;
//		}
//		if ($('#proimg3').val() == "") {
//			$('#proimg3').focus();
//			return false;
//		}
		
		if ($('#describe').val() == "") {
			$('#describe').focus();
			return false;
		}
		var loginword = hex_md5(document.getElementById("loginword").value);
		$.ajax({
			url:ajaxurl,
			type:"post",
			data:"shopname=" + $("#shopname").val(),
			dataType:'html',
			success: function(result) {
				if (result.length > 2) {
					$('#message').html("<font color='red'><b>"+result+"</b></font>");
					return false;
				} else {
					$('#message').html("<font color='blue'><b>注册请求已提交！</b></font>");
					document.getElementById("loginword").value = loginword;
					$('#registerFrom').submit();
				}
			}
		});
	});
});
<file_sep>/Runtime/Cache/Admin/515eaa81c30b431e825eb4fdfdd05f1b.php
<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript"> var delurl= '<?php echo U("/Admin/Role/del");?>'</script>
<script type="text/javascript"> var statusurl= '<?php echo U("/Admin/Role/status");?>'</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-role.js"></script>
</head>
<body>
<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">添加角色</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<table class="admin-tab" width="900px">
				<tbody align="right">
					<tr style="background:#e8e8e8">
						<th width=25%>角色名称</th>
						<th width=25%>角色描述</th>
						<th width=25%>使用状态</th>
						<th width=25%>执行操作</th>
					</tr>
					<?php if(is_array($role)): foreach($role as $key=>$v): ?><tr>
						<th><?php echo ($v["name"]); ?></th>
						<th><?php echo ($v["remark"]); ?></th>
						<th><?php if($v["status"]): ?>启用<?php else: ?>停用<?php endif; ?></th>
						<th>
							<a href="javascript:poststatus('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["pid"]); ?>','<?php echo ($v["status"]); ?>','<?php echo ($v["remark"]); ?>');">
								<i class="icon-font">
									&#xe045;<?php if($v["status"]): ?>停用<?php else: ?>启用<?php endif; ?>
								</i>
							</a>&ensp;
							<a href="javascript:postdel('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["pid"]); ?>','<?php echo ($v["status"]); ?>','<?php echo ($v["remark"]); ?>');">
								<i class="icon-font">&#xe037;删除</i>
							</a>
						</th>
					</tr><?php endforeach; endif; ?>
				</tbody>
			</table>
			<br>
			<form name="addFrom" id="addFrom" accept-charset="utf-8" action="<?php echo U('/Admin/Role/add');?>" method="post">
				<table class="admin-tab" width="900px">
					<tbody>
						<tr>
							<th style="background:#e8e8e8" colspan="2">添加角色</th>
						</tr>
						<tr>
							<th><span class="require-red">*</span>角色名称：</th>
							<td>
								<input class="common-text" type="text" id="role_name" name="role_name" size="40" value="">
							</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>角色描述：</th>
							<td>
								<input class="common-text" type="text" id="role_remark" name="role_remark" size="40" value="">
							</td>
						</tr>
						<tr>
						
							<th><span class="require-red">*</span>是否启用：</th>
							<td>
								<input class="common-text" id="role_status" name="role_status" value="1" type="radio" checked = "checked">开启
								<input class="common-text" id="role_status" name="role_status" value="0" type="radio">关闭
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input type="submit"class="btn btn-primary btn6 mr10" value="添加" id="add"> 
								<input type="reset"	class="btn btn-primary btn6 mr10" value="重置">
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html><file_sep>/Apps/Admin/Controller/IndexController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends AuthController {
    public function index(){
    	for($i=0;$i<10;$i++){
    		echo "00".$i."<i class=\"icon-font\">&#xe00".$i.";</i>";
    	}
    	
    	for($i=10;$i<70;$i++){
    		echo "0".$i."<i class=\"icon-font\">&#xe0".$i.";</i>";
    	}
    }
    
}<file_sep>/Runtime/Cache/Home/400c995c330f1f6ecac6b9102849eb7e.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>宇翔电脑科技有限公司</title>
    <link rel="stylesheet" href="/myweb/xinyi/Public/css/reset.css"/>
    <link rel="stylesheet" href="/myweb/xinyi/Public/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/myweb/xinyi/Public/css/style.css"/>
</head>
<body>
    <!--scroll-head-->
    <div class="scroll-head"></div>
    <!--top-->
    <div class="top-wrapper">
        <div class="top-info">
            <div class="top-left">
                <div data-toggle="arrowdown" id="arrow1" class="user-name">
                    <a href="#">站长素材</a>
                    <span class="down-icon"></span>
                </div>
                <div data-toggle="arrowdown" id="arrow2" class="msg-info">
                    <i class="fa fa-envelope fa-gray"></i>
                    <a href="#">消息</a>
                    <span class="down-icon"></span>
                </div>
                <!--hidden-box-->
                <div data-toggle="hidden-box" id="nav-box1" class="user-box">
                    <img class="my-head" src="/myweb/xinyi/Public/img/user-head.jpg" />
                    <div class="my-grow">
                        <h1><a href="#">账号管理</a>&nbsp;|&nbsp;<a href="#">退出</a></h1>
                        <p>
                            <h2><a href="#">查看我会员特权</a></h2>
                            <a href="#">我的成长</a>
                        </p>
                    </div>
                    <p style="height: 10px; clear: both;">&nbsp;</p>
                    <div class="my-card">
                        <div class="cards-info">
                            <ul>
                                <li><img src="/myweb/xinyi/Public/img/icon.png" /></li>
                                <li><img src="/myweb/xinyi/Public/img/icon.png" /></li>
                            </ul>
                        </div>
                        <div class="toggle-box">
                            <div class="toggle">
                                 <i style="vertical-align: top" class="fa fa-angle-left arrow-left"></i>
                                 <i style="vertical-align: top" class="fa fa-angle-right arrow-right"></i>
                            </div>
                        </div>
                    </div>
                </div>
                <div data-toggle="hidden-box" id="nav-box2" class="msg-box">
                    <h1>未读新消息<a href="#" class="fa fa-pencil-square-o pencil"></a></h1>
                    <div class="read-info">
                        <h2><span class="orange">&nbsp;&nbsp;|</span>&nbsp;你的书架&nbsp;<span style="font-weight: lighter">收到了<span class="orange">1</span>本书</span><span class="fa fa-times close-msg"></span></h2>
                        <img src="/myweb/xinyi/Public/img/book-1.png" />
                        <div style="float: right">
                            <p>
                                全中国最穷的小伙子发财日记<br/>
                                掏彩票公共账号
                            </p>
                            <h3><a href="#">去看看</a></h3>
                        </div>
                    </div>
                    <div class="msg-setting">
                        <a href="#" class="fa fa-cog"></a>
                        <a href="#" class="fa fa-pencil-square-o"></a>
                        <a style="margin-left: 70px" href="#">买家消息&nbsp;|&nbsp;</a>
                        <a href="#">卖家消息</a>
                    </div>
                </div>
            </div>
            <!--top-right-->
            <div class="top-right">
                <div data-toggle="arrowdown" id="arrow3" class="user-name">
                    <a href="#">未登陆</a>
                    <span class="down-icon"></span>
                </div>
                <div data-toggle="arrowdown" id="arrow4" class="user-name">
                    <i class="fa fa-shopping-cart fa-orange"></i>
                    <a href="#">购物车</a>
                    <span class="down-icon"></span>
                </div>
                <div data-toggle="arrowdown" id="arrow5" class="user-name">
                    <i class="fa fa-star fa-gray"></i>
                    <a href="#">收藏夹</a>
                    <span class="down-icon"></span>
                </div>
                <a class="a-float-left" href="#">商品分类</a>
                <span class="vertical-line">|</span>
                <div data-toggle="arrowdown" id="arrow6" class="user-name">
                    <a href="#">卖家中心</a>
                    <span class="down-icon"></span>
                </div>
                <a class="a-float-left" href="#">联系客户</a>
                <div data-toggle="arrowdown" id="arrow7" class="user-name">
                    <i class="fa fa-list-ul fa-orange"></i>
                    <a href="#">网站导航</a>
                    <span class="down-icon"></span>
                </div>
                <!--hidden-box-->
                <div data-toggle="hidden-box" id="nav-box3" class="my-taobao-box">
                    <ul>
                        <li>已买到的宝贝</li>
                        <li>新欢</li>
                        <li>我的足迹</li>
                        <li>我的上新</li>
                        <li>我的优惠</li>
                    </ul>
                </div>
                <div data-toggle="hidden-box" id="nav-box4" class="shopping-box">
                    <span>您购物车里还没有任何宝贝。</span><a class="check-shopp" href="#">查看我的购物车</a>
                </div>
                <div data-toggle="hidden-box" id="nav-box5" class="get-box">
                    <ul>
                        <li>收藏的宝贝</li>
                        <li>收藏的店铺</li>
                    </ul>
                </div>
                <div data-toggle="hidden-box" id="nav-box6" class="center-box">
                    <ul>
                        <li>已卖出的宝贝</li>
                        <li>出售中的宝贝</li>
                        <li>卖家服务市场</li>
                        <li>卖家培训中心</li>
                    </ul>
                </div>
                <div data-toggle="hidden-box" id="nav-box7" class="nav-box">
                    <div class="sub-nav top-sub-nav">
                        <!--<input type="button" class="more-btn" value="更多"/>-->
                        <!--sub-nav-cell-->
                        <div class="sub-nav-cell right-shadow">
                            <h3 class="orange">主题市场</h3>
                            <ul class="sub-nav-box">
                                <li><a href="#">爱美女人</a></li>
                                <li><a href="#">品质男人</a></li>
                                <li><a href="#">淘宝二手</a></li>
                                <li><a href="#">全球购</a></li>
                                <li><a href="#">品牌街</a></li>
                                <li><a href="#">汽车生活</a></li>
                                <li><a href="#">花嫁新娘</a></li>
                                <li><a href="#">孕婴童</a></li>
                                <li><a href="#">同城便民</a></li>
                                <li><a href="#">爱么装</a></li>
                                <li><a href="#">运动户外</a></li>
                                <li><a href="#">家用电器</a></li>
                                <li><a href="#">狠爱</a></li>
                                <li><a href="#">网络游戏</a></li>
                                <li><a href="#">潮流设计</a></li>
                                <li><a href="#">淘宝星愿</a></li>
                            </ul>
                        </div>
                        <div class="sub-nav-cell right-shadow">
                            <h3 class="green-sp">特色购物</h3>
                            <ul class="sub-nav-box sp">
                                <li><a href="#">爱美女人</a></li>
                                <li><a href="#">品质男人</a></li>
                                <li><a href="#">淘宝二手</a></li>
                                <li><a href="#">全球购</a></li>
                                <li><a href="#">品牌街</a></li>
                                <li><a href="#">汽车生活</a></li>
                                <li><a href="#">花嫁新娘</a></li>
                                <li><a href="#">孕婴童</a></li>
                                <li><a href="#">同城便民</a></li>
                                <li><a href="#">爱么装</a></li>
                                <li><a href="#">运动户外</a></li>
                                <li><a href="#">家用电器</a></li>
                                <li><a href="#">狠爱</a></li>
                                <li><a href="#">网络游戏</a></li>
                                <li><a href="#">潮流设计</a></li>
                                <li><a href="#">淘宝星愿</a></li>

                            </ul>
                        </div>
                        <div class="sub-nav-cell right-shadow">
                            <h3 class="red-now">当前热点</h3>
                            <ul class="sub-nav-box now">
                                <li><a href="#">爱美女人</a></li>
                                <li><a href="#">品质男人</a></li>
                                <li><a href="#">淘宝二手</a></li>
                                <li><a href="#">全球购</a></li>
                                <li><a href="#">品牌街</a></li>
                                <li><a href="#">汽车生活</a></li>
                                <li><a href="#">花嫁新娘</a></li>
                                <li><a href="#">孕婴童</a></li>
                                <li><a href="#">同城便民</a></li>
                                <li><a href="#">爱么装</a></li>
                                <li><a href="#">运动户外</a></li>
                                <li><a href="#">家用电器</a></li>
                                <li><a href="#">狠爱</a></li>
                                <li><a href="#">网络游戏</a></li>
                                <li><a href="#">潮流设计</a></li>
                                <li><a href="#">淘宝星愿</a></li>

                            </ul>
                        </div>
                        <div class="sub-nav-cell">
                            <h3 class="blue-more">更多精彩</h3>
                            <ul class="sub-nav-box more">
                                <li><a href="#">爱美女人</a></li>
                                <li><a href="#">品质男人</a></li>
                                <li><a href="#">淘宝二手</a></li>
                                <li><a href="#">全球购</a></li>
                                <li><a href="#">品牌街</a></li>
                                <li><a href="#">汽车生活</a></li>
                                <li><a href="#">花嫁新娘</a></li>
                                <li><a href="#">孕婴童</a></li>
                                <li><a href="#">同城便民</a></li>
                                <li><a href="#">爱么装</a></li>
                                <li><a href="#">运动户外</a></li>
                                <li><a href="#">家用电器</a></li>
                                <li><a href="#">狠爱</a></li>
                                <li><a href="#">网络游戏</a></li>
                                <li><a href="#">潮流设计</a></li>
                                <li><a href="#">淘宝星愿</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--scroll-top-->
        <div class="scroll-search">
            <div class="search-litter">
                <img class="scroll-logo" src="/myweb/xinyi/Public/img/logo.png" />
                <!--scroll-search-->
                <div class="search-wrapper-scroll">
                    <div class="search-box-scroll">
                        <div data-toggle="arrowdown" id="arrow9" class="search-toggle-scroll">
                            宝贝<span class="down-icon"></span>
                        </div>
                        <input class="search-in-scroll" type="text" placeholder="    搜‘健康椅’试试，办公好选择" />
                        <input type="button" class="search-but-scroll" value="搜索">
                        <div data-toggle="hidden-box" id="nav-box9" class="search-toggle-box-scroll">店铺</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--top-main-->
    <div class="top-main">
        <img src="/myweb/xinyi/Public/img/logo.gif" />
        <div class="search-wrapper">
            <div class="search-box">
                <div data-toggle="arrowdown" id="arrow8" class="search-toggle">
                    宝贝<span class="down-icon"></span>
                </div>
                <input class="search-in" type="text" placeholder="    输入商家或商品名称">
                <input type="button" class="search-but" value="搜索">
                <div data-toggle="hidden-box" id="nav-box8" class="search-toggle-box">店铺</div>
            </div>
            <a class="a-float-left hight-search" href="#">高级<br/>搜索</a>
            <!--other-search-->
        </div>
        <!--two-code-->
    </div>
    <!--content-top-->
    <div class="content-top">
        <!--sidebar-->
        <div class="sidebar">
            <h3>商品服务分类</h3>
            <!--sidebar-info-->
            <div class="sidebar-info">
                <ul class="side-li">
                    <li class="s_1"><h3>服装内衣<span class="fa fa-angle-right fa-loc"></span></h3></li>
                </ul>
                <!--hidden-li-box-->
                <ul class="hiden-box">
                    <li data-hidden="li" id="hiden-1">
                        <div class="hidden-title">
                            <a href="#">淘宝女人</a><span class="right-box"><i class="fa fa-angle-right"></i></span>
                            <a href="#">最in女装</a><span class="right-box"><i class="fa fa-angle-right"></i></span>
                            <a href="#">淘宝男人</a><span class="right-box"><i class="fa fa-angle-right"></i></span>
                            <a href="#">女人搭配</a><span class="right-box"><i class="fa fa-angle-right"></i></span>
                        </div>
                        <div class="sub-nav-right">
                            <div class="cell-box">
                                <h1>印记女装</h1>
                                <div class="a-box">
                                    <a href="#">连衣裙</a><span>|</span>
                                    <a href="#">裤子</a><span>|</span>
                                    <a href="#">小西装</a><span>|</span>
                                    <a href="#">长袖村上</a><span>|</span>
                                    <a href="#" class="orange">春季外套</a>
                                    <a href="#">郑志山</a><span>|</span>
                                    <a href="#">毛衣</a><span>|</span>
                                    <a href="#">长袖T恤</a><span>|</span>
                                    <a href="#">唯一</a><span>|</span>
                                    <a href="#">雪绒钱</a><span>|</span>
                                    <a href="#">大地亏</a>
                                    <a href="#">半身全</a><span>|</span>
                                    <a href="#">风衣</a><span>|</span>
                                    <a href="#">类似雪纺</a><span>|</span>
                                    <a href="#">毛衣外套</a><span>|</span>
                                    <a href="#">棒球服</a>
                                    <a href="#">牛仔装</a><span>|</span>
                                    <a href="#">礼服</a><span>|</span>
                                    <a href="#">婚纱</a><span>|</span>
                                    <a href="#">大妈</a><span>|</span>
                                    <a href="#">Zara</a><span>|</span>
                                    <a href="#">挨个</a>
                                </div>
                            </div>
                        </div>
                        <div class="sub-nav-left">
                            <div class="cell-box">
                                <h1>印记女装</h1>
                                <div class="a-box">
                                    <a href="#">连衣裙</a><span>|</span>
                                    <a href="#">裤子</a><span>|</span>
                                    <a href="#">小西装</a><span>|</span>
                                    <a href="#">长袖村上</a><span>|</span>
                                    <a href="#" class="orange">春季外套</a>
                                    <a href="#">郑志山</a><span>|</span>
                                    <a href="#">毛衣</a><span>|</span>
                                    <a href="#">长袖T恤</a><span>|</span>
                                    <a href="#">唯一</a><span>|</span>
                                    <a href="#">雪绒钱</a><span>|</span>
                                    <a href="#">大地亏</a>
                                    <a href="#">半身全</a><span>|</span>
                                    <a href="#">风衣</a><span>|</span>
                                    <a href="#">类似雪纺</a><span>|</span>
                                    <a href="#">毛衣外套</a><span>|</span>
                                    <a href="#">棒球服</a>
                                    <a href="#">牛仔装</a><span>|</span>
                                    <a href="#">礼服</a><span>|</span>
                                    <a href="#">婚纱</a><span>|</span>
                                    <a href="#">大妈</a><span>|</span>
                                    <a href="#">Zara</a><span>|</span>
                                    <a href="#">挨个</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <!--right-con-->
        <div class="right-con">
            <div class="nav">
                <a id="spe-a1" href="#">天猫</a>
                <a id="spe-a2" href="#">聚划算</a>
                <a id="spe-a3" href="#">二手</a>
                <span class="line-a">|</span>
                <a href="#">拍卖</a>
                <a href="#">一淘</a>
                <a href="#">电器城</a>
                <a href="#">Hitao粉妆</a>
                <a href="#">旅行</a>
                <a href="#">云手机</a>
                <a href="#">特色中国</a>
                <img style="cursor: pointer" src="/myweb/xinyi/Public/img/ad.gif" />
                <span class="keep-a" href="#"><a href="#">消费者保障</a></span>
            </div>
            <!--show-box-->
            <div class="show-box">
                <!--content-->
                <div class="content">
                    <ul class="imgBox">
                    	<?php if(is_array($shops)): foreach($shops as $key=>$v): ?><li><a href="#"><img style="width:720px; height:530px" src="/myweb/xinyi<?php echo ($v["imgurl"]); ?>"></a></li><?php endforeach; endif; ?>
                    </ul>
                    <div class="currentNum">
                        <span class="imgNum mark-color"></span>
                        <span class="imgNum"></span>
                        <span class="imgNum"></span>
                        <span class="imgNum"></span>
                        <span class="imgNum"></span>
                    </div>
                    <div class="control to-left"><i class="fa fa-angle-left"></i></div>
                    <div class="control to-right"><i class="fa fa-angle-right"></i></div>
                </div>
                <!--content-down-->
            </div>
            <!--right-sidbar-->
            <div class="right-sidebar">
                <div class="info-box">
                    <ul class="tab-nav">
                        <li id="li-1" class="li-nav li-nav-hover li-border">公告</li>
                        <li id="li-2" class="li-nav">规则</li>
                        <li id="li-3" class="li-nav">论坛</li>
                        <li id="li-4" class="li-nav">安全</li>
                        <li style="border-right: none" id="li-5" class="li-nav">公益</li>
                    </ul>
                    <div id="box-1" style="display: block" class="hiddenBox">

                        <a href="#">淘宝2014:开放多样性</a>
                        <a href="#">舌尖中国二季 天猫首尝</a>
                        <a href="#">阿里通信自建计费系统</a>
                        <a href="#">来往首届419宇宙节</a>
                    </div>
                    <div id="box-2" class="hiddenBox">

                        <a href="#">[重要] 淘点点规范</a>
                        <a href="#">[重要] 虚假交易新规&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
                        <a href="#">[重要] 新增认证规则</a>
                        <a href="#">[重要] 购买刀具实名</a>
                    </div>
                    <div id="box-3" class="hiddenBox">
                        <a href="#">[优化] 称谓滥用将整改</a>
                        <a href="#">[热点] 如何赢取新商机</a>
                        <a href="#">[话题] 同城交易避处罚</a>
                        <a href="#">[聚焦] 新消保法全解析</a>
                    </div>
                    <div id="box-4" class="hiddenBox">

                        <a href="#">个人重要信息要管牢！</a>
                        <a href="#">卖家防范红包欺诈提醒</a>
                        <a href="#">更换收货地址的陷阱！</a>
                        <a href="#">注意骗子的技术升级了</a>
                    </div>
                    <div id="box-5" class="hiddenBox">
                        <a href="#">[优化] 称谓滥用将整改</a>
                        <a href="#">[热点] 如何赢取新商机</a>
                        <a href="#">[话题] 同城交易避处罚</a>
                        <a href="#">[聚焦] 新消保法全解析</a>
                    </div>
                </div>
                <!--user-info-->
                <div class="user-info">
                    <div class="gold-top">
                        <img width="62px" height="62px" src="/myweb/xinyi/Public/img/user-head.jpg" />
                        <div class="inner-user">
                            <h3>Hi 天之狼2011</h3>
                            <a class="get-gold" href="#"><span class="glods"></span><span class="get-money">领淘金币抵钱</span></a>
                            <a class="vip-home" href="#">会员俱乐部</a>
                        </div>
                    </div>
                    <!--login-->
                    <div class="login">
                        <a class="login-btn" href="#"><i class="fa fa-user fa-user-loc"></i>登陆</a>
                        <a class="login-btn free" href="#">免费注册</a>
                        <a class="login-btn free" href="#">免费开店</a>
                    </div>
                </div>
                <!--service-->
                <div class="service">
                    <h3>便民服务</h3>
                    <div id="service-1" class="service-cell service-z">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/phone.png" /></h5>
                        <h6>话费</h6>
                        <i class="fa fa-angle-down"></i>
                    </div>
                    <div id="service-2" class="service-cell service-z">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/game.png" /></h5>
                        <h6>游戏</h6>
                        <i class="fa fa-angle-down"></i>
                    </div>
                    <div id="service-3" class="service-cell service-z">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/plane.png" /></h5>
                        <h6>旅行</h6>
                        <i class="fa fa-angle-down"></i>
                    </div>
                    <div id="service-4" class="service-cell service-z">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/save.png" /></h5>
                        <h6>保险</h6>
                        <i class="fa fa-angle-down"></i>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/18.png" /></h5>
                        <h6>彩票</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/move.png" /></h5>
                        <h6>电影</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/eat.png" /></h5>
                        <h6>点外卖</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/money.png" /></h5>
                        <h6>理财</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/book.png" /></h5>
                        <h6>电子书</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/miusc.png" /></h5>
                        <h6>音乐</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/bag.png" /></h5>
                        <h6>水电煤</h6>
                    </div>
                    <div class="service-cell">
                        <h5 class="service-i"><img src="/myweb/xinyi/Public/img/....png" /></h5>
                        <h6>请期待</h6>
                    </div>
                </div>
                <!--service-box-->
                <div id="service-box-1" class="service-box">
                    <div class="service-head">
                        <a href="#">话费充值</a>
                        <a href="#">流量充值</a>
                        <span class="fa fa-times"></span>
                    </div>
                    <div class="feihua-in">
                        <span>号码</span>
                        <input class="tell-num" type="text"  placeholder="手机号、固话号"/>
                    </div>
                    <div class="feihua-in">
                        <span>面值</span>
                        <input class="money-in" type="text" value="50" />
                        <span class="fa fa-angle-down sel-money"></span>
                    </div>
                    <div class="gary-text"><span>售价&nbsp;￥&nbsp;</span><span class="orange">49-49.8</span></div>
                    <div style="margin-top: 10px">
                        <a href="#" class="now-chongzhi">立即充值</a>
                        <a href="#" class="now-chongzhi dingqi">定期充值</a>
                        <a href="#">3G急速上网卡</a>
                    </div>
                </div>
                <div id="service-box-2" class="service-box">
                    <div class="service-head">
                        <a href="#">话费充值</a>
                        <a href="#">流量充值</a>
                        <span class="fa fa-times"></span>
                    </div>
                    <div class="feihua-in">
                        <span>号码</span>
                        <input class="tell-num" type="text"  placeholder="手机号、固话号"/>
                    </div>
                    <div class="feihua-in">
                        <span>面值</span>
                        <input class="money-in" type="text" value="50" />
                        <span class="fa fa-angle-down sel-money"></span>
                    </div>
                    <div class="gary-text"><span>售价&nbsp;￥&nbsp;</span><span class="orange">49-49.8</span></div>
                    <div style="margin-top: 10px">
                        <a href="#" class="now-chongzhi">立即充值</a>
                        <a href="#" class="now-chongzhi dingqi">定期充值</a>
                        <a href="#">3G急速上网卡</a>
                    </div>
                </div>
                <div id="service-box-3" class="service-box">
                    <div class="service-head">
                        <a href="#">话费充值</a>
                        <a href="#">流量充值</a>
                        <span class="fa fa-times"></span>
                    </div>
                    <div class="feihua-in">
                        <span>号码</span>
                        <input class="tell-num" type="text"  placeholder="手机号、固话号"/>
                    </div>
                    <div class="feihua-in">
                        <span>面值</span>
                        <input class="money-in" type="text" value="50" />
                        <span class="fa fa-angle-down sel-money"></span>
                    </div>
                    <div class="gary-text"><span>售价&nbsp;￥&nbsp;</span><span class="orange">49-49.8</span></div>
                    <div style="margin-top: 10px">
                        <a href="#" class="now-chongzhi">立即充值</a>
                        <a href="#" class="now-chongzhi dingqi">定期充值</a>
                        <a href="#">3G急速上网卡</a>
                    </div>
                </div>
                <div id="service-box-4" class="service-box">
                    <div class="service-head">
                        <a href="#">话费充值</a>
                        <a href="#">流量充值</a>
                        <span class="fa fa-times"></span>
                    </div>
                    <div class="feihua-in">
                        <span>号码</span>
                        <input class="tell-num" type="text"  placeholder="手机号、固话号"/>
                    </div>
                    <div class="feihua-in">
                        <span>面值</span>
                        <input class="money-in" type="text" value="50" />
                        <span class="fa fa-angle-down sel-money"></span>
                    </div>
                    <div class="gary-text"><span>售价&nbsp;￥&nbsp;</span><span class="orange">49-49.8</span></div>
                    <div style="margin-top: 10px">
                        <a href="#" class="now-chongzhi">立即充值</a>
                        <a href="#" class="now-chongzhi dingqi">定期充值</a>
                        <a href="#">3G急速上网卡</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--main-->
    <div class="sub-nav">
        <input type="button" class="more-btn" value="更多"/>
        <!--sub-nav-cell-->
        <div class="sub-nav-cell">
            <h3 class="orange">主题市场</h3>
            <ul class="sub-nav-box">
                <li><a href="#">爱美女人</a></li>
                <li><a href="#">品质男人</a></li>
                <li><a href="#">淘宝二手</a></li>
                <li><a href="#">全球购</a></li>
                <li><a href="#">品牌街</a></li>
                <li><a href="#">汽车生活</a></li>
                <li><a href="#">花嫁新娘</a></li>
                <li><a href="#">孕婴童</a></li>
                <li><a href="#">同城便民</a></li>
                <li><a href="#">爱么装</a></li>
                <li><a href="#">运动户外</a></li>
                <li><a href="#">家用电器</a></li>
                <li><a href="#">狠爱</a></li>
                <li><a href="#">网络游戏</a></li>
                <li><a href="#">潮流设计</a></li>
                <li><a href="#">淘宝星愿</a></li>
            </ul>
        </div>
        <div class="sub-nav-cell">
            <h3 class="green-sp">特色购物</h3>
            <ul class="sub-nav-box sp">
                <li><a href="#">爱美女人</a></li>
                <li><a href="#">品质男人</a></li>
                <li><a href="#">淘宝二手</a></li>
                <li><a href="#">全球购</a></li>
                <li><a href="#">品牌街</a></li>
                <li><a href="#">汽车生活</a></li>
                <li><a href="#">花嫁新娘</a></li>
                <li><a href="#">孕婴童</a></li>
                <li><a href="#">同城便民</a></li>
                <li><a href="#">爱么装</a></li>
                <li><a href="#">运动户外</a></li>
                <li><a href="#">家用电器</a></li>
                <li><a href="#">狠爱</a></li>
                <li><a href="#">网络游戏</a></li>
                <li><a href="#">潮流设计</a></li>
                <li><a href="#">淘宝星愿</a></li>

            </ul>
        </div>
        <div class="sub-nav-cell">
            <h3 class="red-now">当前热点</h3>
            <ul class="sub-nav-box now">
                <li><a href="#">爱美女人</a></li>
                <li><a href="#">品质男人</a></li>
                <li><a href="#">淘宝二手</a></li>
                <li><a href="#">全球购</a></li>
                <li><a href="#">品牌街</a></li>
                <li><a href="#">汽车生活</a></li>
                <li><a href="#">花嫁新娘</a></li>
                <li><a href="#">孕婴童</a></li>
                <li><a href="#">同城便民</a></li>
                <li><a href="#">爱么装</a></li>
                <li><a href="#">运动户外</a></li>
                <li><a href="#">家用电器</a></li>
                <li><a href="#">狠爱</a></li>
                <li><a href="#">网络游戏</a></li>
                <li><a href="#">潮流设计</a></li>
                <li><a href="#">淘宝星愿</a></li>

            </ul>
        </div>
        <div class="sub-nav-cell">
            <h3 class="blue-more">更多精彩</h3>
            <ul class="sub-nav-box more">
                <li><a href="#">爱美女人</a></li>
                <li><a href="#">品质男人</a></li>
                <li><a href="#">淘宝二手</a></li>
                <li><a href="#">全球购</a></li>
                <li><a href="#">品牌街</a></li>
                <li><a href="#">汽车生活</a></li>
                <li><a href="#">花嫁新娘</a></li>
                <li><a href="#">孕婴童</a></li>
                <li><a href="#">同城便民</a></li>
                <li><a href="#">爱么装</a></li>
                <li><a href="#">运动户外</a></li>
                <li><a href="#">家用电器</a></li>
                <li><a href="#">狠爱</a></li>
                <li><a href="#">网络游戏</a></li>
                <li><a href="#">潮流设计</a></li>
                <li><a href="#">淘宝星愿</a></li>
            </ul>
        </div>
    </div>
    <!--main-->
    <div class="main">
        <div class="main-left">
            <div class="main-title">
                <h1>精彩推荐</h1>
            </div>
            <?php if(is_array($products)): foreach($products as $key=>$v): ?><div class="product-box">
                <div class="inner-info">
                    <div>
                        <span class="line-f40">|</span>
                        <span class="text-title"><?php echo ($v["shopname"]); ?></span>
                        <span class="share-weitao">
                            <span class="line-f40">+</span>
                            <a href="#">更多信息</a>
                        </span>
                    </div>
                    <div class="inner-left">
                        <img style="max-width:168px; max-height:130px" src="/myweb/xinyi<?php echo ($v["imgurl"]); ?>" />
                        <h1 style="color:#f00">￥<?php echo ($v["price"]); ?></h1>
                        <span><?php echo ($v["name"]); ?></span>
                    </div>
                    <div class="inner-right">
                        <div>
                            <a href="#">
                                <img src="/myweb/xinyi/Public/img/shooes.jpg" />
                                <p>春夏美鞋</p>
                            </a>
                            <a href="#">
                                <img src="/myweb/xinyi/Public/img/c.gif" />
                                <p>春季亮色搭</p>
                            </a>
                        </div>
                        <table class="tab-inner">
                            <tr><td><a href="#">降价通知</a></td>
                                <td><a href="#">立即购买</a></td>
                            </tr>
                            <tr><td><a href="#">加入收藏</a></td>
                                <td><a href="#">加入购物车</a></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div><?php endforeach; endif; ?>
        </div>
        <div class="main-right">
            <div class="time-go">
                <div class="time-cell">
                    <h1><a href="#" class="text_shadow">我收藏的店铺上新</a><span class="now-news">更新<span class="">3</span></span></h1>
                    <div class="inner-show">
                        <a href="#">
                            <img src="/myweb/xinyi/Public/img/inner1.png">
                            <p class="price-info">￥118.00</p>
                        </a>
                        <a href="#">
                            <img src="/myweb/xinyi/Public/img/inner2.png">
                            <p>￥118.00</p>
                        </a>
                        <a href="#">
                            <img src="/myweb/xinyi/Public/img/inner3.png">
                            <p>￥118.00</p>
                        </a>
                        <h3><a href="$">更多店铺上新</a><i class="fa fa-angle-right"></i></h3>
                    </div>
                </div>
            </div>
            <!--fix-right-->
        </div>
    </div>
    <!--main-bottom-->
    <div class="main-bottom">
        <div class="sub-bottom-nav">
            <h1>热卖单品</h1>
           <div class="sub-nav-info">
               <a href="#">链接1</a>|
               <a href="#">链接2</a>|
               <a href="#">链接3</a>|
               <a href="#">链接4</a>|
               <a href="#">链接5</a>|
               <a href="#">链接6</a>|
               <a href="#">链接7</a>|
               <a href="#">链接8</a>
           </div>
        </div>
        <div class="single-sale">
            <a href="#">
                <img src="/myweb/xinyi/Public/img/sing1.jpg" />
                <h3>褶皱立领雪纺衫</h3>
            </a>
            <p><span class="orange">￥&nbsp;</span><span class="orange">129.00</span><span class="send-free">包邮</span></p>
            <p class="gary-text"><span>￥&nbsp;</span><span><del>399.00</del></span>&nbsp;|&nbsp;<span>月消29件</span></p>
        </div>
    </div>
    <!--help-->
    <div class="help">
        <div class="help-info">
            <h1><img src="/myweb/xinyi/Public/img/help4.png"><span class="help-text">消费者保障</span></h1>
            <a class="help-a" href="#">保障范围</a>
            <a class="help-a" href="#">退货退款流程</a>
            <a class="help-a" href="#">服务中心</a>
            <a class="help-a" href="#">更多特色服务</a>
        </div>
        <div class="help-info">
            <h1><img src="/myweb/xinyi/Public/img/help1.png"><span class="help-text">新手上路</span></h1>
            <a class="help-a" href="#">新手专区</a>
            <a class="help-a"v href="#">消费警示</a>
            <a class="help-a" href="#">交易安全</a>
            <a class="help-a margin-r" href="#">24小时在线帮助</a>
        </div>
        <div class="help-info">
            <h1><img src="/myweb/xinyi/Public/img/help2.png"><span class="help-text">付款方式</span></h1>
            <a class="help-a-litter" href="#">支付宝快捷支付</a>
            <a class="help-a-litter" href="#">支付宝卡（现金）付款</a>
            <a class="help-a-litter" href="#">支付宝余额付款</a>
            <a class="help-a" href="#">货到付款</a>
        </div>
        <div class="help-info">
            <h1><img src="/myweb/xinyi/Public/img/help3.png"><span class="help-text">淘宝特色</span></h1>
            <a class="help-a" href="#">淘宝指数</a>
            <a class="help-a" href="#">淘公仔</a>
            <a class="help-a" href="#">手机淘宝</a>
            <a class="help-a" href="#">旺信</a>
        </div>
    </div>
    <!--footer-->
    <div class="footer">
        <div class="footer-right">
            <div class="footer-nav">
                <a href="#">阿里巴巴集团</a>|
                <a href="#">阿里巴巴国际站</a>|
                <a href="#">阿里巴巴中国站</a>|
                <a href="#">全球速卖通</a>|
                <a href="#">淘宝网</a>|
                <a href="#">天猫</a>|
                <a href="#">聚划算</a>|
                <a href="#">一淘</a>|
                <a href="#">阿里妈妈</a>|
                <a href="#">阿里云计算</a>|
                <a href="#">云OS</a>|
                <a href="#">万网</a>|
                <a href="#">支付宝</a>|
                <a href="#">来往</a>
            </div>
            <div class="about-tao">
                <a href="#">关于淘宝</a>
                <a href="#">合作伙伴</a>
                <a href="#">营销中心</a>
                <a href="#">廉正举报</a>
                <a href="#">联系客服</a>
                <a href="#">开放平台</a>
                <a href="#">诚征英才</a>
                <a href="#">联系我们</a>
                <a href="#">网站地图</a>
                <a href="#">法律声明</a>
                <span class="gary-text">&copy; 2014 Taobao.com 版权所有</span>
            </div>
            <a class="app-in-grd" href='itms-services://?action=download-manifest&url=https://i.s.manxapp.com/app/manbetx.plist'>下载IOS</a>
            <p class="gary-text"><span>网络文化经营许可证：文网文[2010]040号</span>|<span>增值电信业务经营许可证：浙B2-20080224-1</span>|<span>信息网络传播视听节目许可证：1109364号</span></p>
            <div class="some-info">
                <img src="/myweb/xinyi/Public/img/some.png" />
            </div>
        </div>
        <div class="tao-man">
            <img src="/myweb/xinyi/Public/img/tao-man.png" />
        </div>
    </div>

    <!--backtoTop1-->
    <!--兼容所有现代浏览器同时包括 ie6/7/8/9 （ie6会有一点点抖动）-->
    <div class="backtoTop" id="backToTop1">
        <div id="backToTop-up" class="up-back"><i class="fa fa-angle-up"></i></div>
        <div id="backToTop-down" class="down-back"><i class="fa fa-angle-down"></i></div>
    </div>
    <script src="/myweb/xinyi/Public/js/jquery_1.9.js"></script>
    <script src="/myweb/xinyi/Public/js/main.js"></script>
    <script src="/myweb/xinyi/Public/js/img-show.js"></script>
</body>
</html><file_sep>/Apps/Common/Common/function.php
<?php

function compute_level($count,$step) {
	$level = 0;
	$num = $count;
	while ( $num > 0 ) {
		$level ++;
		$num = $num - round ( pow ( $step, $level ) + 0.5 );
	}
	return $level;
}

function result_user($user) {
	unset ( $user ['regtime'] );
	unset ( $user ['loginword'] );
	return  $user;
}

/**
 * logininfo表插入数据
 * @param unknown $id
 */
function insertLogin($id) { 
	if ($id && $id != "") {
		$loginDao = M ( 'ulogininfo' );
		$logininfo = array (
				'user_id' => $id,
				'clientIP' => get_client_ip (),
				'logintime' => time () 
		);
		$loginDao->add ( $logininfo );
	}
}


/**
 * userinfo表更新数据
 * @param unknown $userDao
 * @param unknown $post_user
 * @param unknown $sql_user
 */
function upUser($userDao,$post_user,&$sql_user){
	$sql_user ['level'] = compute_level ( ++ $sql_user ['logincount'], 1.3 );
	$sql_user ['lastlogintime'] = $sql_user ['logintime'];
	$sql_user ['logintime'] = time ();
	return $userDao->save( $sql_user );
}

/**
 * userinfo表插入数据
 * @param unknown $post_user
 * @param unknown $userDao
 */
function insertUser(&$post_user,$userDao){
	$post_user ['level'] = 1;
	$post_user ['logincount'] = 1;
	$post_user ['regtime'] = time ();
	$post_user ['logintime'] = $post_user ['regtime'];
	$post_user ['lastlogintime'] = $post_user ['regtime'];
	return $userDao->add ( $post_user );
}


/**
 * post提交数据
 * @param unknown $url
 * @param unknown $data
 * @return mixed
 */
function vpost($url,$data){ // 模拟提交数据函数
	$curl = curl_init();  // 启动一个CURL会话
	curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在
	curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
	curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
	curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
	curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
	curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
	curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
	curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
	
	//https请求 不验证证书和host
// 	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// 	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
	$result = curl_exec($curl); // 执行操作
	if (curl_errno($curl)) {
		echo 'Errno'.curl_error($curl);//捕抓异常
	}
	curl_close($curl); // 关闭CURL会话
	return $result; // 返回数据
}

function vget($url, $params) {
	if($params){
		$url = ($url . "?" . $params);
	}
	$ch = curl_init ();
	curl_setopt ( $ch, CURLOPT_URL, $url );
	curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false );
	curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, false );
	$result = curl_exec ( $ch );
	return $result;
}<file_sep>/Apps/Admin/Controller/WelcomeController.class.php
<?php

namespace Admin\Controller;

use Think\Controller;

class WelcomeController extends AuthController {
	public function index() {
		$images=M("welcome")->select();
		$this->images=$images;
		$this->imgnum=sizeof($images);
		$this->display ();
	}
	public function add() {
		$upload = new \Think\Upload (); // 实例化上传类
		$upload->maxSize = 3145728; // 设置附件上传大小
		$upload->exts = array (	'jpg','png' ); // 设置附件上传类型
		$upload->rootPath = './UpLoads/';
		$upload->savePath = '/welcome/images/'; // 设置附件上传目录
		
	// 上传单个文件     
		$info   =   $upload->uploadOne($_FILES['proimg1']);    
		if(!$info) {// 上传错误提示错误信息        
			$this->error($upload->getError());    
		}else{// 上传成功 获取上传文件信息       
			$imageurl = '/UpLoads'.$info['savepath'].$info['savename'];
			if(!M("welcome")->add(array('imageurl'=>$imageurl))){
				$this->error("添加图像文件失败！");
			}else{
				import("Fly.MyImage",".");
				\MyImage::thumb(".".$imageurl, 480, 800);
				$this->redirect("/Admin/Welcome");
			}
		}
	}
	
	public function del(){
		if(!IS_POST) $this->error("页面不存在！");
		$id=I('post.id','','htmlspecialchars');
		if(M("welcome")->where(array('id'=>$id))->delete()){
			$this->redirect("/Admin/Welcome");
		}else{
			$this->error("删除图像失败！");
		}
	}
}<file_sep>/Apps/API/Controller/ProductController.class.php
<?php

namespace API\Controller;

use Think\Controller\RestController;

class ProductController extends RestController {
	protected $allowMethod    = array('get','post','put','delete'); // REST允许的请求类型列表
	protected $allowType      = array('json'); // REST允许请求的资源类型列表
	public function index() {
		header ( 'Cache-Control:max-age=0' );
		header ( 'Content-Type:text/html;charset=utf-8 ', true );
		header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT', true );
		$data = D ( 'ProductAll' )->relation(true)->select();
		$this->response($data,'json');
	}
	
	public function type(){
		header ( 'Cache-Control:max-age=0' );
		header ( 'Content-Type:text/html;charset=utf-8 ', true );
		header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT', true );
		$data = D ( 'ProductAll' )->where(array('ptype_id'=>I('type')))->relation(true)->select();
		$this->response($data,'json');
	}
	
	public function id(){
		header ( 'Cache-Control:max-age=0' );
		header ( 'Content-Type:text/html;charset=utf-8 ', true );
		header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s', time () ) . ' GMT', true );
		$data = D ( 'ProductAll' )->where(array('id'=>I('id')))->relation(true)->select();
		$this->response($data,'json');
	}
}<file_sep>/Apps/Admin/Controller/AttrController.class.php
<?php
namespace Admin\Controller;
use Think\Controller;
class AttrController extends AuthController {
	
	/**
	 * 商品属性页面
	 */
    public function index(){
    	$this->pattr=M('pattr')->select();
    	$this->display();
    }
    
    /**
     * 添加商品属性
     */
    public function add(){
    	if(!IS_POST) $this->error("页面不存在！");
    	if($_POST['name']==null||$_POST['color']==null){
    		$this->error("传入参数错误！");
    	}
    	$pattrDao = M('pattr');
    	if($pattrDao->add($_POST)){
    		$this->redirect("/Admin/Attr");
    	}else{
    		$this->error($pattrDao->getError());
    	}
    }
    
    /**
     * 删除商品属性
     */
    public function del(){
    	if (! IS_POST) $this->error("页面不存在！");
    	$pattrDao = M('pattr');
    	if($pattrDao->where(array($_POST))->delete()){
    		$this->redirect("/Admin/Attr");
    	}else{
    		$this->error($pattrDao->getError());
    	}
    }
    
}<file_sep>/Apps/Cls/User.class.php
<?php
class User{
	
	/**
	 * 验证数据库中的帐号是否存在。
	 * 返回值:帐号不存在近回NULL否则返回帐号。
	 * @param string $tabla 数据表名
	 * @param string $userName 帐号
	 * @param string $name_id 帐号在数据表中的字段名
	 */
	public static function verifyName($tabla='user',$userName,$name_filed="loginname"){
		return M($tabla)->field($name_filed)->where(array($name_filed=>$userName))->find();
	}
	
	/**
	 * 验证数据库中的帐号和密码是否正确。
	 * 返回值:-1，验证帐号不存在;0,验证密码不正确;验证通过返回用户在数据表中的记录。
	 * @param string $tabla 数据表名
	 * @param string $userName 帐号
	 * @param string $userPswd 密码
	 * @param string $name_id 帐号在数据表中的字段名
	 * @param string $pwsd_id 密码在数据表中的字段名
	 * 
	 */
	public static function verifyUser($tabla='user',$userName,$userPswd,$name_filed="loginname",$pwsd_filed="loginword"){
		$data=M($tabla)->where(array($name_filed=>$userName))->find();
		if(!$data) return -1;
		if($data[$pwsd_filed]!=md5($userPswd)) return 0;
		return $data;
	}
	/**
	 * 向数据表$table中插入一条数据$data。
	 * 成功返回插入的数据，失败返回false。
	 * @param unknown $table
	 * @param unknown $data
	 */
	public static function insertUser($table='user',$data){
		//初始化其它要插入的数据
		$data['level'] = 1;
		$data['logincount'] = 1;
		$data['regtime'] = time();
		//暂时使用用户名作为昵称。
		$data['nickname'] = $data ['nickname'] != null ? $data ['nickname'] : $data ['loginname'];
		//密码进行md5加密。
		$data['loginword'] = md5($data['loginword']);
		
		$ret=M($table)->add($data);
		if($ret){
			$data['id']=$ret;
			return $data;
		}else{
			return false;
		}
	}
	
	/**
	 * 插入帐号登陆信息。成功返回插入信息，失败返回false。
	 * @param unknown $table
	 * @param unknown $id
	 */
	public static function insertLog($table='user_log',$id,$user_id='user_id'){
		$data = array (
				$user_id => $id,
				'logintime' => time (),
				'loginIP'=>get_client_ip(),
		);
		if(M($table)->add($data)){
			return $data;
		}else{
			return false;
		}
	}
	
	/**
	 * 保存cookie
	 * @param unknown $data
	 * @param unknown $log
	 * @param number $time
	 */
	public static function saveCookie($data,$log,$time=3600){
		cookie ( 'loginname', $data ['loginname'], $time );
		cookie ( 'nickname', $data ['nickname'] != null ? $data ['nickname'] : $data ['loginname'], $time );
		cookie ( 'level', $data ['level'], $time );
		cookie ( 'logincount', $data ['logincount'] );
		cookie ( 'id', $log ['user_id'], $time );
		cookie ( 'logintime', $log ['logintime'], $time );
		cookie ( 'loginIP', $log ['loginIP'], $time );
	}
	/**
	 * 保存session
	 * @param unknown $data
	 * @param unknown $log
	 */
	public static function saveSession($data,$log){
		session ( 'loginname', $data ['loginname'] );
		session ( 'nickname', $data ['nickname'] != null ? $data ['nickname'] : $data ['loginname'] );
		session ( 'level', $data ['level'] );
		session ( 'logincount', $data ['logincount'] );
		session ( 'id', $log ['user_id'] );
		session ( 'logintime', $log ['logintime'] );
		session ( 'loginIP', $log ['loginIP'] );
		
	}
	
	
	/**
	 * App返回包含用户信息的json字符串 
	 * @param unknown $data
	 * @param unknown $log
	 */
	public static function echoUserJson($data,$log){
		$data ['nickname']= $data ['nickname'] != null ? $data ['nickname'] : $data ['loginname'];
		$data['user_id'] = $log ['user_id'] ;
		$data ['logintime']= $log ['logintime'];
		unset($data['loginword']);
		unset($data['openid']);
		unset($data['regtime']);
		unset($data['lock']);
		echo json_encode($data);
	}
	
	/**
	 * 计算用户等级
	 * @param unknown $count
	 * @param unknown $step
	 * @return number
	 */
	public static function computeLevel($count,$step=1.3) {
		$level = 0;
		$num = $count;
		while ( $num > 0 ) {
			$level ++;
			$num = $num - round ( pow ( $step, $level ) + 0.5 );
		}
		return $level;
	}
	
	/**
	 * 更新用户等级
	 * @param unknown $userDao
	 * @param unknown $post_user
	 * @param unknown $sql_user
	 */
	public static function upUserLevel($table='user',&$data){
		$data['level']= \User::computeLevel( ++ $data ['logincount']);
		return M($table)->save($data);
	}
	
}<file_sep>/Runtime/Cache/Admin/ec0657704c9aaed9286a02f12c56ca11.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理-移动端管理</title>
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/welcome.css" />
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/font-awesome.min.css" />
<script type="text/javascript"> var imgnum = <?php echo ($imgnum); ?>;</script>
<style type="text/css">
.imgBox {
	position: absolute;
	clear: both;
	list-style-type: none;
	width: <?php echo ($imgnum*480); ?>px;
}
.currentNum {
	position: absolute;
	left: 50%;
	top: 780px;
	width: 480px;
	height: 11px;
	margin-left: -<?php echo ($imgnum*7); ?>px;
}
</style>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-welcome.js"></script>
</head>
<body>
	<div class="crumb-wrap">
		<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> <span class="crumb-step">&gt; <a href="#">移动端首页广告管理</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<div class="showimgs">
				<div class="content">
					<ul class="imgBox">
						<?php if(is_array($images)): foreach($images as $key=>$v): ?><li>
							<a href="javascript:delDlg('<?php echo ($v["id"]); ?>')"><img src="<?php echo U($v['imageurl']);?>"></a>
						</li><?php endforeach; endif; ?>
					</ul>
					<div class="currentNum">
						<span class="imgNum mark-color"></span>
						<?php for($i=1;$i<$imgnum;$i++){?>
						<span class="imgNum"></span>
						<?php } ?>
					</div>
					<div class="control to-left">
						<i class="fa fa-angle-left"></i>
					</div>
					<!-- div class="control to-center"><a>删除</a></div-->
					<div class="control to-right">
						<i class="fa fa-angle-right"></i>
					</div>
					<div class="dlg-content1">
						<form name="delFrom" id="delFrom" accept-charset="utf-8" action="<?php echo U('/Admin/welcome/del');?>" method="post">
							<input type="hidden" value="" name="id" id="imageID">
							你确定要删除该图像吗
							<table width="100%">
								<tr>
									<td><input type="submit" class="btn btn-primary" value="删除"></td>
									<td><input type="button" class="btn btn-primary" onclick="javascript:closeDlg()" value="取消"></td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
			<form action="<?php echo U('/Admin/Welcome/add');?>" method="post" id="addFrom" name="addFrom" enctype="multipart/form-data">
				<table class="insert-tab" width="100%">
					<tbody>
						<tr>
							<th><span class="require-red">*</span>上传图像：</th>
							<td><input class="common-text" name="proimg1" id="proimg1" type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*800。</span> <!--<input class="btn btn6" type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>-->
							</td>
							<td><input type="submit" class="btn btn-primary btn6 mr10" value="上传" id="add"></td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
	<!-- 添加菜单 Start-->
	<script src="/myweb/xinyi/Apps/Admin/Public/js/img-show.js"></script>
</body>
</html><file_sep>/Apps/Common/Model/HomeShopModel.class.php
<?php

namespace Common\Model;

use Think\Model\RelationModel;

class HomeShopModel extends RelationModel {
	// 定义主表
	protected $tableName = 'shop_home';
	
	// 定义关联关系
	protected $_link = array (
			'shop' => array (
					'mapping_type' => self::HAS_ONE,
					'class_name' => 'shop', // 要关联的模型类名
					'foreign_key' => 'id', // 关联的外键名称
					'as_fields' => 'shopname' 
			),
			
			'imgurl' => array(    
				'mapping_type'  => self::HAS_ONE,   
				'class_name'    => 'shop_imgurl', 			//要关联的模型类名  
				'foreign_key'   => 'shop_id',    			//关联的外键名称
// 				'mapping_name'  => 'articles',
				'mapping_name'  => 'imgurl',
// 				'mapping_fields'=> 'imageurl',
				'as_fields'=>'imgurl',
			),
	);
}<file_sep>/Apps/Admin/Public/js/admin-welcome.js
$(document).ready(function() {
	$('#add').click(function() {
		if ($('#proimg1').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#proimg1').focus();
			return false;
		}
		$('#addFrom').submit();
	});
});

function delDlg(s1) {
	$('.dlg-content1').fadeIn(100);
//	$('.dlg-mask').fadeIn(100);
	// 设置初始值
	document.getElementById("imageID").value = s1;
}

function closeDlg() {
	$('.dlg-content1').fadeOut(100);
}
<file_sep>/Runtime/Cache/Admin/707b16be43de1247e1cd48ae9a29332d.php
<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript"> var ajaxurl= '<?php echo U("/Admin/Type/del","","");?>'</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-type.js"></script>
</head>
<body>
<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">商品分类</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<table class="admin-tab" width="900px">
				<tbody align="right">
					<tr style="background:#e8e8e8">
						<th width=%25>分类名称</th>
						<th width=%25>分类层次</th>
						<th width=%25>排列顺序</th>
						<th width=%25>执行操作</th>
					</tr>
					<?php if(is_array($ptype)): foreach($ptype as $key=>$v): ?><tr>
						<th><?php echo ($v["ptype_name"]); ?></th>
						<th><?php echo ($v["pid"]); ?></th>
						<th><?php echo ($v["order"]); ?></th>
						<th><a href="javascript:postdel('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["pid"]); ?>','<?php echo ($v["order"]); ?>');"><i class="icon-font">&#xe037;删除</i></a></th>
					</tr><?php endforeach; endif; ?>
				</tbody>
			</table>
			<br>
			<form name="addFrom" id="addFrom" accept-charset="utf-8" action="<?php echo U('/Admin/Type/add');?>" method="post">
				<table class="admin-tab" width="900px">
					<tbody>
						<tr>
							<th style="width:838px;background:#e8e8e8" colspan="2">添加分类</th>
						</tr>
						<tr>
							<th width = "200px"><span class="require-red">*</span>分类名称：</th>
							<td>
								<input class="common-text" id="ptype_name" name="ptype_name" size="40" value="" type="text">
							</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>分类层次：</th>
							<td>
								<input class="common-text" id="pid"	name="pid" size="40" value="0" type="text">
							</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>排列顺序：</th>
							<td>
								<input class="common-text" id="order" name="order" size="40" value="100" type="text">
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input type="submit"class="btn btn-primary btn6 mr10" value="添加" id="add"> 
								<input type="reset"	class="btn btn-primary btn6 mr10" value="重置">
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
		
	</div>
</body>
</html><file_sep>/Runtime/Cache/Admin/1c30f6ab002a9149cc7388ff45b634b3.php
<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/node.css" />
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript"> var delurl= '<?php echo U("/Admin/Node/del");?>'</script>
<script type="text/javascript"> var statusurl= '<?php echo U("/Admin/Node/status");?>'</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-node.js"></script>
</head>
<body>
<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">节点管理</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<div class="apps-title">网站目录<a href="javascript:addDlg('','0','1');">＋</a>
				<?php if(is_array($node)): foreach($node as $key=>$v): ?><div class="apps">
					<div class="app"><?php echo ($v["remark"]); ?><!-- 
						 --><a href="javascript:addDlg('<?php echo ($v["remark"]); ?>','<?php echo ($v["id"]); ?>','2');">＋</a><!-- 
						 --><?php if($v['child']==null): ?><a href="javascript:delDlg('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["remark"]); ?>','<?php echo ($v["status"]); ?>','<?php echo ($v["pid"]); ?>','<?php echo ($v["level"]); ?>');">－</a><!-- 
						 --><?php endif; ?><a href="javascript:editDlg('<?php echo ($v["id"]); ?>','<?php echo ($v["name"]); ?>','<?php echo ($v["remark"]); ?>','1','<?php echo ($v["pid"]); ?>','<?php echo ($v["level"]); ?>','');">Ｅ</a>
					</div>
					<?php if(is_array($v["child"])): foreach($v["child"] as $key=>$c): ?><div class="controls">
						<div class="control"><?php echo ($c["remark"]); ?><!-- 
						--><a href="javascript:addDlg('<?php echo ($c["remark"]); ?>','<?php echo ($c["id"]); ?>','3');">＋</a><!-- 
						--><?php if($c['child']==null): ?><a href="javascript:delDlg('<?php echo ($c["id"]); ?>','<?php echo ($c["name"]); ?>','<?php echo ($c["remark"]); ?>','<?php echo ($v["status"]); ?>','<?php echo ($c["pid"]); ?>','<?php echo ($c["level"]); ?>');">－</a><!-- 
						--><?php endif; ?><a href="javascript:editDlg('<?php echo ($c["id"]); ?>','<?php echo ($c["name"]); ?>','<?php echo ($c["remark"]); ?>','1','<?php echo ($c["pid"]); ?>','<?php echo ($c["level"]); ?>','<?php echo ($v["remark"]); ?>');">Ｅ</a>
						</div>	
						<?php if(is_array($c["child"])): foreach($c["child"] as $key=>$m): ?><div class="method"><?php echo ($m["remark"]); ?><!-- 
						--><a href="javascript:delDlg('<?php echo ($m["id"]); ?>','<?php echo ($m["name"]); ?>','<?php echo ($m["remark"]); ?>','<?php echo ($v["status"]); ?>','<?php echo ($m["pid"]); ?>','<?php echo ($m["level"]); ?>');">－</a><!-- 
						--><a href="javascript:editDlg('<?php echo ($m["id"]); ?>','<?php echo ($m["name"]); ?>','<?php echo ($m["remark"]); ?>','1','<?php echo ($m["pid"]); ?>','<?php echo ($m["level"]); ?>','<?php echo ($c["remark"]); ?>');">Ｅ</a>
						</div><?php endforeach; endif; ?>
					</div><?php endforeach; endif; ?>
				</div><?php endforeach; endif; ?>
			</div>
		</div>
	</div>
	<!-- 弹出菜单 Start-->
	<div class="node-mask"></div>
	<!-- 添加菜单 Start-->
	<div class="node-dlg-add">
		<form name="addFrom" id="addFrom" accept-charset="utf-8" action="<?php echo U('Admin/Node/add');?>" method="post">
			<table class="admin-tab" width="450px">
				<tbody>
				<div class="node-dlg-title">添加节点
					<div class="node-dlg-title-close"><a href="javascript:closeAddDlg();" title="关闭" >×</a></div>
				</div>
					<tr>
						<th><span class="require-red">*</span>节点名称：</th>
						<td>
							<input class="common-text" type="text" id="node_name" name="node_name" size="20" value="">
							</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>节点描述：</th>
						<td>
							<input class="common-text" type="text" id="node_remark" name="node_remark" size="40" value="">
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>是否启用：</th>
						<td>
							<input class="common-text" id="node_status" name="node_status" value="1" type="radio" checked = "checked">开启
								<input class="common-text" id="node_status" name="node_status" value="0" type="radio">关闭
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>父&ensp;节&ensp;点：</th>
						<td>
							<input class="common-text" type="hidden" id="node_pid" name="node_pid" size="20" value="1">
							<input class="common-text" type="text" id="parent_name1" size="20" value="" readonly="true">
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>应用级别：</th>
						<td>
							<input class="common-text" type="text" id="node_level" name="node_level" size="20" value="1" readonly="true">
						</td>
						</tr>
					<tr>
						<th colspan="2">
							<input type="submit"class="btn btn-primary btn6 mr10" value="添加" id="add"> 
							<input type="reset"	class="btn btn-primary btn6 mr10" value="重置">
						</th>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
	<!-- 修改菜单 Start-->
	<div class="node-dlg-edit">
		<form name="addFrom" id="addFrom" accept-charset="utf-8" action="<?php echo U('/Admin/Node/edit');?>" method="post">
			<input type="hidden" id="edit_id" name="node_id" value="0">
			<table class="admin-tab" width="450px">
				<tbody>
				<div class="node-dlg-title">修改节点
					<div class="node-dlg-title-close"><a href="javascript:closeEditDlg();" title="关闭" >×</a></div>
				</div>
					<tr>
						<th><span class="require-red">*</span>节点名称：</th>
						<td>
							<input class="common-text" type="text" id="edit_name" name="node_name" size="20" value="">
							</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>节点描述：</th>
						<td>
							<input class="common-text" type="text" id="edit_remark" name="node_remark" size="40" value="">
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>是否启用：</th>
						<td>
							<input class="common-text" id="edit_status" name="node_status" value="1" type="radio" checked = "checked">开启
								<input class="common-text" id="edit_status" name="node_status" value="0" type="radio">关闭
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>父&ensp;节&ensp;点：</th>
						<td>
							<input class="common-text" type="hidden" id="edit_pid" name="node_pid" size="20" value="1" readonly="true">
							<input class="common-text" type="text" id="parent_name2" size="20" value="" readonly="true">
						</td>
					</tr>
					<tr>
						<th><span class="require-red">*</span>应用级别：</th>
						<td>
							<input class="common-text" type="text" id="edit_level" name="node_level" size="20" value="1" readonly="true">
						</td>
						</tr>
					<tr>
						<th colspan="2">
							<input type="submit"class="btn btn-primary btn6 mr10" value="修改" id="add"> 
							<input type="reset"	class="btn btn-primary btn6 mr10" value="重置">
						</th>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
<!-- 弹出菜单 End -->
</body>
</html><file_sep>/Runtime/Cache/Admin/05e028d2fdcac36e7055e2e81468e3d1.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/admin.css" />
</head>
<body>
	<div class="topbar-wrap">
		<div class="topbar-inner">
			<div class="topbar-logo-wrap">
				<h4 class="topbar-logo"><?php if($username != ''): echo ($username); else: ?>未登陆<?php endif; ?></h4>
			</div>
		</div>
	</div>
	<div class="sidebar-wrap">
		<div class="sidebar-content">
			<ul class="sidebar-list">
				<?php if($super||in_array("/Admin/Role",$paths)||in_array("/Admin/Node",$paths)||in_array("/Admin/Access",$paths)||in_array("/Admin/Verify",$paths)){ ?>
				<li><a href="#"><i class="icon-font">&#xe018;</i>访问权限</a>
					<ul class="sub-menu">
						<?php if($super||in_array("/Admin/Role",$paths)){ ?><li><a href="<?php echo U('/Admin/Role');?>"><i class="icon-font">&#xe014;</i>角色管理</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Node",$paths)){ ?><li><a href="<?php echo U('/Admin/Node');?>"><i class="icon-font">&#xe016;</i>节点管理</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Access",$paths)){ ?><li><a href="<?php echo U('/Admin/Access');?>"><i class="icon-font">&#xe020;</i>权限设置</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Verify",$paths)){ ?><li><a href="<?php echo U('/Admin/Verify');?>"><i class="icon-font">&#xe015;</i>申核用户</a></li><?php } ?>
					</ul>
				</li>
				<?php } ?>
				<?php if($super||in_array("/Admin/Welcome",$paths)){ ?>
				<li><a href="#"><i class="icon-font">&#xe031;</i>移动端管理</a>
					<ul class="sub-menu">
						<?php if($super||in_array("/Admin/Welcome",$paths)){ ?><li><a href="<?php echo U('/Admin/Welcome');?>"><i class="icon-font">&#xe048;</i>欢迎界面广告</a></li><?php } ?>
						<?php if($super||in_array("/Admin/HomeShop",$paths)){ ?><li><a href="<?php echo U('/Admin/HomeShop');?>"><i class="icon-font">&#xe048;</i>首页商家推荐</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Product/find",$paths)){ ?><li><a href="<?php echo U('/Admin/Product/find');?>"><i class="icon-font">&#xe050;</i>首页产品推荐</a></li><?php } ?>
					</ul>
				</li>
				<?php } ?>
				<?php if($super||in_array("/Admin/Attr",$paths)||in_array("/Admin/Type",$paths)||in_array("/Admin/Product/find",$paths)||in_array("/Admin/Product",$paths)){ ?>
				<li><a href="#"><i class="icon-font">&#xe031;</i>商品管理</a>
					<ul class="sub-menu">
						<?php if($super||in_array("/Admin/Attr",$paths)){ ?><li><a href="<?php echo U('/Admin/Attr');?>"><i class="icon-font">&#xe048;</i>商品属性</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Type",$paths)){ ?><li><a href="<?php echo U('/Admin/Type');?>"><i class="icon-font">&#xe048;</i>商品分类</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Product/find",$paths)){ ?><li><a href="<?php echo U('/Admin/Product/find');?>"><i class="icon-font">&#xe050;</i>商品查询</a></li><?php } ?>
						<?php if($super||in_array("/Admin/Product",$paths)){ ?><li><a href="<?php echo U('/Admin/Product');?>"><i class="icon-font">&#xe026;</i>添加商品</a></li><?php } ?>
					</ul>
				</li>
				<?php } ?>
				<li><a href="#"><i class="icon-font">&#xe014;</i>用户管理</a>
					<ul class="sub-menu">
						<?php if($username!=null){ ?><li><a href="#"><i class="icon-font">&#xe002;</i>修改资料</a></li><?php } ?>
						<li><a href="<?php echo U('/Admin/Register');?>"><i class="icon-font">&#xe026;</i>注册商店</a></li>
						<li><a href="<?php echo U('/Admin/Login/logout');?>"><?php if($username != ''): ?><i class="icon-font">&#xe059;</i>退出登陆<?php else: ?><i class="icon-font">&#xe014;</i>登陆帐号<?php endif; ?></a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
</body>
</html><file_sep>/Apps/Admin/Public/js/admin-role.js
$(document).ready(function() {
	$('#add').click(function() {
		if ($('#role_name').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#role_name').focus();
			return false;
		}
		if ($('#role_remark').val() == "") {
			// alert("请选择分类！");
			// document.getElementById("message").innerHTML = "名称不能为空！";
			$('#role_remark').focus();
			return false;
		}
		$('#addfrom').submit();
	});
});

function postdel(s1,s2,s3,s4,s5) {
	$.ajax({
		url: delurl,
		type: 'post',
		data: "id="+s1+"&name="+s2+"&pid="+s3+"&status="+s4+"&remark="+s5,
		success: function(){
			parent.location.reload();
			window.location.reload();
		},
		dataType: 'html'
	});
} 

function poststatus(s1,s2,s3,s4,s5) {
	$.ajax({
		url: statusurl,
		type: 'post',
		data: "id="+s1+"&name="+s2+"&pid="+s3+"&status="+s4+"&remark="+s5,
		success: function(){
			parent.location.reload();
			window.location.reload();
		},
		dataType: 'html'
	});
} 




<file_sep>/Apps/Common/Model/ProductAllModel.class.php
<?php
namespace Common\Model;
use Think\Model\RelationModel;
class ProductAllModel extends RelationModel{
	//定义主表
	protected $tableName = 'product';
	
	//定义关联关系
	protected $_link = array(
		'imgurl' => array(    
				'mapping_type'  => self::HAS_ONE,   
				'class_name'    => 'product_imgurl', 			//要关联的模型类名  
				'foreign_key'   => 'product_id',    			//关联的外键名称
// 				'mapping_name'  => 'articles',
				'mapping_name'  => 'imgurl',
				'mapping_order' => 'product_id desc',   		//关联查询的排序
// 				'mapping_fields'=> 'imageurl',
				'as_fields'=>'imgurl',
		),
		'pattr'=>array(
				'mapping_type' => self::MANY_TO_MANY,
				'class_name'  =>  'pattr',
				'foreign_key'=>'product_id',
				'relation_key'=>'pattr_id',
				'relation_table'=>'fz_product_pattr',
				'mapping_fields'=>'name,color',
		),
			
		'ptype_name'=>array(
				'mapping_type'  => self::BELONGS_TO,
				'class_name'    => 'ptype', 			//要关联的模型类名
				'foreign_key'   => 'ptype_id',    			//关联的外键名称
// 				'mapping_name'  => 'ptype_name',
				'mapping_fields'=> 'ptype_name',
				'as_fields'=>'ptype_name',
		),
			
	);
}<file_sep>/Apps/API/Controller/UserController.class.php
<?php

namespace API\Controller;

use Think\Controller;
/**
 * 移动端登陆验证
 * @author FlyZebra
 *
 */
class UserController extends Controller {
	
	public function index() {
	}
	/**
	 * 注册用户
	 */
	public function register() {
		if (! IS_POST) $this->error("页面不存在！");
		//如果传入的参数没有帐号和密码这两个参数，直接结束。
		if($_POST['loginname']==""&&$_POST['loginword']=="") die("us empty");
		//导入自定义User处理类
		import("Cls.User",APP_PATH);
		//用户名已存在返回错误信息。
		if(\User::verifyName("user", $_POST['loginname'])) die("us exist");
		//向数据表插入新用户数据。
		$data=\User::insertUser("user", $_POST);
		if(!$data) die("注册帐号失败，请重试！");
		//插入成功，更新用户登陆信息
		$log=\User::insertLog("user_log", $data["id"]);
		if(!$log) die("注册帐号成功，请登陆！");
		// 返回包含用户信息的json字符串
		\User::echoUserJson( $data, $log );
	}
	
	/**
	 * 验证登陆信息
	 */
	public function login() {
		if (!IS_POST) $this->error("页面不存在！");
		import("Cls.User",APP_PATH);
		
		// 使用客户端注册用户登陆
		if ($_POST ['loginname']){
			$data = \User::verifyUser("user", $_POST['loginname'], $_POST['loginword']);
			if($data == -1) die("no user");
			if($data == 0) die("pw error");
			//验证通过，更新用度等级//因为用用户登陆次数来判断用户等级
			if (!(\User::upUserLevel ('user', $data)))	die("更新数户数据出错，请重试！");
			// 更新用户登陆信息
			$log = \User::insertLog ( "user_log", $data ["id"] );
			if (! $log)	die( "更新用户信息出错，可能服务器连接超时，请重试！" );
			\User::echoUserJson( $data, $log );
		}	

		// 使用QQ第三方登陆,使用BAIDU第三方登陆
		elseif ($_POST ['loginwith'] == "QQ" || $_POST ['loginwith'] == "BAIDU") {
			// 如果已经注册返回已数据表中的已有用户信息
			$data = M('user')->where ( array('openid'=>$_POST['openid']) )->find ();
			// 如果QQ方式没有注册则注册新用户。这里为什么会超时?
			if(!$data){
				$data=\User::insertUser("user", $_POST);
				if(!$data) die("注册帐号失败，请重试！");
			}else {
				if (!(\User::upUserLevel ('user', $data)))	die("更新数户数据出错，请重试！");
			}
			$log = \User::insertLog ( "user_log", $data ["id"] );
			if (! $log)	die( "更新用户信息出错，可能服务器连接超时，请重试！" );
			\User::echoUserJson( $data, $log );
		}	
		
		// 使用SINA第三方登陆
		elseif ($_POST ['loginwith'] == "SINA") {
		}
		
		
	}
	
	/**
	 * 更新用户登陆信息
	 */
	public function upLoginInfo() {
		if (! IS_POST)	die ();
		//导入自定义User处理类
		import("Cls.User",APP_PATH);
		$data = M("user")->where(array('id'=>$_POST['id']))->find();
		//验证通过，更新用度等级//因为用用户登陆次数来判断用户等级
		if (!(\User::upUserLevel ('user', $data)))	die ("更新数户数据出错，请重试！");
		// 更新用户登陆信息
		$log = \User::insertLog ( "user_log", $data ["id"] );
		if (! $log)	die ( "更新用户信息出错，可能服务器连接超时，请重试！" );
		// 返回包含用户信息的json字符串
		\User::echoUserJson( $data, $log );
	}
	
}<file_sep>/Runtime/Cache/Admin/ff5284c55541268002e4c7802b5ab64b.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理-商品管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-product.js"></script>
</head>
<body>
<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">添加商品</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<form action="<?php echo U('/Admin/Product/add');?>" method="post" id="addFrom" name="addFrom" enctype="multipart/form-data">
				<table class="insert-tab" width="100%">
					<tbody>
						<tr>
							<th width="120"><span class="require-red">*</span>商品类型：</th>
							<td><select name="ptype_id" id="ptype_name" class="select_type">
									<option value="">===请选择分类===</option>
									<?php if(is_array($ptype)): foreach($ptype as $key=>$v): ?><option value="<?php echo ($v["id"]); ?>"><?php echo ($v["ptype_name"]); ?></option><?php endforeach; endif; ?>
							</select></td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>商品属性：</th>
							<td>
								<div name="checkbox_css" id = "checkbox_css">
									<?php if(is_array($pattr)): foreach($pattr as $key=>$v): ?><input  class="checkbox1" type="checkbox" name="pattr_id[]" id="pattr_id" value="<?php echo ($v["id"]); ?>">
										<span style="background:<?php echo ($v["color"]); ?>;color:#FFFFFF">[<?php echo ($v["name"]); ?>]</span>&emsp;<?php endforeach; endif; ?>
								</div>
							</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商品名称：</th>
							<td><input class="common-text" id="name" name="name"
								size="50" value="" type="text"></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商品价格：</th>
							<td><input class="common-text" id="price" name="price"
								size="15" value="" type="text">元</td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商品图像1：</th>
							<td><input class="common-text" name="proimg1" id="proimg1"
								type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span> <!--<input class="btn btn6" type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>-->
							</td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>商品图像2：</th>
							<td><input class="common-text" name="proimg2" id="proimg2"
								type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span> <!--<input type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>-->
							</td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>商品图像3：</th>
							<td><input class="common-text" name="proimg3" id="proimg3"
								type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span> <!--<input type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>--></td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>商品图像4：</th>
							<td><input class="common-text" name="proimg4" id="proimg4"
								type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span> <!--<input type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>--></td>
						</tr>
						<tr>
							<th><span class="require-red">&ensp;</span>商品图像5：</th>
							<td><input class="common-text" name="proimg5" id="proimg5"
								type="file" accept=".jpg,.png"><span class="require-red">支持格式PNG、JPG，分辨率：480*320。</span> <!--<input type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>--></td>
						</tr>
						<tr>
							<th><span class="require-red">*</span>商品描述：</th>
							<td><textarea name="describe" class="common-textarea"
									id="describe" cols="30" style="width: 98%;" rows="10"></textarea></td>
						</tr>
						<tr>
							<th></th>
							<td><input type="submit" class="btn btn-primary btn6 mr10"
								value="添加" id="addproduct"> <input type="reset"
								class="btn btn-primary btn6 mr10" value="重置"></td>
						</tr>
					</tbody>
				</table>
				<input type="hidden"  name="shopname" value="<?php echo ($shopname); ?>">
				<input type="hidden"  name="shop_id" value="<?php echo ($shop_id); ?>">
			</form>
		</div>
	</div>
</body>
</html><file_sep>/Runtime/Cache/Admin/9863cdbd814baf9e9ab93473c90cfc4b.php
<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技登陆界面</title>
<link rel="stylesheet" type="text/css" href="/myweb/xinyi/Apps/Admin/Public/css/login.css" />
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/md5.js"></script>
<script type="text/javascript"> var ajaxurl= '<?php echo U("/Admin/Ajax/log");?>'</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-login.js"></script>
</head>
<body>
<div class="login-mask"></div>
<div class="login-center">
	<form name="loginform" id="loginform" accept-charset="utf-8" action="<?php echo U('/Admin/Login/login');?>"  method="post">
		<table class="login-tab" width=100%>
			<tbody>
				<tr>
					<th colspan="2">管理员登陆</th>
				</tr>
				<tr>
					<td style="width:35%;text-align:right">帐号：</td>
					<td><input class="common-text" id="shopname" name="shopname" size="20" value="" type="text"></td>
				</tr>
				<tr>
					<td style="text-align:right">密码：</td>
					<td><input class="common-text" id="password" name="password" size="20" value="" type="password"></td>
				</tr>
				<tr>
					<th colspan="2" >
						<input type="button" class="btn btn-primary btn100" value="登陆" id="login"> 
						<input type="reset"  class="btn btn-primary btn100" value="重置"></th>
				</tr>
				<tr>
					<td style="text-align:center" colspan="2">
						<div id="message"></div>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
</body>
</html><file_sep>/Apps/API/Conf/config.php
<?php
return array(
	//'配置项'=>'配置值'
		'URL_ROUTER_ON'   => true,	// 开启路由
		'URL_ROUTE_RULES'=>array(
				'Product/id/:id'=>'API/Product/id',
				'Product/Type/:type'=>'API/Product/type',
		),
);<file_sep>/Apps/Admin/Public/js/admin-verify.js
function verify(s1) {
	openDlg();
	var s2 = $("#role"+s1).val();
	$.ajax({
		url: ajaxurl,
		type: 'post',
		data: "user_id="+s1+"&role_id="+s2,
		success: function(result) {
			parent.location.reload();
			window.location.reload();
		},
		dataType: 'html'
	});
}

function openDlg() {
	$('.dlg-content').fadeIn(100);
	$('.dlg-mask').fadeIn(100);
}

function closeDlg() {
	$('.dlg-content').fadeOut(100);
	$('.dlg-mask').fadeOut(100);
}
<file_sep>/Runtime/Cache/Admin/ebb58a319a155968b09ce38983312dae.php
<?php if (!defined('THINK_PATH')) exit();?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>宇翔科技后台管理</title>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/jquery-1.9.0.min.js"></script>
<script type="text/javascript">
	var ajaxurl = '<?php echo U("/Admin/Verify/verify");?>'
</script>
<script type="text/javascript" src="/myweb/xinyi/Apps/Admin/Public/js/admin-verify.js"></script>
</head>
<body>
	<div class="crumb-wrap">
			<span class="icon-font">&emsp;&ensp;<a href="<?php echo U('/Admin');?>">首页</a></span> 
			<span class="crumb-step">&gt; <a href="#">申核用户</a></span>
	</div>
	<div class="main-wrap">
		<div class="result-wrap">
			<table class="admin-tab" width="100%">
				<tbody align="right">
					<tr style="background: #efefef">
						<th width="5%">ID</th>
						<th width="10%">商店名称</th>
						<th width="8%">店主姓名</th>
						<th width="10%">店主手机</th>
						<th width="10%">商店电话</th>
						<th>商店地址</th>
						<th width="14%">注册时间</th>
						<th width="15%">申核操作</th>
					</tr>
					<?php if(is_array($shop)): foreach($shop as $key=>$s): ?><tr>
						<th><?php echo ($s["id"]); ?></th>
						<td><?php echo ($s["shopname"]); ?></td>
						<td><?php echo ($s["peoplename"]); ?></td>
						<th><?php echo ($s["peoplephone"]); ?></th>
						<th><?php echo ($s["shopphone"]); ?></th>
						<td><?php echo ($s["address"]); ?></td>
						<th><?php echo (date("Y-m-d H:i",$s["regtime"])); ?></th>
						<th><select style="padding-bottom: 5px; height: 26px; font-size: 14px" name="role<?php echo ($s["id"]); ?>" id="role<?php echo ($s["id"]); ?>">
								<option>未申核</option>
								<?php if(is_array($role)): foreach($role as $key=>$r): if($r['id'] == $s['role_id']): ?><option value="<?php echo ($r["id"]); ?>" selected="selected"><?php echo ($r["remark"]); ?></option>
								<?php else: ?>
								<option value="<?php echo ($r["id"]); ?>"><?php echo ($r["remark"]); ?></option><?php endif; endforeach; endif; ?>
							</select><input type="button" class="btn btn-primary" value="通过申核" onclick="javascript:verify('<?php echo ($s["id"]); ?>');">
						</th>
					</tr><?php endforeach; endif; ?>
				</tbody>
			</table>
		</div>
	</div>
	<div class="dlg-mask"></div>
	<!-- 添加菜单 Start-->
	<div class="dlg-content">正在向服务器提交请求.....</div>
</body>
</html>