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.
 
 
 

46 lines
1.4 KiB

<?php
require_once __DIR__ . "/required.php";
?>
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?php echo SITE_TITLE; ?></title>
<link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/bootstrap.min.css" />
<link rel="stylesheet" href="<?php echo SITE_PATH; ?>css/fa-svg-with-js.css" />
<script nonce="<?php echo $SECURE_NONCE; ?>">
FontAwesomeConfig = {autoAddCss: false}
</script>
<script defer src="<?php echo SITE_PATH; ?>js/fontawesome-all.min.js"></script>
<script src="<?php echo SITE_PATH; ?>js/jquery-3.3.1.min.js"></script>
<script src="<?php echo SITE_PATH; ?>js/bootstrap.min.js"></script>
<?php
$path = $_SERVER['REQUEST_URI'];
$pos = strpos($_SERVER['REQUEST_URI'], SITE_PATH);
if ($pos !== false) {
$path = substr_replace($_SERVER['REQUEST_URI'], "", $pos, strlen(SITE_PATH));
}
$pathbits = explode("/", $path);
$pageid = $pathbits[0];
$arg1 = isset($pathbits[1]) ? $pathbits[1] : "";
$arg2 = isset($pathbits[2]) ? $pathbits[2] : "";
switch ($pageid) {
case "":
require __DIR__ . "/pages/home.php";
break;
case "create":
require __DIR__ . "/pages/create.php";
break;
case "q":
require __DIR__ . "/pages/question.php";
break;
case "r":
case "respond":
require __DIR__ . "/pages/respond.php";
break;
default:
require __DIR__ . "/pages/404.php";
break;
}
?>