Rev | Line | |
---|
[57] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Description of SessionMenu |
---|
| 5 | * |
---|
| 6 | * @author fpvanagthoven |
---|
| 7 | */ |
---|
[65] | 8 | class SessionMenu extends Menu { |
---|
[57] | 9 | |
---|
| 10 | public function __construct() { |
---|
[60] | 11 | ?> <fieldset class="menu"> <?php |
---|
| 12 | parent::__construct('Session'); |
---|
[58] | 13 | ?> <div class="menuButtons"> <?php |
---|
[57] | 14 | SessionMenu::createSessionButton(); |
---|
[58] | 15 | SessionMenu::loadSessionButton(); |
---|
[59] | 16 | SessionMenu::startSessionButton(); |
---|
[58] | 17 | ?> </div> <?php |
---|
| 18 | SessionMenu::loadSessionList(null); |
---|
[60] | 19 | ?></fieldset><?php |
---|
[57] | 20 | } |
---|
| 21 | |
---|
| 22 | public static function createSessionButton() { |
---|
| 23 | ?> |
---|
| 24 | |
---|
| 25 | <form action="sessioncreation.php" method="post"> |
---|
| 26 | |
---|
[60] | 27 | <input type="submit" value="New" class="surveyButton bigSurveyButton" /> |
---|
[57] | 28 | |
---|
| 29 | </form> |
---|
| 30 | |
---|
| 31 | <?php |
---|
| 32 | } |
---|
| 33 | |
---|
[58] | 34 | public static function loadSessionButton() { |
---|
| 35 | ?> |
---|
| 36 | <form id="loadSessionForm" action="sessioncreation.php" method="post"> |
---|
[60] | 37 | <input type="button" onclick="loadSession()" value="Load / Edit" class="surveyButton bigSurveyButton" /> |
---|
[58] | 38 | </form> |
---|
| 39 | <?php |
---|
| 40 | } |
---|
| 41 | |
---|
[59] | 42 | public static function startSessionButton() { |
---|
| 43 | ?> |
---|
| 44 | <form action="session.php" method="post"> |
---|
[60] | 45 | <input type="button" onclick="startSession()" value="Start" class="surveyButton bigSurveyButton" /> |
---|
[59] | 46 | </form> |
---|
| 47 | <?php |
---|
| 48 | } |
---|
| 49 | |
---|
[58] | 50 | public static function loadSessionList($sessions) { |
---|
| 51 | ?> |
---|
| 52 | <select class="toLoad" size="1000"> |
---|
| 53 | <?php |
---|
[65] | 54 | if (!empty($sessions)) { |
---|
| 55 | foreach ($sessions as $session) { |
---|
| 56 | ?><option value='<?php echo $session->id; ?>'><?php echo $session->title; ?></option><?php |
---|
| 57 | } |
---|
[58] | 58 | } |
---|
| 59 | ?> |
---|
| 60 | </select> |
---|
| 61 | <?php |
---|
| 62 | } |
---|
| 63 | |
---|
[57] | 64 | } |
---|
| 65 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.