This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadmin_groups.php
112 lines (112 loc) · 3.83 KB
/
admin_groups.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
session_start();
include "exec/dbconnect.php";
include "exec/check_user.php";
if($_SESSION['loginin'] == "1"){
if($_SESSION['groupu'] == "2"){
if($_GET['idg']){
include "exec/datefn.php";
include "exec/header.php";
include "exec/leftmenu.php";
$qu = $dbh1->prepare("SELECT * FROM club WHERE id = '".$_GET['idg']."'");
$qu->execute();
$user = $qu->fetch();
?>
<div id="content-infoname"><b><?php echo $user['name'].' '.$user['surname']; ?></b></div>
<form action="admin_groups.php" method="post">
<input type="hidden" name="edit_id" <?php echo 'value="'.$_GET['idg'].'"'; ?>>
<table border="0" style="font-size:11px;">
<tr><td style="width:150px;"><div style="float:right;padding-right:7px;color:#777;">Имя:</div></td><td><input id="text" style="width:380px;" name="edit_general_fname" <?php echo 'value="'.$user['name'].'"'; ?>></td></tr>
<tr><td style="width:150px;"><div style="float:right;padding-right:7px;color:#777;">О себе:</div></td><td><textarea style="min-width:380px;max-width:380px;" id="text" name="edit_general_about"><?php echo ''.$user['about'].''; ?></textarea></td></tr>
<tr><td style="width:150px;"><div style="float:right;padding-right:7px;color:#777;">Забанен?:</div></td><td><select style="width:380px;" name="edit_general_ban" style="width:185px;"><option value="1"<?php if($user['ban'] == "1") {echo ' selected';} ?>>Да</option>
<option value="0"<?php if($user['ban'] == "0") {echo ' selected';} ?>>Нет</option></select></td></tr>
<tr><td style="width:150px;"><div style="float:right;padding-right:7px;color:#777;">Галочка?:</div></td><td><select style="width:380px;" name="edit_general_verify" style="width:185px;">
<option value="1"<?php if($user['verify'] == "1") {echo ' selected';} ?>>Обычная</option>
<option value="5"<?php if($user['verify'] == "5") {echo ' selected';} ?>>Админская</option>
<option value="0"<?php if($user['verify'] == "0") {echo ' selected';} ?>>Нету</option>
<option value="3"<?php if($user['verify'] == "3") {echo ' selected';} ?>>Не указано</option></select></td></tr>
<?php
if($user['ban'] == "1"){
echo '<tr><td style="width:150px;"><div style="float:right;padding-right:7px;color:#777;">Причина бана:</div></td><td><input id="text" style="width:380px;" name="edit_general_fname" value="'.$user['comment_ban'].'"></td></tr>';
}
?>
</table>
<div style="margin-left:157px;"><input type="submit" id="button" value="Сохранить" name="edit_general_submit"></div>
</form>
</div>
<div><?php include "exec/footer.php"; ?></div>
</body>
</html><?php
}else{
include "exec/datefn.php";
include "exec/header.php";
include "exec/leftmenu.php";
?>
<div id="content-infoname"><b>Сообщества</b></div>
<table border="0" style="font-size:11px;">
<tr>
<td>
ID
</td>
<td>
Название
</td>
<td>
Описание
</td>
<td>
Верификация
</td>
<td>
Управление
</td>
</tr>
<?php $qu = $dbh1->prepare("SELECT * FROM club");
$qu->execute();
while($users = $qu->fetch()){
if($users['verify'] == "0"){
$gr = "-";
}elseif($users['verify'] == "1"){
$gr = "+";
}
echo '<tr>
<td>
'.$users['id'].'
</td>
<td>
<a href="club'.$users['id'].'">'.$users['name'].'</a>
</td>
<td>
'.$users['about'].'
</td>
<td>
'.$gr.'
</td>
<td>
<a href="admin_groups.php?idg='.$users['id'].'">Перейти в управление</a>
</td>
</tr>';
} ?>
</table>
<br>
</div>
<div><?php include "exec/footer.php"; ?></div>
</body>
</html>
<?php
}}else{
include "exec/header.php";
include "exec/leftmenu.php";
?>
<div style="margin:0 -10px;padding:55px;"><center><img src="img/critical-error.png"><br><br><b style="font-size:25px;">Access denied</b><br><text style="font-size:14px;">У Вас нет доступа к данной странице.</text></center></div>
</div>
<div><?php include "exec/footer.php"; ?></div>
</body>
</html>
<?php
}
}else{
header("Location: blank/..");
exit();
}
?>