1
<img class="profilepic" src="./get_image.php?userName=<?PHP echo $username;?>"/>
2
<a href="profile.php?uid=<?php echo $username; ?>" class="profilename"><?php echo $firstName . " " . $surName;?></a>
3
<p class="smallheader">Personer jag vill träffa:</p>
6
ExtremeDating - a Hackathon 2013 project.
7
Copyright (C) 2013 Gustav Hartvigsson <gustav.hartvigsson@gmail.com>
8
Copyright (C) 2013 Daniel Johansson <maila@danieljohansson.nu>
11
This program is free software: you can redistribute it and/or modify
12
it under the terms of the GNU Affero General Public License as
13
published by the Free Software Foundation, either version 3 of the
14
License, or (at your option) any later version.
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU Affero General Public License for more details.
21
You should have received a copy of the GNU Affero General Public License
22
along with this program. If not, see <http://www.gnu.org/licenses/>.
24
$relationinfo = $db->query("SELECT user2 from dateInterests WHERE(user1='$username')");
25
$relationstring = $relationinfo->fetchAll();
27
foreach ($relationstring as $relationquery) {
28
$userinfo = $db->query("SELECT firstName from Users WHERE loginName='$relationquery[0]'");
29
$self = $userinfo->fetchAll();
30
$firstName = $self [0]['firstName'];
31
$userinfo = $db->query("SELECT surName from Users WHERE loginName='$relationquery[0]'");
32
$self = $userinfo->fetchAll();
33
$surName = $self [0]['surName'];
34
echo '<li><a href="./profile.php?uid=' . $relationquery[0] . '">' . $firstName . ' ' . $surName . '</a></li>';
37
echo '<p class="smallheader">Personer som vill träffa mig:</p>';
39
$relationinfo = $db->query("SELECT user2 from dateInterests WHERE(user1='$username')");
40
$relationstring = $relationinfo->fetchAll();
41
foreach ($relationstring as $relationquery) {
42
$relation2info = $db->query("SELECT user2 from dateInterests WHERE(user1='$relationquery[0]')");
43
$relation2string = $relation2info->fetchAll();
44
foreach ($relation2string as $relation2query) {;
45
if($relation2query[0] == $username){
46
$userinfo = $db->query("SELECT firstName from Users WHERE loginName='$relationquery[0]'");
47
$self = $userinfo->fetchAll();
48
$firstName = $self [0]['firstName'];
49
$userinfo = $db->query("SELECT surName from Users WHERE loginName='$relationquery[0]'");
50
$self = $userinfo->fetchAll();
51
$surName = $self [0]['surName'];
52
echo '<li><a href="./profile.php?uid=' . $relationquery[0] . '">' . $firstName . ' ' . $surName . '</a></li>';