source: Dev/trunk/survey.php @ 134

Last change on this file since 134 was 83, checked in by basvannuland, 14 years ago

start with answer saving

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