<?php
session_start(); 
include("sql/conn.php"); 

if (empty($_SESSION['name'])){
	header("Location: ../index.php");
    $_GET['id'] = "";
	include("sql/close.php"); 
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php include("adm/all/gjz.txt"); ?> 签到</title>
<meta name="description" content="<?php include("adm/all/description.txt"); ?> 签到" />
<meta name="keywords" content="<?php include("adm/all/gjz.txt"); ?>  签到" />
<link  href="css/css<?php include("adm/all/css.txt"); ?>.css" rel="stylesheet" type="text/css">
</head>

<body >
<div id="top">
<?php include("user.php");  ?>
</div>
<?php include("gh.php");  ?>
<div align="center">

<?php include("logo.php");  ?>

<div id="dh" ><?php 
 if(file_exists("dh1.php"))
 {
include("dh1.php"); 
 }
 else
 {
include("action/dh1.php"); 
 }
?></div>




<?php 
 if(file_exists("top.php"))
 {
include("top.php"); 
 }
 else
 {
include("action/top.php"); 
 }
?>

</div>



<div align="center">
<div id="nr">

<style>
td{font-size:9pt;word-break: break-all}
.corner{font-size:0;}
.corner_bo{background:blue}
.corner_bg{background:#6699ff}
#tit{height:22px;color:white;}
#txt{line-height:150%;background:white;border:1px solid blue}
#tl,#tr,#bl,#br,#corner_tl,#corner_tr,#corner_bl,#corner_br{width:3px;height:3px}
#t,#b,#corner_t,#corner_b{height:3px}
#l,#r,#corner_l,#corner_r{width:3px}
</style>
<script src=corner.js></script>
<table cellpadding=0 cellspacing=0 width=400 align=center>
<tr><td id=tl></td><td id=t></td><td id=tr></td></tr>
<tr><td id=l></td>
<td id=box>
<table cellpadding=3 cellspacing=0 width=100%>
<tr id=tit><td>
<b>TTPK.NET免费发布 祝您心想事成！</b>
</td></tr>
<tr><td height=200 id=txt>
<p align="left">

<?php


echo $_SESSION['name'];
echo "您好！<br>您当前的积分为：[";
echo $_SESSION['jf']."]签到可以增加".$_SESSION['qf']."积分！<br>";

if ($_SESSION['paty']>0 )
echo "<b>您还可以获得游戏平台奖励分".$_SESSION['paty']."积分!</b><br>";

$noww = date('Ymd');
echo "当前日期是".$noww;
echo "<br>您上次签到日期是：".$_SESSION['today']."<br>";

if ($_SESSION['today']==$noww)
{
echo "您今天已经签到过了！";
}
else
{
$jf = $_SESSION['jf'] + $_SESSION['qf'] + $_SESSION['paty'];///////试验能不能签到加分！
$_SESSION['jf'] = $jf ;
$_SESSION['today'] = $noww;
mysql_query("UPDATE user SET today = '".$noww."' WHERE name = '".$_SESSION['name']."'");
mysql_query("UPDATE user SET jf = '".$jf."' WHERE name = '".$_SESSION['name']."'");
echo "签到成功！获得".$_SESSION['qf']."积分！";

if ($_SESSION['paty']>0 )
echo "<b>您还获得了游戏平台奖励分".$_SESSION['paty']."积分!</b>";

$jfzh = $_SESSION['qf'] + $_SESSION['paty'];
$iipp = $_SERVER["REMOTE_ADDR"];
$noww = time();
mysql_query("INSERT INTO text (name, time, ip, ing, f) 
VALUES ('".$_SESSION['name']."', '".$noww."', '".$iipp."', '签到', '+".$jfzh."')");

}

?>

</p>
<Br>
</td></tr></table>
</td>
<td id=r></td>
</tr>
<tr><td id=bl></td><td id=b></td><td id=br></td></tr>
</table>
<script>
function setcorner(id)
{
var html;
if(id=="t")
{
html="<table class=corner id=corner_t cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td></tr><tr><td class=corner_bg></td></tr><tr><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="b")
{
html="<table class=corner id=corner_b cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td></tr><tr><td class=corner_bg></td></tr><tr><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="l")
{
html="<table class=corner id=corner_l cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="r")
{
html="<table class=corner id=corner_r cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="tl")
{
html="<table class=corner id=corner_tl cellpadding=0 cellspacing=0>"
html+="<tr><td bgcolor=white></td><td bgcolor=white></td><td class=corner_bo></td></tr>"
html+="<tr><td bgcolor=white></td><td class=corner_bo></td><td class=corner_bg></td></tr>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg></td></tr>"
html+="</table>"
}
if(id=="tr")
{
html="<table class=corner id=corner_tr cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td bgcolor=white></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bo></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="bl")
{
html="<table class=corner id=corner_bl cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bo></td><td class=corner_bg></td><td class=corner_bg><td class=corner_bg></tr>"
html+="<tr><td bgcolor=white></td><td class=corner_bo></td><td class=corner_bg></td></tr>"
html+="<tr><td bgcolor=white></td><td bgcolor=white></td><td class=corner_bo></td></tr>"
html+="</table>"
}
if(id=="br")
{
html="<table class=corner id=corner_br cellpadding=0 cellspacing=0>"
html+="<tr><td class=corner_bg></td><td class=corner_bg></td><td class=corner_bo></td></tr>"
html+="<tr><td class=corner_bg></td><td class=corner_bo></td><td bgcolor=white></td></tr>"
html+="<tr><td class=corner_bo></td><td bgcolor=white></td><td bgcolor=white></td></tr>"
html+="</table>"
}
eval(id+".innerHTML=html")
}
function corner(border,bgcolor)
{
setcorner("tl")
setcorner("tr")
setcorner("bl")
setcorner("br")
setcorner("t")
setcorner("b")
setcorner("l")
setcorner("r")
corner_t.style.width=box.offsetWidth
corner_b.style.width=box.offsetWidth
corner_l.style.height=box.offsetHeight
corner_r.style.height=box.offsetHeight
box.style.background=bgcolor
}
corner("blue","#6699ff");
</script>




<div class="RoundedCorner">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<?php
include("ad/ad7.txt");
?>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>


</div></div>


<div class="clear"></div>




<?php 
 if(file_exists("foot.php"))
 {
include("foot.php"); 
 }
 else
 {
include("action/foot.php"); 
 }
?>
<?php
include("sql/close.php"); 
?>
</body>