⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbsdefault.php

📁 这是使用PHP编程的虚拟社区MySQL的简易版
💻 PHP
字号:
<?
  include "config.inc.php";
  include "func.php";

function ReadUserTotal() {
  global $USER_TABLE;
  global $total;

  $SQL="SELECT Count(*) AS total FROM $USER_TABLE";

  $result=mysql_query($SQL) or die(mysql_error());

  $row=mysql_fetch_Array($result);

  $total=$row[total];
}


function ReadUserAttr() {
  global $USER_ATTR_TABLE;
  global $userid,$count,$level,$exper_cent,$last_time,$last_ip,$photo;

  $SQL="SELECT count,level,exper_cent,last_time,last_ip,photo
        FROM $USER_ATTR_TABLE
        WHERE userid='$userid'";

  $result=mysql_query($SQL) or die(mysql_error());

  $row=mysql_fetch_Array($result);

  $count=$row[count];
  $level=$row[level];
  $exper_cent=$row[exper_cent];
  $last_time=$row[last_time];
  $last_ip=$row[last_ip];
  $photo=$row[photo];
}


  ReadUserid();

  if ($userid=="") {
    echo "超时, 请<a href=\"login.php\" target=\"_top\">按此</a>重新登录!";
    exit;
  }

  ReadUserTotal();
  ReadUserAttr();

  switch ($level) {
    case 0:
      $level="新手上路";
      break;
    case 1:
      $level="初级站友";
      break;
    case 2:
      $level="中级站友";
      break;
    case 3:
      $level="本站支柱";
      break;
    case 4:
      $level="开国大老";
      break;
    case 5:
      $level="神~~~~~~";
      break;
  }

  include "header.inc.php";
  include "ad.php";
?>

<TABLE width=95% border=0 align=center>
  <TR class=wdBlack>
    <TD width=20%> <FONT class=wdBlue>●</FONT> 进站画面</TD>
    <TD width=40% align="center">
<?    echo "注册用户: <font color=\"red\">$total</font> 人"; ?>
    </TD>
    <TD width=40% align="right">
<?
  if ($userid==$DEFAULT_USER) {
    echo "<font color=\"red\">★</font> <A href=\"apply.php\" target=_top>新用户申请</A> ";
    echo "<font color=\"red\">★</font> <A href=\"login.php\" target=_top>登录</A>";
  } else {
    echo "<font color=\"red\">★</font> <A href=\"seek.php?id=$id\" target=\"_blank\">查询网友</A>";
  }
?>
      </TD>
  </TR>
</TABLE>

<HR color=#E3E3E3 noshade width=98% size=1>
<table width="95%" border="0" cellspacing="2" cellpadding="2" align="center" bgcolor="<? echo $HEADER_COLOR; ?>" class=wdBlack>
  <tr>
    <td width="42%"><font color="#FF0000">X</font> 档案</td>
    <td width="58%" align=right>
<?
  if ($userid!=$DEFAULT_USER) {
    echo "<A href=\"personal.php?id=$id\"><img src=\"images/pinfo.gif\" width=\"30\" height=\"15\" border=\"0\" alt=\" 修改个人资料 \" align=\"absmiddle\"></A> ";
    echo "<A href=\"password.php?id=$id\"><img src=\"images/passwd.gif\" width=\"30\" height=\"15\" border=\"0\" alt=\" 修改密码 \" align=\"absmiddle\"></A> ";
    echo "<A href=\"signature.php?id=$id\"><img src=\"images/sig.gif\" width=\"30\" height=\"15\" border=\"0\" alt=\" 设置签名档 \" align=\"absmiddle\"></A> ";
    echo "<A href=\"readme.php?id=$id\"><img src=\"images/pnote.gif\" width=\"30\" height=\"15\" border=\"0\" alt=\" 修改个人说明 \" align=\"absmiddle\"></A>";
  }
?>
    </td>
  </tr>
</table>
<table width="95%" border="0" cellspacing="2" cellpadding="2" align="center" bgcolor="<? echo $BODY_COLOR; ?>" class=wdBlack height="155">
  <tr>
    <td colspan="3" height=12></td>
  </tr>
  <tr>
    <td width="40%" rowspan="6" align="center">
<?  if ($userid!=$DEFAULT_USER) echo "<A HREF=\"who.php?id=$id&who=$userid\">"; ?><img src="<? echo ($photo) ? "photo/$userid.jpg" : "images/photo.jpg"; ?>" width="200" height="150" border="0"><?  if ($userid!=$DEFAULT_USER) echo "</A>"; ?>
    </td>
    <td width="2%" rowspan="6">&nbsp;</td>
    <td width="58%"><FONT color=red><? echo $nickname; ?> ( <? echo $userid; ?> ):</FONT> 还是上网的爽!</td>
  </tr>
  <tr>
    <td width="58%"><FONT color=red>您<? echo ($userid==$DEFAULT_USER) ? "" : "上次" ?>的进站时间: <? echo ($userid==$DEFAULT_USER) ? date("Y.m.d H:i:s",time())." - ".$REMOTE_ADDR : date("Y.m.d H:i:s",$last_time)." - ".$last_ip; ?></font></td>
  </tr>
  <tr>
    <td width="58%"><FONT color=red>爬行榜:</font> 您现在在社区的经验值 <FONT color=red><? echo $exper_cent; ?> ( <? echo $level; ?> )</FONT>。</td>
  </tr>
  <tr>
    <td width="58%"><FONT color=red>小秘秘:</font> 还没上班哪!</td>
  </tr>
  <tr>
    <td colspan="3" height=14></td>
  </tr>
</table>
<table width="95%" border="0" cellspacing="2" cellpadding="2" align="center" bgcolor="<? echo $BODY_COLOR; ?>" height="68" class=wdBlack>
  <tr>
    <td colspan="3" class=wdBlue align="center">
      【 <a href="<? echo "okbbs.php?id=$id"; ?>">今日社区十大人气贴</a> 】
    </td>
  </tr>
</table>

<HR color=#E3E3E3 noshade width=98% size=1>

<DIV class=wdBlack align=center><? echo $COPYRIGHT; ?></DIV><BR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -