$data_message"; } if((isset($nr)) && ($nr=='x')) { echo "To enter your seat location in the member's directory, enter as little or as much info as you would like below. "; echo "
"; echo "
Sport:
Section:
Row:
Seat(s):
"; echo ""; // keys seats_actions to upload seats echo "
"; echo ""; } elseif(isset($sid)) { $query = "SELECT * FROM seats WHERE seat_id='$sid'"; $result = mysql_db_query ($db_name, $query, $link); $seats_info = mysql_fetch_array($result); if($login !="$seats_info[member]") { echo "What exactly are you trying to do here?"; } else { // give the author ability to edit his seats echo "
"; echo "
Sport:
Section:
Row:
Seat(s):
"; echo ""; // keys seats_actions to upload seats echo ""; // id of seats to update echo "
"; echo ""; echo "Back to List Without Saving

"; echo "Delete this listing "; } } else { $count_query = "SELECT * FROM seats"; if(isset($section)) { $count_query .=" WHERE section='$section' "; } $count_result = mysql_db_query ($db_name, $count_query, $link); $total_count = mysql_numrows($count_result); $limit=25; // TABLE OPTIONS echo ""; echo " "; echo " "; echo " "; echo " "; echo "
Member Seats
Where the Lair Members Sit!
"; echo "
"; echo " "; echo " "; echo "
Section:  
"; echo "
"; echo "
"; include("football_map.php"); echo ""; echo " "; echo " "; echo "

Click on one of the maps below to show the TigerRoar members in that section.
"; 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 "
"; // echo ""; 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 "
"; 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"); print("
\n"); //Table print("\n"); echo ""; print("\n"); print("\n"); print("\n"); print("\n"); print("\n"); print("\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 (""; print ("\n"); print ("\n"); print ("\n"); print ("\n"); print ("\n"); } //--- END ACTUAL RESULTS TABLE --------------------------------------------------------// } echo " "; echo " "; echo "
MemberSportSectionRowSeats
"); if($login !="$Row[member]") { print ("$Row[member]"); } else { print ("$Row[member] "); } echo "$Row[sport]$Row[section]$Row[row]$Row[seats]
"; mysql_close ($link); ?>