留言本
留言情報
require('config.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="$table_name のレコード数として count(*) を選択 ";
$result=mysql_db_query($db_name,$str_sql_all,$id_link);
if (!result)
{ affy_error_exit('SQL 選択の実行に失敗しました。');}
$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 選択の実行に失敗しました。');}
$number_of_records_on_current_page=@mysql_num_rows($result);
if ($number_of_records<1)
{ echo '表中没有数データ!
';}
else
{
$next_index=$初期レコード+表示する$number_records;
if ($next_index>$number_of_records)
$next_index=$number_of_records;
$prev_index=$initial_record-$number_records_to_display;
if ($prev_index {
$prev_index=0;
}
}
echo "
";
echo "";
if ($initial_record!=0) { $t1="initial_record=$prev_index"; $sort="sort_field=$sort_field"; $asc="sort_direction=$sort_direction"; echo ""; echo "<<前 $number_records_to_display 条留言";
}
else { echo "| 前面没有留言了";
}
echo " | ";
$t2=$initial_record+1; echo "本页显示第 $t2 へ $next_index コメント、合計$number_of_records コメント";
echo " | "; if ($next_index!=$number_of_records)
{ $t1="initial_record=$next_index" $sort="sort_field=$sort_field"; =$sort_direction"; echo " $number_records_to_display comments>> a>"; } else { echo "後でメッセージはありません|";
}
echo " | < /tr>
";
echo ""; 🎜>?>
[メッセージも残したい]
/a>
for ($iindex=0;$iindex{
$record=mysql_fetch_object($result)
require('display.inc'); }
?>
center>";
echo " | echo "ページに移動";
if (($number_of_records % $number_records_to_display )==0)
{
$number_of_pages=$number_of_records / $number_records_to_display;
}
else
{
$number_of_pages=($レコード数-($レコード数 % $レコード数_表示先))/$レコード数_表示先+1;
}
$sort="sort_field=$sort_field"; =$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 "";
echo "[ $ii ] "; >
echo "合計ページ数 $number_of_pages ページ";
echo "
echo "";
?>
無料のゲストブックは Little Bear サポート