Changeset 75 for Dev/trunk/dashboard.php
- Timestamp:
- 08/08/11 15:12:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/dashboard.php
r73 r75 3 3 4 4 if (is_null($_SESSION['username'])) 5 redirect('index.php'); 5 redirect('index.php'); 6 7 /* MOCK SURVEY */ 8 9 $survey = new Survey('ultimateid', 'The Epic Survey'); 10 $question1 = new Question('question1id', 'Age', 'int', 'What is your age?'); 11 $question2 = new Question('question2id', '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 6 37 ?> 7 38 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" … … 12 43 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 13 44 <title></title> 14 <?php new StyleSheet(); ?> 45 <?php new StyleSheet(); ?> 46 <script type="text/javascript" src="d3/d3.js"></script> 15 47 </head> 16 48 <body> 17 49 <div id="header"> 18 50 <?php new Logo(); ?> 19 51 </div> 20 52 <div id="wrapper"> 21 53 22 54 <div id="content"> 23 <?php 24 ?> 55 <?php new DashboardTool($surveys); ?> 25 56 </div> 26 57 </div>
Note: See TracChangeset
for help on using the changeset viewer.