mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-19 04:03:26 +02:00
* some changes
* moved some admin html code from php to twig templates (.html files) * minimum PHP version required by installer is now 5.1.2, cause of spl_autoload_register functon. * depracated Twig to version 1.20.0 cause of Autoloader * removed unused admin stylish template
This commit is contained in:
77
system/templates/admin.dashboard.html
Normal file
77
system/templates/admin.dashboard.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th><a href="?p=dashboard&clear_cache" onclick="return confirm('Are you sure?');">Clear cache</a></th>
|
||||
</tr>
|
||||
</table>
|
||||
<form action="?p=dashboard&maintenance" method="post">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th colspan="2">Maintenance
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Site status:</td>
|
||||
<td>
|
||||
<select name="status">
|
||||
<option value="0"{% if not is_closed %} selected{% endif %}>Open</option>
|
||||
<option value="1"{% if is_closed %} selected{% endif %}>Closed</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Message: (only if closed)</td>
|
||||
<td>
|
||||
<textarea name="message" maxlength="255" cols="40" rows="5">{{ closed_message }}</textarea>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" class="button" value="Update"/>
|
||||
</td>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
<div>
|
||||
{% if status.online %}
|
||||
<p class="success" style="width: 150px; text-align: center;">Status: Online<br/>
|
||||
{{ status.uptimeReadable }}, {{ status.players }}/{{ status.playersMax }}<br/>
|
||||
{{ status.lua.ip }} : {{ status.lua.loginPort }}
|
||||
<br/><br/><u><a id="more-button" href="#"></a></u>
|
||||
|
||||
<span id="status-more">
|
||||
<br/>
|
||||
<b>Server</b>:<br/> {{ status.server }} {{ status.serverVersion }}<br/>
|
||||
<b>Version</b>: {{ status.clientVersion }}<br/><br/>
|
||||
|
||||
<b>Monsters</b>: {{ status.monsters }}<br/>
|
||||
<b>Map</b>: {{ status.mapName }}, <b>author</b>: {{ status.mapAuthor }}, <b>size</b>: {{ status.mapWidth }} x {{ status.mapHeight }}<br/>
|
||||
<b>MOTD</b>:<br/> {{ status.motd }}<br/><br/>
|
||||
|
||||
<b>Last updated</b>: {{ status.lastCheck|date("H:i:s") }}
|
||||
</span>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="error" style="width: 120px; text-align: center;">Status: Offline</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if status.online %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#status-more").hide();
|
||||
$("#more-button").text("More");
|
||||
});
|
||||
|
||||
$("#more-button").click(function() {
|
||||
if($("#status-more").is(":hidden")) {
|
||||
$("#more-button").text("Hide");
|
||||
$("#status-more").show();
|
||||
}
|
||||
else {
|
||||
$("#more-button").text("More");
|
||||
$("#status-more").hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
9
system/templates/admin.login.html
Normal file
9
system/templates/admin.login.html
Normal file
@@ -0,0 +1,9 @@
|
||||
Please login.
|
||||
<form method="post">
|
||||
<input type="password" name="account_login" id="account-name-input" size="30" maxlength="30" autofocus/><br/>
|
||||
<input type="password" name="password_login" size="30" maxlength="29"/><br/>
|
||||
<input type="checkbox" id="remember_me" name="remember_me" value="true"/>
|
||||
<label for="remember_me"> Remember me</label><br/>
|
||||
<input type="hidden" name="admin" value="1"/>
|
||||
<input type="submit" class="button" value="Login"/>
|
||||
</form>
|
46
system/templates/admin.mailer.html
Normal file
46
system/templates/admin.mailer.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
mode : "textareas",
|
||||
theme : "advanced",
|
||||
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
|
||||
|
||||
relative_urls : false,
|
||||
remove_script_host : false,
|
||||
document_base_url : "{{ constant('BASE_URL') }}",
|
||||
|
||||
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
});
|
||||
</script>
|
||||
<table width="800" cellspacing="1" cellpadding="2" border="0" align="center">
|
||||
<form method="post">
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<p class="note note-image" style="width: 80%;">Sending mails may take some time if there are much users in db.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label for="mail_subject">Subject:</label>
|
||||
</td>
|
||||
<td align="left">
|
||||
<input type="text" id="mail_subject" name="mail_subject" value="{{ mail_subject }}" size="30" maxlength="30" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea id="mail_content" name="mail_content" style="width: 100%" class="tinymce">{{ mail_content }}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<input type="checkbox" name="preview" id="preview" value="1"/><label for="preview">Just send test email to me (preview)</label>{% if preview_done %} - <b>Done.</b>{% endif %}<br/><input type="submit" name="submit" value="Send" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
51
system/templates/admin.notepad.html
Normal file
51
system/templates/admin.notepad.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<table width="700" cellspacing="1" cellpadding="2" border="0" align="center">
|
||||
<form method="post">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<p>This is your personal notepad. Be sure to save it each time you modify something.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<textarea style="text-align: left;" name="content" cols="50" rows="15" onchange="notepad_onchange(this);">{% if content is not null %}{{ content }}{% endif %}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<input type="submit" name="submit" onclick="notepad_save(this);" value="Save" />
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
{# <?php echo isset($_content) ? htmlentities($_content, ENT_COMPAT, 'UTF-8') : ''; ?> #}
|
||||
|
||||
{# confirm leaving current page if content of the notepad has been modified #}
|
||||
|
||||
<script type="text/javascript">
|
||||
var original_value = document.getElementsByName("content")[0].value;
|
||||
|
||||
function confirm_exit(e) {
|
||||
var e = e || window.event;
|
||||
var message = 'Are you sure you want to quit? Remaining changes will be unsaved.';
|
||||
|
||||
// for IE and Firefox prior to version 4
|
||||
if (e) {
|
||||
e.returnValue = message;
|
||||
}
|
||||
|
||||
// for Safari
|
||||
return message;
|
||||
}
|
||||
|
||||
function notepad_onchange(e) {
|
||||
if(original_value != e.value) {
|
||||
window.onbeforeunload = confirm_exit;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function notepad_save(e) {
|
||||
window.onbeforeunload = function(e) {};
|
||||
return true;
|
||||
}
|
||||
</script>
|
17
system/templates/admin.plugins.form.html
Normal file
17
system/templates/admin.plugins.form.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<form enctype="multipart/form-data" method="post">
|
||||
<input type="hidden" name="upload_plugin" />
|
||||
<table cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td colspan="2">Install plugin:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="file" name="plugin" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" value="Upload" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/><br/>
|
19
system/templates/admin.plugins.html
Normal file
19
system/templates/admin.plugins.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<b>Installed plugins:</b>
|
||||
<table class="table" border="0" align="center">
|
||||
<tr>
|
||||
<th>Plugin name (Description on hover)</th>
|
||||
<th>Filename</th>
|
||||
<th>Version</th>
|
||||
<th>Author</th>
|
||||
<th>Contact</th>
|
||||
</tr>
|
||||
{% for plugin in plugins %}
|
||||
<tr>
|
||||
<td><div title="{{ plugin.description }}">{{ plugin.name }}</div></td>
|
||||
<td>{{ plugin.file }}</td>
|
||||
<td>{{ plugin.version }}</td>
|
||||
<td>{{ plugin.author }}</td>
|
||||
<td>{{ plugin.contact }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
38
system/templates/admin.statistics.html
Normal file
38
system/templates/admin.statistics.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table">
|
||||
<tr><th colspan="2">Statistics</th></tr>
|
||||
<tr>
|
||||
<td>Total accounts:</td>
|
||||
<td>{{ total_accounts }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total players:</td>
|
||||
<td>{{ total_players }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total guilds:</td>
|
||||
<td>{{ total_guilds }}</td>
|
||||
</tr>
|
||||
<tr><td>Total houses:</td>
|
||||
<td>{{ total_houses }}</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table class="table">
|
||||
<tr><th colspan="3">TOP 10 - Most wealth accounts</th></tr>
|
||||
<tr><th>#</th><th>Account {{ account_type }}</th><th>Premium points</th></tr>
|
||||
{% set i = 0 %}
|
||||
{% for result in points %}
|
||||
{% set i = i + 1 %}
|
||||
<tr>
|
||||
<td>{{ i }}</td>
|
||||
<td>{{ result.name }}</td>
|
||||
<td>{{ result.premium_points }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
19
system/templates/admin.visitors.html
Normal file
19
system/templates/admin.visitors.html
Normal file
@@ -0,0 +1,19 @@
|
||||
Users being active within last {{ config_visitors_counter_ttl }} minutes.<br/><br/>
|
||||
<table class="table" width="100%" border="0">
|
||||
<tr>
|
||||
<th><b>IP</b></th>
|
||||
<th><b>Last visit</b></th>
|
||||
<th><b>Page</b></th>
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for visitor in visitors %}
|
||||
{% set i = i + 1 %}
|
||||
<tr>
|
||||
<td>{{ visitor.ip }}</td>
|
||||
<td>{{ visitor.lastvisit|date("H:i:s") }}</td>
|
||||
<td>
|
||||
<a href="{{ visitor.page }}">{{ visitor.page|slice(0, 50) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
Reference in New Issue
Block a user