source: Dev/trunk/index.php @ 144

Last change on this file since 144 was 142, checked in by fpvanagthoven, 14 years ago
  • Added pipelineEditor.php, testing graphical pipeline creation.
  • Added DisplayStep?.php, a visual representation of a contained Step (Questionnaire/Dashboard?/etc..) object in a pipeline. Allows icon-based presentation of pipeline.
  • Fixed StyleSheet?.php class, can be passed string argument (style name) to choose different .css files.
  • Added Logo class, basically the same as classes_old/Logo.php
  • Added placeholder icons and some UI elemtent images for use in pipelineEditor.php
File size: 1.7 KB
RevLine 
[47]1<?php
2require 'classes/master.php'; //should be at top of every page
[10]3
[47]4if (isset($_POST['register'])) {
5    if ($_POST['username'] != null && $_POST['password'] != null) {
6        $userDBI = new UserDatabaseInterface();
7        $user_exists = $userDBI->checkUserName($_POST['username']);
8        if (!$user_exists) {
9            $userDBI->addNewUser($_POST);
10        }
11        else
12            echo "Username already exists, try something else";
13    }
14    else
15        echo "please fill in a username and password";
[44]16}
[60]17
18if (isset($_SESSION['username']))
19    redirect('mainmenu.php');
[38]20?>
21
[10]22<!DOCTYPE html>
23<html>
24    <head>
25        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
26        <title>Facilitator</title>
[142]27        <?php new StyleSheet("awesome"); ?>
[38]28        <script type="text/javascript" src="js/menu.js"></script>
[10]29    </head>
30    <body>
31        <div id="header">
[47]32<?php new Logo(); ?>
33        </div>
34
[10]35        <div id="wrapper">
[47]36
[10]37            <div id="content">
[58]38                <div class="menu">
[47]39                    <form action="mainmenu.php" method="POST">
[48]40                        <h3>Username</h3>
[47]41                        <input type="text" name="username"><br />
[48]42                        <h3>Password</h3>
[47]43                        <input type="password" name="password"><br/><br/><br/>
44                        <input type="submit" name="login" class="surveyButton bigSurveyButton" value="Log in">
45                    </form>
46                    <form action="register.php" method="POST">
47                        <input type="submit" name="register" class="surveyButton bigSurveyButton" value="Register">
48                    </form>
[10]49                </div>
50            </div>
51        </div>
52    </body>
[47]53</html>
Note: See TracBrowser for help on using the repository browser.