source: Dev/trunk/classes/ApplicationMenu.php @ 62

Last change on this file since 62 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.5 KB
Line 
1<?php
2
3/**
4 * Description of ApplicationMenu
5 *
6 * @author fpvanagthoven
7 */
8class ApplicationMenu extends Menu {
9
10    public function __construct() {
11       
12        ?><fieldset class="menu"><?php
13        parent::__construct('Application');
14        ?> <div class="menuButtons"> <?php
15        ApplicationMenu::createApplicationButton();
16        ApplicationMenu::loadApplicationButton();
17        ?> </div> <?php
18        ApplicationMenu::loadApplicationList(null);
19        ?></fieldset><?php
20    }
21
22    public static function createApplicationButton() {
23        ?>
24
25        <form action="applicationcreation.php" method="post">
26
27            <input type="submit" value="New" class="surveyButton bigSurveyButton" />
28
29        </form>
30
31        <?php
32    }
33
34    /**
35     *
36     * @param Survey $surveys An array of surveys
37     */
38    public static function loadApplicationButton() {
39        ?>
40        <form id="loadApplicationForm" action="applicationcreation.php" method="post">
41            <input type="button" onclick="loadApplication()" value="Load / Edit" class="surveyButton bigSurveyButton" />
42        </form>
43
44
45        <?php
46    }
47
48    public static function loadApplicationList($applications) {
49        ?>
50        <select id="applicationsToLoad" class="toLoad" size="1000">
51            <?php
52            foreach ($applications as $application) {
53                ?><option value='<?php echo $application->id; ?>'><?php echo $application->name; ?></option><?php
54        }
55            ?>
56        </select>
57        <?php
58
59    }
60
61}
62?>
Note: See TracBrowser for help on using the repository browser.