1 | <?php
|
---|
2 | $id = (int) $_GET['str1'];
|
---|
3 | $tpl->output['info_servers'] = $text['info_servers'];
|
---|
4 | $tpl->output['info_num_of_comments'] = $text['info_num_of_comments'];
|
---|
5 | $tpl->output['info_num_of_servers'] = $text['info_num_of_servers'];
|
---|
6 | $user_info = $db->query_fetch_assoc('select `name`, `id`, `email`, `admin`, `ban` from `users` where `id`='.$id);
|
---|
7 | $tpl->output['name']=$user_info['name'];
|
---|
8 | if ($user_info['admin']==1)
|
---|
9 | {
|
---|
10 | $tpl->output['user_name']=$user_info['name'].'(Admin)';
|
---|
11 | }
|
---|
12 | else
|
---|
13 | {
|
---|
14 | $tpl->output['user_name']=$user_info['name'];
|
---|
15 | }
|
---|
16 |
|
---|
17 | if ($user['admin']==1)
|
---|
18 | {
|
---|
19 | $tpl->output['user_email'] = '<tr class="table"><td align="left"><b>E-mail</b></td><td align="center"><a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a></td></tr>';
|
---|
20 | if ($user_info['ban']==1)
|
---|
21 | {
|
---|
22 | $tpl->output['admin'] = '<tr class="table"><td align="center" colspan="2"><a href="action.php?do=unban&id='.$id.'">UnBan</a></td></tr>';
|
---|
23 | }
|
---|
24 | else
|
---|
25 | {
|
---|
26 | $tpl->output['admin'] = '<tr class="table"><td align="center" colspan="2"><a href="action.php?do=ban&id='.$id.'">Ban</a></td></tr>';
|
---|
27 | }
|
---|
28 | }
|
---|
29 | else
|
---|
30 | {
|
---|
31 | $tpl->output['user_email'] = '';
|
---|
32 | $tpl->output['admin']='';
|
---|
33 | }
|
---|
34 |
|
---|
35 | $db->query('servers', 'select `name`, `id` from `servers` where `owner`='.$id);
|
---|
36 | $tpl->output['user_num_of_servers'] = $db->query_result('select count(*) as pocet from `servers` where `owner`='.$id);
|
---|
37 | $tpl->output['user_servers'] = '';
|
---|
38 | while ($row = $db->fetch_assoc('servers'))
|
---|
39 | {
|
---|
40 | $tpl->output['user_servers'] .= ulink('server/'.$row['id'], $row['name']).'<br />';
|
---|
41 | }
|
---|
42 | $tpl->output['user_num_of_comments'] = $db->query_result('select count(*) as pocet from `comments` where `author`='.$id);
|
---|
43 |
|
---|
44 | ?>
|
---|