source: Dev/trunk/survey.php @ 58

Last change on this file since 58 was 58, checked in by fpvanagthoven, 14 years ago

mainmenu.php tweaked for usability. When not logged in, the user gets redirected to index.php

File size: 1.1 KB
RevLine 
[51]1<?php
[50]2require 'classes/master.php';
[51]3
[58]4if (is_null($_SESSION['username']))
5    redirect('index.php');
6
[51]7if (isset($_GET['id']))
8{
9    $surveyID = $_GET['id'];
10
11    $surveyDBI = new SurveyDatabaseInterface($surveyID);
12    $info = $surveyDBI->getSurveyInfo();
13
14    $savedSurvey = Survey::getSurvey($info);
15   
16    var_dump($_POST);
17}
18else
19    redirect('index.php');
[50]20?>
21<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
22    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
23
24<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
25    <head>
26        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
[52]27            <title>Survey</title>
[51]28            <link rel="stylesheet" type="text/css" href="css/style.css" />
29            <script type="text/javascript" src="js/menu.js"></script>
[50]30    </head>
[51]31
[50]32    <body>
33        <div id="header">
[51]34            <?php new Logo(); ?>
[50]35        </div>
36
37        <div id="wrapper">
38            <div id="content">
[51]39                <?php new SurveyTool($savedSurvey); ?>
[50]40            </div>
41        </div>
42    </body>
43</html>
Note: See TracBrowser for help on using the repository browser.