source: Dev/trunk/classes/SessionMenu.php @ 58

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