<?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 '
±iÖÐûÓÐÊý¾Ý!
';}
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 "
";
if ($initial_record!=0) } else } echo " | ";
ÌoÁoÑÔ,¹²$number_of_recordsÌoÁoÑÔ"; echo " | ";
if ($next_index!=$number_of_records) { } echo " |
";
?>
<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');
}
?>
"; echo "
";
echo "תµ½µÚ";
if (($number_of_records % $number_records_to_display)==0) } else }
for ($ii=1;$ii<=$number_of_pages;$ii++) {
} echo "Ò³ ¹² $number_of_pages Ò³"; |
";
?>
¡¾±¾ÎÄ°aeȨ¹e×÷ÕßÓe°ÂË÷Íø¹²Í¬ÓµÓУ¬ÈçÐeתÔØ£¬Çe×¢Ã÷×÷Õß¼°³o´¦¡¿