<?
include("../config/conn.php");
include("../config/function.php");
sesCheck();
while0("*","yjcode_user where uid='".$_SESSION[SHOPUSER]."'");if(!$row=mysql_fetch_array($res)){php_toheader("un.php");}
$usertx="../upload/".$row[id]."/user.jpg";if(!is_file($usertx)){$usertx="img/nonetx.gif";}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="x-ua-compatible" content="ie=7" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户管理面板 - <?=webname?></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/personalCenter.css">
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<!--<link rel="stylesheet" type="text/css" href="css/gameListStyle.css">
<link rel="stylesheet" type="text/css" href="css/oldstyle.css">-->
<link rel="stylesheet" type="text/css" href="css/layui.css">
<script src="js/layer.js"></script>
<script src="js/navchoice.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.superslide.2.1.1.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/jquery.wallform.js"></script>
<script src="js/jquery.zclip.min.js"></script>
</head>
<body style="background:#f7f7f7;">
<? include("top.php");?>




<!--中间开始-->
<div class="personal_center main_wrap clear">
   <? include("left.php");?>
	<script>
    //添加提现账户
    function account(){
        $.ajax({
                url:'/Member/account.html',
                type:'post',
                dataType:'json',
                success:function(msg){
                                if(msg['status'] == 0){
                                    layer.confirm(msg['info'], {
                                      btn: ['现在就去','考虑一下'] //按钮
                                    }, function(){
                                         //去实名认证
                                    location.href="/Memberorder/realname.html";
                                    }, function(){
                                        
                                    });
                                }else if(msg['status'] == 1){
                                    location.href="/Member/account.html";
                                }
                }
            });
    }

/* 	function editpwd(){
        // var index = layer.msg('正在跳转，请稍等...',{icon: 0,shade:0.5,shadeClose:false,time:0}); 
				var data = {
					type:4
				}
				$.ajax({
				url:'/Member/editpwd.html',
				type:'post',
				data:data,
				dataType:'json',
				success:function(msg){
								if(msg['status'] == 1){
                                    setTimeout(function(){
                                        location.href="/Member/editpwd.html";
                                        // layer.close(index);
                                    },300);
								}else{
									setTimeout(function(){
                                        layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:2000,end:function(){
                                                location.href="/Memberorder/bindphone.html";
                                            }
                                        });
                                    },300);
								}
				}
			});
	} */
	
	function resetpaypwd(){
        // var index = layer.msg('正在跳转，请稍等...',{icon: 0,shade:0.5,shadeClose:false,time:0}); 
				var data = {
					type:3
				}
				$.ajax({
				url:'/Memberorder/resetpaypwd.html',
				type:'post',
				data:data,
				dataType:'json',
				success:function(msg){
								if(msg['status'] == 1){
                                    setTimeout(function(){
                                        location.href="/Memberorder/resetpaypwd.html";
                                        layer.close(index);
                                    },300);
								}else if(msg['status'] == 2){
                                     setTimeout(function(){
                                        layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:2000,end:function(){
                                                location.href="/Memberorder/setpaypwd.html";
                                            }
                                        });
                                    },1000);
									
								}else if(msg['status'] == 0){
                                    setTimeout(function(){
                                        layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:2000,end:function(){
                                                location.href="/Memberorder/bindphone.html";
                                            }
                                        });
                                    },300);
									
								}
				}
			});
	}
	
	function setpaypwd(){
        // var index = layer.msg('正在跳转，请稍等......',{icon: 0,shade:0.5,shadeClose:false,time:0}); 
				var data = {
					type:2
				}
				$.ajax({
				url:'/Memberorder/setpaypwd.html',
				type:'post',
				data:data,
				dataType:'json',
				success:function(msg){
								if(msg['status'] == 1){
									setTimeout(function(){
                                        location.href="/Memberorder/setpaypwd.html";
                                        layer.close(index);
                                    },300);
								}else{
                                    setTimeout(function(){
                                        layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:2000,end:function(){
                                                location.href="/Memberorder/bindphone.html";
                                            }
                                        });
                                    },300);
								}
				}
			});
	}
    //我的店铺
    function my_shop(){
        //var index = layer.msg('正在检测安全环境，请稍等...',{icon: 0,shade:0.5,shadeClose:false,time:0}); 
        var data = {
                    type:6
        }
        $.ajax({
            url:'/Publish/index.html',
            type:'post',
            data:data,
            dataType:'json',
            success:function(msg){
                            if(msg['status'] == 1){          
                                setTimeout(function(){
                                    //layer.close(index);
                                    location.href="/Seller/shop.html";
                                },200);
                            }else if(msg['status'] == 2) {
                                setTimeout(function(){
                                    layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:3000,end:function(){
                                        location.href="/Seller/index.html";
                                        }
                                    }); 
                                },200);
                            }else if(msg['status'] == 3){
                                setTimeout(function(){       
                                     layer.msg(msg['info'], {icon: 5}); 
                                },200);
                            }else if(msg['status'] == 4){
                                setTimeout(function(){
                                    layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:3000,end:function(){
                                        location.href="/Memberorder/realname.html";
                                        }
                                    }); 
                                },200);
                            }
                        }
            });
    }

	  function Withdrawcash(){
        var index = layer.msg('正在跳转，请稍等...',{icon: 0,shade:0.5,shadeClose:false,time:0}); 
				var data = {
					type:1
				}
				$.ajax({
				url:'/Withdrawcash/index.html',
				type:'post',
				data:data,
				dataType:'json',
				success:function(msg){
								if(msg['status'] == 1){
									setTimeout(function(){
                                        layer.close(index);
                                        location.href="/Withdrawcash/index.html"
                                    },1000);
								}else{
                                    setTimeout(function(){
                                        layer.msg(msg['info'], {icon: 5,shade:0.5,shadeClose:false,time:2000,end:function(){
                                                location.href="/Withdrawcash/index.html";
                                            }
                                        });
                                    },1000);    
								}
				}
			});
		}
	</script>


<!--订单刷新-->
<script type="text/javascript" language="javascript">  
    $(document).ready(function () {  
        // setInterval("startRequest()", 3000);  
        setTimeout("startRequest()", 3000);
    });  
    function startRequest() {  

        // alert(222);
        $.ajax({
            url:'/ajax/RefreshOrders.html',
            type:'post',
            dataType:'json',
            success:function(msg){
            if(msg['status'] == 1){
                //声音1
                playSound();

                //弹窗1
                layer.confirm(msg['info'], {
                  btn: ['朕知道了'] //按钮
                }, function(){
                  layer.msg('请记得及时处理哦', {icon: 1});
                  confirm();

                });
            }else if(msg['status'] == 2){
                //声音2
                playSound();
                //弹窗2
                layer.confirm(msg['info'], {
                  btn: ['朕知道了'] //按钮
                }, function(){
                  layer.msg('开始赚钱吧，Go Go Go', {icon: 1});
                  pass(msg['yz']);
                });
            }
            }
       });
    }
    function confirm(){
        $.ajax({
            url:'/ajax/confirm.html',
            type:'post',
            dataType:'json',
            success:function(msg){
            if(msg['status'] == 1){
              setTimeout('location.href="/Seller/shoporders/type/3.html"',2000);
            }else{
               layer.msg('处理失败，请联系客服管理员', {icon: 5});
            }
            }
           
       });
    }
    
    function pass(id){
        $.ajax({
            url:'/ajax/pass.html',
            type:'post',
            data:{'id': id},
            dataType:'json',
            success:function(msg){
            if(msg['status'] == 1){
                setTimeout('location.href="/member/index.html"',1000);
            }
            }
       });
    }

    //使用 audio 和 embed 实现浏览器兼容的网页声音播放
        
        function playSound()  
        {  
            
            var borswer = window.navigator.userAgent.toLowerCase();  
            if ( borswer.indexOf( "ie" ) >= 0 )  
            {  
                
                //IE内核浏览器  
                var strEmbed = '<embed name="embedPlay" src="/Template/pc/Home/Public/static/sound/2478.wav" autostart="true" hidden="true" loop="false"></embed>';  
                if ( $( "body" ).find( "embed" ).length <= 0 )  
                    $( "body" ).append( strEmbed );  
                var embed = document.embedPlay;  
  
                //浏览器不支持 audion，则使用 embed 播放  
                embed.volume = 100;  
                embed.play();  
            } else  
            {  
                
                //非IE内核浏览器  
                var strAudio = "<audio id='audioPlay' src='/Template/pc/Home/Public/static/sound/2478.wav' hidden='true' type='audio/mpeg' ></audio> ";  
                
                if ( $( "body" ).find( "audio" ).length <= 0 )  
                    $( "body" ).append( strAudio );  
                var audio = document.getElementById( "audioPlay" );  
                
                //浏览器支持 audion  
                audio.play();  
            }  
        }  
</script> 









    <!--右侧主体-->
    <div class="center-body">
	
        <div class="welcomeback">
            <div class="s_logo">
                <img src="imgg/s_logo.png" alt="">
            </div>
            <div class="s_title">
                <span>个人中心</span>
            </div>
			<div class="load_add">
				<img src="imgg/nav_log.png">
				<div class="load_status">
				<?
 while1("*","yjcode_loginlog where userid=".$row[id]." and admin=1 order by id desc limit 2");$row1=mysql_fetch_array($res1);$psj=$row1[sj];$puip=$row1[uip];
 if($row1=mysql_fetch_array($res1)){$psj=$row1[sj];$puip=$row1[uip];}
 ?>
 
					<p>您上次登录时间:
                        <i>
                            <?=$psj?>                                                    </i>
                    </p>
					<p>上次登录IP:
                        <i><?=$puip?></i><span></span>
                         
                    </p>
				</div>
				
			</div>
        </div>
        <div class="center-body-style user_acc clear">
        
			<div class="iright2">
			<div class="center_left fl">
				<div class="center_l_wrap">
					   <a href="touxiang.php" title="修改头像">
							<img src="<?=$usertx?>" alt="<?=$row[nc]?>">
							                        </a>
					<div class="center_l_text">
						<h3><?=$row[nc]?></h3>
						<li class="l3">
 <a href="mobbd.php"><? if(1==$row[ifmot]){?><img src="img/sj1.gif" title="手机已通过认证" /><? }else{?><img src="img/sj0.gif" title="手机未认证" /><? }?></a>
 <a href="emailbd.php"><? if(1==$row[ifemail]){?><img src="img/yx1.gif" title="邮箱已通过认证" /><? }else{?><img src="img/yx0.gif" title="邮箱未认证" /><? }?></a>
 </li>
						
					</div>
				</div>
			</div></div>
			<div class="center_mid fl">
				<div class="center_m_wrap">
					<p>帐户余额：<span><?=sprintf("%.2f",$row[money1])?></span>元</p>
					<p>冻结资金：<span id="idl3" class="feng"></span>元</p>
					<p>可用积分：<span><?=$row[jf]?></span>个</p>
				</div>
			</div>
			<div class="center_right fl">
				<div class="center_r_wrap">
					<h2>快速入口</h2>
					<ul class="clear">
						<li>
							<a href="pay.php">
								<img src="imgg/cz.png" alt="">
								<span>充值</span>
							</a>
						</li>
						
						<li>
							<a href="tixian.php">
								<img src="imgg/tx.png" alt="">
								<span>提现</span>
							</a>
						</li>
						
						<li>
							<a href="product/">
								<img src="imgg/ib.png" alt="">
								<span>我要买</span>
							</a>
						</li>
						
						<li>
							<a href="productlx.php">
								<img src="imgg/is.png" alt="">
								<span>我要卖</span>
							</a>
						</li>
					</ul>
				</div>
			</div>
        </div>
 <? 
  $sj=date("Y-m-d H:i:s");
  while1("id,uid,pwd,shopzt,dqsj","yjcode_user where uid='".$_SESSION[SHOPUSER]."'");$row1=mysql_fetch_array($res1);
  if($sj>$row1[dqsj] && !empty($row1[dqsj])){updatetable("yjcode_user","shopzt=4 where shopzt=2 and id=".$row1[id]);}
  if(empty($pdpwd)){if(strcmp(sha1("123456"),$row1[pwd])==0){Audit_alert("您的密码为123456，请立即修改","pwd.php");}}
  if(2!=$row1[shopzt] && 4!=$row1[shopzt]){
  ?>

   <? }elseif(4==$row1[shopzt]){?>
  
 
  <? }else{?>

		<div class="sell_warn">
			<div class="user_acc_left_top mi_tit">
                <h2><span></span>卖家提醒</h2>
            </div>
            <div class="sell_warn_box hi-icon-effect-1 hi-icon-effect-1b">
                <div onselectstart="return false" class="alert_box1">
                    <!-- <b class="bor_rad" > -->
                        <a href="sellorder.php?ddzt=wait" class="circle1 hi-icon"><?=returncount("yjcode_order where selluserid=".$row1[id]." and ddzt='wait'")?></a>
                    <!-- </b> -->
                    <span>
                        <a href="sellorder.php?ddzt=wait">等待发货</a>
                    </span>
                </div>
                <div onselectstart="return false" class="alert_box2">
                    <!-- <b class="bor_rad"> -->
                        <a href="sellorder.php?ddzt=wpay" class="circle2 hi-icon"><?=returncount("yjcode_order where selluserid=".$row1[id]." and ddzt='wpay'")?></a>
                    <!-- </b> -->
                    <span>
                        <a href="sellorder.php?ddzt=wpay">等待付款</a>
                    </span>
                </div>
                <div onselectstart="return false" class="alert_box3">
                    <!-- <b class="bor_rad"> -->
                        <a href="sellorder.php?ddzt=back" class="circle3 hi-icon"><?=returncount("yjcode_order where selluserid=".$row1[id]." and ddzt='back'")?></a>
                    <!-- </b> -->
                    <span>
                        <a href="sellorder.php?ddzt=back">退款申请</a>
                    </span>
                </div>
            </div>
			        </div>
					
					
					<? }?>
 		
		<!--RB-->
<div class="iright">


 <!--推广B-->
  <div class="rzts">
 <div class="user_acc_left_top mi_tit">
                <h2><span></span>推广赚钱</h2>
            </div>
 <div class="tuig">
 <ul class="u1">
 <li class="l1">每笔<strong><? if(empty($rowcontrol[tjmoney])){echo 0;}else{echo $rowcontrol[tjmoney]*100;}?>%</strong>做为佣金</li>
 <li class="l2"><input type="text" onclick="this.select();" value="<?=weburl?>reg/reg.php?tid=<?=$row[id]?>" /></li>
 </ul>
 </div></div>
 <!--推广E-->
 
 <!--提示B-->
 <div class="rzts">
<div class="user_acc_left_top mi_tit">
                <h2><span></span>个人信息安全服务</h2>
            </div>
 
 <? if(1==$row[sfzrz]){$a="ok";}else{$a="err";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">实名认证</li>
 <li class="l2">通过实名认证将有助于我们为您提供更好的服务</li>
 <li class="l3"><a href="smrz.php">查看</a></li>
 </ul>

 <? if(1==$row[ifmot]){$a="ok";}else{$a="err";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">手机绑定</li>
 <li class="l2">将您的手机绑定在您注册时的帐号上，提高帐户及资金安全性</li>
 <li class="l3"><a href="mobbd.php">查看</a></li>
 </ul>
 
 <? if(empty($row[txyh]) || empty($row[txname]) || empty($row[txzh])){$a="err";}else{$a="ok";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">收款帐号设置</li>
 <li class="l2">您在本站有资金收入时，我们将通过你的收款帐号汇款给你</li>
 <li class="l3"><a href="txsz.php">查看</a></li>
 </ul>
 
 <? if(1==$row[ifemail]){$a="ok";}else{$a="err";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">常用邮箱绑定</li>
 <li class="l2">当你忘记登录密码时，可以通过邮箱找回密码</li>
 <li class="l3"><a href="emailbd.php">查看</a></li>
 </ul>
  
 <? if(strcmp(sha1("admin"),$row[pwd])==0 || strcmp(sha1("123456"),$row[pwd])==0 || strcmp(sha1("admin888"),$row[pwd])==0){$a="err";}else{$a="ok";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">登录密码</li>
 <li class="l2">英文加数字或符号的组合密码，安全性更高，建议定期更换密码</li>
 <li class="l3"><a href="pwd.php">查看</a></li>
 </ul>
 
 <? if(1==$row[ifqq]){$a="ok";}else{$a="err";}?>
 <ul class="u1">
 <li class="l1 <?=$a?>">QQ绑定</li>
 <li class="l2">绑定QQ，以后可以用QQ一键登录，无需再输入帐号密码</li>
 <li class="l3"><a href="qq.php">查看</a></li>
 </ul>
  
 <? if(!empty($row[uqq]) && !empty($row[weixin])){$a="ok";}else{$a="err";}?>
 <ul class="u1 u0">
 <li class="l1 <?=$a?>">联系方式</li>
 <li class="l2">补充完善您的个人基本资料，有助于我们更好为您提供服务</li>
 <li class="l3"><a href="inf<?=$_SESSION[FCWuserID]?>.php">查看</a></li>
 </ul>

 </div>
 <!--提示E-->


</div> 
<!--RE-->

     
    </div>
</div>
<!--中间结束-->
<br><br><br>









</body>
</html>