/extremedating/trunk

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

« back to all changes in this revision

Viewing changes to index.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-14 06:18:19 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130414061819-srmgejb8a9geyw1g
added a date-picker that workes with 'all' browsers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html>
 
2
<html>
 
3
<?PHP
 
4
        session_start();
 
5
?>
 
6
<!--
 
7
    ExtremeDating - a Hackathon 2013 project.
 
8
    Copyright (C) 2013 Gustav Hartvigsson <gustav.hartvigsson@gmail.com>
 
9
    Copyright (C) 2013 Daniel Johansson <maila@danieljohansson.nu>
 
10
 
 
11
 
 
12
    This program is free software: you can redistribute it and/or modify
 
13
    it under the terms of the GNU Affero General Public License as
 
14
    published by the Free Software Foundation, either version 3 of the
 
15
    License, or (at your option) any later version.
 
16
 
 
17
    This program is distributed in the hope that it will be useful,
 
18
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
    GNU Affero General Public License for more details.
 
21
 
 
22
    You should have received a copy of the GNU Affero General Public License
 
23
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
-->
 
25
        <head>
 
26
                <title>Lunchdating</title>
 
27
                <link rel="stylesheet" type="text/css" href="css/main.css"/>
 
28
                <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 
29
        </head>
 
30
        <?PHP
 
31
        if(isset($_SESSION ['userName'])){
 
32
        $username = $_SESSION ['userName'];
 
33
        include 'php/db.php';
 
34
        $userinfo = $db->query("SELECT firstName from Users WHERE loginName='$username'");
 
35
        $self = $userinfo->fetchAll();
 
36
        $firstName = $self [0]['firstName'];
 
37
        $userinfo = $db->query("SELECT surName from Users WHERE loginName='$username'");
 
38
        $self = $userinfo->fetchAll();
 
39
        $surName = $self [0]['surName'];
 
40
        ?>
 
41
        <body id="wrapper">
 
42
                <div id="profile">
 
43
                        <div id="profileheader">
 
44
                        <div class="logo">
 
45
                        <a href="index.php">
 
46
                        <img src="img/logo.png"/>
 
47
                        </a>
 
48
                        </div>
 
49
                                <form action="./logout.php" method="POST">
 
50
                                        <table id="logout">
 
51
                                                <tr>
 
52
                                                        <td><input id="inputbutton1" type="Submit" value="Logga ut"/></td>
 
53
                                                </tr>
 
54
                                        </table>
 
55
                                </form>
 
56
                        </div>
 
57
                        <div id="profileimg">
 
58
                                <?PHP include './php/sidepanel.php'; ?>
 
59
                        </div>
 
60
                        <div id="wallflow">
 
61
                                <?PHP include './php/feed.php'; ?>
 
62
                        </div>
 
63
                </div>
 
64
        </body>
 
65
        <?PHP
 
66
        } else {
 
67
        ?>
 
68
        <body id="wrapper">
 
69
                <div id="profile">
 
70
                        <div id="profileheader">
 
71
                                <div class="logo">
 
72
                                        <a href="index.php">
 
73
                                        <img src="img/logo.png"/>
 
74
                                        </a>
 
75
                                </div>
 
76
                                <form action="./login.php" method="POST">
 
77
                                        <table id="login">
 
78
                                                <tr>
 
79
                                                        <td><label for="username">Användarnamn:</label></td>
 
80
                                                        <td><input id="username" class="input" type="input" name="username"/></td>
 
81
                                                </tr>
 
82
                                                <tr>
 
83
                                                        <td><label for="password">Lösenord:</label></td>
 
84
                                                        <td><input id="password" class="input" type="password" name="password"/></td>
 
85
                                                </tr>
 
86
                                                <tr>
 
87
                                                        <td><input id="inputbutton1" type="Submit" value="Logga in"/></td>
 
88
                                                        <td><a href="adduser.php">Registera dig</td>
 
89
                                                </tr>
 
90
                                        </table>
 
91
                                </form>
 
92
                        </div>
 
93
                        <div id="profileimg">
 
94
                        </div>
 
95
                        <div id="wallflow">
 
96
                        </div>
 
97
                </div>
 
98
        </body>
 
99
        <?PHP } ?>
 
100
</html>