mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 20:43:34 +02:00
Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
946144016b | ||
![]() |
5c3b01aca4 | ||
![]() |
50983a2b85 | ||
![]() |
765886f0c7 | ||
![]() |
8ea78a5852 | ||
![]() |
063cbab93e | ||
![]() |
f1670f4012 | ||
![]() |
6fcf0f7117 | ||
![]() |
7a07763625 | ||
![]() |
8d2172a649 | ||
![]() |
b8f65207b6 | ||
![]() |
ea675afe86 | ||
![]() |
cc1cebf359 | ||
![]() |
1e874c7027 | ||
![]() |
a338fd967c | ||
![]() |
8796ff7e72 | ||
![]() |
a8172a518f | ||
![]() |
559c2c7bd2 | ||
![]() |
7a546e5a41 | ||
![]() |
5f7a9154b7 | ||
![]() |
0d52978d9f | ||
![]() |
df48363ea4 | ||
![]() |
34725e0257 | ||
![]() |
df321154f6 | ||
![]() |
f2a3ec1185 | ||
![]() |
ce4aed0f17 | ||
![]() |
d0c82f6fb0 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -2,6 +2,9 @@ Thumbs.db
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
#
|
||||||
|
/.htaccess
|
||||||
|
|
||||||
# composer
|
# composer
|
||||||
composer.lock
|
composer.lock
|
||||||
vendor
|
vendor
|
||||||
@@ -32,6 +35,12 @@ images/guilds/*
|
|||||||
images/editor/*
|
images/editor/*
|
||||||
!images/editor/index.html
|
!images/editor/index.html
|
||||||
|
|
||||||
|
# gallery images
|
||||||
|
images/gallery/*
|
||||||
|
!images/gallery/index.html
|
||||||
|
!images/gallery/demon.jpg
|
||||||
|
!images/gallery/demon_thumb.gif
|
||||||
|
|
||||||
# cache
|
# cache
|
||||||
system/cache/*
|
system/cache/*
|
||||||
!system/cache/index.html
|
!system/cache/index.html
|
||||||
|
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,5 +1,36 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.8.13 - 16.09.2023]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* latest client versions to config
|
||||||
|
* patching from develop - twig context for hooks
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* fixed XSS vulnerability in some pages
|
||||||
|
|
||||||
|
Nothing more or less!
|
||||||
|
|
||||||
|
## [0.8.12 - 07.08.2023]
|
||||||
|
I've moved the repository back to my personal account. (Just so you know!)
|
||||||
|
|
||||||
|
I will also try to add git commits pointed to each change, lets see if you like it or not - you can comment in discussion, that will be created just after releasing this version :)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* forum: better error messages (Suggested by @anyeor) (https://github.com/slawkens/myaac/commit/34725e0257684fe5fa43875cc3a8f587ba04642e)
|
||||||
|
* more support for GesiorAAC classes, so some of them will work with MyAAC (https://github.com/slawkens/myaac/commit/a8172a518ff8939c4402349b16c064fcaf855d31)
|
||||||
|
* word-break on forum thread & reply (Suggested by @anyeor) (https://github.com/slawkens/myaac/commit/ce4aed0f1719d2aadc749e5238e883e3c10e2686)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* not working pages/links from database, introduced in 0.8.10 (Thanks to OtLand user - https://otland.net/members/0lo.99657/ for report) (https://github.com/slawkens/myaac/commit/1e874c7027769bd09e772a1cdac75d7e37991256)
|
||||||
|
* it was possible to create topic in board that was closed, ommiting the error check (Thanks to @anyeor for report) (https://github.com/slawkens/myaac/commit/0d52978d9fb99869500d35e7676f454ca5eaba14)
|
||||||
|
* PHP 8.2 compatibility - removed deprecated functions utf8_encode & utf8_decode (https://github.com/slawkens/myaac/commit/a338fd967cdbcc89e86be4e6b66b2cad2ff23251)
|
||||||
|
* guild description not being correctly shown (Reported by @anyeor) (https://github.com/slawkens/myaac/commit/f2a3ec1185df64ad9084d4ff55790ae4a5b3e5fd, https://github.com/slawkens/myaac/commit/df321154f63d458a4bc7d83bac5e3447b67317a4)
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* Some old code for verifying messages length (Reported by @anyeor) (https://github.com/slawkens/myaac/commit/df48363ea4ced4350fd90ffddf57d464ba5afa8b)
|
||||||
|
* some info about config failed to load, was never working (https://github.com/slawkens/myaac/commit/7a546e5a41036b0e9e926d337c6f2e3c41c591d2)
|
||||||
|
|
||||||
## [0.8.11 - 30.06.2023]
|
## [0.8.11 - 30.06.2023]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
26
README.md
26
README.md
@@ -1,16 +1,22 @@
|
|||||||
# [MyAAC](https://my-aac.org)
|
# [MyAAC](https://my-aac.org)
|
||||||
|
|
||||||
[](https://travis-ci.org/github/slawkens/myaac)
|
|
||||||
[](https://opensource.org/licenses/gpl-license)
|
|
||||||
[](https://github.com/slawkens/myaac/releases)
|
|
||||||
[](https://github.com/slawkens/myaac/blob/d8b3b4135827ee17e3c6d41f08a925e718c587ed/.travis.yml#L3)
|
|
||||||
[](https://discord.gg/2J39Wus)
|
|
||||||
[](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed)
|
|
||||||
|
|
||||||
MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
|
MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
|
||||||
|
|
||||||
Official website: https://my-aac.org
|
Official website: https://my-aac.org
|
||||||
|
|
||||||
|
[](https://github.com/slawkens/myaac/actions)
|
||||||
|
[](https://opensource.org/licenses/gpl-license)
|
||||||
|
[](https://github.com/slawkens/myaac/releases)
|
||||||
|
[](https://discord.gg/2J39Wus)
|
||||||
|
[](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed)
|
||||||
|
|
||||||
|
| Version | Status | Branch | Requirements |
|
||||||
|
|:-----------|:------------------------------------------|:--------|:---------------|
|
||||||
|
| **0.10.x** | **Active development** | develop | **PHP >= 8.0** |
|
||||||
|
| 0.9.x | Active support | 0.9 | PHP >= 7.2.5 |
|
||||||
|
| 0.8.x | Active support | master | PHP >= 7.2.5 |
|
||||||
|
| 0.7.x | End Of Life | 0.7 | PHP >= 5.3.3 |
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
- PHP 7.2.5 or later
|
- PHP 7.2.5 or later
|
||||||
@@ -73,6 +79,12 @@ Look: [Contributing](https://github.com/otsoft/myaac/wiki/Contributing) in our w
|
|||||||
|
|
||||||
If you have a great idea or want contribute to the project - visit our website at https://www.my-aac.org
|
If you have a great idea or want contribute to the project - visit our website at https://www.my-aac.org
|
||||||
|
|
||||||
|
## Project supported by JetBrains
|
||||||
|
|
||||||
|
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
|
||||||
|
|
||||||
|
[](https://www.jetbrains.com/?from=https://github.com/slawkens)
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
This program and all associated files are released under the GNU Public License.
|
This program and all associated files are released under the GNU Public License.
|
||||||
|
@@ -426,7 +426,7 @@ else if ($id > 0 && isset($account) && $account->isLoaded()) {
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form action="<?php echo $base; ?>" method="post">
|
<form action="<?php echo $base; ?>" method="post">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<input type="text" class="form-control" name="search_name" value="<?php echo $search_account; ?>"
|
<input type="text" class="form-control" name="search_name" value="<?php echo escapeHtml($search_account); ?>"
|
||||||
maxlength="32" size="32">
|
maxlength="32" size="32">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
|
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
|
||||||
|
@@ -784,7 +784,7 @@ else if ($id > 0 && isset($player) && $player->isLoaded())
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form action="<?php echo $base; ?>" method="post">
|
<form action="<?php echo $base; ?>" method="post">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<input type="text" class="form-control" name="search_name" value="<?php echo $search_name; ?>"
|
<input type="text" class="form-control" name="search_name" value="<?php echo escapeHtml($search_name); ?>"
|
||||||
maxlength="32" size="32">
|
maxlength="32" size="32">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
|
<button type="submit" type="button" class="btn btn-info btn-flat">Search</button>
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
if (version_compare(phpversion(), '7.2.5', '<')) die('PHP version 7.2.5 or higher is required.');
|
if (version_compare(phpversion(), '7.2.5', '<')) die('PHP version 7.2.5 or higher is required.');
|
||||||
|
|
||||||
define('MYAAC', true);
|
define('MYAAC', true);
|
||||||
define('MYAAC_VERSION', '0.8.11');
|
define('MYAAC_VERSION', '0.8.13');
|
||||||
define('DATABASE_VERSION', 33);
|
define('DATABASE_VERSION', 33);
|
||||||
define('TABLE_PREFIX', 'myaac_');
|
define('TABLE_PREFIX', 'myaac_');
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
|
0
images/gallery/index.html
Normal file
0
images/gallery/index.html
Normal file
@@ -167,7 +167,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handle ?fbclid=x, etc. (show news page)
|
// handle ?fbclid=x, etc. (show news page)
|
||||||
if (!$found && count($_GET) > 0 && !isset($_REQUEST['subtopic']) && !isset($_REQUEST['p'])) {
|
if (!$found && count($_GET) > 0 && !isset($_REQUEST['subtopic']) && !isset($_REQUEST['p']) && !in_array($_SERVER['QUERY_STRING'], getDatabasePages())) {
|
||||||
$_REQUEST['p'] = $_REQUEST['subtopic'] = 'news';
|
$_REQUEST['p'] = $_REQUEST['subtopic'] = 'news';
|
||||||
$found = true;
|
$found = true;
|
||||||
}
|
}
|
||||||
|
@@ -4,12 +4,12 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$reward = config('account_mail_confirmed_reward');
|
$reward = config('account_mail_confirmed_reward');
|
||||||
|
|
||||||
$hasCoinsColumn = $db->hasColumn('accounts', 'coins');
|
$hasCoinsColumn = $db->hasColumn('accounts', 'coins');
|
||||||
if ($reward['coins'] > 0 && $hasCoinsColumn) {
|
if ($reward['coins'] > 0 && !$hasCoinsColumn) {
|
||||||
log_append('email_confirm_error.log', 'accounts.coins column does not exist.');
|
log_append('email_confirm_error.log', 'accounts.coins column does not exist.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($account) || !$account->isLoaded()) {
|
if (!isset($account) || !$account->isLoaded()) {
|
||||||
log_append('email_confirm_error.log', 'Account not loaded.');
|
//log_append('email_confirm_error.log', 'Account not loaded.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,4 +99,10 @@ $config['clients'] = [
|
|||||||
1291,
|
1291,
|
||||||
|
|
||||||
1300,
|
1300,
|
||||||
|
1310,
|
||||||
|
1311,
|
||||||
|
1312,
|
||||||
|
1316,
|
||||||
|
1320,
|
||||||
|
1321,
|
||||||
];
|
];
|
||||||
|
@@ -9,7 +9,30 @@
|
|||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
class Player extends OTS_Player {}
|
class Account extends OTS_Account {
|
||||||
class Guild extends OTS_Guild {}
|
public function loadById($id) {
|
||||||
|
$this->load($id);
|
||||||
|
}
|
||||||
|
public function loadByName($name) {
|
||||||
|
$this->find($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Player extends OTS_Player {
|
||||||
|
public function loadById($id) {
|
||||||
|
$this->load($id);
|
||||||
|
}
|
||||||
|
public function loadByName($name) {
|
||||||
|
$this->find($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class Guild extends OTS_Guild {
|
||||||
|
public function loadById($id) {
|
||||||
|
$this->load($id);
|
||||||
|
}
|
||||||
|
public function loadByName($name) {
|
||||||
|
$this->find($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
class GuildRank extends OTS_GuildRank {}
|
class GuildRank extends OTS_GuildRank {}
|
||||||
class House extends OTS_House {}
|
class House extends OTS_House {}
|
||||||
|
@@ -923,8 +923,8 @@ function load_config_lua($filename)
|
|||||||
$config_file = $filename;
|
$config_file = $filename;
|
||||||
if(!@file_exists($config_file))
|
if(!@file_exists($config_file))
|
||||||
{
|
{
|
||||||
log_append('error.log', '[load_config_file] Fatal error: Cannot load config.lua (' . $filename . '). Error: ' . print_r(error_get_last(), true));
|
log_append('error.log', '[load_config_file] Fatal error: Cannot load config.lua (' . $filename . ').');
|
||||||
throw new RuntimeException('ERROR: Cannot find ' . $filename . ' file. More info in system/logs/error.log');
|
throw new RuntimeException('ERROR: Cannot find ' . $filename . ' file.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
@@ -1247,6 +1247,36 @@ function escapeHtml($html) {
|
|||||||
return htmlentities($html, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
return htmlentities($html, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayErrorBoxWithBackButton($errors, $action = null) {
|
||||||
|
global $twig;
|
||||||
|
$twig->display('error_box.html.twig', ['errors' => $errors]);
|
||||||
|
$twig->display('account.back_button.html.twig', [
|
||||||
|
'action' => $action ?: getLink('')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDatabasePages($withHidden = false): array
|
||||||
|
{
|
||||||
|
global $db, $logged_access;
|
||||||
|
|
||||||
|
if (!isset($logged_access)) {
|
||||||
|
$logged_access = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pages = $db->query('SELECT `name` FROM ' . TABLE_PREFIX . 'pages WHERE ' . ($withHidden ? '' : '`hidden` != 1 AND ') . '`access` <= ' . $db->quote($logged_access));
|
||||||
|
$ret = [];
|
||||||
|
|
||||||
|
if ($pages->rowCount() < 1) {
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($pages->fetchAll() as $page) {
|
||||||
|
$ret[] = $page['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
// validator functions
|
// validator functions
|
||||||
require_once LIBS . 'validator.php';
|
require_once LIBS . 'validator.php';
|
||||||
require_once SYSTEM . 'compat/base.php';
|
require_once SYSTEM . 'compat/base.php';
|
||||||
|
@@ -74,6 +74,10 @@ class Plugins {
|
|||||||
if (isset($plugin['hooks'])) {
|
if (isset($plugin['hooks'])) {
|
||||||
foreach ($plugin['hooks'] as $_name => $info) {
|
foreach ($plugin['hooks'] as $_name => $info) {
|
||||||
if (defined('HOOK_'. $info['type'])) {
|
if (defined('HOOK_'. $info['type'])) {
|
||||||
|
if (strpos($info['type'], 'HOOK_') !== false) {
|
||||||
|
$info['type'] = str_replace('HOOK_', '', $info['type']);
|
||||||
|
}
|
||||||
|
|
||||||
$hook = constant('HOOK_'. $info['type']);
|
$hook = constant('HOOK_'. $info['type']);
|
||||||
$hooks[] = ['name' => $_name, 'type' => $hook, 'file' => $info['file']];
|
$hooks[] = ['name' => $_name, 'type' => $hook, 'file' => $info['file']];
|
||||||
} else {
|
} else {
|
||||||
|
@@ -123,7 +123,7 @@ class OTS_ServerInfo
|
|||||||
{
|
{
|
||||||
// loads respond XML
|
// loads respond XML
|
||||||
$info = new OTS_InfoRespond();
|
$info = new OTS_InfoRespond();
|
||||||
if(!$info->loadXML( utf8_encode($status->getBuffer())))
|
if(!$info->loadXML( $status->getBuffer()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $info;
|
return $info;
|
||||||
|
@@ -191,12 +191,13 @@ if(!$logged)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
||||||
error('Error: Action contains illegal characters.');
|
$errors[] = 'Error: Action contains illegal characters.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
else if(file_exists(PAGES . 'forum/' . $action . '.php')) {
|
else if(file_exists(PAGES . 'forum/' . $action . '.php')) {
|
||||||
require PAGES . 'forum/' . $action . '.php';
|
require PAGES . 'forum/' . $action . '.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error('This page does not exists.');
|
$errors[] = 'This page does not exists.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
@@ -14,7 +14,8 @@ if(Forum::canPost($account_logged))
|
|||||||
{
|
{
|
||||||
$post_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : false;
|
$post_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : false;
|
||||||
if(!$post_id) {
|
if(!$post_id) {
|
||||||
echo 'Please enter post id.';
|
$errors[] = 'Please enter post id.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,24 +36,18 @@ if(Forum::canPost($account_logged))
|
|||||||
$post_topic = stripslashes(trim($_REQUEST['topic']));
|
$post_topic = stripslashes(trim($_REQUEST['topic']));
|
||||||
$smile = isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0;
|
$smile = isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0;
|
||||||
$html = isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0;
|
$html = isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0;
|
||||||
$lenght = 0;
|
|
||||||
for($i = 0; $i < strlen($post_topic); $i++)
|
$length = strlen($post_topic);
|
||||||
{
|
if(($length < 1 || $length > 60) && $thread['id'] == $thread['first_post'])
|
||||||
if(ord($post_topic[$i]) >= 33 && ord($post_topic[$i]) <= 126)
|
$errors[] = "Too short or too long topic (Length: $length letters). Minimum 1 letter, maximum 60 letters.";
|
||||||
$lenght++;
|
|
||||||
}
|
$length = strlen($text);
|
||||||
if(($lenght < 1 || strlen($post_topic) > 60) && $thread['id'] == $thread['first_post'])
|
if($length < 1 || $length > 15000)
|
||||||
$errors[] = 'Too short or too long topic (short: '.$lenght.' long: '.strlen($post_topic).' letters). Minimum 1 letter, maximum 60 letters.';
|
$errors[] = "Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters.";
|
||||||
$lenght = 0;
|
|
||||||
for($i = 0; $i < strlen($text); $i++)
|
|
||||||
{
|
|
||||||
if(ord($text[$i]) >= 33 && ord($text[$i]) <= 126)
|
|
||||||
$lenght++;
|
|
||||||
}
|
|
||||||
if($lenght < 1 || strlen($text) > 15000)
|
|
||||||
$errors[] = 'Too short or too long post (short: '.$lenght.' long: '.strlen($text).' letters). Minimum 1 letter, maximum 15000 letters.';
|
|
||||||
if($char_id == 0)
|
if($char_id == 0)
|
||||||
$errors[] = 'Please select a character.';
|
$errors[] = 'Please select a character.';
|
||||||
|
|
||||||
if(empty($post_topic) && $thread['id'] == $thread['first_post'])
|
if(empty($post_topic) && $thread['id'] == $thread['first_post'])
|
||||||
$errors[] = 'Thread topic can\'t be empty.';
|
$errors[] = 'Thread topic can\'t be empty.';
|
||||||
|
|
||||||
@@ -104,11 +99,17 @@ if(Forum::canPost($account_logged))
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo '<br/>You are not an author of this post.';
|
$errors[] = 'You are not an author of this post.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = "Post with ID $post_id doesn't exist.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
echo "<br/>Post with ID " . $post_id . " doesn't exist.";
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo "<br/>Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post.";
|
$errors[] = "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
@@ -14,12 +14,13 @@ if(!Forum::isModerator()) {
|
|||||||
echo 'You are not logged in or you are not moderator.';
|
echo 'You are not logged in or you are not moderator.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$save = isset($_REQUEST['save']) ? (int)$_REQUEST['save'] == 1 : false;
|
$save = isset($_REQUEST['save']) && (int)$_REQUEST['save'] == 1;
|
||||||
if($save) {
|
if($save) {
|
||||||
$post_id = (int)$_REQUEST['id'];
|
$post_id = (int)$_REQUEST['id'];
|
||||||
$board = (int)$_REQUEST['section'];
|
$board = (int)$_REQUEST['section'];
|
||||||
if(!Forum::hasAccess($board)) {
|
if(!Forum::hasAccess($board)) {
|
||||||
echo "You don't have access to this board.";
|
$errors[] = "You don't have access to this board.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,8 +32,10 @@ if($save) {
|
|||||||
header('Location: ' . getForumBoardLink($nPost['section']));
|
header('Location: ' . getForumBoardLink($nPost['section']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo 'Post with ID ' . $post_id . ' does not exist.';
|
$errors[] = 'Post with ID ' . $post_id . ' does not exist.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$post_id = (int)$_REQUEST['id'];
|
$post_id = (int)$_REQUEST['id'];
|
||||||
@@ -58,7 +61,8 @@ else {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo 'Post with ID ' . $post_id . ' does not exist.';
|
$errors[] = 'Post with ID ' . $post_id . ' does not exist.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
@@ -15,17 +15,20 @@ if(Forum::canPost($account_logged))
|
|||||||
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
||||||
$thread_id = isset($_REQUEST['thread_id']) ? (int) $_REQUEST['thread_id'] : 0;
|
$thread_id = isset($_REQUEST['thread_id']) ? (int) $_REQUEST['thread_id'] : 0;
|
||||||
if($thread_id == 0) {
|
if($thread_id == 0) {
|
||||||
echo "Thread with this id doesn't exist.";
|
$errors[] = "Thread with this id doesn't exist.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$thread = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch();
|
$thread = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".$thread_id." LIMIT 1")->fetch();
|
||||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
|
||||||
if(isset($thread['id']) && Forum::hasAccess($thread['section']))
|
if(isset($thread['id']) && Forum::hasAccess($thread['section']))
|
||||||
{
|
{
|
||||||
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
||||||
|
|
||||||
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
||||||
$text = isset($_REQUEST['text']) ? stripslashes(trim($_REQUEST['text'])) : NULL;
|
$text = isset($_REQUEST['text']) ? stripslashes(trim($_REQUEST['text'])) : NULL;
|
||||||
$char_id = (int) (isset($_REQUEST['char_id']) ? $_REQUEST['char_id'] : 0);
|
$char_id = (int) ($_REQUEST['char_id'] ?? 0);
|
||||||
$post_topic = isset($_REQUEST['topic']) ? stripslashes(trim($_REQUEST['topic'])) : '';
|
$post_topic = isset($_REQUEST['topic']) ? stripslashes(trim($_REQUEST['topic'])) : '';
|
||||||
$smile = (isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0);
|
$smile = (isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0);
|
||||||
$html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0);
|
$html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0);
|
||||||
@@ -38,14 +41,10 @@ if(Forum::canPost($account_logged))
|
|||||||
}
|
}
|
||||||
elseif(isset($_REQUEST['save']))
|
elseif(isset($_REQUEST['save']))
|
||||||
{
|
{
|
||||||
$lenght = 0;
|
$length = strlen($text);
|
||||||
for($i = 0; $i < strlen($text); $i++)
|
if($length < 1 || strlen($text) > 15000)
|
||||||
{
|
$errors[] = 'Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters.';
|
||||||
if(ord($text[$i]) >= 33 && ord($text[$i]) <= 126)
|
|
||||||
$lenght++;
|
|
||||||
}
|
|
||||||
if($lenght < 1 || strlen($text) > 15000)
|
|
||||||
$errors[] = 'Too short or too long post (short: '.$lenght.' long: '.strlen($text).' letters). Minimum 1 letter, maximum 15000 letters.';
|
|
||||||
if($char_id == 0)
|
if($char_id == 0)
|
||||||
$errors[] = 'Please select a character.';
|
$errors[] = 'Please select a character.';
|
||||||
|
|
||||||
@@ -73,8 +72,8 @@ if(Forum::canPost($account_logged))
|
|||||||
if(count($errors) == 0)
|
if(count($errors) == 0)
|
||||||
{
|
{
|
||||||
$saved = true;
|
$saved = true;
|
||||||
Forum::add_post($thread['id'], $thread['section'], $account_logged->getId(), (int) $char_id, $text, $post_topic, $smile, $html, time(), $_SERVER['REMOTE_ADDR']);
|
Forum::add_post($thread['id'], $thread['section'], $account_logged->getId(), (int) $char_id, $text, $post_topic, $smile, $html);
|
||||||
$db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".(int) $thread_id);
|
$db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".$thread_id);
|
||||||
$post_page = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`post_date` <= ".time()." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id'])->fetch();
|
$post_page = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`post_date` <= ".time()." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id'])->fetch();
|
||||||
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
||||||
header('Location: ' . getForumThreadLink($thread_id, $_page));
|
header('Location: ' . getForumThreadLink($thread_id, $_page));
|
||||||
@@ -110,10 +109,14 @@ if(Forum::canPost($account_logged))
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo "Thread with ID " . $thread_id . " doesn't exist.";
|
$errors[] = "Thread with ID " . $thread_id . " doesn't exist.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
echo "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post.";
|
|
||||||
|
|
||||||
$twig->display('forum.fullscreen.html.twig');
|
$twig->display('forum.fullscreen.html.twig');
|
@@ -13,7 +13,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
if(Forum::canPost($account_logged))
|
if(Forum::canPost($account_logged))
|
||||||
{
|
{
|
||||||
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
||||||
$section_id = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null;
|
$section_id = $_REQUEST['section_id'] ?? null;
|
||||||
if($section_id !== null) {
|
if($section_id !== null) {
|
||||||
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
||||||
if(isset($sections[$section_id]['name']) && Forum::hasAccess($section_id)) {
|
if(isset($sections[$section_id]['name']) && Forum::hasAccess($section_id)) {
|
||||||
@@ -28,22 +28,13 @@ if(Forum::canPost($account_logged))
|
|||||||
$html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0);
|
$html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0);
|
||||||
$saved = false;
|
$saved = false;
|
||||||
if (isset($_REQUEST['save'])) {
|
if (isset($_REQUEST['save'])) {
|
||||||
$errors = array();
|
$length = strlen($post_topic);
|
||||||
|
if ($length < 1 || $length > 60)
|
||||||
|
$errors[] = "Too short or too long topic (Length: $length letters). Minimum 1 letter, maximum 60 letters.";
|
||||||
|
|
||||||
$lenght = 0;
|
$length = strlen($text);
|
||||||
for ($i = 0; $i < strlen($post_topic); $i++) {
|
if ($length < 1 || $length > 15000)
|
||||||
if (ord($post_topic[$i]) >= 33 && ord($post_topic[$i]) <= 126)
|
$errors[] = "Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters.";
|
||||||
$lenght++;
|
|
||||||
}
|
|
||||||
if ($lenght < 1 || strlen($post_topic) > 60)
|
|
||||||
$errors[] = 'Too short or too long topic (short: ' . $lenght . ' long: ' . strlen($post_topic) . ' letters). Minimum 1 letter, maximum 60 letters.';
|
|
||||||
$lenght = 0;
|
|
||||||
for ($i = 0; $i < strlen($text); $i++) {
|
|
||||||
if (ord($text[$i]) >= 33 && ord($text[$i]) <= 126)
|
|
||||||
$lenght++;
|
|
||||||
}
|
|
||||||
if ($lenght < 1 || strlen($text) > 15000)
|
|
||||||
$errors[] = 'Too short or too long post (short: ' . $lenght . ' long: ' . strlen($text) . ' letters). Minimum 1 letter, maximum 15000 letters.';
|
|
||||||
|
|
||||||
if ($char_id == 0)
|
if ($char_id == 0)
|
||||||
$errors[] = 'Please select a character.';
|
$errors[] = 'Please select a character.';
|
||||||
@@ -93,11 +84,17 @@ if(Forum::canPost($account_logged))
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo 'Board with ID ' . $board_id . ' doesn\'t exist.';
|
$errors[] = "Board with ID $section_id doesn't exist.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = 'Please enter section_id.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
echo 'Please enter section_id.';
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo 'Your account is banned, deleted or you don\'t have any player with level '.$config['forum_level_required'].' on your account. You can\'t post.';
|
$errors[] = 'Your account is banned, deleted or you don\'t have any player with level '.$config['forum_level_required'].' on your account. You can\'t post.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
@@ -29,8 +29,12 @@ if(Forum::isModerator())
|
|||||||
header('Location: ' . getForumThreadLink($post['first_post'], (int) $_page));
|
header('Location: ' . getForumThreadLink($post['first_post'], (int) $_page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
echo 'Post with ID ' . $id . ' does not exist.';
|
$errors[] = 'Post with ID ' . $id . ' does not exist.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = 'You are not logged in or you are not moderator.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
echo 'You are not logged in or you are not moderator.';
|
|
@@ -14,12 +14,14 @@ $links_to_pages = '';
|
|||||||
$section_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : null;
|
$section_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : null;
|
||||||
|
|
||||||
if($section_id == null || !isset($sections[$section_id])) {
|
if($section_id == null || !isset($sections[$section_id])) {
|
||||||
echo "Board with this id does't exist.";
|
$errors[] = "Board with this id does't exist.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Forum::hasAccess($section_id)) {
|
if(!Forum::hasAccess($section_id)) {
|
||||||
echo "You don't have access to this board.";
|
$errors[] = "You don't have access to this board.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,5 +92,3 @@ if(isset($last_threads[0]))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo '<h3>No threads in this board.</h3>';
|
echo '<h3>No threads in this board.</h3>';
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -16,12 +16,14 @@ $_page = (int) (isset($_REQUEST['page']) ? $_REQUEST['page'] : 0);
|
|||||||
$thread_starter = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`first_post` AND `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` LIMIT 1")->fetch();
|
$thread_starter = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`first_post` AND `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` LIMIT 1")->fetch();
|
||||||
|
|
||||||
if(empty($thread_starter['name'])) {
|
if(empty($thread_starter['name'])) {
|
||||||
echo 'Thread with this ID does not exits.';
|
$errors[] = 'Thread with this ID does not exists.';
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Forum::hasAccess($thread_starter['section'])) {
|
if(!Forum::hasAccess($thread_starter['section'])) {
|
||||||
echo "You don't have access to view this thread.";
|
$errors[] = "You don't have access to view this thread.";
|
||||||
|
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% set i = 0 %}
|
{% set i = 0 %}
|
||||||
{% for thread in threads %}
|
{% for thread in threads %}
|
||||||
<tr bgcolor="{{ getStyle(i) }}"><td>{{ thread.name }}</td><td>{{ thread.post|raw }}</td></tr>
|
<tr bgcolor="{{ getStyle(i) }}"><td>{{ thread.name }}</td><td style="word-break: break-all">{{ thread.post|raw }}</td></tr>
|
||||||
{% set i = i + 1 %}
|
{% set i = i + 1 %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
@@ -40,7 +40,7 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
<br />Posts: {{ post.author_posts_count }}<br />
|
<br />Posts: {{ post.author_posts_count }}<br />
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">{{ post.content|raw }} </td></tr>
|
<td valign="top" style="word-break: break-all">{{ post.content|raw }} </td></tr>
|
||||||
<tr bgcolor="{{ getStyle(i) }}">
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
<td>
|
<td>
|
||||||
<span style="font-size: 10px">{{ post.date|date('d.m.y H:i:s') }}
|
<span style="font-size: 10px">{{ post.date|date('d.m.y H:i:s') }}
|
||||||
|
@@ -49,8 +49,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div id="GuildInformationContainer">
|
<div id="GuildInformationContainer">
|
||||||
{% if descriptions is not empty %}
|
{% if description is not empty %}
|
||||||
{{ description }}
|
{{ description|raw }}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -44,15 +44,16 @@ $function = new TwigFunction('getGuildLink', function ($s, $p) {
|
|||||||
});
|
});
|
||||||
$twig->addFunction($function);
|
$twig->addFunction($function);
|
||||||
|
|
||||||
$function = new TwigFunction('hook', function ($hook) {
|
$function = new TwigFunction('hook', function ($context, $hook, array $params = []) {
|
||||||
global $hooks;
|
global $hooks;
|
||||||
|
|
||||||
if(is_string($hook)) {
|
if(is_string($hook)) {
|
||||||
$hook = constant($hook);
|
$hook = constant($hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
$hooks->trigger($hook);
|
$params['context'] = $context;
|
||||||
});
|
$hooks->trigger($hook, $params);
|
||||||
|
}, ['needs_context' => true]);
|
||||||
$twig->addFunction($function);
|
$twig->addFunction($function);
|
||||||
|
|
||||||
$function = new TwigFunction('config', function ($key) {
|
$function = new TwigFunction('config', function ($key) {
|
||||||
|
@@ -28,7 +28,7 @@ if(!@file_exists($page_file))
|
|||||||
|
|
||||||
// set text
|
// set text
|
||||||
$font = getenv('GDFONTPATH') . DIRECTORY_SEPARATOR . 'martel.ttf';
|
$font = getenv('GDFONTPATH') . DIRECTORY_SEPARATOR . 'martel.ttf';
|
||||||
imagettftext($image, 18, 0, 4, 20, imagecolorallocate($image, 240, 209, 164), $font, utf8_decode($_GET['t']));
|
imagettftext($image, 18, 0, 4, 20, imagecolorallocate($image, 240, 209, 164), $font, $_GET['t']);
|
||||||
|
|
||||||
// header mime type
|
// header mime type
|
||||||
header('Content-type: image/gif');
|
header('Content-type: image/gif');
|
||||||
|
@@ -21,7 +21,7 @@ if(isset($config['boxes']))
|
|||||||
<?php
|
<?php
|
||||||
if(PAGE !== 'news') {
|
if(PAGE !== 'news') {
|
||||||
if(strpos(URI, 'subtopic=') !== false) {
|
if(strpos(URI, 'subtopic=') !== false) {
|
||||||
$tmp = $_REQUEST['subtopic'];
|
$tmp = escapeHtml($_REQUEST['subtopic']);
|
||||||
if($tmp === 'accountmanagement') {
|
if($tmp === 'accountmanagement') {
|
||||||
$tmp = 'accountmanage';
|
$tmp = 'accountmanage';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user