A simple system for creating multiple-choice questions for an audience to answer on their phones. Responses are tallied and displayed in real-time. https://openquestion.netsyms.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. require_once __DIR__ . "/required.php";
  3. ?>
  4. <!DOCTYPE html>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <title><?php echo SITE_TITLE; ?></title>
  8. <link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/bootstrap.min.css" />
  9. <link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/fa-svg-with-js.css" />
  10. <script nonce="<?php echo $SECURE_NONCE; ?>">
  11. FontAwesomeConfig = {autoAddCss: false}
  12. </script>
  13. <script defer src="<?php echo SITE_PATH; ?>js/fontawesome-all.min.js"></script>
  14. <script src="<?php echo SITE_PATH; ?>js/jquery-3.3.1.min.js"></script>
  15. <script src="<?php echo SITE_PATH; ?>js/bootstrap.min.js"></script>
  16. <?php
  17. $pathbits = explode("/", str_replace(SITE_PATH, "", $_SERVER['REQUEST_URI']));
  18. $pageid = $pathbits[0];
  19. $arg1 = isset($pathbits[1]) ? $pathbits[1] : "";
  20. $arg2 = isset($pathbits[2]) ? $pathbits[2] : "";
  21. switch ($pageid) {
  22. case "":
  23. require __DIR__ . "/pages/home.php";
  24. break;
  25. case "create":
  26. require __DIR__ . "/pages/create.php";
  27. break;
  28. case "q":
  29. require __DIR__ . "/pages/question.php";
  30. break;
  31. case "r":
  32. case "respond":
  33. require __DIR__ . "/pages/respond.php";
  34. break;
  35. default:
  36. require __DIR__ . "/pages/404.php";
  37. break;
  38. }
  39. ?>