首页包括以下四部分:
1>首页导航栏,其中含有首页链接,用户注册,发表留言,查看留言,查询留言,版主管理,注销登录模块
2>左侧显示区:其中包含用户登录,万年历和最新留言模块.访客可以通过该区域登录留言本,了解最新的留言主题
3>主显示区:为留言本最新留言,访客可以通过该区域查看最新的留言主题和留言内容
4>尾部显示区:为留言本的版本声明
主页主要实现代码如下:
<?php
include_once("top.php");
?>
<table width="779" height="23" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td width="292" background="images/dh_back.gif"><div align="right">今天是: <script language=JavaScript>
today=new Date();
function initArray()
{
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i]
}
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
);
document.write(
"<font color=#000000 style='font-size:9pt;font-family:宋体'>",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
$nbsp;$nbsp;
d[today.getDay()+1],
"<font>");
</script></div></td>
<td width="200" valign="top"><?php include_once("left.php");?></td>
</td>
</tr>
</table>
<?php
include_once("bottom.php");
?>
注:1.top.php,用于显示网站导航,留言本名称和当前登录的用户名称
2.left.php,用于显示用户登录,万年历和最新留言信息
3.bottom.php,用于显示版权信息