/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/views/header.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-03 12:03:33 UTC
  • mfrom: (52.1.1 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130503120333-pps6aq9mlm3weawx
Merged the changes from the implementation team: - Added examplespage.
- Added functions to header.
- Added interactions with database.
- Added ajax controller for user settings.
- Logged in page updated with links.
- Added template layout controller.
and so forth
General changes in Codeigniter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
        <div id="header">
2
 
                <div id="logoContainer">
3
 
                        <a href="#" class="logo" title="Back to startpage">haha poo xD!</a>
4
 
                        <span class="title">Webbprogrammering</span>
5
 
                </div>
6
 
        </div>
 
1
 
 
2
<!-- header.php -->
 
3
<div id="header">
 
4
        <span class="title">Läran om Gson - D1POPCRN (7.5hp)</span>
 
5
        <a href="#" class="logo" title="Back to startpage">haha poo xD!</a>
 
6
        <span class="outerBorder"></span>
 
7
 
 
8
<?php
 
9
        //$userName
 
10
        //$userType
 
11
        if($userName==''){
 
12
        
 
13
        echo '<span class="userConfig notLoggedIn" id="loginLink" >
 
14
        <p class="userLink" title="Click to login">1</p>
 
15
        <span class="userInformation">Login</span>
 
16
        </span>';
 
17
        }
 
18
        else if($userName!=''){
 
19
        
 
20
        echo '<span class="userConfig loggedIn" id="popoutLink">
 
21
        <p class="userLink" title="Configuration">#</p> 
 
22
        <span class="userInformation">'.$userName.'</span>
 
23
        </span>';
 
24
        }
 
25
?>
 
26
</div>
 
27
 
 
28
<div class="invisHeader">
 
29
        <div id="popoutMenu">
 
30
                <ul><!--[if IE]>Using IE! You piece of shit!<![endif]-->
 
31
                        <a href="#"><li>Settings</li></a>
 
32
                        <a href="javascript:expandCourses();"><li class="expander">Courses</li></a>
 
33
                        <ul id="expandedCourses"> 
 
34
                                <li class="expanded">JavaScript - DA113G</li>
 
35
                                <li class="expanded">AJAX API - DA235H</li>
 
36
                                <li class="expanded">SQL Database - CP666A</li>
 
37
                        </ul>
 
38
                        <a href="#"><li>Add User</li></a>
 
39
                        <li name="changePwd" title="Click to change password">Change Password</li>
 
40
                        <a href="<?php echo base_url(); ?>logout"><li>Logout</li></a>
 
41
                </ul>
 
42
        </div>
 
43
</div>
 
44
 
 
45
        <div id="passwordChanger">
 
46
                <p class="passwordHeader">Change password</p><p class="passwordHeaderBorder"></p>
 
47
                <form id="changePassword" onsubmit="return confirm('<?php echo base_url(); ?>'); return false;">
 
48
                        <p>Current password:
 
49
                                <span class="errorMessage" name="currentPwd" title="Enter your current password.">#</span>
 
50
                                <input type="password" id="currentPwd"/>
 
51
                        </p>
 
52
                        <p>New password:
 
53
                                <span class="errorMessage" name="newPwd" title="Password can only use: a-z A-Z 0-9 _ - and must be of minimum 6 characters.">#</span>
 
54
                                <input type="password" id="newPwd" onkeyup="validNewPwd(), validRepeatedPwd();"/>
 
55
                        </p>
 
56
                        <p>Repeat password:
 
57
                                <span class="errorMessage" name="repeatPwd" title="Passwords don't match!">#</span>
 
58
                                <input type="password" id="repeatPwd" onkeyup="validRepeatedPwd();"/>
 
59
                        </p>
 
60
                        <p>Password hint:
 
61
                                <span class="errorMessage" name="hintPwd" title="This hint should be cool!">#</span>
 
62
                                <input type="text" id="hintPwd"/>
 
63
                        </p>
 
64
                        <input type="button" class="button" value="Cancel" onclick="cancelPasswordChange();"/>
 
65
                        <input type="button" class="button" value="Ok" onclick="confirm('<?php echo base_url(); ?>');"/>
 
66
                </form>
 
67
        </div>
 
68
        <div id="formContainer" hidden="hidden">
 
69
                <h2 class="loginTitle">Login</h2>
 
70
                <?php echo form_open('login/validate'); ?>
 
71
                <div class="inputarea">
 
72
                        <input class="text" type="text" size="20" id="username" name="username" placeholder="username"/><br>
 
73
                        <input class="text" type="password" size="20" id="password" name="password" placeholder="password"/><br>
 
74
                </div>
 
75
                <div>
 
76
                        <input class="hint" type="button"/>
 
77
                        <input class="submit" type="submit" value="Login"/>
 
78
                </div>
 
79
                </form>
 
80
        </div>
 
81
        
 
 
b'\\ No newline at end of file'