";
echo " Click on one of the maps below to show the TigerRoar members in that section.
";
echo "
";
// echo "

";
echo " | ";
echo " ";
//--- NAVAGATION LINKS ---------------------------------------------------------//
if(isset($offset)) { $offset=$offset; } else { $offset=0; }
echo "
| ";
// Setting condition for previous link
if ($offset>=$limit) { // bypass PREV link if offset is 0
$prevoffset=$offset-$limit;
if (isset($orderby)) {
print "< Prev $limit | \n";
}
else {
print "< Prev $limit | \n";
}
}
// calculate number of pages needing links
$pages=intval($total_count/$limit);
// $pages now contains int of pages needed unless there is a remainder from division
if ($total_count%$limit) {
// has remainder so add one page
$pages++;
}
for ($i=1;$i<=$pages;$i++) { // loop thru
$newoffset=$limit*($i-1);
if (isset($orderby)) {
print "$i \n";
}
else {
print "$i \n";
}
}
// check to see if last page
if (!(($total_count-$offset)<$limit)) {
// not last page so give NEXT link
$newoffset=$offset+$limit;
if (isset($orderby)) {
print "| Next $limit >\n";
}
else {
print "| Next $limit >\n";
}
}
echo " |
|
";
if (isset($orderby)) {
$orderby=trim($orderby);
$order = $orderby;
}
else {
$order = "sport";
}
$from=$offset+1;
echo " Showing $from to ";
// Looking for last page and setting the number for last table in row
if (($offset+$limit)<=$total_count) {
$to=$offset+$limit;
echo "$to";
} else {
echo "$total_count";
}
echo " of $total_count";
echo " | ";
// echo " ";
echo " ";
echo " | ";
if ($offset <0) {
$offset = 0;
}
//-- GET DATA TO VIEW IN TABLE FOR PAGE----------------------------------------------//
$query = "SELECT * FROM seats";
if(isset($section)) { $query .=" WHERE section='$section' "; }
if(isset($orderby)) { $query .= " order by '$orderby' "; }
$query .=" limit $offset,$limit";
$result = mysql_db_query ($db_name, $query, $link);
$number_of_results = mysql_numrows($result);
//---- THIS IS THE ACTUAL RESULTS TABLE ------------------------------------------------//
print("\n");
//Table
print("\n");
echo " | | | | | ";
print("\n");
print("| Member | \n");
print("Sport | \n");
print("Section | \n");
print("Row | \n");
print("Seats | \n");
print(" \n");
echo " | | | | | ";
//Get results from database
while ($Row = mysql_fetch_array ($result)) {
$color_1 = "#EEEEF8";
$color_2 = "#FFFFFF";
static $color;
// Set the color to that's not currently set.
if ( $color == $color_1 ) { $color = $color_2;
} else { $color = $color_1; }
print ("\n");
print ("| ");
if($login !="$Row[member]") {
print ("$Row[member]");
} else {
print ("$Row[member] ");
}
echo " | ";
print ("$Row[sport] | \n");
print ("$Row[section] | \n");
print ("$Row[row] | \n");
print ("$Row[seats] | \n");
print (" \n");
}
//--- END ACTUAL RESULTS TABLE --------------------------------------------------------//
}
echo " ";
echo " ";
echo " ";
mysql_close ($link);
?>
|