Game server and admin dashboard for TerranQuest.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. * Make things happen when buttons are pressed and forms submitted.
  7. */
  8. require_once __DIR__ . "/required.php";
  9. if ($VARS['action'] !== "signout") {
  10. dieifnotloggedin();
  11. }
  12. /**
  13. * Redirects back to the page ID in $_POST/$_GET['source'] with the given message ID.
  14. * The message will be displayed by the app.
  15. * @param string $msg message ID (see lang/messages.php)
  16. * @param string $arg If set, replaces "{arg}" in the message string when displayed to the user.
  17. */
  18. function returnToSender($msg, $arg = "") {
  19. global $VARS;
  20. $header = "Location: app.php?page=" . urlencode($VARS['source']) . "&msg=$msg";
  21. if ($arg != "") {
  22. $header .= "&arg=$arg";
  23. }
  24. header($header);
  25. die();
  26. }
  27. switch ($VARS['action']) {
  28. case "signout":
  29. session_destroy();
  30. header('Location: index.php?logout=1');
  31. die("Logged out.");
  32. }