<title>留言本</title>
<body bgcolor=white>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">

<!--
td { font-f " /> 欧美日b视频,国产精品亚洲精品日韩动图,黄色a一片

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

挑戰最棒的留言本的源碼(五)

<html>
<title>留言本</title>
<body bgcolor=white>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">

<!--
td {  font-family: "宋體", "serif"; font-size: 9pt; font-weight: normal}
a:link {  text-decoration: none}
a:hover {  color: #999999}
a:visited {  text-decoration: none; font-weight: normal}
body {  font-family: "宋體", "serif"; font-size: 11pt}
tr {  font-family: "宋體", "serif"; font-size: 11pt}
.unnamed1 {  font-size: 9pt; font-weight: bold}
.p9 {  font-family: "宋體"; font-size: 11pt}
.unnamed2 {  font-size: 11pt}
-->
</style>
</head>
<h1><center><font color="green" size=7>留言信息</font></center></h1>

<?php  
      require('config.php');  
?>


<?php


$initial_record=0;
$sort_field='key_liuyan';
$sort_direction='DESC';

if (strlen($arr_request['initial_record']))
   {  
     $initial_record=$arr_request['initial_record'];
     $sort_field=$arr_request['sort_field'];
     $sort_direction=$arr_request['sort_direction'];

   }


$str_sql_all="select count(*) as number_of_records from $table_name ";

$result=mysql_db_query($db_name,$str_sql_all,$id_link);

if (!result)
   { affy_error_exit('SQL select execution has failed.');}

$record=@mysql_fetch_object($result);

$number_of_records=$record->number_of_records;

if (strlen($sort_field)==0)
  {
    $str_sql="select * from $table_name  
              limit $initial_record,$number_records_to_display ";

  }

else  
{

   $str_sql="select * from $table_name order by $sort_field $sort_direction
             limit $initial_record,$number_records_to_display ";
}


$result=mysql_db_query($db_name,$str_sql,$id_link);

if (!$result)
   { affy_error_exit('SQL select execution has failed.');}

$number_of_records_on_current_page=@mysql_num_rows($result);

if ($number_of_records<1)
  {  echo '<p>表中沒有數據!<p>';}
else
  {
    $next_index=$initial_record+$number_records_to_display;

    if ($next_index>$number_of_records)
         $next_index=$number_of_records;

     

    $prev_index=$initial_record-$number_records_to_display;

    if ($prev_index<0)
       {
          $prev_index=0;
       }  


  }

echo "<center>";
echo "<table border=0><tr bgcolor=#f1f1f1><td width=24% align=left>";

if ($initial_record!=0)
   {
     $t1="initial_record=$prev_index";
     $sort="sort_field=$sort_field";
     $asc="sort_direction=$sort_direction";
     echo "<a href="$php_SELF?$asc&$sort&$t1 ">";
     echo "<<前 $number_records_to_display 條留言</a>";

   }

else
  {
     echo "|前面沒有留言了";

  }

echo "</td><td width=52% align=center>";

    $t2=$initial_record+1;

    echo "本頁顯示第 <font color=green>$t2</font> 到 <font color=green>$next_index</font>
條留言,共<font color=blue>$number_of_records</font>條留言";

echo "</td><td width=24% align=right>";

if ($next_index!=$number_of_records)

  {
     $t1="initial_record=$next_index";
     $sort="sort_field=$sort_field";
     $asc="sort_direction=$sort_direction";
     echo "    <a href="$php_SELF?$asc&$sort&$t1 ">";
     echo "后 $number_records_to_display 條留言>></a>";
  }  
else
  {
     echo "后面沒有留言了|";

  }

echo "</td></tr></table>";
echo "</center><p>";

?>

<center>

<a href=index.html><h4>[我也要留言]</h4></a>
<p>

<table border="0",width="95%" cellspacing="0" cellpadding="0">
<?php
for ($iindex=0;$iindex<$number_of_records_on_current_page;$iindex++)
{
$record=mysql_fetch_object($result);
require('display.inc');
}

?>
</table>
</center>

<p>
<?php  
echo "<center>";
echo "<table border=0><tr><td>";
echo "轉到第";

if (($number_of_records % $number_records_to_display)==0)
   {
     $number_of_pages=$number_of_records / $number_records_to_display;

      
   }

else  
   {
     $number_of_pages=($number_of_records-($number_of_records % $number_records_to_display))/$number_records_to_display+1;

   }


     $sort="sort_field=$sort_field";
     $asc="sort_direction=$sort_direction";


for ($ii=1;$ii<=$number_of_pages;$ii++)

{
     $yeshu=($ii-1)*$number_records_to_display ;
     $t1="initial_record=$yeshu ";

     if ($initial_record!=$yeshu)
       {

         echo "<a href="$php_SELF?$asc&$sort&$t1 ">";
         echo "[ $ii ]</a>";
       }
     else
         echo "[ $ii ]";



}












echo "頁  共<font color=blue> $number_of_pages </font>頁";
echo "</td></tr></table>";
echo "</center><p>";

?>

<hr></hr>
<center>免費留言本由<a href="http://little.oso.com.cn" >小熊</a>提供技術支持</center>


</body>
</html>


【本文版權歸作者與奧索網共同擁有,如需轉載,請注明作者及出處】    

php技術挑戰最棒的留言本的源碼(五),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 丁香婷婷开心激情深爱五月 | 亚洲一区二区福利视频 | 国产乱码精品一区二区三上 | 国产精品久久久亚洲第一牛牛 | 国产精品每日在线观看男人的天堂 | 久久久久久久久久免观看 | 看全色黄大色黄女片做 | 在线日本妇人成熟免费观看 | 性欧美4k高清精品 | 久久精品国产99精品国产2021 | 五月天激情久久综合一区 | 日本乱人伦在线观看免费 | 国产精品高清全国免费观看 | 999免费视频 | 影院亚洲| 欧美在线观看www | 日韩视频免费 | 天堂成人一区二区三区 | 丝袜美女丝袜亚洲综合 | 亚洲精品第一国产综合高清 | 午夜视频福利在线 | 日韩久久网 | 国产精品制服诱惑 | 91大神麻豆 | 国产一级一级一级成人毛片 | 国产成人精品一区二区三区 | 加勒比视频网站 | 一区二区在线视频观看 | 真实国产乱弄免费视频 | 伊人久久亚洲综合 | 国产精品_国产精品_国产精品 | 国产成人资源 | 成人福利网 | 91亚洲精品| 午夜免费视频 | 日本亚洲网站 | 天天色影院 | 午夜欧美性欧美 | 国产福利免费观看 | 国产日韩欧美综合色视频在线 | 久久一本色系列综合色 |