Merge branch 'develop' into feature/docker

This commit is contained in:
slawkens 2023-09-16 14:41:28 +02:00
commit 86b94ea5e8
16 changed files with 72 additions and 69 deletions

View File

@ -15,5 +15,5 @@ trim_trailing_whitespace = false
[{composer.json,package.json}] [{composer.json,package.json}]
indent_style = space indent_style = space
[package.json] [{package.json, *.yml}]
indent_size = 2 indent_size = 2

View File

@ -30,11 +30,6 @@ if(!$db->hasTable('myaac_account_actions')) {
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.'); throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
} }
// event system
require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
require SYSTEM . 'status.php'; require SYSTEM . 'status.php';
require SYSTEM . 'login.php'; require SYSTEM . 'login.php';
require __DIR__ . '/includes/functions.php'; require __DIR__ . '/includes/functions.php';

View File

@ -327,8 +327,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="group">Account Type:</label> <label for="group">Account Type:</label>
<select name="group" id="group" class="form-control"> <select name="group" id="group" class="form-control">
<?php foreach ($acc_type as $id => $a_type): ?> <?php foreach ($acc_type as $_id => $a_type): ?>
<option value="<?php echo($id); ?>" <?php echo($acc_group == ($id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option> <option value="<?php echo($_id); ?>" <?php echo($acc_group == ($_id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -338,8 +338,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="group">Account Type:</label> <label for="group">Account Type:</label>
<select name="group" id="group" class="form-control"> <select name="group" id="group" class="form-control">
<?php foreach ($groups->getGroups() as $id => $group): ?> <?php foreach ($groups->getGroups() as $_id => $group): ?>
<option value="<?php echo $id; ?>" <?php echo($acc_group == $id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option> <option value="<?php echo $_id; ?>" <?php echo($acc_group == $_id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -347,8 +347,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="web_flags">Website Access:</label> <label for="web_flags">Website Access:</label>
<select name="web_flags" id="web_flags" class="form-control"> <select name="web_flags" id="web_flags" class="form-control">
<?php foreach ($web_acc as $id => $a_type): ?> <?php foreach ($web_acc as $_id => $a_type): ?>
<option value="<?php echo($id); ?>" <?php echo($account->getWebFlags() == ($id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option> <option value="<?php echo($_id); ?>" <?php echo($account->getWebFlags() == ($_id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -403,8 +403,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-4"> <div class="col-12 col-sm-12 col-lg-4">
<label for="rl_country">Country:</label> <label for="rl_country">Country:</label>
<select name="rl_country" id="rl_country" class="form-control"> <select name="rl_country" id="rl_country" class="form-control">
<?php foreach ($countries as $id => $a_type): ?> <?php foreach ($countries as $_id => $a_type): ?>
<option value="<?php echo($id); ?>" <?php echo($account->getCountry() == ($id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option> <option value="<?php echo($_id); ?>" <?php echo($account->getCountry() == ($_id) ? 'selected' : ''); ?>><?php echo $a_type; ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -581,18 +581,18 @@ else if (isset($_REQUEST['search'])) {
<div class="row"> <div class="row">
<div class="col-6 col-lg-12"> <div class="col-6 col-lg-12">
<form action="<?php echo $admin_base; ?>" method="post"> <form action="<?php echo $admin_base; ?>" method="post">
<label for="name">Account Name:</label> <label for="search">Account Name:</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control" name="search" value="<?php echo $search_account; ?>" maxlength="32" size="32"> <input type="text" class="form-control" id="search" name="search" value="<?= escapeHtml($search_account); ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span> <span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div> </div>
</form> </form>
</div> </div>
<div class="col-6 col-lg-12"> <div class="col-6 col-lg-12">
<form action="<?php echo $admin_base; ?>" method="post"> <form action="<?php echo $admin_base; ?>" method="post">
<label for="name">Account ID:</label> <label for="id">Account ID:</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control" name="id" value="" maxlength="32" size="32"> <input type="text" class="form-control" id="id" name="id" value="<?= $id; ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span> <span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div> </div>
</form> </form>

View File

@ -23,10 +23,10 @@ if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
header('X-XSS-Protection:0'); header('X-XSS-Protection:0');
// some constants, used mainly by database (cannot by modified without schema changes) // some constants, used mainly by database (cannot by modified without schema changes)
define('NEWS_TITLE_LIMIT', 100); const NEWS_TITLE_LIMIT = 100;
define('NEWS_BODY_LIMIT', 65535); // maximum news body length const NEWS_BODY_LIMIT = 65535; // maximum news body length
define('ARTICLE_TEXT_LIMIT', 300); const ARTICLE_TEXT_LIMIT = 300;
define('ARTICLE_IMAGE_LIMIT', 100); const ARTICLE_IMAGE_LIMIT = 100;
$name = $p_title = ''; $name = $p_title = '';
if(!empty($action)) if(!empty($action))
@ -52,12 +52,13 @@ if(!empty($action))
$p_title = $body = $comments = $article_text = $article_image = ''; $p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0; $type = $category = $player_id = 0;
success("Added successful."); success('Added successful.');
} }
} }
else if($action == 'delete') { else if($action == 'delete') {
News::delete($id, $errors); if (News::delete($id, $errors)) {
success("Deleted successful."); success('Deleted successful.');
}
} }
else if($action == 'edit') else if($action == 'edit')
{ {
@ -82,7 +83,7 @@ if(!empty($action))
$action = $p_title = $body = $comments = $article_text = $article_image = ''; $action = $p_title = $body = $comments = $article_text = $article_image = '';
$type = $category = $player_id = 0; $type = $category = $player_id = 0;
success("Updated successful."); success('Updated successful.');
} }
} }
} }

View File

@ -390,8 +390,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="group">Group:</label> <label for="group">Group:</label>
<select name="group" id="group" class="form-control custom-select"> <select name="group" id="group" class="form-control custom-select">
<?php foreach ($groups->getGroups() as $id => $group): ?> <?php foreach ($groups->getGroups() as $_id => $group): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getGroup()->getId() == $id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option> <option value="<?php echo $_id; ?>" <?php echo($player->getGroup()->getId() == $_id ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -399,8 +399,8 @@ else if (isset($_REQUEST['search'])) {
<label for="vocation">Vocation</label> <label for="vocation">Vocation</label>
<select name="vocation" id="vocation" class="form-control custom-select"> <select name="vocation" id="vocation" class="form-control custom-select">
<?php <?php
foreach ($config['vocations'] as $id => $name) { foreach ($config['vocations'] as $_id => $name) {
echo '<option value=' . $id . ($id == $player->getVocation() ? ' selected' : '') . '>' . $name . '</option>'; echo '<option value=' . $_id . ($_id == $player->getVocation() ? ' selected' : '') . '>' . $name . '</option>';
} }
?> ?>
</select> </select>
@ -410,8 +410,8 @@ else if (isset($_REQUEST['search'])) {
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="sex">Sex:</label> <label for="sex">Sex:</label>
<select name="sex" id="sex" class="form-control custom-select">> <select name="sex" id="sex" class="form-control custom-select">>
<?php foreach ($config['genders'] as $id => $sex): ?> <?php foreach ($config['genders'] as $_id => $sex): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getSex() == $id ? 'selected' : ''); ?>><?php echo strtolower($sex); ?></option> <option value="<?php echo $_id; ?>" <?php echo($player->getSex() == $_id ? 'selected' : ''); ?>><?php echo strtolower($sex); ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -424,8 +424,8 @@ else if (isset($_REQUEST['search'])) {
$configTowns[$player->getTownId()] = 'Unknown Town'; $configTowns[$player->getTownId()] = 'Unknown Town';
} }
foreach ($configTowns as $id => $town): ?> foreach ($configTowns as $_id => $town): ?>
<option value="<?php echo $id; ?>" <?php echo($player->getTownId() == $id ? 'selected' : ''); ?>><?php echo $town; ?></option> <option value="<?php echo $_id; ?>" <?php echo($player->getTownId() == $_id ? 'selected' : ''); ?>><?php echo $town; ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
@ -436,8 +436,8 @@ else if (isset($_REQUEST['search'])) {
<select name="skull" id="skull" class="form-control custom-select"> <select name="skull" id="skull" class="form-control custom-select">
<?php <?php
foreach ($skull_type as $id => $s_name) { foreach ($skull_type as $_id => $s_name) {
echo '<option value=' . $id . ($id == $player->getSkull() ? ' selected' : '') . '>' . $s_name . '</option>'; echo '<option value=' . $_id . ($_id == $player->getSkull() ? ' selected' : '') . '>' . $s_name . '</option>';
} }
?> ?>
</select> </select>
@ -554,16 +554,16 @@ else if (isset($_REQUEST['search'])) {
</div> </div>
<div class="tab-pane fade" id="tabs-skills"> <div class="tab-pane fade" id="tabs-skills">
<?php <?php
foreach ($skills as $id => $info) { foreach ($skills as $_id => $info) {
?> ?>
<div class="form-group row"> <div class="form-group row">
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<?php echo '<label for="skills[' . $id . ']" class="control-label">' . $info[0] . '</label> <?php echo '<label for="skills[' . $_id . ']" class="control-label">' . $info[0] . '</label>
<input type="text" class="form-control" id="skills[' . $id . ']" name="skills[' . $id . ']" maxlength="10" autocomplete="off" value="' . $player->getSkill($id) . '"/>'; ?> <input type="text" class="form-control" id="skills[' . $_id . ']" name="skills[' . $_id . ']" maxlength="10" autocomplete="off" value="' . $player->getSkill($_id) . '"/>'; ?>
</div> </div>
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<?php echo '<label for="skills_tries[' . $id . ']" class="control-label">' . $info[0] . ' tries</label> <?php echo '<label for="skills_tries[' . $_id . ']" class="control-label">' . $info[0] . ' tries</label>
<input type="text" class="form-control" id="skills_tries[' . $id . ']" name="skills_tries[' . $id . ']" maxlength="10" autocomplete="off" value="' . $player->getSkillTries($id) . '"/>'; ?> <input type="text" class="form-control" id="skills_tries[' . $_id . ']" name="skills_tries[' . $_id . ']" maxlength="10" autocomplete="off" value="' . $player->getSkillTries($_id) . '"/>'; ?>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
@ -622,7 +622,7 @@ else if (isset($_REQUEST['search'])) {
if ($outfitlist) { ?> if ($outfitlist) { ?>
<select name="look_type" id="look_type" class="form-control custom-select"> <select name="look_type" id="look_type" class="form-control custom-select">
<?php <?php
foreach ($outfitlist as $id => $outfit) { foreach ($outfitlist as $_id => $outfit) {
if ($outfit['enabled'] == 'yes') ; if ($outfit['enabled'] == 'yes') ;
echo '<option value=' . $outfit['id'] . ($outfit['id'] == $player->getLookType() ? ' selected' : '') . '>' . $outfit['name'] . ' - ' . ($outfit['type'] == 1 ? 'Male' : 'Female') . '</option>'; echo '<option value=' . $outfit['id'] . ($outfit['id'] == $player->getLookType() ? ' selected' : '') . '>' . $outfit['name'] . ' - ' . ($outfit['type'] == 1 ? 'Male' : 'Female') . '</option>';
} }
@ -638,8 +638,8 @@ else if (isset($_REQUEST['search'])) {
<select name="look_addons" id="look_addons" class="form-control custom-select"> <select name="look_addons" id="look_addons" class="form-control custom-select">
<?php <?php
$addon_type = array("None", "First", "Second", "Both"); $addon_type = array("None", "First", "Second", "Both");
foreach ($addon_type as $id => $s_name) { foreach ($addon_type as $_id => $s_name) {
echo '<option value=' . $id . ($id == $player->getLookAddons() ? ' selected' : '') . '>' . $s_name . '</option>'; echo '<option value=' . $_id . ($_id == $player->getLookAddons() ? ' selected' : '') . '>' . $s_name . '</option>';
} }
?> ?>
</select> </select>
@ -704,7 +704,7 @@ else if (isset($_REQUEST['search'])) {
<div class="form-group row"> <div class="form-group row">
<div class="col-12"> <div class="col-12">
<label for="comment" class="control-label">Comment:</label> <label for="comment" class="control-label">Comment:</label>
<textarea class="form-control" name="comment" rows="10" cols="50" wrap="virtual"><?php echo $player->getCustomField("comment"); ?></textarea> <textarea class="form-control" id="comment" name="comment" rows="10" cols="50" wrap="virtual"><?php echo $player->getCustomField("comment"); ?></textarea>
<small>[max. length: 2000 chars, 50 lines (ENTERs)]</small> <small>[max. length: 2000 chars, 50 lines (ENTERs)]</small>
</div> </div>
</div> </div>
@ -841,7 +841,7 @@ else if (isset($_REQUEST['search'])) {
<?php if($hasLookAddons): ?> <?php if($hasLookAddons): ?>
const $addonvalue = $('#look_addons'); const $addonvalue = $('#look_addons');
$('#look_addons').on('change', () => { $addonvalue.on('change', () => {
updateOutfit(); updateOutfit();
}); });
<?php endif; ?> <?php endif; ?>
@ -870,18 +870,18 @@ else if (isset($_REQUEST['search'])) {
<div class="card-body row"> <div class="card-body row">
<div class="col-6 col-lg-12"> <div class="col-6 col-lg-12">
<form action="<?php echo $player_base; ?>" method="post"> <form action="<?php echo $player_base; ?>" method="post">
<label for="name">Player Name:</label> <label for="search">Player Name:</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control" name="search" value="<?php echo $search_player; ?>" maxlength="32" size="32"> <input type="text" class="form-control" id="search" name="search" value="<?= escapeHtml($search_player); ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span> <span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div> </div>
</form> </form>
</div> </div>
<div class="col-6 col-lg-12"> <div class="col-6 col-lg-12">
<form action="<?php echo $player_base; ?>" method="post"> <form action="<?php echo $player_base; ?>" method="post">
<label for="name">Player ID:</label> <label for="id">Player ID:</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control" name="id" value="" maxlength="32" size="32"> <input type="text" class="form-control" id="id" name="id" value="<?= $id; ?>" maxlength="32" size="32">
<span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span> <span class="input-group-append"><button type="submit" class="btn btn-info btn-flat">Search</button></span>
</div> </div>
</form> </form>
@ -892,7 +892,7 @@ else if (isset($_REQUEST['search'])) {
</div> </div>
<script> <script>
$(document).ready(function () { $(function () {
$('.player_datatable').DataTable({ $('.player_datatable').DataTable({
"order": [[0, "asc"]] "order": [[0, "asc"]]
}); });

View File

@ -71,10 +71,6 @@ if(!$db->hasTable('myaac_account_actions')) {
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.'); throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
} }
// event system
require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
require_once SYSTEM . 'template.php'; require_once SYSTEM . 'template.php';
require_once SYSTEM . 'login.php'; require_once SYSTEM . 'login.php';
require_once SYSTEM . 'status.php'; require_once SYSTEM . 'status.php';

View File

@ -1451,7 +1451,7 @@ function echo_success($message)
function echo_error($message) function echo_error($message)
{ {
global $error; global $error;
echo '<div class="col-12 alert alert-error mb-2">' . $message . '</div>'; echo '<div class="col-12 alert alert-danger mb-2">' . $message . '</div>';
$error = true; $error = true;
} }
@ -1606,7 +1606,7 @@ function getGuildLogoById($id)
$guild = Guild::where('id', intval($id))->select('logo_name')->first(); $guild = Guild::where('id', intval($id))->select('logo_name')->first();
if ($guild) { if ($guild) {
$guildLogo = $query->logo_name; $guildLogo = $guild->logo_name;
if (!empty($guildLogo) && file_exists(GUILD_IMAGES_DIR . $guildLogo)) { if (!empty($guildLogo) && file_exists(GUILD_IMAGES_DIR . $guildLogo)) {
$logo = $guildLogo; $logo = $guildLogo;

View File

@ -76,6 +76,7 @@ define('HOOK_GUILDS_AFTER_GUILD_HEADER', ++$i);
define('HOOK_GUILDS_AFTER_GUILD_INFORMATION', ++$i); define('HOOK_GUILDS_AFTER_GUILD_INFORMATION', ++$i);
define('HOOK_GUILDS_AFTER_GUILD_MEMBERS', ++$i); define('HOOK_GUILDS_AFTER_GUILD_MEMBERS', ++$i);
define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i); define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i);
define('HOOK_TWIG', ++$i);
const HOOK_FIRST = HOOK_STARTUP; const HOOK_FIRST = HOOK_STARTUP;
define('HOOK_LAST', $i); define('HOOK_LAST', $i);

View File

@ -33,6 +33,11 @@ if(isset($config['gzip_output']) && $config['gzip_output'] && isset($_SERVER['HT
require_once SYSTEM . 'libs/cache.php'; require_once SYSTEM . 'libs/cache.php';
$cache = Cache::getInstance(); $cache = Cache::getInstance();
// event system
require_once SYSTEM . 'hooks.php';
$hooks = new Hooks();
$hooks->load();
// twig // twig
require_once SYSTEM . 'twig.php'; require_once SYSTEM . 'twig.php';

View File

@ -75,18 +75,20 @@ class News
static public function delete($id, &$errors) static public function delete($id, &$errors)
{ {
if(isset($id)) if(isset($id)) {
{
$row = ModelsNews::find($id); $row = ModelsNews::find($id);
if($row) if($row) {
if (!$row->delete()) { if (!$row->delete()) {
$errors[] = 'Fail during delete News.'; $errors[] = 'Fail during delete News.';
} }
else }
else {
$errors[] = 'News with id ' . $id . ' does not exists.'; $errors[] = 'News with id ' . $id . ' does not exists.';
}
} }
else else {
$errors[] = 'News id not set.'; $errors[] = 'News id not set.';
}
if(count($errors)) { if(count($errors)) {
return false; return false;

View File

@ -14,8 +14,9 @@ CREATE TABLE `myaac_menu`
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8; ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;
"); ");
require_once LIBS . 'plugins.php';
Plugins::installMenus('kathrine', require TEMPLATES . 'kathrine/menus.php');
Plugins::installMenus('tibiacom', require TEMPLATES . 'tibiacom/menus.php');
} }
require_once LIBS . 'plugins.php';
Plugins::installMenus('kathrine', require TEMPLATES . 'kathrine/menus.php');
Plugins::installMenus('tibiacom', require TEMPLATES . 'tibiacom/menus.php');

View File

@ -1127,7 +1127,7 @@ Sent by MyAAC,<br/>
'name' => 'Display Quests', 'name' => 'Display Quests',
'type' => 'boolean', 'type' => 'boolean',
'desc' => 'Show characters quests. Can be configured below', 'desc' => 'Show characters quests. Can be configured below',
'default' => true, 'default' => false,
], ],
'quests' => [ 'quests' => [
'name' => 'Quests List', 'name' => 'Quests List',

View File

@ -3,7 +3,7 @@
namespace MyAAC\Models; namespace MyAAC\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
class GuildInvites extends Model { class GuildInvite extends Model {
protected $table = 'guild_invites'; protected $table = 'guild_invites';

View File

@ -124,3 +124,5 @@ $filter = new TwigFilter('urlencode', function ($s) {
$twig->addFilter($filter); $twig->addFilter($filter);
unset($function, $filter); unset($function, $filter);
$hooks->trigger(HOOK_TWIG, ['twig' => $twig, 'twig_loader' => $twig_loader]);

View File

@ -28,7 +28,7 @@ if(isset($config['boxes']))
<?php <?php
if(PAGE !== 'news') { if(PAGE !== 'news') {
if(isset($_REQUEST['subtopic'])) { if(isset($_REQUEST['subtopic'])) {
$tmp = $_REQUEST['subtopic']; $tmp = escapeHtml($_REQUEST['subtopic']);
if($tmp === 'accountmanagement') { if($tmp === 'accountmanagement') {
$tmp = 'accountmanage'; $tmp = 'accountmanage';
} }