<?php include 'header.php'; $adminQuestions = new AdminQuestions(); $question = new Questions(); $allowedGroups = array(4, 5, 110, 7, 117, 118); if (in_array($user->data['group_id'], $allowedGroups)) { if ($_POST['changeEvent']) { $adminQuestions->updateEvent($_POST['Changequest'], $_POST['realEvent']); } if ($_POST['close']) { $adminQuestions->fixReport($_POST['idval']); } if ($_POST['delete']) { $adminQuestions->deleteQuestion($_POST['idval']); } if ($_POST['update']) { $adminQuestions->updateMCQuestion($_POST['textChange'], $_POST['response1'], $_POST['response2'], $_POST['response3'], $_POST['response4'], $_POST['response5'], $_POST['correct_answer'], $_POST['idval']); } if ($_POST['updateFRQ']) { $adminQuestions->updateFRQ($_POST['textChange'], $_POST['keywords'], $_POST['idval']); } if ($_POST['resetNumbering']) { $adminQuestions->resetNumbering($_POST['event']); } if ($_POST['questionSubmission']) { //questionSubmission is two radio boxes, one approval, one rejection. //update question approval status if set if ($_POST['approval'] == 'approve') { $adminQuestions->questionsApprove($_POST['eventId'], $_POST['questionId']); } elseif ($_POST['approval'] == 'reject') {
<div> <h2>Approve Questions:</h2> <?php $admin = new AdminQuestions(); $admin->pending_questions(); ?> </div> <div> <h2>Open Reports:</h2><br/> {%for reports in ReportArray %} {%if reports.questionType ==4 or reports.questionType ==2%} {%if reportsquestionType'] ==4 %} <img src="{{reports.imageLocation}}" max-width=300 max-height=300/><br/>'; {%endif%} <div id="questions"> <form method="POST" action=""> <textarea name="textChange" id="stylized">{{reports.Question}}</textarea><br/> <input type=hidden name=idval value="{{reports.idQuestions}}"/>'; <input type="text" name="keywords" value={{reports.KeyWords}}/> <input type="Submit" value="Update Question" name="updateFRQ"> <input type="submit" value="Close Report" name="close"/></div> {%else%} {%if reports.questionType'] == 3 %} <img src="{{reports.imageLocation}}" max-width=300 max-height=300/><br/> {%endif%} <div id="questions"> <form method="POST" action=""> <textarea name="textChange" id="stylized">{{reports.Question}}</textarea><br/>'; <input type=hidden name=idval value="{{reports.idQuestions}}"/> {%for i in range(1,5)%}