Moderator options
This commit is contained in:
parent
ff8e6b818f
commit
6a57db8588
11
forum.php
11
forum.php
@ -498,7 +498,8 @@ if (isset($_GET['do']) && $isModerator == true) {
|
||||
</a>
|
||||
<a onclick="var obj; if (obj = prompt('Введите комментарий','')) { window.location='forum.php?topic=<?= $_GET['topic'] ?>&konftop=<?= htmlspecialchars($_GET['conf']) ?>&page=<?= $_GET['page'] ?>&cpr='+obj+'&com=<?= $row['id'] ?>'; }"
|
||||
href='#'>
|
||||
| <small>Комментарий</small>
|
||||
|
|
||||
<small>Комментарий</small>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
@ -584,10 +585,10 @@ if (isset($_GET['do']) && $isModerator == true) {
|
||||
if (is_numeric($_GET['conf']) && $row = db::c()->query('SELECT * FROM `forum` WHERE `id` = ?i', $_GET['conf'])->fetch_assoc()) {
|
||||
if (($row['min_align'] == 0 && $row['max_align'] == 0) || ($user['align'] >= $row['min_align'] && $user['align'] <= $row['max_align']) || $isAdmin) {
|
||||
$confname = 'Конференция «' . $row['topic'] . '»';
|
||||
$pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = ?i ORDER BY `fix` DESC, `updated` DESC', $_GET['conf'])->fetch_assoc();
|
||||
$pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = ?i ORDER BY `fix` DESC, `updated` DESC', $_GET['conf'])->fetch_row();
|
||||
$pgs = $pgs[0] / 20;
|
||||
$pages_str = '';
|
||||
$page = (int)$_GET['page'] > 0 ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0;
|
||||
$page = !empty((int)$_GET['page']) ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0;
|
||||
$page = ceil($page);
|
||||
?>
|
||||
<td rowspan="2" style="padding-left: 10px">
|
||||
@ -614,13 +615,14 @@ if (isset($_GET['do']) && $isModerator == true) {
|
||||
<img src="i/ico/news.gif" width="16" height="16"/> Страницы:<?= $pages_str ?>
|
||||
</div>
|
||||
<?php
|
||||
if (!empty($_GET['conf']) AND !empty($_GET['page'])) {
|
||||
$data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY `fix` DESC, `updated` DESC LIMIT ?i,20', $_GET['conf'], ($_GET['page'] * 20));
|
||||
while ($row = $data->fetch_assoc()) {
|
||||
$logi = '';
|
||||
$userlist = '';
|
||||
$icons = $row['icon'];
|
||||
$data2 = db::c()->query('SELECT `author` FROM (SELECT `author`,`id` FROM `forum` WHERE `parent` = ?i ORDER BY `id` DESC LIMIT 10) AS sTable ORDER BY id DESC', $row['id']);
|
||||
while ($row2 = $data2->fetch_assoc()) {
|
||||
while ($row2 = $data2->fetch_row()) {
|
||||
$userlist = strip_tags($row2[0], "");
|
||||
list ($username, $level) = split(" \[", $userlist);
|
||||
$logi .= $username;
|
||||
@ -656,6 +658,7 @@ if (isset($_GET['do']) && $isModerator == true) {
|
||||
<br /><small>Ответов: <b>" . $count . "</b> <span title=\"Последний ответ: " . $logi . "\" style=\"border-bottom:1px dashed grey;cursor:help;font-size:10px;\">(" . $lasttime . ")</span></small>
|
||||
</p></div>";
|
||||
}
|
||||
}
|
||||
if ($pgs > 1) echo "<p><img src=i/ico/news.gif width=\"16\" height=\"16\" /> Страницы:";
|
||||
|
||||
echo $pages_str . "</p>";
|
||||
|
Loading…
Reference in New Issue
Block a user