Example #1
0
require_once '/var/www/config.php';
sro('/Includes/mysql.php');
sro('/Includes/session.php');
global $suid;
if (!$suid) {
    sro('/Pages/restricted/logged-out.php');
    die;
}
sro('/Includes/functions.php');
sro('/PHP5/quiz/common.php');
sro('/PHP5/quiz/quiz_types.php');
$master = safe_get("master", $_GET) == "true" and quiz_auth();
?>
<header>
    <h1>My Quizzes <?php 
if (!$master and quiz_auth()) {
    echo "<a href='?master=true'>master</a>";
}
?>
</h1>
</header>
<article id="quiz">
    <table style="border-spacing: 8px 2px;">
    <tr><th>Select</th>
    <?php 
if ($master) {
    echo "<th>UserName</th>";
}
?>
    <th>Name</th><th>Score/Grade</th><th>Date</th></tr>
    <?php 
Example #2
0
 function is_authorized()
 {
     global $sql_stmts, $suid;
     if (quiz_auth()) {
         return TRUE;
     }
     $user_id = $this->user_id();
     if ($user_id !== NULL and $user_id == $suid) {
         return TRUE;
     }
     return FALSE;
 }