Location: PHPKode > scripts > php ireport > phpireport v1.0 alpha revision 25/phpireport/history.php
<?
$page_title = "history";

$messages_count = 10;

if($start==''){$start=get_report_max_time();}

if($type=='older' or $type=='')
{
$latest_messages = get_older_reports_by_time($start, $messages_count);
}

if($type=='newer')
{
$latest_messages = get_newer_reports_by_time($start, $messages_count);
}

$page_content = $page_content . "<ul class='archive'>";
for ($i = 0; $i <= count($latest_messages)-1; $i++) 
{
	$time = microtime_to_string($latest_messages[$i]['time']);
	$name = $latest_messages[$i]['name'];
	$message = $latest_messages[$i]['message'];
$page_content = $page_content . "
		<li>
			<div class='post-details'><div style='float:left'>user: ".stripslashes($name)."</div> <div style='float:right'>".$time."</div></div>
			<br>
			<div class='post-details'>".stripslashes($message)."</div>
		</li>
	";
	$last_report_time = $latest_messages[$i]['time'];
}
$max_id = get_report_max_id();
$newer = $latest_messages[0]['time'];
$older = $last_report_time;

//if($older<1){$older=1;}
//if($newer>$max_id+$messages_count){$prev=$max_id-$messages_count;}

$page_content = $page_content . "					</ul>
					<div class='navigation clear'>
						<div><a href='index.php?page=history&type=newer&start=".$newer."' > &laquo; Newer Reports  </a></div>
						<div><a href='index.php?page=history&type=older&start=".$older."' > Older Reports &raquo; </a></div>	
					</div>
";

?>
Return current item: php ireport