source: Dev/branches/jQueryUI/pages_old/dashboard.php @ 247

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

Created first page mainmenu in new system.
Moved old pages out of project root.
Fixed RDFAPI.php case for people with proper OS'es.

File size: 1.6 KB
Line 
1<?php
2require 'classes/master.php';
3
4if (is_null($_SESSION['username']))
5        redirect('index.php');
6
7/* MOCK SURVEY */
8
9$survey = new Survey('ultimateid', 'The Epic Survey');
10$question1 = new Question('question1id', 'AE340', 'Age', 'int', 'What is your age?');
11$question2 = new Question('question2id', 'XV453', 'Identity', 'mc', 'Are you freakazoid?');
12$question2->answers = array('yes', 'no', 'maybe');
13
14$survey->addQuestion($question1);
15$survey->addQuestion($question2);
16
17/* MOCK RESULTS */
18
19
20$survey1Results = new SurveyResults();
21
22$question1Answers = array(3, 5, 12, 134, 5, 40); // int
23$question2Answers = array('yes', 'no', 'no', 'yes', 'maybe', 'no');     // Multiple choice
24
25$question1Result = new QuestionResult(ResultType::INTEGER, $question1Answers);
26$question2Result = new QuestionResult(ResultType::MULTIPLE_CHOICE, $question2Answers);
27
28$survey1Results->addQuestionResult($question1Result);
29$survey1Results->addQuestionResult($question2Result);
30
31/*  COMBINE */
32
33$survey->setResults($survey1Results);
34
35$surveys = array($survey);
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></title>
45                        <?php new StyleSheet(); ?>
46                        <script type="text/javascript" src="d3/d3.js"></script>
47    </head>
48    <body>
49        <div id="header">
50                        <?php new Logo(); ?>
51        </div>
52        <div id="wrapper">
53
54            <div id="content">
55                                <?php new DashboardTool($surveys); ?>
56            </div>
57        </div>
58    </body>
59</html>
Note: See TracBrowser for help on using the repository browser.