diff --git a/admin-tools/game-not-started b/admin-tools/addresses-released similarity index 100% rename from admin-tools/game-not-started rename to admin-tools/addresses-released diff --git a/admin-tools/close-registration.php b/admin-tools/close-registration.php index 5c00d12..70b8a94 100644 --- a/admin-tools/close-registration.php +++ b/admin-tools/close-registration.php @@ -8,4 +8,5 @@ mysql_query("CREATE TABLE usersfinal SELECT * FROM users"); -?> \ No newline at end of file +?> + \ No newline at end of file diff --git a/admin-tools/create-users-table.php b/admin-tools/create-users-table.php index f5e6e39..d587b9a 100644 --- a/admin-tools/create-users-table.php +++ b/admin-tools/create-users-table.php @@ -31,4 +31,5 @@ else } -?> \ No newline at end of file +?> + \ No newline at end of file diff --git a/admin-tools/game-begun b/admin-tools/game-begun new file mode 100644 index 0000000..e69de29 diff --git a/admin-tools/release-addresses.php b/admin-tools/release-addresses.php new file mode 100644 index 0000000..ac128a8 --- /dev/null +++ b/admin-tools/release-addresses.php @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/admin-tools/reset-all.php b/admin-tools/reset-all.php index d3bbab0..b56d51d 100644 --- a/admin-tools/reset-all.php +++ b/admin-tools/reset-all.php @@ -12,7 +12,7 @@ if ($_POST['txtPassword'] != $password) {

Confirm Assassins Game Reset

First you must download a copy of the game results

-

Export CSV

+

Export CSV

If you are certain that you want to reset the game then enter the following password in the box below: @@ -33,15 +33,37 @@ else { // here is where the actual reset code happens following login // rename the game-begun file to game-not-started rename("game-begun","game-not-started"); -// export the contents of the usersfinal table just in case it was an accident or the results are needed again +//rename the addresses-released file to addresses-not-released +rename("addresses-released","addresses-not-released"); +// delete the two users tables +$retval1 = mysql_query("DROP TABLE users"); +if(! $retval1 ) +{ + die('Could not delete users table: ' . mysql_error()); +} +echo "Users table deleted successfully\n"; +$retval2 = mysql_query("DROP TABLE usersfinal"); +if(! $retval2 ) +{ + die('Could not delete usersfinal table: ' . mysql_error()); +} +echo "Usersfinal table deleted successfully\n"; + +// empty the upload folder of all user photos +$files = glob('../upload/*'); // get all file names +foreach($files as $file){ // iterate files + if(is_file($file)) + unlink($file); // delete file +} } +Echo "
" +Echo "End of the reset page reached. Unless there are error messages above everything is reset!" + ?> - - - + \ No newline at end of file diff --git a/admin-tools/return-to-admin-page.php b/admin-tools/return-to-admin-page.php new file mode 100644 index 0000000..6543569 --- /dev/null +++ b/admin-tools/return-to-admin-page.php @@ -0,0 +1,5 @@ +Admin Task Completed"; +echo "

Click below to return to the admin tools page.

"; +echo 'Return to admin tools page'; +?> \ No newline at end of file diff --git a/admin-tools/startgame.php b/admin-tools/startgame.php index 9c9cecc..3093cf6 100644 --- a/admin-tools/startgame.php +++ b/admin-tools/startgame.php @@ -62,6 +62,7 @@ for ($counter = 1; $counter <= $numberofrows; $counter += 1) { //*THIS WORKS } ?> + diff --git a/admin.php b/admin.php index 5472b9a..92941c6 100644 --- a/admin.php +++ b/admin.php @@ -15,6 +15,9 @@

Close registration

Start the game

+ +

Release addresses

+
diff --git a/index.php b/index.php index efb770d..404f011 100644 --- a/index.php +++ b/index.php @@ -106,13 +106,21 @@ function GetNumberOfRows() { echo "
  • "; } ?> + +
  • They live at:

  • +
  • Full name:
  • Year group:
  • Email Address: @exeter.ac.uk
  • Subject Studied:
  • Societies:
  • Regular Haunts:
  • -
  • They live at:
  • +
  • Ninjaness Score /10
  • They have made kills
  • diff --git a/upload/jc563.jpg b/upload/jc563.jpg deleted file mode 100644 index f2c2995..0000000 Binary files a/upload/jc563.jpg and /dev/null differ diff --git a/upload/jc563.png b/upload/jc563.png new file mode 100644 index 0000000..5fb71a5 Binary files /dev/null and b/upload/jc563.png differ diff --git a/upload/jc563a.jpg b/upload/jc563a.jpg deleted file mode 100644 index 2fc389e..0000000 Binary files a/upload/jc563a.jpg and /dev/null differ