Example #1
0
			</tr>
		</table>
		<table width="100%" cellspacing="1" bgcolor="#000080">
			<form name="form_shout" method="post">
				<input type="hidden" name="p_first_shout_id" value="">
				<input type="hidden" name="p_last_shout_id" value="">

<?php 
$shouts_per_page = 5;
if ($first_shout_id != 0) {
    $result = $shout->SelectNextPage($first_shout_id);
} else {
    if ($last_shout_id != 0) {
        $result = $shout->SelectNextPage($last_shout_id);
    } else {
        $result = $shout->Select();
    }
}
$counter = 0;
while ($data = $database->FetchArray($result)) {
    if ($counter == 0) {
        $first_shout_id = $data["shou_id"];
    }
    if ($counter >= $shouts_per_page) {
        break;
    }
    $last_shout_id = $data["shou_id"];
    $date = new Date();
    $date->SetDate($data["shou_date"]);
    $date->ConvertToFullDisplay();
    ?>