<?php require '../modules/quizrooDB.php'; require '../modules/uploadFunctions.php'; require "../modules/quiz.php"; if (isset($_GET['step'])) { // now check whether this quiz actually belongs to this user if (isset($_GET['id'])) { $quiz = new Quiz($_GET['id']); if ($quiz->exists() && $quiz->isOwner($member->id)) { $quiz_state = true; // unpublish the quiz $quiz->unpublish($member->id); $unikey = $quiz->quiz_key; } else { $quiz_state = false; unset($quiz); } } else { $quiz_state = false; unset($quiz); } if ($quiz_state) { // THE FIRST STEP (Returning): Quiz Information switch ($_GET['step']) { case 1: // populate the categories $query_listCat = "SELECT cat_id, cat_name FROM q_quiz_cat"; $listCat = mysql_query($query_listCat, $quizroo) or die(mysql_error()); $row_listCat = mysql_fetch_assoc($listCat); $totalRows_listCat = mysql_num_rows($listCat);