Exemplo n.º 1
0
		</table>
		<table width="100%" cellspacing="1" bgcolor="#FFFFFF" height="10">
			<tr>
				<td bgcolor="#FFFFFF" align="left" width="20%">
				</td>
			</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;
    }