<?php
error_reporting(0);
session_start();
include_once '../comm/config.php';
include_once '../comm/checkpostandget.php';
include_once '../comm/wjt.php';
include_once 'check.php';

$q = "SELECT * FROM ".$BIAOTOU."user where ddusername='".$_SESSION["duoduouser"]."'";
$rs = mysql_query($q);
$row = mysql_fetch_object($rs);
$money=$row->money;
$jifen=$row->jifen;
$yitixian=$row->yitixian;
$zfb=$row->zfb;
$dengji=$row->dengji;
$txstate=$row->txstate;
$ddpassword=$row->ddpassword;

$sql="select ortheruserid from ".$BIAOTOU."apilogin where dduserid=".$_SESSION["dduserid"].' limit 1';
$rs = mysql_query($sql);
$row = mysql_fetch_object($rs);
$ortheruserid=$row->ortheruserid;

$name=$_SESSION['duoduouser'];
$sql="select addtime from ".$BIAOTOU."mingxi where ddusername='".$name."' and shijian='每日签到' order by Id desc";
$query=mysql_query($sql);
$row=mysql_fetch_array($query);
$addtime=$row['addtime'];
if($addtime<date('Y-m-d 00:00:00')){
	$sing=1;
}
else{
	$sing=0;
}

// 显示编辑页面，页面中包含 camera.swf
$uid = intval($_SESSION['dduserid']);
$urlAvatarMiddle = get_avatar_filepath($uid, $size = 'middle', $type = '');

$tag="center";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>用户管理中心</title>
<link href="/template/<?=MOBAN?>/css/usercss.css" rel="stylesheet" type="text/css">
<link href="/template/<?=MOBAN?>/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/template/<?=MOBAN?>/js/jquery.js"></script>
<script>
$(function(){
$('#sign').click(function(){
    $.post('../ajax.php?fun=sign',function(data){
	    if(data==1){
		    alert('签到完成');
			var money=parseFloat($('.content .userinfo .money').html());
			money=Math.floor(money * 100) / 100;
			$('.content .userinfo .money').html(money+<?=SIGNMONEY?>);
			$('.content .userinfo .jifen').html(parseInt($('.content .userinfo .jifen').html())+<?=SIGNJIFEN?>);
			$('#sign').text('签到完成');
		}
		else{
		    alert('您今天已经签到');
		}
	});
});
})

</script>
</head>

<body id="usercenter">
<?php
include("../template/".MOBAN."/header.tpl.php");
?>
<?php
include("../template/".MOBAN."/nav.tpl.php");
?>
<DIV style="MARGIN-TOP: 25px"></DIV>
<div id="main">
<DIV class=white_top>
<DIV class=white_top_left></DIV>
<DIV class=white_top_middle></DIV>
<DIV class=white_top_right></DIV></DIV>
<DIV class=white_bg_rl>
<?php
include("left.php");
?>
<DIV class=accright>
<H3><IMG src="/template/<?=MOBAN?>/images/miaomiao_laba.gif">您好，<?=$_SESSION["duoduouser"]?>！欢迎回来，<?php echo WEBNICK?>已为您节省<FONT 
size=+0>0.00</FONT>元<SPAN><FONT class=nobold></FONT></SPAN></H3>
<DIV class=acctix>
<DIV class=acctixt></DIV>
<DIV class=acctixc>
<DIV class=ljtxl>
<H2>您的返现情况：</H2>
<P>账户余额 <FONT size=+0><?=number_format($money,2)?></FONT> 元<BR><A hideFocus 
href="/user/tixian.php"></A></P></DIV>
<DIV class=ljtxr>
<DIV class=tishi><B>当前积分：<?=$jifen?><A hideFocus href="/huan.php"> 
兑换商品</A></B><BR>
<P>会员等级：<?php if($dengji<DENGJI1) echo "<img src=\"../images/v0.gif\"  alt=\"普通会员\" />";else if($dengji>=DENGJI1&&$dengji<DENGJI2) echo "<img src=\"../images/v1.gif\"  alt=\"黄金会员\"/>";else if($dengji>=DENGJI2&&$dengji<DENGJI3) echo "<img src=\"../images/v2.gif\" alt=\"白金会员\"  />";  else echo "<img src=\"../images/v3.gif\" alt=\"钻石会员\" />";?> ;成长值： <?=$dengji?>点</P><BR>
<P><?php
if($txstate=='1'){
	echo "<font color=#dd0000>您当前有一笔提现申请正在处理当中，我们将支付到您的支付宝中，请注意查收！</font> <a href=\"mingxilist.php?act=out\">>>查看详细</a>";
}else{
	if($money==0){
		echo "<font color=#118c22>感谢您使用".WEBTITLE."，当您购物累积获得返现超过".TIXIANJE."元，就可以申请提现。祝您购物愉快！</font>";
	}elseif($money<TIXIANJE){
		echo "您当前的账户余额是 <em>".$money."</em> 元，还差 <em>".(TIXIANJE-$money)."</em> 元就可以申请提现了！";
	}else{
		echo "您当前的账户余额是 <em>".$money."</em> 元，可以申请提现了！&nbsp;&nbsp;&nbsp;&nbsp;<input name=\"tx\" onclick=\"window.location='tixian.php'\" value=\"申请提现\" class=smt type=\"button\" />";
	}
}
?></P></DIV></DIV></DIV>
<DIV class=acctixb></DIV></DIV>
<DIV class=accshq>
<DIV class=accshqt></DIV>
<DIV class=accshqc>
<H2>&nbsp;如何通过<?php echo WEBNICK?>拿返现？</H2>
<P>1.登录<?php echo WEBNICK?>查商品或商家；<BR>2.找到商品去商家购物；<BR>3.回到<?php echo WEBNICK?>查看订单领取返现。</P>
<P style="TEXT-ALIGN: right"><A href="/help/faq.php" 
target=_blank><STRONG>查看新手帮助&gt;&gt;</STRONG></A></P></DIV>
<DIV class=accshqb></DIV></DIV>
<DIV class="accnav accnavnoline">
<H2 class=mart>最近的淘宝订单</H2>
<DIV class=spanl><A hideFocus class=wenzi 
href="/help/faq.php#hold" 
target=_blank>下单后为什么看不到返现?</A></DIV></DIV>
<DIV class="acctab accddtab acctabdd">
<TABLE border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TH>订单号/商品</TH>
    <TH>订单时间</TH>
    <TH>订单金额</TH>
    <TH>预计可返</TH>
    <TH>订单状态</TH></TR>
  <TR>
    <TD class="alignr noline" colSpan=8><A class=padd 
      href="/user/tradelist.php?act=taobao">全部订单&gt;&gt;&nbsp;&nbsp;</A></TD></TR></TBODY></TABLE>
<P>1.通过<?php echo WEBNICK?>在淘宝网下单，请及时确认收货，收货后30分钟内订单返回到这里。如不及时确认收货，订单将在7天后进行返回；<BR>2.除了淘宝网、卓越网外，其它合作网站一般5-10分钟后就能在这里查到订单返回信息；<BR>3.由于商城要保证订单付款并且没有退货，所以订单实际返现周期一般需要1~2个月，请您耐心等待。</P></DIV></DIV>
<DIV class=clear></DIV></DIV></div>
<DIV class=white_bottomm>
<DIV class=white_bottom_left></DIV>
<DIV class=white_bottom_middle></DIV>
<DIV class=white_bottom_right></DIV></DIV></DIV>
<?php
include("../template/".MOBAN."/footer.tpl.php");
mysql_close();
?>
</body>
</html>