Регистрации персонажей только для администраторов в отдельный класс.

This commit is contained in:
2023-12-08 17:55:27 +02:00
parent 99341cfd07
commit cda265c799
2 changed files with 63 additions and 80 deletions

View File

@@ -817,62 +817,8 @@ if ($go == 3 && $u->info['admin'] > 0) {
/** Мегафон только для администраторов. */
Announcement::init();
/** Регистрации персонажей только для администраторов. */
$pld520 = date('d.m.Y');
if (isset($_POST['loginLD520'])) {
$pld520 = $_POST['loginLD520'];
}
$pld520TS = strtotime(str_replace(".", "-", $pld520));
$pld520 = date('d.m.Y', $pld520TS);
?>
<div style="padding:0 10px 5px 10px; margin:5px; border-bottom:1px solid #cac9c7;">
<h4>Регистрации персонажей</h4>
Дата регистрации
<input name="pometka520" class="btn btn-success"
onclick="document.getElementById('loginLD520').value='<?= date(
'd.m.Y', ($pld520TS - 86400)
) ?>';" type="submit" value="&laquo;"/>
<input value="<?= $pld520 ?>" name="loginLD520" type="text" id="loginLD520" size="20"
maxlength="10"/>
<input name="pometka520" class="btn btn-success"
onclick="document.getElementById('loginLD520').value='<?= date(
'd.m.Y', ($pld520TS + 86400)
) ?>';" type="submit" value="&raquo;"/>
<input type="submit" name="pometka520" id="pometka520" class="btn" value="Показать"/>
<?php
if (isset($_POST['pometka520'])) {
$sp = mysql_query(
'SELECT `users`.`id`,`users`.`host_reg`,`users`.`banned`,`users`.`battle`,`users`.`online`,`users`.`molch1`,`users`.`bithday` FROM `users` LEFT JOIN `stats` ON `stats`.`id` = `users`.`id` WHERE `users`.`bithday` != "01.01.1800" AND `stats`.`bot` = 0 AND `users`.`timereg` >= ' . $pld520TS . ' AND `users`.`timereg` < ' . ($pld520TS + 86400) . ' ORDER BY `users`.`id` ASC'
);
$i = 1;
echo '<br><b style="color: red;">Персонажи зарегистрированные ' . $pld520 . '</b>';
while ($pl = mysql_fetch_array($sp)) {
$urt5202 = '<br>' . $i . '. ' . User::getLogin($pl['id']);
if ($pl['banned'] > 0) {
$urt5202 = '<font color=red>' . $urt5202 . '</font>';
} elseif ($pl['online'] > time() - 520) {
$urt5202 = '<font color=green>' . $urt5202 . '</font>';
}
if ($pl['molch1'] > time()) {
$urt5202 .= ' <img title="На персонаже молчанка" src=//img.new-combats.tech/i/sleep2.gif width=24 height=15>';
}
if ($pl['battle'] > 0) {
$urt5202 .= ' <a href="/logs.php?log=' . $pl['battle'] . '" target="_blank"><img src=//img.new-combats.tech/i/fighttype0.gif title="Персонаж в поединке"></a>';
}
if ($pl['host_reg'] > 0) {
$urt5202 .= ' &nbsp; <small>(Реферал персонажа ' . User::getLogin($pl['host_reg']) . ')</small>';
}
$urt520 .= $urt5202;
$i++;
}
echo $urt520;
unset($urt520, $i, $pl, $sp);
}
?>
</div>
<?php
/** Регистрации персонажей только для администраторов. */
UserRegistrationList::get();
/** Kог действий модераторов только для администраторов. */
$dsee = [];