-
Notifications
You must be signed in to change notification settings - Fork 0
/
myDebitors.php
47 lines (36 loc) · 1.62 KB
/
myDebitors.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<? include_once ('comp/head.php'); ?>
<? include_once ('comp/header.php'); ?>
<div class="row">
<div class="grid-100 tece">
<h1>Meine Debitoren</h1>
</div>
</div>
<?
$user_query = mysql_query("SELECT users.username, users.id, users.pic FROM users JOIN debitors ON users.id = debitors.debitor WHERE debitors.creditor LIKE '$user_id' ORDER BY users.username") or die (mysql_error());
while($row = mysql_fetch_assoc($user_query)){
echo '
<div class="row">
<div class="grid-80"><div id="user-pic" class="grid-15 no-pad"><div class="quart user-pic" style="background-image: url('.$row['pic'].');"></div></div><div class="grid-80 marg-5 center-vert" data-center-to="user-pic"><h1>'.$row['username'].'</h1></div></div>
</div>';
}
?>
<div class="row">
<div class="grid-100 tece">
<h1>Debitor hinzufügen</h1>
</div>
</div>
<?
$user_query = mysql_query("SELECT users.id, users.username, users.pic FROM users WHERE users.id NOT LIKE '$user_id' AND users.id NOT IN (SELECT debitor FROM debitors WHERE creditor LIKE '$user_id') ORDER BY users.username") or die (mysql_error());
while($row = mysql_fetch_assoc($user_query)){
echo '
<a href="script/add_debitor.php?creditor='.$user_id.'&debitor='.$row['id'].'">
<div class="row norm-bot">
<div class="grid-80"><div id="user-pic" class="grid-15 no-pad"><div class="quart user-pic" style="background-image: url('.$row['pic'].');"></div></div><div class="grid-80 marg-5 center-vert" data-center-to="user-pic"><h1>'.$row['username'].'</h1></div></div>
</div>
</a>';
};
?>
<div class="row norm-bot">
<div class="grid-100"> </div>
</div>
<? include_once ('comp/footer.php'); ?>