

<?php
$result = mysql_query("SELECT * FROM user where name ='".$_SESSION['name']."'");
while($row = mysql_fetch_array($result))
  {
  $_SESSION['jf'] = $row['jf'];
  }////////重新查看积分值//////////  
?>


<?php 
if ($_SESSION['name']=="") 
{ ?>
<form action="dl.php" method="post">
<table class="table1">
  <tr>
    <td width="41"  align="center"><a href="index.php" title="回到首页">首 页</a></td>
    <td width="41"  align="center">用 户</td>
    <td><input class="buttx" type="text" name="name" /></td>
    <td width="41"  align="center">密 码</td>
    <td><input class="buttx" type="password" name="pass" /></td>
    <td width="41"  align="center">验 证</td>
    <td><input class="buttx" type="text" name="yzm" /></td>
	<td width="35"><div align="center">
	  <?php 
	$yzm = rand(1000,9999); 
	echo $yzm;
	$_SESSION['yzm'] = $yzm;
	?>
	</div></td>
    <td>&nbsp;</td>
    <td width="50"> <input class="butbg" type="submit" value="登陆" /></td>
    <td width="50" align="center"><a href="reg.php" title="注册新用户">注 册</a></td>
    <td width="118" align="center"><?php include("adm/all/ad.txt"); ?></td>
</tr></table>
</form>
<?php
}
else
{
echo "<a href=index.php title=回到首页>首页</a>  欢迎 ";
echo "<input type=text class=buttx disabled value=".$_SESSION['name']." size=11 />";
$userid = sprintf("%05d", $_SESSION['id']); 
echo " UID[".$userid."] ";
echo " 积分[".$_SESSION['jf']."] ";


echo " [<a href=qd.php title=签到可以增加".$_SESSION['qf']."积分！>签到</a>] ";
echo " [<A href=webfb.php title=发布网页游戏 >发布广告</A>] ";
echo " [<A href=http://bbs.ttpk.net title=提交各平台发布的文章 >提交文章</A>] ";
echo " [<a href=xpass.php title=修改密码和QQ号码等 >修改资料</a>] "; 
echo " [<a href=rz.php title=查看我的日志 >日志</a>] "; 
echo " [<a href=msn.php title=查看我的信件 >信件</a>] "; 
echo " [<a href=my.php title=查看我的广告并可做适当修改 >我的广告</a>] "; 
echo " [<a href=exit.php title=注销退出 >注销</a>] "; 

      if ($_SESSION['name']==$_SESSION['adm'] and $_SESSION['adm']!="") 
      {
	  echo " [<a  target=_blank  href=adm/other.php title=管理 >后台</a>] "; 
      }
      else
      {
      }
///echo "adm是[".$_SESSION['adm']."]签到得[".$_SESSION['qf']."]分，发布扣[".$_SESSION['fk']."]分。";
 include("adm/all/ad.txt"); 
}
?>


<?php 
//截取中文字符串 
function mysubstr($str, $start, $len) { 
$tmpstr = ""; 
$strlen = $start + $len; 
for($i = 0; $i < $strlen; $i++) { 
if(ord(substr($str, $i, 1)) > 0xa0) { 
$tmpstr .= substr($str, $i, 2); 
$i++; 
} else 
$tmpstr .= substr($str, $i, 1); 
} 
return $tmpstr; 
} 
?>

