新的标头文件 (header.inc):
- <?
- // 定义通用页面头部
- ?>
- <html>
- <HEAD>
- <TITLE> <? echo "$MySiteName - $title"; ?> </TITLE>
- <style type="text/CSS">
- <!--
- .text {
- font-family: "宋体"; font-size: 12pt; color: #006633; text-decoration: none
- }
- -->
- </style>
- </HEAD>
- <body topmargin=2>
- <table width="100%" border="0">
- <tr>
- <td rowspan="3" width="19%"><img src="https://gophp.heha.net/test/images/01dc.gif" width="140" height="60"></td>
- <td rowspan="3" width="29%">
- <?
- // 取得乱数种子
- srand((double)microtime()*1000000);
- // 在 0 和 4 之间取一个数字
- $randval = rand(0,5);
- // 显示结果
- switch($randval)
- {
- case "0";
- echo "<a href=//gophp.heha.net/index.html><img border=0 src=$randval.gif></a>";
- break;
- case "1";
- echo "<a href=//personal.668.cc/haitang/index.htm><img border=0 src=$randval.gif></a>";
- break;
- case "2";
- echo "<a href=//gophp.heha.net/index.html><img border=0 src=$randval.gif></a>";
- break;
- case "3";
- echo "<a href=//gophp.heha.net/index.html><img border=0 src=$randval.gif></a>";
- break;
- case "4";
- echo "<a href=//personal.668.cc/haitang/index.htm><img border=0 src=$randval.gif></a>";
- break;
- }
- ?>
- </td>
- <td width="52%">
- <p align="center"><a href="../test/form.php3" class="text"> 自动发送邮件测试 </a></p>
- </td>
- </tr>
- <tr>
- <td width="52%">
- <p align="center"><a href="../test/php/php1.php3" class="text"> 简易轮回广告更替 </a></p>
- </td>
- </tr>
- <tr>
- <td width="52%">
- <p align="center"><a href="../password/password.php3" class="text"> 简易密码验证实例 </a></p>
- </td>
- </tr>
- </table>
- <hr color="#ff9900" size="4">
- </body>
- </HTML>