bzr branch
http://gegoxaren.bato24.eu/bzr/extremedating/trunk
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
1 |
<!DOCTYPE html>
|
30
by Daniel Johansson
Derping around |
2 |
<html> |
26
by Daniel Johansson
Fixed sessions for logins |
3 |
<?PHP
|
4 |
session_start(); |
|
5 |
?>
|
|
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
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 |
-->
|
|
30
by Daniel Johansson
Derping around |
25 |
<head> |
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
26 |
<title>Lunchdating</title> |
30
by Daniel Johansson
Derping around |
27 |
<link rel="stylesheet" type="text/css" href="css/main.css"/> |
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
28 |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> |
30
by Daniel Johansson
Derping around |
29 |
</head> |
30 |
<?PHP
|
|
31 |
if(isset($_SESSION ['userName'])){ |
|
32 |
$username = $_SESSION ['userName']; |
|
31.1.2
by Daniel Johansson
Messed around |
33 |
include 'php/db.php'; |
30
by Daniel Johansson
Derping around |
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 |
?>
|
|
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
41 |
<body id="wrapper"> |
42 |
<div id="profile"> |
|
43 |
<div id="profileheader"> |
|
30
by Daniel Johansson
Derping around |
44 |
<div class="logo"> |
31.1.4
by Daniel Johansson
Merge |
45 |
<a href="index.php"> |
17
by Daniel Johansson
made sweet love to new index.php |
46 |
<img src="img/logo.png"/> |
31.1.4
by Daniel Johansson
Merge |
47 |
</a> |
17
by Daniel Johansson
made sweet love to new index.php |
48 |
</div> |
30
by Daniel Johansson
Derping around |
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> |
|
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
56 |
</div> |
57 |
<div id="profileimg"> |
|
58 |
<img src="img/profilemockup.jpg"/> |
|
30
by Daniel Johansson
Derping around |
59 |
<p class="profilename"><?php echo $firstName . " " . $surName;?></p> |
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
60 |
</div> |
30
by Daniel Johansson
Derping around |
61 |
<div id="wallflow"> |
38
by Daniel Johansson
Work with profile.php |
62 |
<?PHP
|
63 |
$profilename = 'åäö'; |
|
64 |
$userinfo = $db->query("SELECT firstName from Users WHERE loginName='$profilename'"); |
|
65 |
$self = $userinfo->fetchAll(); |
|
66 |
$firstName = $self [0]['firstName']; |
|
67 |
$userinfo = $db->query("SELECT surName from Users WHERE loginName='$profilename'"); |
|
68 |
$self = $userinfo->fetchAll(); |
|
69 |
$surName = $self [0]['surName'] |
|
70 |
?>
|
|
71 |
<p class="profilename"><?php echo $firstName . " " . $surName;?></p> |
|
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
72 |
</div> |
73 |
</div> |
|
74 |
</body> |
|
30
by Daniel Johansson
Derping around |
75 |
<?PHP
|
76 |
} else { |
|
77 |
sleep(.5); |
|
31.1.2
by Daniel Johansson
Messed around |
78 |
header("Location:index.php"); |
30
by Daniel Johansson
Derping around |
79 |
} ?> |
2.1.6
by Daniel Johansson
Splitted out profile, started firstpage for flow |
80 |
</html> |