diff --git a/admin/template/template.php b/admin/template/template.php
index b728b231..f85b619e 100644
--- a/admin/template/template.php
+++ b/admin/template/template.php
@@ -56,7 +56,7 @@
'book', 'list',
'plug', 'user',
'edit', 'gavel',
- 'book', 'edit', 'book',
+ 'wrench', 'edit', 'book', 'book',
);
$menus = array(
@@ -72,10 +72,17 @@
),
'Items' => 'items',
'Tools' => array(
+ 'Notepad' => 'notepad',
'phpinfo' => 'phpinfo',
),
- 'Notepad' => 'notepad',
- 'Logs' => 'logs'
+ 'Editor' => array(
+ 'Accounts' => 'accounts',
+ 'Players' => 'players',
+ ),
+ 'Logs' => array(
+ 'Logs' => 'logs',
+ 'Reports' => 'reports',
+ ),
);
$i = 0;
diff --git a/system/libs/spells.php b/system/libs/spells.php
index 113ab92f..546d85bf 100644
--- a/system/libs/spells.php
+++ b/system/libs/spells.php
@@ -14,7 +14,23 @@ class Spells {
private static $spellsList = null;
private static $lastError = '';
- public static function loadFromXML($show = false) {
+ // 1 - attack, 2 - healing, 3 - summon, 4 - supply, 5 - support
+ public static function loadGroup($tGroup) {
+ switch ($tGroup) {
+ case "attack":
+ return 1;
+ case "healing":
+ return 2;
+ case "summon":
+ return 3;
+ case "supply":
+ return 4;
+ case "support":
+ return 5;
+ }
+ }
+
+ public static function loadFromXML($show = false) {
global $config, $db;
try { $db->query('DELETE FROM `' . TABLE_PREFIX . 'spells`;'); } catch(PDOException $error) {}
@@ -58,6 +74,8 @@ class Spells {
'premium' => $spell->isPremium() ? 1 : 0,
'vocations' => json_encode($spell->getVocations()),
'conjure_count' => $spell->getConjureCount(),
+ 'conjure_id' => $spell->getConjureId(),
+ 'reagent' => $spell->getReagentId(),
'hidden' => $spell->isEnabled() ? 0 : 1
));
@@ -121,7 +139,7 @@ class Spells {
foreach($runeslist as $spellname) {
$spell = self::$spellsList->getRune($spellname);
- $name = $spell->getName() . ' (rune)';
+ $name = $spell->getName() . ' Rune';
try {
$db->insert(TABLE_PREFIX . 'spells', array(
diff --git a/system/pages/admin/logs.php b/system/pages/admin/logs.php
index 0fea9301..a927fba6 100644
--- a/system/pages/admin/logs.php
+++ b/system/pages/admin/logs.php
@@ -16,77 +16,68 @@ $title = 'Logs viewer';
Logs:
-
@@ -119,6 +110,6 @@ if (!empty($file)) {
?>
\ No newline at end of file
diff --git a/system/pages/admin/reports.php b/system/pages/admin/reports.php
new file mode 100644
index 00000000..5a951aec
--- /dev/null
+++ b/system/pages/admin/reports.php
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+ Report name
+ Last updated
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
';
+ echo nl2br(file_get_contents($server_path_reports . $file));
+ echo '
';
+ } else
+ echo 'Specified file does not exist.';
+ } else
+ echo 'Invalid file name specified.';
+}
+?>
+
\ No newline at end of file
diff --git a/system/pages/spells.php b/system/pages/spells.php
index fb311ffd..4699143c 100644
--- a/system/pages/spells.php
+++ b/system/pages/spells.php
@@ -41,8 +41,9 @@ else {
}
}
+$order = 'name';
$spells = array();
-$spells_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'spells` WHERE `hidden` != 1 AND `type` < 3 ORDER BY name, level');
+$spells_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'spells` WHERE `hidden` != 1 AND `type` < 4 AND `level` > 0 ORDER BY ' . $order . '');
if((string)$vocation_id != 'all') {
foreach($spells_db->fetchAll() as $spell) {
@@ -77,12 +78,16 @@ $twig->display('spells.html.twig', array(
'post_vocation_id' => $vocation_id,
'post_vocation' => $vocation,
'spells' => $spells,
+ 'item_path' => $config['item_images_url'],
));
?>
diff --git a/system/templates/admin.pages.html.twig b/system/templates/admin.pages.html.twig
index a0f80fd3..096d43d5 100644
--- a/system/templates/admin.pages.html.twig
+++ b/system/templates/admin.pages.html.twig
@@ -6,58 +6,44 @@
-
diff --git a/system/templates/admin.plugins.html.twig b/system/templates/admin.plugins.html.twig
index bcd639c1..4b854f70 100644
--- a/system/templates/admin.plugins.html.twig
+++ b/system/templates/admin.plugins.html.twig
@@ -5,55 +5,40 @@
Installed plugins:
\ No newline at end of file
diff --git a/system/templates/admin.visitors.html.twig b/system/templates/admin.visitors.html.twig
index 55475f84..1b3c25b9 100644
--- a/system/templates/admin.visitors.html.twig
+++ b/system/templates/admin.visitors.html.twig
@@ -3,54 +3,36 @@
Users active within last {{ config_visitors_counter_ttl }} minutes.
\ No newline at end of file
diff --git a/system/templates/spells.html.twig b/system/templates/spells.html.twig
index 3e9e4fcc..1c76e8f7 100644
--- a/system/templates/spells.html.twig
+++ b/system/templates/spells.html.twig
@@ -1,9 +1,42 @@
+
{% if canEdit %}
-
+
{% endif %}
-
- Name Words Type (count)
- Mana Level Magic Level Soul Premium Vocations
-
- {% set i = 0 %}
- {% for spell in spells %}
- {% set i = i + 1 %}
-
- {{ spell.name }}
- {{ spell.words }}
-
- {% if spell.type == 1 %}
- Instant
- {% elseif spell.type == 2 %}
- Conjure ({{ spell.conjure_count }})
- {% else %}
- Rune
- {% endif %}
-
- {{ spell.mana }}
- {{ spell.level }}
- {{ spell.maglevel }}
- {{ spell.soul }}
- {% if spell.premium == 1 %}yes{% else %}no{% endif %}
-
- {% if spell.vocations|length > 0 %}
-
- {{ spell.vocations|raw }}
-
- {% else %}
- {{ config.vocations[post_vocation_id] }}
- {% endif %}
-
-
- {% endfor %}
-
\ No newline at end of file
+
+
+
+
Instant
+
+
+
Conjure
+
+
+
Rune
+
+
+
+
+
+ Name
+ Words
+ Level
+ Mana
+ Vocations
+
+
+ {% set i = 0 %}
+ {% set y = 0 %}
+ {% for spell in spells %}
+ {% set i = i + 1 %}
+ {% if spell.type == 1 %}
+ {% set y = y + 1 %}
+
+ {{ spell.name }}
+ {{ spell.words }}
+ {{ spell.level }}
+ {{ spell.mana }}
+
+ {% if spell.vocations|length > 0 %}
+ {{ spell.vocations|raw }}
+ {% else %}
+ {{ config.vocations[post_vocation_id] }}
+ {% endif %}
+
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+
+ Name
+ Words
+ Level
+ Mana
+ Soul
+ Item
+ Reagent
+ Vocations
+
+
+ {% set i = 0 %}
+ {% set y = 0 %}
+ {% for spell in spells %}
+ {% set i = i + 1 %}
+ {% if spell.type == 2 %}
+ {% set y = y + 1 %}
+
+ {{ spell.name }}
+ {{ spell.words }}
+ {{ spell.level }}
+ {{ spell.mana }}
+ {{ spell.soul }}
+
+
+ {% if (spell.conjure_count < 150) and ( spell.conjure_count > 0) %} {{ spell.conjure_count }}x
+ {% endif %}
+
+ {% if (spell.reagent > 0) %}
+ {% else %}---{% endif %}
+
+ {% if spell.vocations|length > 0 %}
+ {{ spell.vocations|raw }}
+ {% else %}
+ {{ config.vocations[post_vocation_id] }}
+ {% endif %}
+
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+
+
+ Name
+ Level
+ Magic Level
+ Item
+ Vocations
+
+
+ {% set i = 0 %}
+ {% set y = 0 %}
+ {% for spell in spells %}
+ {% set i = i + 1 %}
+ {% if spell.type == 3 %}
+ {% set y = y + 1 %}
+
+ {{ spell.name }}
+ {{ spell.level }}
+ {{ spell.maglevel }}
+
+
+ {% if spell.vocations|length > 0 %}
+ {{ spell.vocations|raw }}
+ {% else %}
+ {{ config.vocations[post_vocation_id] }}
+ {% endif %}
+
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
\ No newline at end of file
diff --git a/tools/images/sort_asc.png b/tools/images/sort_asc.png
new file mode 100644
index 00000000..e1ba61a8
Binary files /dev/null and b/tools/images/sort_asc.png differ
diff --git a/tools/images/sort_asc_disabled.png b/tools/images/sort_asc_disabled.png
new file mode 100644
index 00000000..fb11dfe2
Binary files /dev/null and b/tools/images/sort_asc_disabled.png differ
diff --git a/tools/images/sort_both.png b/tools/images/sort_both.png
new file mode 100644
index 00000000..af5bc7c5
Binary files /dev/null and b/tools/images/sort_both.png differ
diff --git a/tools/images/sort_desc.png b/tools/images/sort_desc.png
new file mode 100644
index 00000000..0e156deb
Binary files /dev/null and b/tools/images/sort_desc.png differ
diff --git a/tools/images/sort_desc_disabled.png b/tools/images/sort_desc_disabled.png
new file mode 100644
index 00000000..c9fdd8a1
Binary files /dev/null and b/tools/images/sort_desc_disabled.png differ