【php开源代码栏目提醒】:本文主要为网学会员提供FVisitor.php,希望对需要FVisitor.php网友有所帮助,学习一下!
<?
include "conn.php";
$query="Select * From visitor Order By Id DESC limit 0,30";
$result=mysql_query("$query",$connection) or die (浏览失败!);
$Rows = 0;
while($row=
mysql_fetch_row($result)){
$Assay[$Rows][0]=$row[0];
$Assay[$Rows][1]=$row[1];
$Assay[$Rows][2]=$row[2];
$Assay[$Rows][3]=$row[3];
$Assay[$Rows][4]=$row[4];
$Assay[$Rows][5]=$row[5];
$Assay[$Rows][6]=$row[6];
$Assay[$Rows][7]=$row[7];
$Assay[$Rows][8]=$row[8];
$Rows++;
}
if ($Rows)
$Rows-- ;
else
$Rows=-1 ;
my
sql_close($connection) or die ("无法断开与数据库的连接!");
include "Header.php"; ?>
<CENTER>
<table width="640" border=0 cellpadding=0 cellspacing=0 align="center" >
<tbody>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#000000">
<tr>
<td bgcolor="#AB6C00">
<div align="center"><font color="#FFFFFF">最 近 30 位 访 问 者 信 息 分 析</font></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#000000">
<tr>
<td align=left bgcolor="#666666">日期</td>
<td align=left bgcolor="#666666">时间</td>
<td align=left bgcolor="#666666">地址</td>
<td align=left bgcolor="#666666">链接页面</td>
</tr>
<?
for ($i=0;$i<=$Rows;$i++){
if ($i%2==0)
$bgcolor="#663300";
else
$bgcolor="#793D00";?>
<tr bgcolor= <? echo $bgcolor; ?>>
<td align=left width="15%"><? echo $Assay[$i][1]; ?></td>
<td align=left width="15%"><? echo substr($Assay[$i][2],-8); ?></td>
<td align=left width="25%"><? echo $Assay[$i][4]; ?></td>
<td align=left width="45%" nowrap>
<?
if ($Assay[$i][8]=="直接输入或书签导入")
echo substr($Assay[$i][8],0,40);
else
echo "<a href=".$Assay[$i][8].">".substr($Assay[$i][8],0,40)."</a>";
?></td>
</tr>
<?
if ($i>29)
break;
}
?>
</table>
<? if ($Rows<0) { ?>
<table width="100%" border="0" cellpadding="30" bgcolor="#000000">
<tr>
<td bgcolor="#AB6C00">
<div align='center' ><img src='Image/Alert.gif'>
系统中无数据
!</div>
</td></tr>
</table>
<? } ?>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
<tr>
<td bgcolor="#AB6C00"> </td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</CENTER>
<? include "End.php"; ?>