<?php session_start(); if (isset($_SESSION['login']) && $_SESSION['login'] == true) { include "../include/DB.php"; $user_id = $_SESSION['UID']; $group = GetGroup($user_id); if ($group < 2) { header("Location: http://localhost/546Final/pages/index.php"); } else { $question_id = $_POST['QID']; $question_content = GetQuestion_ByID($question_id); } } else { header("Location: http://localhost/546Final/pages/index.php"); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Edit Question</title> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" rel="stylesheet"> <link href="../css/bootstrap.min.css" rel="stylesheet"> <link href="../css/index_site.css" rel="stylesheet">
<input id="password" name="password" type="password"/> <button id="LoginBtn" type="Button" value="Login">Login </button> </div> </div> </div> </form> </div> </div> <div class="container"> <?php echo "<filedset>"; include "../include/DB.php"; if (isset($_GET['var'])) { $res = GetQuestion_ByID($_GET['var']); //echo question; echo "<legend>\n"; echo $res[0]['Title']; echo "</legend>\n"; echo "<div>\n"; echo $res[0]['Content']; echo "</div>\n"; echo "<div>\n"; echo $res[0]['Name']; echo "</div>\n"; echo "<div>\n"; echo $res[0]['Time']; echo "</div>\n"; //echo $_GET['var']. "<br/>"; $results = GetQuestion_Answer($_GET['var']);