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