Зачем-то инкапсулирем.
This commit is contained in:
+2
-2
@@ -308,7 +308,7 @@ Template::header('Вход в Лабиринты');
|
||||
</div>
|
||||
<?
|
||||
if (isset($_GET['del_com'])) {
|
||||
if ($user->admin) {
|
||||
if ($user->getAdmin()) {
|
||||
mysql_query('UPDATE `laba_zv` SET `com` = "" WHERE `id` = "' . (int)$_GET['del_com'] . '" LIMIT 1');
|
||||
$re = 'Комментарий удалён';
|
||||
} else {
|
||||
@@ -400,7 +400,7 @@ while ($pl = mysql_fetch_array($sp)) {
|
||||
}
|
||||
$userszv = ltrim($userszv, ', ');
|
||||
if ($pl['com'] != '') {
|
||||
if ($user->admin) {
|
||||
if ($user->getAdmin()) {
|
||||
$del = ' <a href=\'lab_enter.php?del_com=' . $pl['id'] . '\'>Удалить комментарий</a>';
|
||||
} else {
|
||||
$del = '';
|
||||
|
||||
Reference in New Issue
Block a user