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

Last change on this file since 60 was 60, checked in by fpvanagthoven, 14 years ago

You now get redirected to mainmenu, when you're already logged in and go to index.php

File size: 1.6 KB
RevLine 
[57]1<?php
2
3/**
4 * Description of SessionMenu
5 *
6 * @author fpvanagthoven
7 */
[60]8class 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
54            foreach ($sessions as $session) {
55                ?><option value='<?php echo $session->id; ?>'><?php echo $session->title; ?></option><?php
56        }
57            ?>
58        </select>
59        <?php
60    }
61
[57]62}
63?>
Note: See TracBrowser for help on using the repository browser.