First Prev Next Last "; if ($allChecked !='checked') echo ""; else echo ""; echo " "; display_counts($key, $totalRows, $startNum, $endNum); //display rest echo " "; } //*********************************************************************** // display 'showing x to y of z' function display_counts ($key, $totalRows, $startNum, $endNum) { $query = "SELECT user_id FROM users LIMIT $key, ".USERADMINDISPLAYNUM.""; $result = mysql_query($query) or die("Invalid query"); $numberOfRows = @mysql_num_rows($result); $startNum = $key + 1; $endNum = $startNum + $numberOfRows - 1; if ($endNum == 0) { $startNum = 0; } echo "showing ".$startNum." to ".$endNum." of ".$totalRows."
"; } //*********************************************************************** function column_header ($header) { // display column headers: // 1)as a hyperlink if the column is NOT currently sorted // 2)in italics if the column IS currently sorted global $srt; echo ""; if ($srt==$header) { echo ""; } else { echo ""; } echo $header; if ($srt==$header) { echo ""; } else { echo ""; } echo ""; } //*********************************************************************** function display_users ($ky, $srt, $allChecked) { $query = "SELECT * FROM users ORDER BY ".$srt." LIMIT $ky, ".USERADMINDISPLAYNUM.""; $result = mysql_query($query) or die("Error: Invalid query"); $numberOfRows = @mysql_num_rows($result); echo "
"; column_header("user_id"); column_header("user_name"); column_header("user_password"); column_header("user_email"); column_header("user_country"); column_header("user_admin"); echo ""; for ($i=0; $i < $numberOfRows; $i++) { $row = @mysql_fetch_array($result); echo(""; } else { echo " "; } echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo(""); } echo "
 
"); // don't allow the admin user (or her scores) to be deleted if ($row["user_name"]<>"admin") { echo "" .$row["user_id"]." " .stripslashes($row["user_name"])." " .stripslashes($row["user_password"])." " .stripslashes($row["user_email"])." " .$row["user_country"]." " .$row["user_admin"]." 
"; } if ( isset($sessUserName) && isset($sessUserId) && @$sessAdmin==1 ) { include("db_fns.php"); // Sdb functions include("constants.php"); global $srt; // column sort global $key; // what record to start displaying from global $scroll; // global $numberOfRows; // global $ticked; // array of selected checkboxes global $startNum; global $endNum; ?> USER - ADMIN PAGE

USER - ADMIN PAGE

Score Admin         Return to Featured Scores $totalRows) { $key = 0; } elseif (!($key+USERADMINDISPLAYNUM >= $totalRows)) { $key += USERADMINDISPLAYNUM; } break; case "last": if (USERADMINDISPLAYNUM > $totalRows) { $key = 0; } else { $key = $totalRows - USERADMINDISPLAYNUM; } break; // if Select All was hit, then keep the key the same as it was default: } } else { //When the user visits the page for the first time //there is no key selected so give them the first record. $key = 0; } if (!isset($srt)) { $srt = "user_id"; } ?>

* Note: Deleting a user will also delete their scores.