source: Dev/branches/jQueryUI/client/pages_old/surveycreation.php @ 249

Last change on this file since 249 was 249, checked in by hendrikvanantwerpen, 13 years ago

This one's for Subversion, because it's so close...

First widget (stripped down sequencer).
Seperated client and server code in two direcotry trees.

File size: 2.0 KB
Line 
1<?php
2require 'classes/master.php';
3
4if (is_null($_SESSION['username']))
5    redirect('index.php');
6
7if (isset($_POST['submit'])) {
8    if (isset($_POST['surveyName'])) {
9        $survey = new Survey(null, $_POST['surveyName'], "Thijs", null);
10        $dbi = new DatabaseInterface();
11        $dbi->set($survey);
12    }
13}
14
15
16
17
18/*
19  $savedSurvey = null;
20  $timeStamp = null;
21 */
22
23/* LOAD SURVEY */
24/*
25  if (isset($_POST['UID'])) {
26  $surveyID = $_POST['UID'];
27  $surveyDBI = new SurveyCreationDatabaseInterface($surveyID);
28  $info = $surveyDBI->getSurveyInfo();
29
30  $savedSurvey = Survey::getSurvey($info);
31  }
32 */
33/* AUTOSAVE */
34
35/*
36  else if (isset($_POST['timeStamp'])) {
37  $timeStamp = $_POST['timeStamp'];
38
39  echo 'This is what gets sent:';
40  var_dump($_POST);
41  echo '<br/><br/>';
42  $surveyDBI = new SurveyCreationDatabaseInterface($_POST['surveyID']);
43  $surveyDBI->setSurveyInfo($_POST,$_SESSION);
44  $info = $surveyDBI->getSurveyInfo();
45  echo '<br/><br/>';
46  echo 'This is what I get back:';
47  var_dump($info);
48
49  $savedSurvey = Survey::getSurvey($info);
50  }
51
52 */
53?>
54
55<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
56    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
57
58<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
59    <head>
60        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
61        <title>Survey Creation</title>
62        <?php new StyleSheet("awesome"); ?>
63    </head>
64    <body>
65        <div id="header">
66            <?php new Logo(); ?>
67        </div>
68        <div id="wrapper">
69
70            <div id="content">
71                <form action="surveycreation.php" method="post">
72                    <fieldset>
73                    Name: <input type="text" name="surveyName" /><br />
74                    Uid: <input type="text" name="surveyID" /><br /><br />
75                    <input type="submit" name="submit" value="Make fake survey!" />
76                    </fieldset>
77                </form>
78            </div>
79        </div>
80    </body>
81</html>
Note: See TracBrowser for help on using the repository browser.