Last change
on this file since 135 was
95,
checked in by fpvanagthoven, 14 years ago
|
Done: Default question description -> do not display in SurveyTool?. Added bug to TODO list
|
File size:
1.5 KB
|
Line | |
---|
1 | <?php |
---|
2 | require 'classes/master.php'; |
---|
3 | |
---|
4 | if (is_null($_SESSION['username'])) |
---|
5 | redirect('index.php'); |
---|
6 | |
---|
7 | $savedSurvey = null; |
---|
8 | $timeStamp = null; |
---|
9 | |
---|
10 | |
---|
11 | /* LOAD SURVEY */ |
---|
12 | if (isset($_POST['UID'])) { |
---|
13 | $surveyID = $_POST['UID']; |
---|
14 | $surveyDBI = new SurveyCreationDatabaseInterface($surveyID); |
---|
15 | $info = $surveyDBI->getSurveyInfo(); |
---|
16 | |
---|
17 | $savedSurvey = Survey::getSurvey($info); |
---|
18 | } |
---|
19 | |
---|
20 | /* AUTOSAVE */ |
---|
21 | else if (isset($_POST['timeStamp'])) { |
---|
22 | $timeStamp = $_POST['timeStamp']; |
---|
23 | |
---|
24 | echo 'This is what gets sent:'; |
---|
25 | var_dump($_POST); |
---|
26 | echo '<br/><br/>'; |
---|
27 | $surveyDBI = new SurveyCreationDatabaseInterface($_POST['surveyID']); |
---|
28 | $surveyDBI->setSurveyInfo($_POST,$_SESSION); |
---|
29 | $info = $surveyDBI->getSurveyInfo(); |
---|
30 | echo '<br/><br/>'; |
---|
31 | echo 'This is what I get back:'; |
---|
32 | var_dump($info); |
---|
33 | |
---|
34 | $savedSurvey = Survey::getSurvey($info); |
---|
35 | } |
---|
36 | ?> |
---|
37 | |
---|
38 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
---|
39 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
40 | |
---|
41 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
42 | <head> |
---|
43 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
---|
44 | <title>Survey Creation</title> |
---|
45 | <?php new StyleSheet(); ?> |
---|
46 | </head> |
---|
47 | <body> |
---|
48 | <div id="header"> |
---|
49 | <?php new Logo(); ?> |
---|
50 | </div> |
---|
51 | <div id="wrapper"> |
---|
52 | |
---|
53 | <div id="content"> |
---|
54 | <?php |
---|
55 | new SurveyCreationTool($savedSurvey, $timeStamp); |
---|
56 | ?> |
---|
57 | </div> |
---|
58 | </div> |
---|
59 | </body> |
---|
60 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.