mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Merge branch 'develop' into feature/login-by-email
This commit is contained in:
commit
6f3ba9c34b
@ -38,7 +38,7 @@ else
|
|||||||
$uri = str_replace(array('index.php/', '?'), '', $uri);
|
$uri = str_replace(array('index.php/', '?'), '', $uri);
|
||||||
define('URI', $uri);
|
define('URI', $uri);
|
||||||
|
|
||||||
if(preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) {
|
if(preg_match("/^[A-Za-z0-9-_%'+]+\.png$/i", $uri)) {
|
||||||
$tmp = explode('.', $uri);
|
$tmp = explode('.', $uri);
|
||||||
$_REQUEST['name'] = urldecode($tmp[0]);
|
$_REQUEST['name'] = urldecode($tmp[0]);
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ if(preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match("/^(.*)\.(gif|jpg|png|jpeg|tiff|bmp|css|js|less|map|html|php|zip|rar|gz|ttf|woff|ico)$/i", $_SERVER['REQUEST_URI'])) {
|
if(preg_match("/^(.*)\.(gif|jpg|png|jpeg|tiff|bmp|css|js|less|map|html|php|zip|rar|gz|ttf|woff|ico)$/i", $_SERVER['REQUEST_URI'])) {
|
||||||
header('HTTP/1.0 404 Not Found');
|
http_response_code(404);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,12 +17,14 @@ if [ $1 = "prepare" ]; then
|
|||||||
|
|
||||||
echo "Preparing to release version $version of the MyAAC Project!"
|
echo "Preparing to release version $version of the MyAAC Project!"
|
||||||
|
|
||||||
|
# make required directories
|
||||||
|
mkdir -p releases
|
||||||
|
mkdir -p tmp
|
||||||
|
|
||||||
# get myaac from git archive
|
# get myaac from git archive
|
||||||
git archive --format zip --output tmp/myaac.zip master
|
git archive --format zip --output tmp/myaac.zip master
|
||||||
|
|
||||||
# make required directories
|
cd tmp/
|
||||||
mkdir -p releases
|
|
||||||
mkdir -p tmp && cd tmp
|
|
||||||
|
|
||||||
dir="myaac-$version"
|
dir="myaac-$version"
|
||||||
if [ -d "$dir" ] ; then
|
if [ -d "$dir" ] ; then
|
||||||
|
@ -63,7 +63,7 @@ class DataLoader
|
|||||||
|
|
||||||
self::$startTime = microtime(true);
|
self::$startTime = microtime(true);
|
||||||
|
|
||||||
require LIBS . 'npc.php';
|
require_once LIBS . 'npc.php';
|
||||||
if(NPCs::loadFromXML()) {
|
if(NPCs::loadFromXML()) {
|
||||||
success(self::$locale['step_database_loaded_npcs'] . self::getLoadedTime());
|
success(self::$locale['step_database_loaded_npcs'] . self::getLoadedTime());
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class Plugins {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($plugin['enabled']) && $plugin['enabled'] === 0) {
|
if(isset($plugin['enabled']) && !getBoolean($plugin['enabled'])) {
|
||||||
self::$warnings[] = 'Skipping ' . $filename . '... The plugin is disabled.';
|
self::$warnings[] = 'Skipping ' . $filename . '... The plugin is disabled.';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ class Validator
|
|||||||
|
|
||||||
$npcCheck = config('character_name_npc_check');
|
$npcCheck = config('character_name_npc_check');
|
||||||
if ($npcCheck) {
|
if ($npcCheck) {
|
||||||
require LIBS . 'npc.php';
|
require_once LIBS . 'npc.php';
|
||||||
NPCS::load();
|
NPCS::load();
|
||||||
if(NPCS::$npcs && in_array(strtolower($name), NPCS::$npcs)) {
|
if(NPCS::$npcs && in_array(strtolower($name), NPCS::$npcs)) {
|
||||||
self::$lastError = "Invalid name format. Do not use NPC Names";
|
self::$lastError = "Invalid name format. Do not use NPC Names";
|
||||||
@ -346,7 +346,7 @@ class Validator
|
|||||||
|
|
||||||
$npcCheck = config('character_name_npc_check');
|
$npcCheck = config('character_name_npc_check');
|
||||||
if ($npcCheck) {
|
if ($npcCheck) {
|
||||||
require LIBS . 'npc.php';
|
require_once LIBS . 'npc.php';
|
||||||
NPCS::load();
|
NPCS::load();
|
||||||
if(NPCS::$npcs && in_array($name_lower, NPCS::$npcs)) {
|
if(NPCS::$npcs && in_array($name_lower, NPCS::$npcs)) {
|
||||||
self::$lastError = "Invalid name format. Do not use NPC Names";
|
self::$lastError = "Invalid name format. Do not use NPC Names";
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
$character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null;
|
$character_name = isset($_POST['name']) ? stripslashes($_POST['name']) : null;
|
||||||
$character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
|
$character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
|
||||||
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
|
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
|
||||||
$character_town = isset($_POST['town']) ? (int)$_POST['town'] : null;
|
$character_town = isset($_POST['town']) ? (int)$_POST['town'] : null;
|
||||||
@ -42,4 +42,4 @@ if(!$character_created) {
|
|||||||
'save' => $save,
|
'save' => $save,
|
||||||
'errors' => $errors
|
'errors' => $errors
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -54,16 +54,14 @@ if (empty($_REQUEST['creature'])) {
|
|||||||
$loot = json_decode($creature['loot'], true);
|
$loot = json_decode($creature['loot'], true);
|
||||||
usort($loot, 'sort_by_chance');
|
usort($loot, 'sort_by_chance');
|
||||||
|
|
||||||
$loot_list = [];
|
foreach ($loot as &$item) {
|
||||||
foreach ($loot as $item) {
|
|
||||||
$item['name'] = getItemNameById($item['id']);
|
$item['name'] = getItemNameById($item['id']);
|
||||||
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
||||||
$item['rarity'] = getItemRarity($item['chance']);
|
$item['rarity'] = getItemRarity($item['chance']);
|
||||||
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('creatures_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('creatures_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
||||||
$loot_list[] = $item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$creature['loot'] = isset($loot_list) ? $loot_list : null;
|
$creature['loot'] = isset($loot) ? $loot : null;
|
||||||
$creature['voices'] = isset($voices) ? $voices : null;
|
$creature['voices'] = isset($voices) ? $voices : null;
|
||||||
$creature['summons'] = isset($summons) ? $summons : null;
|
$creature['summons'] = isset($summons) ? $summons : null;
|
||||||
$creature['elements'] = isset($elements) ? $elements : null;
|
$creature['elements'] = isset($elements) ? $elements : null;
|
||||||
|
@ -43,7 +43,15 @@ echo '<br /><br />Page: '.$links_to_pages.'<br />';
|
|||||||
$last_threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`last_post`, `" . FORUM_TABLE_PREFIX . "forum`.`replies`, `" . FORUM_TABLE_PREFIX . "forum`.`views`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".(int) $section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id` ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`last_post` DESC LIMIT ".$config['forum_threads_per_page']." OFFSET ".($_page * $config['forum_threads_per_page']))->fetchAll();
|
$last_threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`last_post`, `" . FORUM_TABLE_PREFIX . "forum`.`replies`, `" . FORUM_TABLE_PREFIX . "forum`.`views`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".(int) $section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id` ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`last_post` DESC LIMIT ".$config['forum_threads_per_page']." OFFSET ".($_page * $config['forum_threads_per_page']))->fetchAll();
|
||||||
if(isset($last_threads[0]))
|
if(isset($last_threads[0]))
|
||||||
{
|
{
|
||||||
echo '<table width="100%"><tr bgcolor="'.$config['vdarkborder'].'" align="center"><td><span style="color: white; font-size: 10px"><b>Thread</b></span></td><td><span style="color: white; font-size: 10px"><b>Thread Starter</b></span></td><td><span style="color: white; font-size: 10px"><b>Replies</b></span></td><td><span style="color: white; font-size: 10px"><b>Views</b></span></td><td><span style="color: white; font-size: 10px"><b>Last Post</b></span></td></tr>';
|
echo '<table width="100%">
|
||||||
|
<tr bgcolor="'.$config['vdarkborder'].'" align="center">
|
||||||
|
<td class="white">
|
||||||
|
<span style="font-size: 10px"><b>Thread</b></span></td>
|
||||||
|
<td><span style="font-size: 10px"><b>Thread Starter</b></span></td>
|
||||||
|
<td><span style="font-size: 10px"><b>Replies</b></span></td>
|
||||||
|
<td><span style="font-size: 10px"><b>Views</b></span></td>
|
||||||
|
<td><span style="font-size: 10px"><b>Last Post</b></span></td>
|
||||||
|
</tr>';
|
||||||
|
|
||||||
$player = new OTS_Player();
|
$player = new OTS_Player();
|
||||||
foreach($last_threads as $thread)
|
foreach($last_threads as $thread)
|
||||||
@ -83,4 +91,4 @@ if(isset($last_threads[0]))
|
|||||||
else
|
else
|
||||||
echo '<h3>No threads in this board.</h3>';
|
echo '<h3>No threads in this board.</h3>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -29,11 +29,13 @@ if(isset($_GET['archive']))
|
|||||||
// display big news by id
|
// display big news by id
|
||||||
if(isset($_GET['id']))
|
if(isset($_GET['id']))
|
||||||
{
|
{
|
||||||
|
$id = (int)$_GET['id'];
|
||||||
|
|
||||||
$field_name = 'date';
|
$field_name = 'date';
|
||||||
if($_REQUEST['id'] < 100000)
|
if($id < 100000)
|
||||||
$field_name = 'id';
|
$field_name = 'id';
|
||||||
|
|
||||||
$news = $db->query('SELECT * FROM `'.TABLE_PREFIX . 'news` WHERE `hidden` != 1 AND `' . $field_name . '` = ' . (int)$_REQUEST['id'] . '');
|
$news = $db->query('SELECT * FROM `'.TABLE_PREFIX . 'news` WHERE `hidden` != 1 AND `' . $field_name . '` = ' . $id . '');
|
||||||
if($news->rowCount() == 1)
|
if($news->rowCount() == 1)
|
||||||
{
|
{
|
||||||
$news = $news->fetch();
|
$news = $news->fetch();
|
||||||
@ -227,4 +229,4 @@ if(!$news_cached)
|
|||||||
echo $tmp_content;
|
echo $tmp_content;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo $news_cached;
|
echo $news_cached;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* @link https://my-aac.org
|
* @link https://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Gamemasters List';
|
$title = 'Support in game';
|
||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require SYSTEM . 'countries.conf.php';
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
@ -80,6 +80,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$template_ini = parse_ini_file($file);
|
$template_ini = parse_ini_file($file);
|
||||||
|
unset($file);
|
||||||
|
|
||||||
if ($cache->enabled()) {
|
if ($cache->enabled()) {
|
||||||
$cache->set('template_ini_' . $template_name, serialize($template_ini));
|
$cache->set('template_ini_' . $template_name, serialize($template_ini));
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<b>Boards</b>
|
<b>Boards</b>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}" class="white">
|
||||||
<td>
|
<td>
|
||||||
<span style="color: white; font-size: 10px"><b>Board</b></span>
|
<span style="font-size: 10px"><b>Board</b></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span style="color: white; font-size: 10px"><b>Posts</b></span>
|
<span style="font-size: 10px"><b>Posts</b></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span style="color: white; font-size: 10px"><b>Threads</b></span>
|
<span style="font-size: 10px"><b>Threads</b></span>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<span style="color: white; font-size: 10px"><b>Last Post</b></span>
|
<span style="font-size: 10px"><b>Last Post</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% if canEdit %}
|
{% if canEdit %}
|
||||||
<td>
|
<td>
|
||||||
<span style="color: white; font-size: 10px"><b>Options</b></span>
|
<span style="font-size: 10px"><b>Options</b></span>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -12,8 +12,8 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
<td width="200">
|
<td width="200" class="white">
|
||||||
<span style="color: white; font-size: 10px"><b>Author</b></span>
|
<span style="font-size: 10px"><b>Author</b></span>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -8,15 +8,11 @@ Here you can change logo of your guild.<br/>Actuall logo: <img src="images/guild
|
|||||||
</form>
|
</form>
|
||||||
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_size_kb }} KB</b><br>
|
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_size_kb }} KB</b><br>
|
||||||
<br/>
|
<br/>
|
||||||
{% spaceless %}
|
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/global/buttons/sbutton.gif)">
|
{{ include('buttons.back.html.twig') }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endspaceless %}
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#upload_form').submit(function (event) {
|
$('#upload_form').submit(function (event) {
|
||||||
@ -34,4 +30,4 @@ Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_siz
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -5,12 +5,8 @@ Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br
|
|||||||
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
||||||
(max. {{ config.guild_motd_chars_limit }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
(max. {{ config.guild_motd_chars_limit }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
||||||
<br/>
|
<br/>
|
||||||
{% spaceless %}
|
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/global/buttons/sbutton.gif)">
|
{{ include('buttons.back.html.twig') }}
|
||||||
{{ include('buttons.back.html.twig') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endspaceless %}
|
|
@ -28,7 +28,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
background-color: {{ config.vdarkborder }};
|
background-color: {{ config.vdarkborder }};
|
||||||
color: #fff;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -61,13 +60,13 @@
|
|||||||
|
|
||||||
<div class="ts_Spells">
|
<div class="ts_Spells">
|
||||||
<input type="radio" name="ts_Spells" id="tab_instant" aria-controls="instant" checked>
|
<input type="radio" name="ts_Spells" id="tab_instant" aria-controls="instant" checked>
|
||||||
<label for="tab_instant">Instant</label>
|
<label for="tab_instant" class="white">Instant</label>
|
||||||
|
|
||||||
<input type="radio" name="ts_Spells" id="tab_conjure" aria-controls="conjure">
|
<input type="radio" name="ts_Spells" id="tab_conjure" aria-controls="conjure">
|
||||||
<label for="tab_conjure">Conjure</label>
|
<label for="tab_conjure" class="white">Conjure</label>
|
||||||
|
|
||||||
<input type="radio" name="ts_Spells" id="tab_rune" aria-controls="rune">
|
<input type="radio" name="ts_Spells" id="tab_rune" aria-controls="rune">
|
||||||
<label for="tab_rune">Rune</label>
|
<label for="tab_rune" class="white">Rune</label>
|
||||||
|
|
||||||
<div class="tab-panels">
|
<div class="tab-panels">
|
||||||
<section id="instant" class="tab-panel">
|
<section id="instant" class="tab-panel">
|
||||||
|
42
templates/kathrine/javascript.php
Normal file
42
templates/kathrine/javascript.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
$menus = get_template_menus();
|
||||||
|
|
||||||
|
function get_template_pages($category) {
|
||||||
|
global $menus;
|
||||||
|
|
||||||
|
$ret = array();
|
||||||
|
foreach($menus[$category] as $menu) {
|
||||||
|
$ret[] = $menu['link'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
var category = '<?php
|
||||||
|
if(strpos(URI, 'subtopic=') !== false) {
|
||||||
|
$tmp = array($_REQUEST['subtopic']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tmp = URI;
|
||||||
|
if(empty($tmp)) {
|
||||||
|
$tmp = array('news');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$tmp = explode('/', URI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array($tmp[0], get_template_pages(MENU_CATEGORY_NEWS)))
|
||||||
|
echo 'news';
|
||||||
|
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_LIBRARY)))
|
||||||
|
echo 'library';
|
||||||
|
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_COMMUNITY)))
|
||||||
|
echo 'community';
|
||||||
|
elseif(in_array($tmp[0], array_merge(get_template_pages(MENU_CATEGORY_ACCOUNT), array('account'))))
|
||||||
|
echo 'account';
|
||||||
|
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_SHOP)))
|
||||||
|
echo 'shops';
|
||||||
|
else {
|
||||||
|
echo 'news';
|
||||||
|
}
|
||||||
|
?>';
|
@ -13,45 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="tools/basic.js"></script>
|
<script type="text/javascript" src="tools/basic.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php
|
<?php require 'javascript.php'; ?>
|
||||||
$menus = get_template_menus();
|
|
||||||
|
|
||||||
function get_template_pages($category) {
|
|
||||||
global $menus;
|
|
||||||
|
|
||||||
$ret = array();
|
|
||||||
foreach($menus[$category] as $menu) {
|
|
||||||
$ret[] = $menu['link'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
var category = '<?php
|
|
||||||
if(strpos(URI, 'subtopic=') !== false) {
|
|
||||||
$tmp = array($_REQUEST['subtopic']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$tmp = URI;
|
|
||||||
if(empty($tmp)) {
|
|
||||||
$tmp = array('news');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$tmp = explode('/', URI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(in_array($tmp[0], get_template_pages(MENU_CATEGORY_NEWS)))
|
|
||||||
echo 'news';
|
|
||||||
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_LIBRARY)))
|
|
||||||
echo 'library';
|
|
||||||
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_COMMUNITY)))
|
|
||||||
echo 'community';
|
|
||||||
elseif(in_array($tmp[0], array_merge(get_template_pages(MENU_CATEGORY_ACCOUNT), array('account'))))
|
|
||||||
echo 'account';
|
|
||||||
elseif(in_array($tmp[0], get_template_pages(MENU_CATEGORY_SHOP)))
|
|
||||||
echo 'shops';
|
|
||||||
?>';
|
|
||||||
</script>
|
</script>
|
||||||
<?php echo template_place_holder('head_end'); ?>
|
<?php echo template_place_holder('head_end'); ?>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user