$IP=$_SERVER["REMOTE_ADDR"]; $str1="select Lastip from rficcount where ID='1'";//取出資料 $list2=mysql_query($str1,$link); list($Lastip) = mysql_fetch_row($list2); if($Lastip!=$IP){ $str2="update rficcount set Count=Count+1,Lastip='$IP' where ID='1'";//修改資料 $list3=mysql_query($str2,$link); } //error_reporting(0);//不顯示錯誤 if(!isset($Login)){ session_register("Login","Log_Name","Log_Sys"); $Login="未登入"; $Log_Name="NoLogin"; $Log_Sys="NoLogin"; } $page_num="5";//每頁顯示的篇數 if(empty($page_count))$page_count="1";//分頁分析 $start_num=$page_num*($page_count-1); $str="select count(*) from rficnews"; $list=mysql_query($str,$link); list($rficnews_count)=mysql_fetch_row($list); $all_page=ceil($rficnews_count/$page_num);//抓取頁數 $str="select Count,Lastip from rficcount where ID='1'";//取出資料,到訪人數 $list2=mysql_query($str,$link); list($Count,$Lastip) = mysql_fetch_row($list2) ?>
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||
|