source: Dev/trunk/surveycreation.php @ 51

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

Start on survey page. There's something weird in surveycreationtool though. Should fix that.

File size: 1.4 KB
Line 
1<?php
2require 'classes/master.php';
3
4$savedSurvey = null;
5$timeStamp = null;
6
7
8/* LOAD SURVEY */
9if (isset($_POST['UID'])) {
10    $surveyID = $_POST['UID'];
11    $surveyDBI = new SurveyDatabaseInterface($surveyID);
12    $info = $surveyDBI->getSurveyInfo();
13
14    $savedSurvey = Survey::getSurvey($info);
15}
16
17/* AUTOSAVE */ else if (isset($_POST['timeStamp'])) {
18    $timeStamp = $_POST['timeStamp'];
19
20    echo 'This is what gets sent:';
21    var_dump($_POST);
22//    echo '<br/><br/>';
23    $surveyDBI = new SurveyDatabaseInterface($_POST['surveyID']);
24    $surveyDBI->setSurveyInfo($_POST);
25    $info = $surveyDBI->getSurveyInfo();
26//    echo '<br/><br/>';
27    echo 'This is what I get back:';
28    var_dump($info);
29
30    $savedSurvey = Survey::getSurvey($info);
31}
32?>
33
34<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
35    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
36
37<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
38    <head>
39        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
40            <title>Survey</title>
41            <link rel="stylesheet" type="text/css" href="css/style.css" />
42    </head>
43    <body>
44        <div id="header">
45            <?php new Logo(); ?>
46        </div>
47        <div id="wrapper">
48
49            <div id="content">
50                <?php
51                new SurveyCreationTool($savedSurvey, $timeStamp);
52                ?>
53            </div>
54        </div>
55    </body>
56</html>
Note: See TracBrowser for help on using the repository browser.