. */ include("./include/include.php"); admin_header(); if( !in_array("application_viewdetail", $_SESSION['sess_functions']) ) { echoln("You are not authorized to see this page."); }else { echoln("
"); $query = "SELECT COUNT(`PersonID`) AS `tot_rows` FROM `persons` WHERE ".$_SESSION['sess_sel']." AND LENGTH(`Photo`)>64"; if( @mysql_num_rows( $res=doquery($query) )!=1 ) { echoln("Failed selecting row count."); }else { $row = mysql_fetch_array($res); $tot_rows=$row["tot_rows"]; if( $tot_rows>$setup['MaxList'] ) { // There are more entries to show than fit on one page, split in pages $page_text = "Page"; for($i=0; $i<($tot_rows/$setup['MaxList']); $i++) { if( $_REQUEST['start']==($i*$setup['MaxList']) ) { $page_text .= " ".($i+1).""; }else { $page_text .= " ".($i+1).""; } } if( $_REQUEST['start']==-1 ) { $page_text .= " all rows"; }else { $page_text.=" all rows"; } echoln($page_text); echoln("
"); } if( $_REQUEST['start']==-1 ) { $sqllimit = ""; if( $tot_rows>0 ) echoln("Showing rows 1 - $tot_rows ($tot_rows total).
"); }else { $start = get_int('start'); if( $start<0 ) $start = 0; if( $start>$tot_rows ) $start = $tot_rows-$setup['MaxList']; $sqllimit = "LIMIT $start, ".$setup['MaxList']; if( $tot_rows>0 ) echoln("Showing rows ".($start+1)." - ".min( ($start+$setup['MaxList']), $tot_rows )." ($tot_rows total).
"); } $query = "SELECT `FirstName`, `LastName`, `PersonID` FROM `persons` WHERE ".$_SESSION['sess_sel']." AND LENGTH(`Photo`)>64 ORDER BY `FirstName`, `LastName` ".$sqllimit; if( @mysql_num_rows( $res=doquery($query) )>0 ) { echoln("
".$row['FirstName']." ".$row['LastName']." | ");
if( ($i%4)==0 ) echoln(" "); } echoln(" "); } echoln(" |