if ($_POST["selState"] && $_GET["id"]) { Utils::display_admin_navbar("Report Manager"); echo '<div class="container">'; if ($db->update_state($_GET["id"], $_POST["selState"])) { echo '<div class="alert alert-success col-sm-8 col-sm-offset-2">Report state successfully updated.</div>'; } else { echo '<div class="alert alert-danger col-sm-8 col-sm-offset-2">Error while trying to update report state. Please go easy on the developer.</div>'; } echo '</div>'; $question = display_report_panel($_GET["id"]); display_question_panel($question, $_GET["id"]); } else { if ($_SESSION["username"] && $_SESSION["password"]) { Utils::display_admin_navbar("Report Manager"); $question = display_report_panel($_GET["id"]); display_question_panel($question, $_GET["id"]); } else { Utils::display_login(); } } } } } $db->stop(); $trivia->stop(); ?> <br/><br/> <footer class="footer footer_admin"> <center> <div id="rizon_footer">© <?php echo date("Y");
if ($_POST["actionQuestionChange"] == "edit" && $_POST["txtQuestion"] && $_POST["txtQuestionID"]) { Utils::display_admin_navbar("Question Manager"); if ($trivia->update_question($_POST["txtQuestionID"], $_POST["txtQuestion"], $_POST["txtAnswer"], $_POST["selTheme"])) { echo '<div class="container"><div class="alert alert-success col-sm-6 col-sm-offset-3">Question successfully updated.</div></div>'; } else { echo '<div class="container"><div class="alert alert-danger col-sm-6 col-sm-offset-3">Error when trying to update the question.</div></div>'; } display_question_panel($_GET["page"]); } else { if ($_GET["search"]) { Utils::display_admin_navbar("Question Manager"); display_question_panel($_GET["page"], $_GET["search"]); } else { if ($_SESSION["username"] && $_SESSION["password"]) { Utils::display_admin_navbar("Question Manager"); display_question_panel($_GET["page"]); } else { Utils::display_login(); } } } } } } } $trivia->stop(); ?> <br/><br/> <footer class="footer footer_admin"> <center> <div id="rizon_footer">© <?php