mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Znote AAC rev 168 from subversion.
This commit is contained in:
44
layout/widgets/Wadmin.php
Normal file
44
layout/widgets/Wadmin.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<div class="sidebar">
|
||||
<h2>Administration:</h2>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li>
|
||||
<a href='admin.php'>Admin Page</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='admin_news.php'>Admin News</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='admin_gallery.php'>Admin Gallery</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='admin_skills.php'>Admin Skills</a>
|
||||
</li>
|
||||
<?php
|
||||
$new = 0;
|
||||
$cat = 4; //Category ID for feedback section
|
||||
$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) {
|
||||
$response = false;
|
||||
$posts = mysql_select_multi("SELECT `id`, `player_id` FROM `znote_forum_posts` WHERE `thread_id`='". $thread['id'] ."';");
|
||||
if ($posts !== false) {
|
||||
foreach($posts as $post) {
|
||||
foreach ($staffs as $staff) {
|
||||
if ($post['player_id'] == $staff['id']) $response = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$response) $new++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href='forum.php?cat=4'>Feedback: [<?php echo $new; ?>] new</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
8
layout/widgets/charactersearch.php
Normal file
8
layout/widgets/charactersearch.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="sidebar">
|
||||
<h2>Character search</h2>
|
||||
<div class="inner">
|
||||
<form type="submit" action="characterprofile.php" method="get">
|
||||
<input type="text" name="name" class="search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
6
layout/widgets/example1.php
Normal file
6
layout/widgets/example1.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="sidebar">
|
||||
<h3>Latest News</h3>
|
||||
<h4>New Website Launched</h4>
|
||||
<h5>January 1st, 2012</h5>
|
||||
<p>2012 sees the redesign of our website. Take a look around and let us know what you think.<br /><a href="#">Read more</a></p>
|
||||
</div>
|
9
layout/widgets/example2.php
Normal file
9
layout/widgets/example2.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="sidebar">
|
||||
<h3>Useful Links</h3>
|
||||
<ul>
|
||||
<li><a href="#">First Link</a></li>
|
||||
<li><a href="#">Another Link</a></li>
|
||||
<li><a href="#">And Another</a></li>
|
||||
<li><a href="#">Last One</a></li>
|
||||
</ul>
|
||||
</div>
|
25
layout/widgets/highscore.php
Normal file
25
layout/widgets/highscore.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<div class="sidebar">
|
||||
<h2>Search highscores</h2>
|
||||
<div class="inner">
|
||||
<form action="highscores.php" method="post">
|
||||
|
||||
Select skill type to view:<br>
|
||||
<select name="selected">
|
||||
<option value="7">Experience</option>
|
||||
<option value="5">Shielding</option>
|
||||
<option value="3">Axe</option>
|
||||
<option value="2">Sword</option>
|
||||
<option value="1">Club</option>
|
||||
<option value="4">Distance</option>
|
||||
<option value="0">Fist</option>
|
||||
<option value="6">Fish</option>
|
||||
<option value="8">Magic</option>
|
||||
</select>
|
||||
<?php
|
||||
/* Form file */
|
||||
Token::create();
|
||||
?>
|
||||
<input type="submit" value="Fetch scoreboard">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
19
layout/widgets/houses.php
Normal file
19
layout/widgets/houses.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="sidebar">
|
||||
<h2>Search town list</h2>
|
||||
<div class="inner">
|
||||
<form action="houses.php" method="post">
|
||||
|
||||
Select town:<br>
|
||||
<select name="selected">
|
||||
<?php
|
||||
foreach ($config['towns'] as $id => $name) echo '<option value="'. $id .'">'. $name .'</option>';
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
/* Form file */
|
||||
Token::create();
|
||||
?>
|
||||
<input type="submit" value="Fetch houses">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
22
layout/widgets/loggedin.php
Normal file
22
layout/widgets/loggedin.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="sidebar">
|
||||
<h2>Welcome, <?php echo $user_data['name']; ?>.</h2>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li>
|
||||
<a href='myaccount.php'>My Account</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='createcharacter.php'>Create Character</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='changepassword.php'>Change Password</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='settings.php'>Settings</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='logout.php'>Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
26
layout/widgets/login.php
Normal file
26
layout/widgets/login.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="sidebar">
|
||||
<h2>Login / Register</h2>
|
||||
<div class="inner">
|
||||
<form action="login.php" method="post">
|
||||
<ul id="login">
|
||||
<li>
|
||||
Userame: <br>
|
||||
<input type="text" name="username">
|
||||
</li>
|
||||
<li>
|
||||
Password: <br>
|
||||
<input type="password" name="password">
|
||||
</li>
|
||||
<li>
|
||||
<input type="submit" value="Log in">
|
||||
</li>
|
||||
<?php
|
||||
/* Form file */
|
||||
Token::create();
|
||||
?>
|
||||
<center> <h3><a href="register.php">New account</a></h3>
|
||||
<font size="1">- Lost <a href="recovery.php?mode=username">username</a> or <a href="recovery.php?mode=password">password</a>?</font></center>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
31
layout/widgets/serverinfo.php
Normal file
31
layout/widgets/serverinfo.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<div class="sidebar">
|
||||
<h2>Server Information</h2>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<?php
|
||||
$status = true;
|
||||
if ($config['status']['status_check']) {
|
||||
@$sock = fsockopen ($config['status']['status_ip'], $config['status']['status_port'], $errno, $errstr, 1);
|
||||
if(!$sock) {
|
||||
echo "<span style='color:red;font-weight:bold;'><center>Server Offline!</center></span><br/>";
|
||||
$status = false;
|
||||
}
|
||||
else {
|
||||
$info = chr(6).chr(0).chr(255).chr(255).'info';
|
||||
fwrite($sock, $info);
|
||||
$data='';
|
||||
while (!feof($sock))$data .= fgets($sock, 1024);
|
||||
fclose($sock);
|
||||
echo "<span style='color:green;font-weight:bold;'><center>Server Online!</center></span><br />";
|
||||
}
|
||||
}
|
||||
if ($status) {
|
||||
?>
|
||||
<li><a href="onlinelist.php">Players online: <?php echo user_count_online();?></a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<li>Registered accounts: <?php echo user_count_accounts();?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
24
layout/widgets/topplayers.php
Normal file
24
layout/widgets/topplayers.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="sidebar">
|
||||
<h3>Top 5 players</h3>
|
||||
<?php
|
||||
|
||||
$cache = new Cache('engine/cache/topPlayer');
|
||||
if ($cache->hasExpired()) {
|
||||
$players = mysql_select_multi("SELECT `name`, `level`, `experience` FROM `players` ORDER BY `experience` DESC LIMIT 5;");
|
||||
|
||||
$cache->setContent($players);
|
||||
$cache->save();
|
||||
} else {
|
||||
$players = $cache->load();
|
||||
}
|
||||
|
||||
if ($players) {
|
||||
$count = 1;
|
||||
foreach($players as $player) {
|
||||
echo "$count - <a href='characterprofile.php?name=". $player['name']. "'>". $player['name']. "</a> (". $player['level'] .").<br>";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
</div>
|
35
layout/widgets/twitter.php
Normal file
35
layout/widgets/twitter.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="sidebar">
|
||||
<!-- TWITTER widget
|
||||
Generate your own twitter widget at:
|
||||
http://twitter.com/about/resources/widgets/widget_profile
|
||||
Recommended size: width: auto, height: 300
|
||||
-->
|
||||
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
|
||||
<script>
|
||||
new TWTR.Widget({
|
||||
version: 2,
|
||||
type: 'profile',
|
||||
rpp: 4,
|
||||
interval: 30000,
|
||||
width: 215,
|
||||
height: 300,
|
||||
theme: {
|
||||
shell: {
|
||||
background: '#d1a562',
|
||||
color: '#000000'
|
||||
},
|
||||
tweets: {
|
||||
background: '#ffffff',
|
||||
color: '#ba4100',
|
||||
links: '#ff0000'
|
||||
}
|
||||
},
|
||||
features: {
|
||||
scrollbar: false,
|
||||
loop: false,
|
||||
live: false,
|
||||
behavior: 'all'
|
||||
}
|
||||
}).render().setUser('leremere').start();
|
||||
</script>
|
||||
</div>
|
Reference in New Issue
Block a user