mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +02:00
layout aside cleanup
This commit is contained in:
parent
f896b59e36
commit
f011f782bd
@ -30,24 +30,31 @@
|
|||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$new = 0;
|
$new = 0;
|
||||||
$cat = 4; //Category ID for feedback section
|
$cache = new Cache('engine/cache/asideFeedbackCount');
|
||||||
$threads = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_threads` WHERE `forum_id`='$cat' AND `closed`='0';");
|
if ($cache->hasExpired()) {
|
||||||
if ($threads !== false) {
|
$cat = 4; //Category ID for feedback section
|
||||||
$staffs = mysql_select_multi("SELECT `id` FROM `players` WHERE `group_id` > '1';");
|
$threads = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_threads` WHERE `forum_id`='$cat' AND `closed`='0';");
|
||||||
|
if ($threads !== false) {
|
||||||
|
$staffs = mysql_select_multi("SELECT `id` FROM `players` WHERE `group_id` > '1';");
|
||||||
|
|
||||||
foreach($threads as $thread) {
|
foreach($threads as $thread) {
|
||||||
$response = false;
|
$response = false;
|
||||||
$posts = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_posts` WHERE `thread_id`='". $thread['id'] ."';");
|
$posts = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_posts` WHERE `thread_id`='". $thread['id'] ."';");
|
||||||
if ($posts !== false) {
|
if ($posts !== false) {
|
||||||
foreach($posts as $post) {
|
foreach($posts as $post) {
|
||||||
foreach ($staffs as $staff) {
|
foreach ($staffs as $staff) {
|
||||||
if ($post['player_id'] == $staff['id']) $response = true;
|
if ($post['player_id'] == $staff['id']) $response = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$response) $new++;
|
if (!$response) $new++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$cache->setContent($new);
|
||||||
|
$cache->save();
|
||||||
|
} else {
|
||||||
|
$new = $cache->load();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
|
@ -3,17 +3,13 @@
|
|||||||
Town list / houses
|
Town list / houses
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<form action="houses.php" method="<?php if ($config['ServerEngine'] !== 'TFS_10') echo "post"; else echo "get" ;?>">
|
<form action="houses.php" method="get">
|
||||||
<select name="<?php if ($config['ServerEngine'] !== 'TFS_10') echo "selected"; else echo "id" ;?>">
|
<select name="id">
|
||||||
<?php
|
<?php
|
||||||
foreach ($config['towns'] as $id => $name)
|
foreach ($config['towns'] as $id => $name)
|
||||||
echo '<option value="'. $id .'">'. $name .'</option>';
|
echo '<option value="'. $id .'">'. $name .'</option>';
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php
|
|
||||||
/* Form file */
|
|
||||||
if ($config['ServerEngine'] !== 'TFS_10') Token::create();
|
|
||||||
?>
|
|
||||||
<input type="submit" value="Fetch houses">
|
<input type="submit" value="Fetch houses">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="well myaccount_widget widget" id="loginContainer">
|
<div class="well myaccount_widget widget" id="loginContainer">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
Welcome, <?php if ($config['ServerEngine'] !== 'OTHIRE') echo $user_data['name']; else echo $user_data['id'];?>.
|
Welcome, <?php echo $user_data['name']; ?>.
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<ul class="linkbuttons">
|
<ul class="linkbuttons">
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$cache = new Cache('engine/cache/topPlayer');
|
$cache = new Cache('engine/cache/topPlayer');
|
||||||
if ($cache->hasExpired()) {
|
if ($cache->hasExpired()) {
|
||||||
$players = mysql_select_multi('SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < ' . $config['highscore']['ignoreGroupId'] . ' ORDER BY `level` DESC, `experience` DESC LIMIT 5;');
|
$players = mysql_select_multi("
|
||||||
|
SELECT `name`, `level`, `experience`
|
||||||
|
FROM `players` WHERE `group_id` < {$config['highscore']['ignoreGroupId']}
|
||||||
|
ORDER BY `level` DESC, `experience` DESC LIMIT 5;
|
||||||
|
");
|
||||||
|
|
||||||
$cache->setContent($players);
|
$cache->setContent($players);
|
||||||
$cache->save();
|
$cache->save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user