* Updates

+Added missing images
+Added report viewer as requested by icekis
-Code cleanup

if strict db, need to set spell to null run

ALTER TABLE `myaac_spells` CHANGE `spell` `spell` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
This commit is contained in:
Lee
2018-12-12 19:44:29 +00:00
committed by slawkens
parent 876b1b988a
commit 1b539f82ac
14 changed files with 456 additions and 260 deletions

View File

@@ -6,58 +6,44 @@
</div>
</div>
<div class="box-body">
<div id="tb_pages_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
<div class="col-sm-12">
<table id="tb_pages" class="table table-bordered table-striped dataTable" role="grid"
aria-describedby="tb_pages_info">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="tb_pages" rowspan="1" colspan="1"
aria-sort="ascending" aria-label="Name: activate to sort column descending">Name
</th>
<th class="sorting" tabindex="0" aria-controls="tb_pages" rowspan="1" colspan="1"
aria-sort="ascending" aria-label="Title: activate to sort column descending">Title
</th>
<th class="" tabindex="0" aria-controls="tb_pages" rowspan="1" colspan="1"
style="width: 150px;">Options
</th>
</tr>
</thead>
<tbody>
{% for page in pages %}
<tr>
<td>{{ page.link|raw }}</td>
<td><i>{{ page.title }}</i></td>
<td>
<a href="?p=pages&action=edit&id={{ page.id }}" class="ico" title="Edit"><span
class="btn btn-success btn-sm edit btn-flat"><i class="fa fa-edit"></i></span></a>
<a href="?p=pages&action=delete&id={{ page.id }}" class="ico"
onclick="return confirm('Are you sure?');" title="Delete"><span
class="btn btn-danger btn-sm delete btn-flat"><i
class="fa fa-trash"></i></span></a>
<a href="?p=pages&action=hide&id={{ page.id }}" class="ico"
title="{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}">
{% if page.hidden != 1 %}
<span class="btn btn-primary btn-sm btn-flat"><i
class="fa fa-eye"></i></span>
{% else %}
<span class="btn btn-default btn-sm btn-flat"><i
class="fa fa-eye-slash"></i></span>
{% endif %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class="row">
<div class="col-sm-12">
<table id="tb_pages">
<thead>
<tr>
<th>Name</th>
<th>Title</th>
<th style="width: 150px;">Options</th>
</tr>
</thead>
<tbody>
{% for page in pages %}
<tr>
<th>Name</th>
<th>Title</th>
<th>Options</th>
</tfoot>
</table>
</div>
<td>{{ page.link|raw }}</td>
<td><i>{{ page.title }}</i></td>
<td>
<a href="?p=pages&action=edit&id={{ page.id }}" class="ico" title="Edit"><span
class="btn btn-success btn-sm edit btn-flat"><i
class="fa fa-edit"></i></span></a>
<a href="?p=pages&action=delete&id={{ page.id }}" class="ico"
onclick="return confirm('Are you sure?');" title="Delete"><span
class="btn btn-danger btn-sm delete btn-flat"><i
class="fa fa-trash"></i></span></a>
<a href="?p=pages&action=hide&id={{ page.id }}" class="ico"
title="{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}">
{% if page.hidden != 1 %}
<span class="btn btn-primary btn-sm btn-flat"><i
class="fa fa-eye"></i></span>
{% else %}
<span class="btn btn-default btn-sm btn-flat"><i
class="fa fa-eye-slash"></i></span>
{% endif %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -5,55 +5,40 @@
<h3 class="box-title">Installed plugins:</h3>
</div>
<div class="box-body">
<div id="plugins_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
<div class="col-sm-12">
<table id="plugins" class="table table-bordered table-striped dataTable" role="grid"
aria-describedby="plugins_info">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="plugins" rowspan="1"
colspan="1" aria-sort="ascending"
aria-label="Name: activate to sort column descending">Name
</th>
<th class="sorting" tabindex="0" aria-controls="plugins" rowspan="1" colspan="1"
aria-label="Description: activate to sort column ascending">Description
</th>
<th class="sorting" tabindex="0" aria-controls="plugins" rowspan="1" colspan="1"
aria-label="Author: activate to sort column ascending">Author
</th>
<th class="sorting" tabindex="0" aria-controls="plugins" rowspan="1" colspan="1"
aria-label="Filename: activate to sort column ascending">Filename
</th>
<th class="sorting" tabindex="0" aria-controls="plugins" rowspan="1" colspan="1"
aria-label="Options: activate to sort column ascending"
style="width: 55px;">Options
</th>
<div class="row">
<div class="col-sm-12">
<table id="tb_plugins">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Author</th>
<th>Filename</th>
<th style="width: 55px;">Options</th>
</tr>
</thead>
<tbody>
{% for plugin in plugins %}
<tr>
<td><b>{{ plugin.name }}</b><br>
<small>{{ plugin.description }}</small>
</td>
<td>{{ plugin.version }}</td>
<td><b>{{ plugin.author }}</b><br>
<small>{{ plugin.contact }}</small>
</td>
<td>{{ plugin.file }}.json</td>
<td>
{% if plugin.uninstall %}
<a href="?p=plugins&uninstall={{ plugin.file }}" title="Uninstall"
onclick="return confirm('Are you sure?');"><span
class="btn btn-danger btn-sm delete btn-flat"><i
class="fa fa-trash"></i></span></a>
{% endif %}</td>
</tr>
</thead>
<tbody>
{% for plugin in plugins %}
<tr>
<td><b>{{ plugin.name }}</b><br>
<small>{{ plugin.description }}</small>
</td>
<td>{{ plugin.version }}</td>
<td><b>{{ plugin.author }}</b><br>
<small>{{ plugin.contact }}</small>
</td>
<td>{{ plugin.file }}.json</td>
<td>
{% if plugin.uninstall %}
<a href="?p=plugins&uninstall={{ plugin.file }}" title="Uninstall"
onclick="return confirm('Are you sure?');"><span
class="btn btn-danger btn-sm delete btn-flat"><i
class="fa fa-trash"></i></span></a>
{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
@@ -62,6 +47,6 @@
</div>
<script>
$(function () {
$('#plugins').DataTable()
$('#tb_plugins').DataTable()
})
</script>

View File

@@ -3,54 +3,36 @@
<h3 class="box-title">Users active within last {{ config_visitors_counter_ttl }} minutes.</h3>
</div>
<div class="box-body">
<div id="visitors_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
<div class="col-sm-12">
<table id="visitors" class="table table-bordered table-striped dataTable" role="grid"
aria-describedby="visitors_info">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
aria-sort="ascending" aria-label="IP: activate to sort column descending"
style="width: 297px;">IP
</th>
<th class="sorting" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
aria-label="Last visit: activate to sort column ascending" style="width: 361px;">Last
visit
</th>
<th class="sorting" tabindex="0" aria-controls="visitors" rowspan="1" colspan="1"
aria-label="Page: activate to sort column ascending" style="width: 322px;">Page
</th>
<div class="row">
<div class="col-sm-12">
<table id="tb_visitors">
<thead>
<tr>
<th>IP</th>
<th>Last visit</th>
<th>Page</th>
</tr>
</thead>
<tbody>
{% set i = 0 %}
{% for visitor in visitors %}
{% set i = i + 1 %}
<tr role="row" class="odd">
<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>
</thead>
<tbody>
{% set i = 0 %}
{% for visitor in visitors %}
{% set i = i + 1 %}
<tr role="row" class="odd">
<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 %}
</tbody>
<tfoot>
<tr>
<th>IP</th>
<th>Last visit</th>
<th>Page</th>
</tr>
</tfoot>
</table>
</div>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(function () {
$('#visitors').DataTable()
$('#tb_visitors').DataTable()
})
</script>

View File

@@ -1,9 +1,42 @@
<style type="text/css">
.ts_Spells > input[type="radio"] {
position: absolute;
left: -200vw;
}
.ts_Spells .tab-panel {
display: none;
}
.ts_Spells > input:first-child:checked ~ .tab-panels > .tab-panel:first-child,
.ts_Spells > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2),
.ts_Spells > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3),
.ts_Spells > input:nth-child(7):checked ~ .tab-panels > .tab-panel:nth-child(4),
.ts_Spells > input:nth-child(9):checked ~ .tab-panels > .tab-panel:nth-child(5),
.ts_Spells > input:nth-child(11):checked ~ .tab-panels > .tab-panel:nth-child(6) {
display: block;
}
.ts_Spells > label {
position: relative;
display: inline-block;
padding: 10px 10px 10px;
margin-bottom: 10px;
border: 1px solid transparent;
border-bottom: 0;
cursor: pointer;
font-weight: 600;
background-color: {{ config.vdarkborder }};
color: #fff;
}
</style>
{% if canEdit %}
<form method="post" action="{{ getLink('spells') }}">
<input type="hidden" name="reload_spells" value="yes"/>
<input type="submit" value="(admin) Reload spells"/>
</form>
<form method="post" action="{{ getLink('spells') }}">
<input type="hidden" name="reload_spells" value="yes"/>
<input type="submit" value="(admin) Reload spells"/>
</form>
{% endif %}
<form action="{{ getLink('spells') }}" method="post">
@@ -18,7 +51,7 @@
<td>Only for vocation: <select name="vocation_id">
<option value="all" {% if post_vocation_id == 'all' %} selected{% endif %}>All</option>
{% for id, vocation in config.vocations %}
<option value="{{ id }}"{% if id == post_vocation_id and post_vocation_id != "all" and post_vocation_id != '' %} selected{% endif %}>{{ vocation }}</option>
<option value="{{ id }}"{% if id == post_vocation_id and post_vocation_id != "all" and post_vocation_id != '' %} selected{% endif %}>{{ vocation }}</option>
{% endfor %}
</select>
</td>
@@ -32,39 +65,137 @@
</table>
</form>
<br/>
<table id="spellstb" class=""><thead>
<tr role="row"><th>Name</th><th>Words</th><th>Type<br/>(count)</th>
<th>Mana</th><th>Level</th><th>Magic Level</th><th>Soul</th><th>Premium</th><th>Vocations</th></tr>
</thead><tbody>
{% set i = 0 %}
{% for spell in spells %}
{% set i = i + 1 %}
<tr>
<td>{{ spell.name }}</td>
<td>{{ spell.words }}</td>
<td>
{% if spell.type == 1 %}
Instant
{% elseif spell.type == 2 %}
Conjure ({{ spell.conjure_count }})
{% else %}
Rune
{% endif %}
</td>
<td>{{ spell.mana }}</td>
<td>{{ spell.level }}</td>
<td>{{ spell.maglevel }}</td>
<td>{{ spell.soul }}</td>
<td>{% if spell.premium == 1 %}yes{% else %}no{% endif %}</td>
<td>
{% if spell.vocations|length > 0 %}
<span style="font-size: 10px">
{{ spell.vocations|raw }}
</span>
{% else %}
{{ config.vocations[post_vocation_id] }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody></table>
<div class="ts_Spells">
<input type="radio" name="ts_Spells" id="tab_instant" aria-controls="instant" checked>
<label for="tab_instant">Instant</label>
<input type="radio" name="ts_Spells" id="tab_conjure" aria-controls="conjure">
<label for="tab_conjure">Conjure</label>
<input type="radio" name="ts_Spells" id="tab_rune" aria-controls="rune">
<label for="tab_rune">Rune</label>
<div class="tab-panels">
<section id="instant" class="tab-panel">
<table id="tb_instantSpells">
<thead>
<th>Name</th>
<th>Words</th>
<th>Level</th>
<th>Mana</th>
<th>Vocations</th>
</thead>
<tbody>
{% set i = 0 %}
{% set y = 0 %}
{% for spell in spells %}
{% set i = i + 1 %}
{% if spell.type == 1 %}
{% set y = y + 1 %}
<tr>
<td>{{ spell.name }}</td>
<td>{{ spell.words }}</td>
<td>{{ spell.level }}</td>
<td>{{ spell.mana }}</td>
<td>
{% if spell.vocations|length > 0 %}
<span style="font-size: 10px">{{ spell.vocations|raw }}</span>
{% else %}
{{ config.vocations[post_vocation_id] }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</section>
<section id="conjure" class="tab-panel">
<table id="tb_conjureSpells">
<thead>
<th>Name</th>
<th>Words</th>
<th>Level</th>
<th>Mana</th>
<th>Soul</th>
<th>Item</th>
<th>Reagent</th>
<th>Vocations</th>
</thead>
<tbody>
{% set i = 0 %}
{% set y = 0 %}
{% for spell in spells %}
{% set i = i + 1 %}
{% if spell.type == 2 %}
{% set y = y + 1 %}
<tr>
<td>{{ spell.name }}</td>
<td>{{ spell.words }}</td>
<td>{{ spell.level }}</td>
<td>{{ spell.mana }}</td>
<td>{{ spell.soul }}</td>
<td>
<small>
{% if (spell.conjure_count < 150) and ( spell.conjure_count > 0) %} {{ spell.conjure_count }}x
<br/>{% endif %}</small>
<img src="{{ item_path }}/{{ spell.conjure_id }}.gif"
width="32" height="32" border="0"
alt="{{ spell.conjure_id }}"></td>
<td>{% if (spell.reagent > 0) %}
<img src="{{ item_path }}/{{ spell.reagent }}.gif"
width="32" height="32" border="0"
alt="{{ spell.reagent }}">{% else %}---{% endif %}</td>
<td>
{% if spell.vocations|length > 0 %}
<span style="font-size: 10px">{{ spell.vocations|raw }}</span>
{% else %}
{{ config.vocations[post_vocation_id] }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</section>
<section id="rune" class="tab-panel">
<table id="tb_runeSpells">
<thead>
<th>Name</th>
<th>Level</th>
<th>Magic Level</th>
<th>Item</th>
<th>Vocations</th>
</thead>
<tbody>
{% set i = 0 %}
{% set y = 0 %}
{% for spell in spells %}
{% set i = i + 1 %}
{% if spell.type == 3 %}
{% set y = y + 1 %}
<tr>
<td>{{ spell.name }}</td>
<td>{{ spell.level }}</td>
<td>{{ spell.maglevel }}</td>
<td><img src="{{ item_path }}/{{ spell.item_id }}.gif"
width="32" height="32" border="0"
alt="{{ spell.item_id }}"></td>
<td>
{% if spell.vocations|length > 0 %}
<span style="font-size: 10px">{{ spell.vocations|raw }}</span>
{% else %}
{{ config.vocations[post_vocation_id] }}
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</section>
</div>
</div>