Compare commits

...

14 Commits

Author SHA1 Message Date
slawkens
739782109e * update to 0.5.0 2017-10-10 15:50:46 +02:00
slawkens
87ba018ab8 * some fix 2017-10-10 15:42:52 +02:00
slawkens
041702615f * fixed so you can also use slash in custom pages 2017-10-10 15:39:00 +02:00
slawkens
0a82f306f6 * moved admin pages to twig
* edited account.management.html.twig to fit modern templates, tibiacom have its own template
* sample characters are now assigned to admin account and have group_id 4 to not be shown on highscores
* fixed database pages loading
* added require.database plugin option, which will prove if DATABASE_VERSION is enough
2017-10-10 15:32:59 +02:00
slawkens1
856e72150c * fixed adding/editing commands
* fixed undefined index in install plugin
2017-10-09 20:34:06 +02:00
slawkens1
e2857f8ca5 * suggested by @gpedro 2017-10-09 20:01:29 +02:00
slawkens
04d9ec9c94 * updated tinymce to the latest (4.7.0) version
* added option to uninstall plugin
* added option to require specified myaac or php version for plugins
* added links loaded from database to admin panel - for future plugins
* added few characters hooks
* fixed some kathrine template js bug when shop is disabled
2017-10-09 16:47:34 +02:00
slawkens1
e984a467ef * print some info to error.log when can't find config.lua 2017-10-08 22:04:33 +02:00
slawkens1
8342a7b8a8 * fixed links like serverInfo (capitalized) 2017-10-08 20:53:45 +02:00
Sławek
269af1930c * updated readme 2017-10-08 19:07:21 +02:00
slawkens1
b7bb950abc * fixed typo 2017-10-08 18:59:43 +02:00
slawkens1
4a19458c15 * moved functions declaration a bit upper, so it can use str_replace_first 2017-10-08 18:24:35 +02:00
slawkens1
b6db420465 * fixed redirects when BASE_DIR is empty 2017-10-08 18:12:06 +02:00
slawkens
7b234ad41f * moved .htaccess rules to plain php (index.php)
Its a salut to nginx and other web server nutzer (not apache), as they can now simply redirect all requests with simple rule to index.php, and php will take care of all redirects. .htaccess just now redirects everything to index.php with simple 3 lines.
* change accountmanagement links to use friendly_urls
* fixed creating new forum thread
* some fixes in account changecomment action
* show info when account name/number or password is empty on login
* fixed showing account login errors
* added new twig function getLink that convert link taking into account config.friendly_urls
* internalLayoutLink -> getLink
2017-10-06 17:11:06 +02:00
437 changed files with 2137 additions and 39043 deletions

View File

@@ -1,33 +1,7 @@
Options -Indexes -MultiViews Options -Indexes -MultiViews
RewriteEngine On RewriteEngine On
#RewriteBase /
# Page parser
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_+']+)\.png/?$ tools/signature/index.php?name=$1 [L] RewriteRule ^.*$ index.php [L]
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
RewriteRule ^guilds/([A-Za-z0-9-_+']+)$ index.php?subtopic=guilds&action=show&guild=$1
RewriteRule ^forum/board/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1&page=$2
RewriteRule ^forum/thread/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1
RewriteRule ^forum/thread/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
RewriteRule ^account/manage$ index.php?subtopic=accountmanagement
RewriteRule ^account/create$ index.php?subtopic=createaccount
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
RewriteRule ^account/logout$ index.php?subtopic=accountmanagement&action=logout
RewriteRule ^news/archive/([0-9]+)$ index.php?subtopic=newsarchive&id=$1
RewriteRule ^news/archive$ index.php?subtopic=newsarchive
RewriteRule ^highscores/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?subtopic=highscores&list=$1&vocation=$2
RewriteRule ^highscores/([A-Za-z0-9-_']+)$ index.php?subtopic=highscores&list=$1
RewriteRule ^polls/([0-9]+)$ index.php?subtopic=polls&id=$1
RewriteRule ^admin/$ admin/index.php
RewriteRule ^install/$ install/index.php
# temp solution >.>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L]
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?p=$1&action=$2 [L]

View File

@@ -1,3 +1,22 @@
[0.5.0 - 10.10.2017]
- moved .htaccess rules to plain php (index.php)
- updated tinymce to the latest (4.7.0) version, you can now embed code, for example youtube videos
- added option to uninstall plugin
- added option to require specified myaac, php or database version for plugins, without that plugin won't be installed
- change accountmanagement links to use friendly_urls
- fixed creating new forum thread
- sample characters are now assigned to admin account and have group_id 4 to not be shown on highscores
- added links loaded from database to admin panel - for future plugins
- print some info to error.log when can't find config.lua
- some fixes in account changecomment action
- show info when account name/number or password is empty on login
- fixed showing account login errors
- added few characters hooks
- fixed some kathrine template js bug when shop is disabled
- you can now use slash '/' in custom pages loaded from database
- added new twig function getLink that convert link taking into account config.friendly_urls
- internalLayoutLink -> getLink
[0.4.3 - 05.10.2017] [0.4.3 - 05.10.2017]
- better config loader taken from latest gesior, you can now include files in your config by doing dofile('config.local.lua') - better config loader taken from latest gesior, you can now include files in your config by doing dofile('config.local.lua')
- fixed country detection in create account - fixed country detection in create account

View File

@@ -1,7 +1,7 @@
# myaac # myaac
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) and Content Management System (CMS) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
Official website: http://my-aac.org Official website: https://my-aac.org
### REQUIREMENTS ### REQUIREMENTS

View File

@@ -26,7 +26,7 @@
<a href="<?php echo BASE_URL; ?>" target="_blank">Preview</a> <span class="separator">|</span> <a href="?action=logout">Log out<img src="<?php echo BASE_URL; ?>images/icons/logout.png" alt="" title="Log out" /></a> <a href="<?php echo BASE_URL; ?>" target="_blank">Preview</a> <span class="separator">|</span> <a href="?action=logout">Log out<img src="<?php echo BASE_URL; ?>images/icons/logout.png" alt="" title="Log out" /></a>
</div> </div>
<?php endif; ?> <?php endif; ?>
<h1><?php echo $config['lua']['serverName'] . ' - ' . $title; ?> - Admin Panel</h1> <h1><?php echo $config['lua']['serverName'] . (isset($title) ? ' - ' . $title : ''); ?> - Admin Panel</h1>
</div> </div>
<div id="wrapper"> <div id="wrapper">
<?php <?php
@@ -78,6 +78,19 @@
} }
echo '</li>'; echo '</li>';
} }
$query = $db->query('SELECT `name`, `page`, `flags` FROM `' . TABLE_PREFIX . 'admin_menu` ORDER BY `ordering`');
$menu_db = $query->fetchAll();
foreach($menu_db as $item) {
if($item['flags'] == 0 || hasFlag($item['flags'])) {
echo '<li><h3>
<a href="?p=' . $item['page'] . '">';
if($page == $item['page']) echo '<u>';
echo $item['name'];
if($page == $item['page']) echo '</u>';
echo '</a></h3></li>';
}
}
?> ?>
</ul> </ul>
</div> </div>

View File

@@ -21,14 +21,14 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
session_start(); session_start();
define('MYAAC', true); define('MYAAC', true);
define('MYAAC_VERSION', '0.4.3'); define('MYAAC_VERSION', '0.5.0');
define('DATABASE_VERSION', 9); define('DATABASE_VERSION', 10);
define('TABLE_PREFIX', 'myaac_'); define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true)); define('START_TIME', microtime(true));
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX')); define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));

View File

@@ -13,7 +13,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */

102
index.php
View File

@@ -21,7 +21,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
@@ -39,17 +39,105 @@ if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['i
die('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!'); die('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!');
} }
require_once(SYSTEM . 'functions.php');
$uri = $_SERVER['REQUEST_URI'];
if(!empty(BASE_DIR))
$uri = str_replace(BASE_DIR . '/', '', $uri);
else
$uri = str_replace_first('/', '', $uri);
$uri = str_replace(array('index.php/', '?'), '', $uri);
$uri = strtolower($uri);
$found = false;
if(empty($uri) || isset($_REQUEST['template'])) {
$_REQUEST['p'] = 'news';
$found = true;
}
else if(!preg_match('/[^A-z0-9_\-]/', $uri) && file_exists(SYSTEM . 'pages/' . $uri . '.php')) {
$_REQUEST['p'] = $uri;
$found = true;
}
else {
$rules = array(
'/^account\/manage\/?$/' => array('subtopic' => 'accountmanagement'),
'/^account\/create\/?$/' => array('subtopic' => 'createaccount'),
'/^account\/lost\/?$/' => array('subtopic' => 'lostaccount'),
'/^account\/logout\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'logout'),
'/^account\/password\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changepassword'),
'/^account\/register\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'registeraccount'),
'/^account\/register\/new\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'registernew'),
'/^account\/email\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changeemail'),
'/^account\/info\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changeinfo'),
'/^account\/character\/create\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'createcharacter'),
'/^account\/character\/name\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changename'),
'/^account\/character\/sex\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changesex'),
'/^account\/character\/delete\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'deletecharacter'),
'/^account\/character\/comment\/[A-Za-z]+\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changecomment', 'name' => '$3'),
'/^account\/character\/comment\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changecomment'),
'/^characters\/[A-Za-z0-9-_%+\']+$/' => array('subtopic' => 'characters', 'name' => '$1'),
'/^commands\/add\/?$/' => array('subtopic' => 'commands', 'action' => 'add'),
'/^commands\/edit\/?$/' => array('subtopic' => 'commands', 'action' => 'edit'),
'/^news\/add\/?$/' => array('subtopic' => 'news', 'action' => 'add'),
'/^news\/edit\/?$/' => array('subtopic' => 'news', 'action' => 'edit'),
'/^news\/archive\/?$/' => array('subtopic' => 'newsarchive'),
'/^news\/archive\/[0-9]+\/?$/' => array('subtopic' => 'newsarchive', 'id' => '$2'),
'/^guilds\/[A-Za-z0-9-_%+\']+$/' => array('subtopic' => 'guilds', 'action' => 'show', 'guild' => '$1'),
'/^forum\/board\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_board', 'id' => '$2'),
'/^forum\/board\/[0-9]+\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_board', 'id' => '$2', 'page' => '$3'),
'/^forum\/thread\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2'),
'/^forum\/thread\/[0-9]+\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2', 'page' => '$3'),
'/^gifts\/history\/?$/' => array('subtopic' => 'gifts', 'action' => 'show_history'),
'/^highscores\/[A-Za-z0-9-_]+\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'vocation' => '$2'),
'/^highscores\/[A-Za-z0-9-_\']+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1'),
'/^polls\/[0-9]+\/?$/' => array('subtopic' => 'polls', 'id' => '$1')
);
if (preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) {
$tmp = explode('.', $uri);
$_REQUEST['name'] = urldecode($tmp[0]);
chdir(TOOLS . 'signature');
include('index.php');
exit();
}
foreach($rules as $rule => $redirect) {
if (preg_match($rule, $uri)) {
$tmp = explode('/', $uri);
foreach($redirect as $key => $value) {
if(strpos($value, '$') !== false) {
$value = str_replace('$' . $value[1], $tmp[$value[1]], $value);
}
$_REQUEST[$key] = $value;
$_GET[$key] = $value;
}
$found = true;
break;
}
}
if(!$found)
$_REQUEST['p'] = $uri;
}
// define page visited, so it can be used within events system // define page visited, so it can be used within events system
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_GET['p']) ? $_GET['p'] : ''); $page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : '');
if(empty($page) || preg_match('/[^A-z0-9_\-]/', $page)) if(empty($page) || preg_match('/[^A-z0-9\/_\-]/', $page)) {
$page = 'news'; if(!$found)
$page = '404';
else
$page = 'news';
}
$page = strtolower($page); $page = strtolower($page);
define('PAGE', $page); define('PAGE', $page);
$template_place_holders = array(); $template_place_holders = array();
require_once(SYSTEM . 'functions.php');
require_once(SYSTEM . 'init.php'); require_once(SYSTEM . 'init.php');
require_once(SYSTEM . 'login.php'); require_once(SYSTEM . 'login.php');
require_once(SYSTEM . 'status.php'); require_once(SYSTEM . 'status.php');
@@ -156,7 +244,7 @@ if($config['backward_support']) {
$config['site']['screenshot_page'] = true; $config['site']['screenshot_page'] = true;
if($config['forum'] != '') if($config['forum'] != '')
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? internalLayoutLink('forum') : $config['forum']); $config['forum_link'] = (strtolower($config['forum']) == 'site' ? getLink('forum') : $config['forum']);
foreach($status as $key => $value) foreach($status as $key => $value)
$config['status']['serverStatus_' . $key] = $value; $config['status']['serverStatus_' . $key] = $value;
@@ -223,7 +311,7 @@ if($load_it)
else else
{ {
$file = SYSTEM . 'pages/' . $page . '.php'; $file = SYSTEM . 'pages/' . $page . '.php';
if(!@file_exists($file)) if(!@file_exists($file) && !$found)
{ {
$page = '404'; $page = '404';
$file = SYSTEM . 'pages/404.php'; $file = SYSTEM . 'pages/404.php';

View File

@@ -1,11 +1,22 @@
CREATE TABLE `myaac_account_actions` CREATE TABLE `myaac_account_actions`
( (
`account_id` INT(11) NOT NULL, `account_id` INT(11) NOT NULL,
`ip` INT(11) NOT NULL DEFAULT 0, `ip` INT(11) NOT NULL DEFAULT 0,
`ipv6` BINARY(16) NOT NULL DEFAULT 0, `ipv6` BINARY(16) NOT NULL DEFAULT 0,
`date` INT(11) NOT NULL DEFAULT 0, `date` INT(11) NOT NULL DEFAULT 0,
`action` VARCHAR(255) NOT NULL DEFAULT '', `action` VARCHAR(255) NOT NULL DEFAULT '',
KEY (`account_id`) KEY (`account_id`)
) ENGINE = MyISAM;
CREATE TABLE `myaac_admin_menu`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`page` VARCHAR(255) NOT NULL DEFAULT '',
`ordering` INT(11) NOT NULL DEFAULT 0,
`flags` INT(11) NOT NULL DEFAULT 0,
`enabled` INT(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE = MyISAM; ) ENGINE = MyISAM;
CREATE TABLE `myaac_bugtracker` CREATE TABLE `myaac_bugtracker`
@@ -20,7 +31,7 @@ CREATE TABLE `myaac_bugtracker`
`who` INT(11) NOT NULL DEFAULT 0, `who` INT(11) NOT NULL DEFAULT 0,
`uid` INT(11) NOT NULL AUTO_INCREMENT, `uid` INT(11) NOT NULL AUTO_INCREMENT,
`tag` INT(11) NOT NULL DEFAULT 0, `tag` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`uid`) PRIMARY KEY (`uid`)
) ENGINE = MyISAM; ) ENGINE = MyISAM;
CREATE TABLE `myaac_changelog` CREATE TABLE `myaac_changelog`
@@ -112,6 +123,7 @@ CREATE TABLE `myaac_hooks`
`name` VARCHAR(30) NOT NULL DEFAULT '', `name` VARCHAR(30) NOT NULL DEFAULT '',
`type` INT(2) NOT NULL DEFAULT 0, `type` INT(2) NOT NULL DEFAULT 0,
`file` VARCHAR(100) NOT NULL, `file` VARCHAR(100) NOT NULL,
`ordering` INT(11) NOT NULL DEFAULT 0,
`enabled` INT(1) NOT NULL DEFAULT 1, `enabled` INT(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE = MyISAM; ) ENGINE = MyISAM;

View File

@@ -146,31 +146,31 @@ INSERT INTO `myaac_news` (`id`, `type`, `date`, `category`, `title`, `body`, `pl
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Rook Sample', 1, 1, 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 11, 2200, 1298, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Rook Sample', 4, " . $_SESSION['account'] . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 11, 2200, 1298, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, 1, 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Sorcerer Sample', 4, " . $_SESSION['account'] . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Druid Sample', 1, 1, 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Druid Sample', 4, " . $_SESSION['account'] . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Paladin Sample', 1, 1, 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Paladin Sample', 4, " . $_SESSION['account'] . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Knight Sample', 1, 1, 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Knight Sample', 4, " . $_SESSION['account'] . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
$success = false; $success = false;
} }

View File

@@ -1,11 +1,20 @@
{ {
"name": "Example Plugin", "name": "Example Plugin",
"description": "This is just an example of a Plugin for MyAAC.", "description": "This is just an example of a Plugin for MyAAC.",
"version": "1.0", "version": "1.0",
"author": "nobody", "author": "nobody",
"contact": "nobody@example.org", "contact": "nobody@example.org",
"install": "plugins/example/install.php", "require": {
"hooks": { "myaac": "0.4.3",
"php": "5.2.0"
},
"install": "plugins/example/install.php",
"uninstall": [
"plugins/example.json",
"plugins/example/install.php",
"plugins/example/before.php"
],
"hooks": {
"Example Hook": { "Example Hook": {
"type": "BEFORE_PAGE", "type": "BEFORE_PAGE",
"file": "plugins/example/before.php" "file": "plugins/example/before.php"

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -38,46 +38,27 @@ function generateLink($url, $name, $blank = false) {
return '<a href="' . $url . '"' . ($blank ? ' target="_blank"' : '') . '>' . $name . '</a>'; return '<a href="' . $url . '"' . ($blank ? ' target="_blank"' : '') . '>' . $name . '</a>';
} }
function getLink($page, $name, $blank = false) { function getFullLink($page, $name, $blank = false) {
return generateLink(getPageLink($page), $name, $blank); return generateLink(getLink($page), $name, $blank);
} }
function getPageLink($page, $action = null) function getLink($page, $action = null)
{ {
global $config; global $config;
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . $page . ($action ? '/' . $action : '');
// TODO: tibiacom template is not working correctly with this
if($config['friendly_urls'])
return BASE_URL . $page . ($action ? '/' . $action : '');
return BASE_URL . '?subtopic=' . $page . ($action ? '&action=' . $action : '');
} }
function internalLayoutLink($page, $action = null) {return getPageLink($page, $action);} function internalLayoutLink($page, $action = null) {return getLink($page, $action);}
function getForumThreadLink($thread_id, $page = NULL) function getForumThreadLink($thread_id, $page = NULL)
{ {
global $config; global $config;
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
$url = '';
if($config['friendly_urls'])
$url = BASE_URL . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
else
$url = BASE_URL . '?subtopic=forum&action=show_thread&id=' . (int)$thread_id . (isset($page) ? '&page=' . $page : '');
return $url;
} }
function getForumBoardLink($board_id, $page = NULL) function getForumBoardLink($board_id, $page = NULL)
{ {
global $config; global $config;
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
$url = '';
if($config['friendly_urls'])
$url = BASE_URL . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
else
$url = BASE_URL . '?subtopic=forum&action=show_board&id=' . (int)$board_id . (isset($page) ? '&page=' . $page : '');
return $url;
} }
function getPlayerLink($name, $generate = true) function getPlayerLink($name, $generate = true)
@@ -91,12 +72,8 @@ function getPlayerLink($name, $generate = true)
if($player->isLoaded()) if($player->isLoaded())
$name = $player->getName(); $name = $player->getName();
} }
$url = ''; $url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'characters/' . urlencode($name);
if($config['friendly_urls'])
$url = BASE_URL . 'characters/' . urlencode($name);
else
$url = BASE_URL . '?subtopic=characters&name=' . urlencode($name);
if(!$generate) return $url; if(!$generate) return $url;
return generateLink($url, $name); return generateLink($url, $name);
@@ -115,13 +92,9 @@ function getHouseLink($name, $generate = true)
if($house->rowCount() > 0) if($house->rowCount() > 0)
$name = $house->fetchColumn(); $name = $house->fetchColumn();
} }
$url = ''; $url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'houses/' . urlencode($name);
if($config['friendly_urls'])
$url = BASE_URL . 'houses/' . urlencode($name);
else
$url = BASE_URL . '?subtopic=houses&page=view&house=' . urlencode($name);
if(!$generate) return $url; if(!$generate) return $url;
return generateLink($url, $name); return generateLink($url, $name);
} }
@@ -138,11 +111,7 @@ function getGuildLink($name, $generate = true)
$name = $guild->fetchColumn(); $name = $guild->fetchColumn();
} }
$url = ''; $url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'guilds/' . urlencode($name);
if($config['friendly_urls'])
$url = BASE_URL . 'guilds/' . urlencode($name);
else
$url = BASE_URL . '?subtopic=guilds&action=show&guild=' . urlencode($name);
if(!$generate) return $url; if(!$generate) return $url;
return generateLink($url, $name); return generateLink($url, $name);
@@ -1175,7 +1144,10 @@ function load_config_lua($filename)
$config_file = $filename; $config_file = $filename;
if(!@file_exists($config_file)) if(!@file_exists($config_file))
die('ERROR: Cannot find ' . $filename . ' file.'); {
log_append('error.log', '[load_config_file] Fatal error: Cannot load config.lua (' . $filename . '). Error: ' . print_r(error_get_last(), true));
die('ERROR: Cannot find ' . $filename . ' file. More info in system/logs/error.log');
}
$result = array(); $result = array();
$config_string = file_get_contents($filename); $config_string = file_get_contents($filename);
@@ -1226,4 +1198,12 @@ function load_config_lua($filename)
$result = array_merge($result, isset($config['lua']) ? $config['lua'] : array()); $result = array_merge($result, isset($config['lua']) ? $config['lua'] : array());
return $result; return $result;
} }
function str_replace_first($search, $replace, $subject) {
$pos = strpos($subject, $search);
if ($pos !== false) {
return substr_replace($subject, $replace, $pos, strlen($search));
}
return $subject;
}
?> ?>

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -16,8 +16,14 @@ define('HOOK_AFTER_PAGE', 3);
define('HOOK_FINISH', 4); define('HOOK_FINISH', 4);
define('HOOK_TIBIACOM_ARTICLE', 5); define('HOOK_TIBIACOM_ARTICLE', 5);
define('HOOK_TIBIACOM_BORDER_3', 6); define('HOOK_TIBIACOM_BORDER_3', 6);
define('HOOK_CHARACTERS_BEFORE_INFORMATIONS', 7);
define('HOOK_CHARACTERS_AFTER_INFORMATIONS', 8);
define('HOOK_CHARACTERS_BEFORE_SIGNATURE', 9);
define('HOOK_CHARACTERS_AFTER_SIGNATURE', 10);
define('HOOK_CHARACTERS_AFTER_ACCOUNT', 11);
define('HOOK_CHARACTERS_AFTER_CHARACTERS', 12);
define('HOOK_FIRST', HOOK_STARTUP); define('HOOK_FIRST', HOOK_STARTUP);
define('HOOK_LAST', HOOK_TIBIACOM_BORDER_3); define('HOOK_LAST', HOOK_CHARACTERS_AFTER_CHARACTERS);
$hook_types = array( $hook_types = array(
'STARTUP' => HOOK_STARTUP, 'STARTUP' => HOOK_STARTUP,
@@ -25,7 +31,13 @@ $hook_types = array(
'AFTER_PAGE' => HOOK_AFTER_PAGE, 'AFTER_PAGE' => HOOK_AFTER_PAGE,
'FINISH' => HOOK_FINISH, 'FINISH' => HOOK_FINISH,
'TIBIACOM_ARTICLE' => HOOK_TIBIACOM_ARTICLE, 'TIBIACOM_ARTICLE' => HOOK_TIBIACOM_ARTICLE,
'TIBIACOM_BORDER_3' => HOOK_TIBIACOM_BORDER_3 'TIBIACOM_BORDER_3' => HOOK_TIBIACOM_BORDER_3,
'CHARACTERS_BEFORE_INFORMATIONS' => HOOK_CHARACTERS_BEFORE_INFORMATIONS,
'CHARACTERS_AFTER_INFORMATIONS' => HOOK_CHARACTERS_AFTER_INFORMATIONS,
'CHARACTERS_BEFORE_SIGNATURE' => HOOK_CHARACTERS_BEFORE_SIGNATURE,
'CHARACTERS_AFTER_SIGNATURE' => HOOK_CHARACTERS_AFTER_SIGNATURE,
'CHARACTERS_AFTER_ACCOUNT' => HOOK_CHARACTERS_AFTER_ACCOUNT,
'CHARACTERS_AFTER_CHARACTERS' => HOOK_CHARACTERS_AFTER_CHARACTERS
); );
class Hook class Hook
@@ -84,7 +96,7 @@ class Hooks
public function load() public function load()
{ {
global $db; global $db;
$hooks = $db->query('SELECT `name`, `type`, `file` FROM `' . TABLE_PREFIX . 'hooks` WHERE `enabled` = 1;'); $hooks = $db->query('SELECT `name`, `type`, `file` FROM `' . TABLE_PREFIX . 'hooks` WHERE `enabled` = 1 ORDER BY `ordering`;');
foreach($hooks as $hook) foreach($hooks as $hook)
$this->register($hook['name'], $hook['type'], $hook['file']); $this->register($hook['name'], $hook['type'], $hook['file']);
} }

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -42,6 +42,21 @@ $function = new Twig_SimpleFunction('getStyle', function ($i) {
}); });
$twig->addFunction($function); $twig->addFunction($function);
$function = new Twig_SimpleFunction('getLink', function ($s) {
global $config;
if($config['friendly_urls'])
return $s;
return '?' . $s;
});
$twig->addFunction($function);
$function = new Twig_SimpleFunction('hook', function ($hook) {
global $hooks;
$hooks->trigger($hook);
});
$twig->addFunction($function);
// trim values we receive // trim values we receive
if(isset($_POST)) if(isset($_POST))
{ {

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com> * @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -334,6 +334,9 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
throw new E_OTS_NotLoaded(); throw new E_OTS_NotLoaded();
} }
if($this->data['lastday'] == 0)
return 0;
return round(($this->data['lastday'] - time()) / (24 * 60 * 60), 3); return round(($this->data['lastday'] - time()) / (24 * 60 * 60), 3);
//return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])); //return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));
} }

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -113,6 +113,9 @@ else
} }
} }
} }
else {
$errors[] = 'Please enter your account ' . (USE_ACCOUNT_NAME ? 'name' : 'password') . ' and password.';
}
} }
// stay-logged with sessions // stay-logged with sessions
@@ -135,6 +138,7 @@ else
if($logged) { if($logged) {
$logged_flags = $account_logged->getWebFlags(); $logged_flags = $account_logged->getWebFlags();
$twig->addGlobal('logged', true);
$twig->addGlobal('account_logged', $account_logged); $twig->addGlobal('account_logged', $account_logged);
} }
} }

17
system/migrations/10.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
if(!fieldExist('ordering', TABLE_PREFIX . 'hooks'))
$db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `ordering` INT(11) NOT NULL DEFAULT 0 AFTER `file`;");
if(!tableExist(TABLE_PREFIX . 'admin_menu'))
$db->query("
CREATE TABLE `myaac_admin_menu`
(
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`page` VARCHAR(255) NOT NULL DEFAULT '',
`ordering` INT(11) NOT NULL DEFAULT 0,
`flags` INT(11) NOT NULL DEFAULT 0,
`enabled` INT(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE = MyISAM;");
?>

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -17,7 +17,6 @@ if($config['account_country'])
$groups = new OTS_Groups_List(); $groups = new OTS_Groups_List();
$errors = array();
$show_form = true; $show_form = true;
$config_salt_enabled = fieldExist('salt', 'accounts'); $config_salt_enabled = fieldExist('salt', 'accounts');
if(!$logged) if(!$logged)
@@ -29,7 +28,7 @@ if(!$logged)
{ {
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); echo $twig->render('error_box.html.twig', array('errors' => $errors));
echo $twig->render('account.login.html.twig', array( echo $twig->render('account.login.html.twig', array(
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null, 'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number', 'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
@@ -39,6 +38,8 @@ if(!$logged)
} }
} }
$errors = array();
if(isset($_REQUEST['redirect'])) if(isset($_REQUEST['redirect']))
{ {
$redirect = urldecode($_REQUEST['redirect']); $redirect = urldecode($_REQUEST['redirect']);
@@ -63,7 +64,7 @@ if(!$logged)
else else
{ {
if($config['generate_new_reckey'] && $config['mail_enabled']) if($config['generate_new_reckey'] && $config['mail_enabled'])
$account_registered = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Recovery Key </a> )</font></b>'; $account_registered = '<b><font color="green">Yes ( <a href="' . getLink('account/register/new') . '"> Buy new Recovery Key </a> )</font></b>';
else else
$account_registered = '<b><font color="green">Yes</font></b>'; $account_registered = '<b><font color="green">Yes</font></b>';
} }
@@ -104,18 +105,6 @@ if(!$logged)
$players = array(); $players = array();
$account_players = $account_logged->getPlayersList(); $account_players = $account_logged->getPlayersList();
$account_players->orderBy('id'); $account_players->orderBy('id');
//show list of players on account
foreach($account_players as $player)
{
$players[] = array(
'name' => $player->getName(),
'name_encoded' => urlencode($player->getName()),
'deleted' => $player->isDeleted(),
'level' => $player->getLevel(),
'vocation' => $config['vocations'][$player->getVocation()],
'online' => $player->isOnline()
);
}
echo $twig->render('account.management.html.twig', array( echo $twig->render('account.management.html.twig', array(
'welcome_message' => $welcome_message, 'welcome_message' => $welcome_message,
@@ -132,7 +121,7 @@ if(!$logged)
'account_rlname' => $account_rlname, 'account_rlname' => $account_rlname,
'account_location' => $account_location, 'account_location' => $account_location,
'actions' => $actions, 'actions' => $actions,
'players' => $players 'players' => $account_players
)); ));
} }
//########### CHANGE PASSWORD ########## //########### CHANGE PASSWORD ##########
@@ -146,31 +135,31 @@ if(!$logged)
else else
{ {
if(empty($new_password) || empty($new_password2) || empty($old_password)){ if(empty($new_password) || empty($new_password2) || empty($old_password)){
$show_msgs[] = "Please fill in form."; $errors[] = "Please fill in form.";
} }
$password_strlen = strlen($new_password); $password_strlen = strlen($new_password);
if($new_password != $new_password2) { if($new_password != $new_password2) {
$show_msgs[] = "The new passwords do not match!"; $errors[] = "The new passwords do not match!";
} }
else if($password_strlen < 8) { else if($password_strlen < 8) {
$show_msgs[] = "New password minimal length is 8 characters."; $errors[] = "New password minimal length is 8 characters.";
} }
else if($password_strlen > 32) { else if($password_strlen > 32) {
$show_msgs[] = "New password maximal length is 32 characters."; $errors[] = "New password maximal length is 32 characters.";
} }
if(empty($show_msgs)) { if(empty($errors)) {
if(!check_password($new_password)) { if(!check_password($new_password)) {
$show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!). Minimum password length is 7 characters and maximum 32."; $errors[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!). Minimum password length is 7 characters and maximum 32.";
} }
$old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password); $old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password);
if($old_password != $account_logged->getPassword()) { if($old_password != $account_logged->getPassword()) {
$show_msgs[] = "Current password is incorrect!"; $errors[] = "Current password is incorrect!";
} }
} }
if(!empty($show_msgs)){ if(!empty($errors)){
//show errors //show errors
echo $twig->render('error_box.html.twig', array('errors' => $show_msg)); echo $twig->render('error_box.html.twig', array('errors' => $errors));
//show form //show form
echo $twig->render('account.change_password.html.twig'); echo $twig->render('account.change_password.html.twig');
@@ -477,7 +466,7 @@ if($action == "changeemail") {
} }
//############## GENERATE NEW RECOVERY KEY ########### //############## GENERATE NEW RECOVERY KEY ###########
if($action == "newreckey") if($action == "registernew")
{ {
if(isset($_POST['reg_password'])) if(isset($_POST['reg_password']))
$reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']); $reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']);
@@ -542,45 +531,52 @@ if($action == "changeemail") {
//###### CHANGE CHARACTER COMMENT ###### //###### CHANGE CHARACTER COMMENT ######
if($action == "changecomment") { if($action == "changecomment") {
$player_name = stripslashes($_REQUEST['name']); $player_name = isset($_REQUEST['name']) ? stripslashes($_REQUEST['name']) : null;
$new_comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'],0,2000))) : NULL; $new_comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'],0,2000))) : NULL;
$new_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL; $new_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL;
if(check_name($player_name)) {
$player = $ots->createObject('Player'); if($player_name != null) {
$player->find($player_name); if (check_name($player_name)) {
if($player->isLoaded()) { $player = $ots->createObject('Player');
$player_account = $player->getAccount(); $player->find($player_name);
if($account_logged->getId() == $player_account->getId()) { if ($player->isLoaded()) {
if(isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) { $player_account = $player->getAccount();
$player->setCustomField("hidden", $new_hideacc); if ($account_logged->getId() == $player_account->getId()) {
$player->setCustomField("comment", $new_comment); if (isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) {
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.'); $player->setCustomField("hidden", $new_hideacc);
echo $twig->render('success.html.twig', array( $player->setCustomField("comment", $new_comment);
'title' => 'Character Information Changed', $account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
'description' => 'The character information has been changed.' echo $twig->render('success.html.twig', array(
)); 'title' => 'Character Information Changed',
} 'description' => 'The character information has been changed.'
else ));
{ $show_form = false;
echo $twig->render('account.change_comment.html.twig', array( }
'player' => $player, } else {
'player_name' => $player_name $errors[] = 'Error. Character <b>' . $player_name . '</b> is not on your account.';
));
} }
} else {
$errors[] = "Error. Character with this name doesn't exist.";
} }
else } else {
{ $errors[] = 'Error. Name contain illegal characters.';
echo "Error. Character <b>".$player_name."</b> is not on your account.";
}
}
else
{
echo "Error. Character with this name doesn't exist.";
} }
} }
else else {
{ $errors[] = 'Please enter character name.';
echo "Error. Name contain illegal characters."; }
if($show_form) {
if(!empty($errors)) {
echo $twig->render('error_box.html.twig', array('errors' => $errors));
}
if(isset($player)) {
echo $twig->render('account.change_comment.html.twig', array(
'player' => $player,
'player_name' => $player_name
));
}
} }
} }

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -26,7 +26,7 @@ $access = 0;
if(!empty($action)) if(!empty($action))
{ {
if($action == 'delete' || $action == 'edit' || $action == 'hide') if($action == 'delete' || $action == 'edit' || $action == 'hide')
$id = $_REQUEST['id']; $id = $_REQUEST['id'];
if(isset($_REQUEST['name'])) if(isset($_REQUEST['name']))
$name = $_REQUEST['name']; $name = $_REQUEST['name'];
@@ -83,147 +83,35 @@ if(!empty($action))
if(!empty($errors)) if(!empty($errors))
echo $twig->render('error_box.html.twig', array('errors' => $errors)); echo $twig->render('error_box.html.twig', array('errors' => $errors));
} }
?>
<?php
$use_tinymce = false;
//if($action != 'edit' || !$php)
// $use_tinymce = true;
if($use_tinymce): ?> $query =
<script type="text/javascript" src="tools/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
$(function() {
$('#news-body').tinymce({
script_url : 'tools/tiny_mce/tiny_mce.js',
forced_root_block : false,
theme : "advanced",
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
<?php /*if($action != 'edit'): ?>
$("#page-edit-table").hide();
$("#page-button").click(function() {
$("#page-edit-table").toggle();
return false;
});
<?php endif; */ ?>
});
</script>
<!--script type="text/javascript">
tinyMCE.init({
forced_root_block : false,
mode : "textareas",
theme : "advanced",
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
</script-->
<?php endif; ?>
<form method="post" action="?p=pages&action=<?php echo ($action == 'edit' ? 'edit' : 'add'); ?>">
<?php if($action == 'edit'): ?>
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<?php endif; ?>
<table class="table" id="page-edit-table" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th><b><?php echo ($action == 'edit' ? 'Edit' : 'Add'); ?> page</b></th>
</tr>
<tr>
<td>
<table border="0" cellpadding="1">
<tr>
<td>Link/name:</td>
<td><input name="name" value="<?php echo $name; ?>" size="29" maxlength="29"/></td>
</tr>
<tr>
<td>Title:</td>
<td><input name="title" value="<?php echo $p_title; ?>" size="29" maxlength="29"/></td>
</tr>
<tr>
<td>PHP:</td>
<td><input type="checkbox" id="news-checkbox" name="php" title="Check if page should be executed as PHP" value="1" <?php if($php) echo 'checked="true"'; ?>/></td>
</tr>
<tr>
<td>Content:</td>
<td>
<textarea id="news-body" name="body" maxlength="65000" <?php /*if($use_tinymce) echo 'class="tinymce"';*/ ?> cols="50" rows="5"><?php echo htmlentities(isset($body) ? $body : '', ENT_COMPAT, 'UTF-8'); ?></textarea>
<?php if($use_tinymce): ?>
<br/>
<a href="javascript:;" onmousedown="$('#news-body').tinymce().hide();">[Hide]</a>
<a href="javascript:;" onmousedown="$('#news-body').tinymce().show();">[Show]</a>
<?php endif; ?>
</td>
<tr/>
<tr>
<td>Access:</td>
<td>
<select name="access">
<?php foreach($groups->getGroups() as $id => $group): ?>
<option value="<?php echo $group->getAccess(); ?>" <?php echo ($access == $group->getAccess() ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<td align="right"><input type="submit" class="button" value="Save"/></td>
<td align="left">
<input type="button" onclick="window.location = '<?php echo getPageLink(PAGE) . ($config['friendly_urls'] ? '?' : '&'); ?>p=pages';" class="button" value="Cancel"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<table class="table" width="100%" cellspacing="1" cellpadding="4">
<tr>
<th><b>Name</b></th>
<th><b>Title</b></th>
<th><b>Options</b></th>
</tr>
<?php
$pages =
$db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages')); $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages'));
$i = 0; $pages = array();
foreach($pages as $_page): ?> foreach($query as $_page) {
<tr> $pages[] = array(
<td><?php echo getLink($_page['name'], $_page['name']); ?></td> 'link' => getFullLink($_page['name'], $_page['name']),
<td><i><?php echo substr($_page['title'], 0, 20); ?></i></td> 'title' => substr($_page['title'], 0, 20),
<td> 'id' => $_page['id'],
<a href="?p=pages&action=edit&id=<?php echo $_page['id']; ?>" class="ico" title="Edit"> 'hidden' => $_page['hidden']
<img src="<?php echo BASE_URL; ?>images/edit.png"/> );
Edit }
</a>
<a href="<?php echo ADMIN_URL; ?>?p=pages&action=delete&id=<?php echo $_page['id']; ?>" class="ico" onclick="return confirm('Are you sure?');" title="Delete"> echo $twig->render('admin.pages.form.html.twig', array(
<img src="<?php echo BASE_URL; ?>images/del.png"/> 'action' => $action,
Delete 'id' => $action == 'edit' ? $id : null,
</a> 'name' => $name,
<a href="?p=pages&action=hide&id=<?php echo $_page['id']; ?>" class="ico" title="<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>"> 'title' => $p_title,
<img src="<?php echo BASE_URL; ?>images/<?php echo ($_page['hidden'] != 1 ? 'success' : 'error'); ?>.png"/> 'php' => $php,
<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?> 'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
</a> 'groups' => $groups->getGroups(),
</td> 'access' => $access
</tr> ));
<?php endforeach; ?>
</table> echo $twig->render('admin.pages.html.twig', array(
'pages' => $pages
));
<?php
class Pages class Pages
{ {
static public function get($id) static public function get($id)
@@ -243,7 +131,7 @@ class Pages
{ {
$query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name)); $query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name));
if($query === false) if($query === false)
$db->insert(TABLE_PREFIX . 'pages', array('name' => $name, 'title' => $title, 'body' => $body, 'player_id' => $player_id, 'php' => $php, 'access' => $access)); $db->insert(TABLE_PREFIX . 'pages', array('name' => $name, 'title' => $title, 'body' => $body, 'player_id' => $player_id, 'php' => $php ? '1' : '0', 'access' => $access));
else else
$errors[] = 'Page with this words already exists.'; $errors[] = 'Page with this words already exists.';
} }

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -15,8 +15,54 @@ require(SYSTEM . 'hooks.php');
echo $twig->render('admin.plugins.form.html.twig'); echo $twig->render('admin.plugins.form.html.twig');
$message = ''; function deleteDirectory($dir) {
if(isset($_FILES["plugin"]["name"])) if(!file_exists($dir)) {
return true;
}
if(!is_dir($dir)) {
return unlink($dir);
}
foreach(scandir($dir) as $item) {
if($item == '.' || $item == '..') {
continue;
}
if(!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
return false;
}
}
return rmdir($dir);
}
if(isset($_REQUEST['uninstall'])){
$uninstall = $_REQUEST['uninstall'];
$string = file_get_contents(BASE . 'plugins/' . $uninstall . '.json');
$plugin_info = json_decode($string, true);
if($plugin_info == false) {
warning('Cannot load plugin info ' . $uninstall . '.json');
}
else {
$success = true;
foreach($plugin_info['uninstall'] as $file) {
$file = BASE . $file;
if(!deleteDirectory($file)) {
$success = false;
}
}
if($success) {
success('Successfully uninstalled plugin ' . $uninstall);
}
else {
error('Error while uninstalling plugin ' . $uninstall . ': ' . error_get_last());
}
}
}
else if(isset($_FILES["plugin"]["name"]))
{ {
$file = $_FILES["plugin"]; $file = $_FILES["plugin"];
$filename = $file["name"]; $filename = $file["name"];
@@ -28,7 +74,7 @@ if(isset($_FILES["plugin"]["name"]))
if(isset($file['error'])) { if(isset($file['error'])) {
$error = 'Error uploading file'; $error = 'Error uploading file';
switch( $file['error'] ) { switch($file['error']) {
case UPLOAD_ERR_OK: case UPLOAD_ERR_OK:
$error = false; $error = false;
break; break;
@@ -79,33 +125,63 @@ if(isset($_FILES["plugin"]["name"]))
$string = file_get_contents($file_name); $string = file_get_contents($file_name);
$plugin = json_decode($string, true); $plugin = json_decode($string, true);
if ($plugin == null) { if ($plugin == null) {
warning('Cannot load ' . $file_name . '. File might be not valid json code.'); warning('Cannot load ' . $file_name . '. File might be not a valid json code.');
} }
else {
if(isset($plugin['install'])) { $continue = true;
if(file_exists(BASE . $plugin['install']))
require(BASE . $plugin['install']); if(isset($plugin['require'])) {
else $require = $plugin['require'];
warning('Cannot load install script. Your plugin might be not working correctly.'); if(isset($require['myaac'])) {
} $require_myaac = $require['myaac'];
if(version_compare(MYAAC_VERSION, $require_myaac, '<')) {
if(isset($plugin['hooks'])) { warning("This plugin requires MyAAC version " . $require_myaac . ", you're using version " . MYAAC_VERSION . " - please update.");
foreach($plugin['hooks'] as $_name => $info) { $continue = false;
if(isset($hook_types[$info['type']])) {
$query = $db->query('SELECT `id` FROM `' . TABLE_PREFIX . 'hooks` WHERE `name` = ' . $db->quote($_name) . ';');
if($query->rowCount() == 1) { // found something
$query = $query->fetch();
$db->query('UPDATE `' . TABLE_PREFIX . 'hooks` SET `type` = ' . $hook_types[$info['type']] . ', `file` = ' . $db->quote($info['file']) . ' WHERE `id` = ' . (int)$query['id'] . ';');
}
else {
$db->query('INSERT INTO `' . TABLE_PREFIX . 'hooks` (`id`, `name`, `type`, `file`) VALUES (NULL, ' . $db->quote($_name) . ', ' . $hook_types[$info['type']] . ', ' . $db->quote($info['file']) . ');');
} }
} }
else
warning('Unknown event type: ' . $info['type']); if(isset($require['php'])) {
$require_php = $require['php'];
if(version_compare(phpversion(), $require_php, '<')) {
warning("This plugin requires PHP version " . $require_php . ", you're using version " . phpversion() . " - please update.");
$continue = false;
}
}
if(isset($require['database'])) {
$require_database = $require['database'];
if($require_database < DATABASE_VERSION) {
warning("This plugin requires database version " . $require_database . ", you're using version " . DATABASE_VERSION . " - please update.");
$continue = false;
}
}
}
if($continue) {
if (isset($plugin['install'])) {
if (file_exists(BASE . $plugin['install']))
require(BASE . $plugin['install']);
else
warning('Cannot load install script. Your plugin might be not working correctly.');
}
if (isset($plugin['hooks'])) {
foreach ($plugin['hooks'] as $_name => $info) {
if (isset($hook_types[$info['type']])) {
$query = $db->query('SELECT `id` FROM `' . TABLE_PREFIX . 'hooks` WHERE `name` = ' . $db->quote($_name) . ';');
if ($query->rowCount() == 1) { // found something
$query = $query->fetch();
$db->query('UPDATE `' . TABLE_PREFIX . 'hooks` SET `type` = ' . $hook_types[$info['type']] . ', `file` = ' . $db->quote($info['file']) . ' WHERE `id` = ' . (int)$query['id'] . ';');
} else {
$db->query('INSERT INTO `' . TABLE_PREFIX . 'hooks` (`id`, `name`, `type`, `file`) VALUES (NULL, ' . $db->quote($_name) . ', ' . $hook_types[$info['type']] . ', ' . $db->quote($info['file']) . ');');
}
} else
warning('Unknown event type: ' . $info['type']);
}
}
success('<strong>' . $plugin['name'] . '</strong> plugin has been successfully installed.');
} }
} }
success('<strong>' . $plugin['name'] . '</strong> plugin has been successfully installed.');
} }
} }
else { else {
@@ -132,8 +208,6 @@ if(isset($_FILES["plugin"]["name"]))
} }
} }
echo $message;
$plugins = array(); $plugins = array();
$rows = array(); $rows = array();
@@ -146,14 +220,20 @@ foreach(scandir($path) as $file)
$string = file_get_contents(BASE . 'plugins/' . $file_info[0] . '.json'); $string = file_get_contents(BASE . 'plugins/' . $file_info[0] . '.json');
$plugin_info = json_decode($string, true); $plugin_info = json_decode($string, true);
$rows[] = array( if($plugin_info == false) {
'name' => $plugin_info['name'], warning('Cannot load plugin info ' . $file);
'description' => $plugin_info['description'], }
'version' => $plugin_info['version'], else {
'author' => $plugin_info['author'], $rows[] = array(
'contact' => $plugin_info['contact'], 'name' => $plugin_info['name'],
'file' => $file, 'description' => $plugin_info['description'],
); 'version' => $plugin_info['version'],
'author' => $plugin_info['author'],
'contact' => $plugin_info['contact'],
'file' => $file_info[0],
'uninstall' => isset($plugin_info['uninstall'])
);
}
} }
echo $twig->render('admin.plugins.html.twig', array( echo $twig->render('admin.plugins.html.twig', array(

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -18,7 +18,7 @@ function generate_search_form($autofocus = false)
{ {
global $config, $twig; global $config, $twig;
return $twig->render('characters.form.html.twig', array( return $twig->render('characters.form.html.twig', array(
'link' => getPageLink('characters'), 'link' => getLink('characters'),
'autofocus' => $autofocus 'autofocus' => $autofocus
)); ));
} }
@@ -42,7 +42,7 @@ function retrieve_former_name($name)
$name = ''; $name = '';
if(isset($_REQUEST['name'])) if(isset($_REQUEST['name']))
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name'])))); $name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
if(empty($name)) if(empty($name))
{ {
@@ -370,9 +370,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
// signature // signature
if($config['signature_enabled']) { if($config['signature_enabled']) {
$signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName()); $signature_url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . urlencode($player->getName()) . '.png';
if($config['friendly_urls'])
$signature_url = BASE_URL . urlencode($player->getName()) . '.png';
} }
$hidden = $player->getCustomField('hidden'); $hidden = $player->getCustomField('hidden');
@@ -431,7 +429,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
'player_link' => getPlayerLink($player->getName(), false), 'player_link' => getPlayerLink($player->getName(), false),
'hidden' => $hidden, 'hidden' => $hidden,
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null, 'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
'characters_link' => internalLayoutLink('characters'), 'characters_link' => getLink('characters'),
'account_players' => isset($account_players) ? $account_players : null, 'account_players' => isset($account_players) ? $account_players : null,
'search_form' => generate_search_form() 'search_form' => generate_search_form()
)); ));

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -73,7 +73,7 @@ if($canEdit)
} }
echo $twig->render('commands.form.html.twig', array( echo $twig->render('commands.form.html.twig', array(
'link' => getPageLink('commands', ($action == 'edit' ? 'edit' : 'add')), 'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
'words' => isset($words) ? $words : null, 'words' => isset($words) ? $words : null,

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
$title = 'Downloads'; $title = 'Downloads';

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -174,7 +174,7 @@ if($canEdit)
if(empty($action) || $action == 'edit_board') { if(empty($action) || $action == 'edit_board') {
echo $twig->render('forum.add_board.html.twig', array( echo $twig->render('forum.add_board.html.twig', array(
'link' => getPageLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')), 'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
'name' => isset($name) ? $name : null, 'name' => isset($name) ? $name : null,
@@ -253,7 +253,7 @@ if($action == 'show_board')
else else
$links_to_pages .= '<b>'.($i + 1).' </b>'; $links_to_pages .= '<b>'.($i + 1).' </b>';
} }
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>'; echo '<a href="' . getLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
if(!$sections[$section_id]['closed'] || Forum::isModerator()) if(!$sections[$section_id]['closed'] || Forum::isModerator())
{ {
echo '<br /><br /> echo '<br /><br />
@@ -324,7 +324,7 @@ if($action == 'show_thread')
$threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll(); $threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll();
if(isset($threads[0]['name'])) if(isset($threads[0]['name']))
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id); $db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>'; echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>'; echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td>&nbsp;</td></tr>';
$player = $ots->createObject('Player'); $player = $ots->createObject('Player');
foreach($threads as $thread) foreach($threads as $thread)
@@ -421,7 +421,7 @@ if($action == 'new_post')
$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 = (int) $_REQUEST['thread_id']; $thread_id = (int) $_REQUEST['thread_id'];
$thread = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch(); $thread = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch();
echo '<a href="' . getPageLink('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>'; 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'])) if(isset($thread['id']))
{ {
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL; $quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
@@ -537,7 +537,7 @@ if($action == 'edit_post')
if(isset($thread['id'])) if(isset($thread['id']))
{ {
$first_post = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch(); $first_post = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch();
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>'; echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
if($account_logged->getId() == $thread['author_aid'] || Forum::isModerator()) if($account_logged->getId() == $thread['author_aid'] || Forum::isModerator())
{ {
$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();
@@ -634,7 +634,7 @@ if($action == 'new_thread')
$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 = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null;
if($section_id !== null) { if($section_id !== null) {
echo '<a href="' . getPageLink('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'])) { if (isset($sections[$section_id]['name'])) {
if ($sections[$section_id]['closed'] && !Forum::isModerator()) if ($sections[$section_id]['closed'] && !Forum::isModerator())
$errors[] = 'You cannot create topic on this board.'; $errors[] = 'You cannot create topic on this board.';

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -104,6 +104,8 @@ if($action == '')
{ {
foreach($guilds_list as $guild) foreach($guilds_list as $guild)
{ {
$link = ($config['friendly_urls'] ? '' : '?') . 'guilds/' . $guild->getName();
$guild_logo = $guild->getCustomField('logo_name'); $guild_logo = $guild->getCustomField('logo_name');
if(empty($guild_logo) || !file_exists('images/guilds/' . $guild_logo)) if(empty($guild_logo) || !file_exists('images/guilds/' . $guild_logo))
$guild_logo = "default.gif"; $guild_logo = "default.gif";
@@ -117,7 +119,7 @@ if($action == '')
<TD valign="top"><B>'.$guild->getName().'</B><BR/>'.$description.''; <TD valign="top"><B>'.$guild->getName().'</B><BR/>'.$description.'';
if(admin()) if(admin())
echo '<br /><a href="?subtopic=guilds&action=deletebyadmin&guild='.$guild->getName().'">Delete this guild (for ADMIN only!)</a>'; echo '<br /><a href="?subtopic=guilds&action=deletebyadmin&guild='.$guild->getName().'">Delete this guild (for ADMIN only!)</a>';
echo '</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild->getName().'" METHOD=post><TR><TD> echo '</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="' . $link . '" METHOD=post><TR><TD>
<INPUT TYPE=image NAME="View" ALT="View" SRC="'.$template_path.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18> <INPUT TYPE=image NAME="View" ALT="View" SRC="'.$template_path.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE> </TD></TR></FORM></TABLE>
</TD></TR>'; </TD></TR>';
@@ -145,7 +147,7 @@ if($action == '')
<BR /><a href="?subtopic=guilds&action=cleanup_players">Cleanup players</a> - can\'t join guild/be invited? Can\'t create guild? Try cleanup players. <BR /><a href="?subtopic=guilds&action=cleanup_players">Cleanup players</a> - can\'t join guild/be invited? Can\'t create guild? Try cleanup players.
<BR /><a href="?subtopic=guilds&action=cleanup_guilds">Cleanup guilds</a> - made guild, you are a leader, but you are not on players list? Cleanup guilds!'; <BR /><a href="?subtopic=guilds&action=cleanup_guilds">Cleanup guilds</a> - made guild, you are a leader, but you are not on players list? Cleanup guilds!';
else else
echo 'Before you can create guild you must login.<br><TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=accountmanagement&redirect=' . getPageLink('guilds') . '" METHOD=post><TR><TD> echo 'Before you can create guild you must login.<br><TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=accountmanagement&redirect=' . getLink('guilds') . '" METHOD=post><TR><TD>
<INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$template_path.'/images/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18> <INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$template_path.'/images/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></FORM></TABLE></TD><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD></TR></TABLE>'; </TD></TR></FORM></TABLE></TD><TD ALIGN=center><IMG SRC="'.$template_path.'/images/general/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD></TR></TABLE>';
} }

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -289,42 +289,32 @@ echo '
); );
foreach($types as $link => $name) { foreach($types as $link => $name) {
if($config['friendly_urls']) echo '<A HREF="' . getLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
echo '<A HREF="' . getPageLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
else
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $link . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
} }
if($config['highscores_frags']) if($config['highscores_frags'])
if($config['friendly_urls']) echo '<a href="' . getLink('highscores') . '/frags' . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">Frags</a><br/>';
echo '<A HREF="' . getPageLink('highscores') . '/frags" CLASS="size_xs">Frags</A><BR>'; echo '</td>
else </tr>
echo '<A HREF="' . getPageLink('highscores') . '&list=frags' . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">Frags</A><BR>'; </table><br>';
echo '</TD>
</TR>
</TABLE><BR>';
if($config['highscores_vocation_box']) if($config['highscores_vocation_box'])
{ {
echo echo
'<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1> '<table border="0" width="100%" cellpadding="4" cellspacing="1">
<TR BGCOLOR="' . $config['vdarkborder'] . '"> <tr bgcolor="' . $config['vdarkborder'] . '">
<TD CLASS=whites><B>Choose a vocation</B></TD> <td class=whites><b>Choose a vocation</b></td>
</TR> </tr>
<TR BGCOLOR="'.$config['lightborder'].'"> <tr bgcolor="'.$config['lightborder'].'">
<TD> <td>
<A HREF="' . getPageLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" CLASS="size_xs">[ALL]</A><BR>'; <a href="' . getLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" class="size_xs">[ALL]</A><BR>';
for($i = 1; $i < count($config_vocations) / 2; $i++) { for($i = 1; $i < count($config_vocations) / 2; $i++) {
if($config['friendly_urls']) echo '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
echo '<A HREF="' . getPageLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
else
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $list . '&vocation=' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
} }
echo ' echo '
</TD> </td>
</TR> </tr>
</TABLE>'; </table>';
} }
?> ?>
</td> </td>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -66,11 +66,9 @@ if(isset($_GET['archive']))
} }
else else
echo "This news doesn't exist or is hidden.<br/>"; echo "This news doesn't exist or is hidden.<br/>";
//echo '<br /><a href="' . internalLayoutLink('news') . ($config['friendly_urls'] ? '/' : '') . 'archive' . '"><font size="2"><b>Back to Archive</b></font></a>';
?> ?>
<center> <center>
<table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo internalLayoutLink('news') . ($config['friendly_urls'] ? '' : '') . 'archive'; ?>"><tbody><tr><td> <table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo getLink('news/archive'); ?>"><tbody><tr><td>
<input width="120" height="18" border="0" type="image" src="<?php echo $template_path; ?>/images/buttons/sbutton_back.gif" alt="Back" name="Back"> <input width="120" height="18" border="0" type="image" src="<?php echo $template_path; ?>/images/buttons/sbutton_back.gif" alt="Back" name="Back">
</form></td></tr></tbody></table> </form></td></tr></tbody></table>
</center> </center>
@@ -85,14 +83,8 @@ if(isset($_GET['archive']))
$news_DB = $db->query('SELECT * FROM '.$db->tableName(TABLE_PREFIX . 'news').' WHERE `type` = 1 AND `hidden` != 1 ORDER BY `date` DESC'); $news_DB = $db->query('SELECT * FROM '.$db->tableName(TABLE_PREFIX . 'news').' WHERE `type` = 1 AND `hidden` != 1 ORDER BY `date` DESC');
foreach($news_DB as $news) foreach($news_DB as $news)
{ {
$link = internalLayoutLink('news');
if($config['friendly_urls'])
$link .= '/archive/' . $news['id'];
else
$link .= 'archive&id=' . $news['id'];
$newses[] = array( $newses[] = array(
'link' => $link, 'link' => getLink('news') . '/archive/' . $news['id'],
'icon_id' => $categories[$news['category']]['icon_id'], 'icon_id' => $categories[$news['category']]['icon_id'],
'title' => stripslashes($news['title']), 'title' => stripslashes($news['title']),
'date' => $news['date'] 'date' => $news['date']
@@ -283,8 +275,8 @@ if(!$news_cached)
echo $twig->render('news.add.html.twig', array( echo $twig->render('news.add.html.twig', array(
'action' => $action, 'action' => $action,
'news_link' => getPageLink(PAGE), 'news_link' => getLink(PAGE),
'news_link_form' => getPageLink('news', ($action == 'edit' ? 'edit' : 'add')), 'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')),
'news_id' => isset($id) ? $id : null, 'news_id' => isset($id) ? $id : null,
'title' => isset($p_title) ? $p_title : '', 'title' => isset($p_title) ? $p_title : '',
'body' => isset($body) ? $body : '', 'body' => isset($body) ? $body : '',

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
$_GET['archive'] = true; $_GET['archive'] = true;

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Averatec <pervera.pl & otland.net> * @author Averatec <pervera.pl & otland.net>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -57,7 +57,7 @@ if($canEdit) {
} }
echo $twig->render('screenshots.form.html.twig', array( echo $twig->render('screenshots.form.html.twig', array(
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')), 'link' => getLink('screenshots/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action, 'action' => $action,
'id' => isset($id) ? $id : null, 'id' => isset($id) ? $id : null,
'comment' => isset($comment) ? $comment : null, 'comment' => isset($comment) ? $comment : null,

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -20,10 +20,10 @@ if(isset($config['lua']['experience_stages']))
<h1><?php echo $config['lua']['serverName']; ?></h1> <h1><?php echo $config['lua']['serverName']; ?></h1>
<h3> <h3>
<?php if(isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages'])): ?> <?php if(isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages'])): ?>
Experience stages: <a href="<?php echo getPageLink('experienceStages'); ?>">Look here</a><br/> Experience stages: <a href="<?php echo getLink('experienceStages'); ?>">Look here</a><br/>
<?php endif; ?> <?php endif; ?>
Commands: <a href="<?php echo getPageLink('commands'); ?>">Look here</a><br/> Commands: <a href="<?php echo getLink('commands'); ?>">Look here</a><br/>
Team: <a href="<?php echo getPageLink('team'); ?>">Look here</a><br/> Team: <a href="<?php echo getLink('team'); ?>">Look here</a><br/>
</h3> </h3>
</center> </center>
@@ -184,6 +184,6 @@ if(isset($config['lua']['experience_stages']))
<?php endif; ?> <?php endif; ?>
<br/> <br/>
<h2>Other</h2> <h2>Other</h2>
<li>Respect our <a href="<?php echo getPageLink('rules'); ?>">rules</a>.</li> <li>Respect our <a href="<?php echo getLink('rules'); ?>">rules</a>.</li>
<li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li> <li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li>
</ul> </ul>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl> * @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC * @package MyAAC
* @author Slawkens <slawkens@gmail.com> * @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC * @copyright 2017 MyAAC
* @version 0.4.3 * @version 0.5.0
* @link http://my-aac.org * @link http://my-aac.org
*/ */
defined('MYAAC') or die('Direct access not allowed!'); defined('MYAAC') or die('Direct access not allowed!');
@@ -72,23 +72,23 @@ else if(file_exists($template_path . '/config.php'))
require($template_path . '/config.php'); require($template_path . '/config.php');
$template = array(); $template = array();
$template['link_account_manage'] = internalLayoutLink('account' . ($config['friendly_urls'] ? '/manage' : 'management')); $template['link_account_manage'] = getLink('account/manage');
$template['link_account_create'] = internalLayoutLink(($config['friendly_urls'] ? 'account/create' : 'createaccount')); $template['link_account_create'] = getLink('account/create');
$template['link_account_lost'] = internalLayoutLink(($config['friendly_urls'] ? 'account/lost' : 'lostaccount')); $template['link_account_lost'] = getLink('account/lost');
$template['link_account_logout'] = internalLayoutLink(($config['friendly_urls'] ? 'account' : 'accountmanagement'), 'logout'); $template['link_account_logout'] = getLink('account/logout');
$template['link_news_archive'] = internalLayoutLink('news' . ($config['friendly_urls'] ? '/' : '') . 'archive'); $template['link_news_archive'] = getLink('news/archive');
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'screenshots', 'movies', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker'); $links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'screenshots', 'movies', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker');
foreach($links as $link) { foreach($links as $link) {
$template['link_' . $link] = internalLayoutLink($link); $template['link_' . $link] = getLink($link);
} }
$template['link_gifts_history'] = internalLayoutLink('gifts', 'show_history'); $template['link_gifts_history'] = getLink('gifts', 'history');
if($config['forum'] != '') if($config['forum'] != '')
{ {
if(strtolower($config['forum']) == 'site') if(strtolower($config['forum']) == 'site')
$template['link_forum'] = "<a href='" . internalLayoutLink('forum') . "'>"; $template['link_forum'] = "<a href='" . getLink('forum') . "'>";
else else
$template['link_forum'] = "<a href='" . $config['forum'] . "' target='_blank'>"; $template['link_forum'] = "<a href='" . $config['forum'] . "' target='_blank'>";
} }

View File

@@ -1,6 +1,6 @@
Here you can see and edit the information about your character.<br/> Here you can see and edit the information about your character.<br/>
If you do not want to specify a certain field, just leave it blank.<br/><br/> If you do not want to specify a certain field, just leave it blank.<br/><br/>
<form action="?subtopic=accountmanagement&action=changecomment" method="post"> <form action="{{ getLink('account/character/comment') }}" method="post">
<div class="TableContainer" > <div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0"> <table class="Table5" cellpadding="0" cellspacing="0">
<div class="CaptionContainer"> <div class="CaptionContainer">
@@ -99,7 +99,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,5 +1,5 @@
Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/> Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/>
<form action="?subtopic=accountmanagement&action=changeinfo" method=post> <form action="{{ getLink('account/info') }}" method=post>
<div class="TableContainer" > <div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" > <table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" > <div class="CaptionContainer" >
@@ -89,7 +89,7 @@ Here you can tell other players about yourself. This information will be display
<td> <td>
</form> </form>
<table border="0" cellspacing="0" cellpadding="0" > <table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement" method="post" > <form action="{{ getLink('account/manage') }}" method="post" >
<tr> <tr>
<td style="border:0px;" > <td style="border:0px;" >
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" > <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" >

View File

@@ -1,5 +1,5 @@
Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.</b><br/><br/> Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.</b><br/><br/>
<form action="?subtopic=accountmanagement&action=changeemail" method="post"> <form action="{{ getLink('account/email') }}" method="post">
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer"> <div class="CaptionContainer">
@@ -58,7 +58,7 @@ Please enter your password and the new email address. Make sure that you enter a
</form> </form>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,6 +1,6 @@
To change a name of character select player and choose a new name.<br/> To change a name of character select player and choose a new name.<br/>
<font color="red">Change name cost {{ config.account_change_character_name_points }} premium points. You have {{ points }} premium points.</font><br/><br/> <font color="red">Change name cost {{ config.account_change_character_name_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
<form action="?subtopic=accountmanagement&action=changename" method="post"> <form action="{{ getLink('account/character/name') }}" method="post">
<input type="hidden" name="changenamesave" value="1"> <input type="hidden" name="changenamesave" value="1">
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
@@ -62,7 +62,7 @@ To change a name of character select player and choose a new name.<br/>
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,6 +1,6 @@
Please enter your current password and a new password. For your security, please enter the new password twice.<br/> Please enter your current password and a new password. For your security, please enter the new password twice.<br/>
<br/> <br/>
<form action="?subtopic=accountmanagement&action=changepassword" method="post"> <form action="{{ getLink('account/password') }}" method="post">
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer"> <div class="CaptionContainer">
@@ -66,7 +66,7 @@ Please enter your current password and a new password. For your security, please
</form> </form>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,6 +1,6 @@
To change a sex of character select player and choose a new sex.<br/> To change a sex of character select player and choose a new sex.<br/>
<font color="red">Change sex cost {{ config.account_change_character_sex_points }} premium points. You have {{ points }} premium points.</font><br/><br/> <font color="red">Change sex cost {{ config.account_change_character_sex_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
<form action="?subtopic=accountmanagement&action=changesex" method="post"> <form action="{{ getLink('account/character/sex') }}" method="post">
<input type="hidden" name="changesexsave" value="1"/> <input type="hidden" name="changesexsave" value="1"/>
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
@@ -64,7 +64,7 @@ To change a sex of character select player and choose a new sex.<br/>
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;" > <td style="border:0px;" >
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,7 +1,7 @@
To play on {{ config.lua.serverName }} you need an account. To play on {{ config.lua.serverName }} you need an account.
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address. All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/> Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
<form action="?subtopic=createaccount" method="post" id="createaccount"> <form action="{{ getLink('account/create') }}" method="post" id="createaccount">
<div class="TableContainer" > <div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" > <table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" > <div class="CaptionContainer" >
@@ -139,7 +139,11 @@ Also you have to agree to the terms presented below. If you have done so, your a
{% endif %} {% endif %}
</table> </table>
</div> </div>
</table></div></td></tr><br/> </td>
</tr>
</table>
</div>
<br/>
<table width="100%"> <table width="100%">
<tr align="center"> <tr align="center">
<td> <td>

View File

@@ -6,7 +6,7 @@ In any case the name must not violate the naming conventions stated in the <a hr
<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b> <b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>
{% endif %} {% endif %}
<br/><br/> <br/><br/>
<form action="?subtopic=accountmanagement&action=createcharacter" method="post"> <form action="{{ getLink('account/character/create') }}" method="post">
<input type="hidden" name=savecharacter value="1"> <input type="hidden" name=savecharacter value="1">
<div class="TableContainer"> <div class="TableContainer">
<table class="Table3" cellpadding="0" cellspacing="0"> <table class="Table3" cellpadding="0" cellspacing="0">
@@ -134,7 +134,7 @@ In any case the name must not violate the naming conventions stated in the <a hr
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div></div>

View File

@@ -1,5 +1,5 @@
To delete a character enter the name of the character and your password.<br/><br/> To delete a character enter the name of the character and your password.<br/><br/>
<form action="?subtopic=accountmanagement&action=deletecharacter" method="post"> <form action="{{ getLink('account/character/delete') }}" method="post">
<input type="hidden" name="deletecharactersave" value="1"/> <input type="hidden" name="deletecharactersave" value="1"/>
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0" > <table class="Table1" cellpadding="0" cellspacing="0" >
@@ -54,7 +54,7 @@ To delete a character enter the name of the character and your password.<br/><br
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,61 +1,61 @@
To generate new recovery key for your account please enter your password.<br/> To generate new recovery key for your account please enter your password.<br/>
<font color="red"><b>New recovery key cost {{ config.generate_new_reckey_price }} Premium Points.</font> You have {{ points }} premium points. You will receive e-mail with this recovery key.</b><br/> <font color="red"><b>New recovery key cost {{ config.generate_new_reckey_price }} Premium Points.</font> You have {{ points }} premium points. You will receive e-mail with this recovery key.</b><br/>
<form action="?subtopic=accountmanagement&action=newreckey" method="post"> <form action="{{ getLink('account/register/new') }}" method="post">
<input type="hidden" name="registeraccountsave" value="1"> <input type="hidden" name="registeraccountsave" value="1">
<div class="TableContainer" > <div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
<div class="CaptionContainer"> <div class="CaptionContainer">
<div class="CaptionInnerContainer"> <div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> <span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >Generate recovery key</div> <div class="Text" >Generate recovery key</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> <span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div> </div>
</div> </div>
<tr> <tr>
<td> <td>
<div class="InnerTableContainer"> <div class="InnerTableContainer">
<table style="width:100%;"> <table style="width:100%;">
<tr> <tr>
<td class="LabelV" ><span>Password:</span></td> <td class="LabelV" ><span>Password:</span></td>
<td><input type="password" name="reg_password" size="30" maxlength="29" ></td> <td><input type="password" name="reg_password" size="30" maxlength="29" ></td>
</tr> </tr>
</table> </table>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<br/> <br/>
<table style="width:100%"> <table style="width:100%">
<tr align="center"> <tr align="center">
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="{{ template_path }}/images/buttons/_sbutton_submit.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="{{ template_path }}/images/buttons/_sbutton_submit.gif" ></div>
</div> </div>
</td> </td>
</tr> </tr>
</form> </form>
</table> </table>
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
</div> </div>
</td> </td>
</tr> </tr>
</form> </form>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -1,5 +1,5 @@
To generate recovery key for your account please enter your password.<br/><br/> To generate recovery key for your account please enter your password.<br/><br/>
<form action="?subtopic=accountmanagement&action=registeraccount" method="post"> <form action="{{ getLink('account/register') }}" method="post">
<input type="hidden" name="registeraccountsave" value="1"/> <input type="hidden" name="registeraccountsave" value="1"/>
<div class="TableContainer"> <div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0"> <table class="Table1" cellpadding="0" cellspacing="0">
@@ -50,7 +50,7 @@ To generate recovery key for your account please enter your password.<br/><br/>
</form> </form>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement" method="post"> <form action="{{ getLink('account/manage') }}" method="post">
<tr> <tr>
<td style="border: 0px;"> <td style="border: 0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>

View File

@@ -1,5 +1,5 @@
Please enter your account {{ account|lower }} and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/> Please enter your account {{ account|lower }} and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/>
<form action="?subtopic=accountmanagement" method="post" > <form action="{{ getLink('account/manage') }}" method="post" >
{% if redirect is not null %} {% if redirect is not null %}
<input type="hidden" name="redirect" value="{{ redirect }}" /> <input type="hidden" name="redirect" value="{{ redirect }}" />
{% endif %} {% endif %}
@@ -66,7 +66,7 @@ Please enter your account {{ account|lower }} and your password.<br/><a href="?s
</td> </td>
<td> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=lostaccount" method="post"> <form action="{{ getLink('account/lost') }}" method="post">
<tr> <tr>
<td style="border:0px;"> <td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div> <div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>

View File

@@ -18,7 +18,7 @@
<div class="InnerTableContainer"> <div class="InnerTableContainer">
<table style="width:100%;"> <table style="width:100%;">
<tr> <tr>
<td>You have logged out of your {{ config.serverName }} account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td> <td>You have logged out of your {{ config.serverName }} account. In order to view your account you need to <a href="{{ getLink('account/manage') }}" >log in</a> again.</td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@@ -2,7 +2,7 @@ Please select action.<br/>
<table cellspacing="0" cellpadding="0" border="0" width="100%"> <table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr> <tr>
<td align="center"> <td align="center">
<a href="?subtopic=lostaccount" border="0"> <a href="{{ getLink('account/lost') }}" border="0">
<img src="{{ template_path }}/images/buttons/sbutton_back.gif" name="back" alt="back" border="0" width="120" height="18"> <img src="{{ template_path }}/images/buttons/sbutton_back.gif" name="back" alt="back" border="0" width="120" height="18">
</a> </a>
</td> </td>

View File

@@ -1,531 +1,115 @@
<div class="SmallBox"> <h1>My account</h1>
<div class="MessageContainer"> <p>Welcome to your account page, {{ account }}<br>
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);"></div> You have {{ account_logged.getPremDays() }} days remaining premium account.</p>
<div class="BoxFrameEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
<div class="Message">
<div class="BoxFrameVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<div class="BoxFrameVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<table>
<tr>
<td width="100%"></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=logout" method="post" >
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Logout" alt="Logout" src="{{ template_path }}/images/buttons/_sbutton_logout.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</div>
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);"></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
</div>
</div>
<br/>
<center>
<table>
<tr>
<td>
<img src="{{ template_path }}/images/content/headline-bracer-left.gif" />
</td>
<td style="text-align:center;vertical-align:middle;horizontal-align:center;font-size:17px;font-weight:bold;" >{{ welcome_message }}<br/></td>
<td><img src="{{ template_path }}/images/content/headline-bracer-right.gif" /></td>
</tr>
</table>
<br/>
</center>
{# if account dont have recovery key show hint #} {# if account dont have recovery key show hint #}
{% if recovery_key is empty %} {% if recovery_key is empty %}
<div class="SmallBox"> <div align="center">
<div class="MessageContainer"> You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!<br/>
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);"></div> <form action="{{ getLink('account/register') }}" method="post">
<div class="BoxFrameEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div> <input type="submit" value="Register Account" />
<div class="BoxFrameEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div> </form>
<div class="Message">
<div class="BoxFrameVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<div class="BoxFrameVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<table>
<tr>
<td class="LabelV" >Hint:</td>
<td style="width:100%;" >You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!</td>
</tr>
</table>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=registeraccount" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="{{ template_path }}/images/buttons/_sbutton_registeraccount.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</div>
</div>
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></div>
</div>
</div> </div>
<br/> <br/>
{% endif %} {% endif %}
{% if email_request %} {% if email_request %}
<div class="SmallBox"> <div align="center">
<div class="MessageContainer"> A request has been submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);"></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div> <form action="{{ getLink('account/email') }}" method="post">
<div class="BoxFrameEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div> <input type="submit" value="Edit" />
<div class="Message"> </form>
<div class="BoxFrameVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<div class="BoxFrameVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></div>
<table>
<tr>
<td class="LabelV" >Note:</td>
<td style="width:100%;" >A request has beefffn submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td>
</tr>
</table>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Edit" alt="Edit" src="{{ template_path }}/images/buttons/_sbutton_edit.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</div>
</div>
<div class="BoxFrameHorizontal" style="background-image:url({{ template_path }}/images/content/box-frame-horizontal.gif);"></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></div>
</div> </div>
</div>
<br/><br/> <br/><br/>
{% endif %} {% endif %}
<a name="General+Information" ></a> <h2>General Information</h2>
<div class="TopButtonContainer"> <table width="100%">
<div class="TopButton"> <tr style="background-color: {{ config.lightborder }};" >
<a href="#top"> <td>Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}:</td>
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif" /> <td style="width:90%;" >{{ account }}</td>
</a> </tr>
</div> <tr style="background-color: {{ config.darkborder }};" >
</div> <td>Email Address:</td>
<div class="TableContainer"> <td style="width:90%;" >{{ account_email ~ email_change}}</td>
<table class="Table3" cellpadding="0" cellspacing="0"> </tr>
<div class="CaptionContainer"> <tr style="background-color: {{ config.lightborder }};" >
<div class="CaptionInnerContainer"> <td>Created:</td>
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <td>{{ account_created|date("j F Y, G:i:s") }}</td>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> </tr>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> <tr style="background-color: {{ config.darkborder }};" >
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> <td>Last Login:</td>
<div class="Text" >General Information</div> <td>{{ "now"|date("j F Y, G:i:s") }}</td>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> </tr>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> {% autoescape false %}
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <tr style="background-color: {{ config.lightborder }};" >
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <td>Account Status:</td>
</div> <td>{{ account_status }}</td>
</div> </tr>
<tr> <tr style="background-color: {{ config.darkborder }};" >
<td> <td>Registered:</td>
<div class="InnerTableContainer"> <td>{{ account_registered }}</td>
<table style="width:100%;" > </tr>
<tr> {% endautoescape %}
<td> </table>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" width="100%">
<tr style="background-color: {{ config.lightborder }};" >
<td class="LabelV" >Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}:</td>
<td style="width:90%;" >{{ account }}</td>
</tr>
<tr style="background-color: {{ config.darkborder }};" >
<td class="LabelV" >Email Address:</td>
<td style="width:90%;" >{{ account_email ~ email_change}}</td>
</tr>
<tr style="background-color: {{ config.lightborder }};" >
<td class="LabelV" >Created:</td>
<td>{{ account_created|date("j F Y, G:i:s") }}</td>
</tr>
<tr style="background-color: {{ config.darkborder }};" >
<td class="LabelV" >Last Login:</td>
<td>{{ "now"|date("j F Y, G:i:s") }}</td>
</tr>
{% autoescape false %}
<tr style="background-color: {{ config.lightborder }};" >
<td class="LabelV" >Account Status:</td>
<td>{{ account_status }}</td>
</tr>
<tr style="background-color: {{ config.darkborder }};" >
<td class="LabelV" >Registered:</td>
<td>{{ account_registered }}</td>
</tr>
{% endautoescape %}
</table>
</div>
</div>
<div class="TableShadowContainer">
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bl.gif);"></div>
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-br.gif);"></div> </div>
</div>
</td>
</tr>
<tr>
<td>
<table class="InnerTableButtonRow" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changepassword" method="post">
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="{{ template_path }}/images/buttons/_sbutton_changepassword.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
<tr>
<td style="border:0px;">
<input type="hidden" name="newemail" value=""/>
<input type="hidden" name="newemaildate" value="0">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Email" alt="Change Email" src="{{ template_path }}/images/buttons/_sbutton_changeemail.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
<td width="100%"></td>
{# show button "register account" #}
{% if recovery_key is empty %}
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=registeraccount" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="{{ template_path }}/images/buttons/_sbutton_registeraccount.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
{% endif %}
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/> <br/>
<a name="Public+Information"></a> <h2>Action Log</h2>
<div class="TopButtonContainer"> <table>
<div class="TopButton"> <tr bgcolor="{{ config.vdarkborder }}" class="white">
<a href="#top"> <th>Action</th><th>Date</th><th>IP</th>
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif"/> </tr>
</a> {% autoescape false %}
</div> {% set i = 0 %}
</div> {% for action in actions %}
<div class="TableContainer"> {% set i = i + 1 %}
<table class="Table5" cellpadding="0" cellspacing="0"> <tr style="background-color: {{ getStyle(i) }}">
<div class="CaptionContainer"> <td>{{ action.action }}</td>
<div class="CaptionInnerContainer"> <td>{{ action.date|date("jS F Y H:i:s") }}</td>
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> <td>{{ action.ip }}</td>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> </tr>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> {% endfor %}
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> {% endautoescape %}
<div class="Text" >Public Information</div> </table>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;">
<tr>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/content/table-shadow-rt.gif);" ></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer">
<table class="TableContent" width="100%">
<tr>
<td>
<table style="width:100%;">
<tr>
<td class="LabelV" >Real Name:</td>
<td style="width:90%;" >{{ account_rlname }}</td>
</tr>
<tr>
<td class="LabelV" >Location:</td>
<td style="width:90%;" >{{ account_location }}</td>
</tr>
</table>
</td>
<td align=right>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=changeinfo" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="{{ template_path }}/images/buttons/_sbutton_edit.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="TableShadowContainer">
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bm.gif);">
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bl.gif);"></div>
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-br.gif);"></div> </div>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/> <br/>
<a name="Account+Logs" ></a> <h2>Character list: {{ players|length }} characters.</h2>
<div class="TopButtonContainer"> <table>
<div class="TopButton"> <tr bgcolor="{{ config.vdarkborder }}" class="white">
<a href="#top"> <th>Name</th><th>Level</th><th>Vocation</th><th>Town</th><th>Last login</th><th>Status</th><th>Hide</th><th>Edit</th>
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif"/> </tr>
</a> {% set i = 0 %}
</div> {% for player in players %}
</div> {% set i = i + 1 %}
<div class="TableContainer"> <tr bgcolor="{{ getStyle(i) }}">
<table class="Table5" cellpadding="0" cellspacing="0"> <td><a href="{{ getLink('characters/' ~ player.getName()|url_encode) }}">{{ player.getName() }}</a></td><td>{{ player.getLevel() }}</td><td>{{ config.vocations[player.getVocation()] }}</td><td>{{ config.towns[player.getTownId()] }}</td><td>{% if player.getLastLogin() > 0 %}{{ player.getLastLogin|date('d F Y (H:i)') }}{% else %}Never.{% endif %}</td><td>{% if player.isOnline() %}<font color="green">ONLINE</font>{% else %}<font color="red">Offline</font>{% endif %}</td><td>{% if player.isHidden() %}Hidden{% else %}Visible{% endif %}</td><td>[<a href="{{ getLink('account/character/comment/' ~ player.getName|url_encode) }}" >Edit</a>]</td>
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >Account logs</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;">
<tr>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer" >
<table class="TableContent" width="100%">
<tr class="LabelH">
<td style="width:60%">Action</td>
<td style="width:25%">Date</td>
<td style="width:15%">IP</td>
</tr>
{% autoescape false %}
{% set i = 0 %}
{% for action in actions %}
{% set i = i + 1 %}
<tr style="background-color: {{ getStyle(i) }}">
<td>{{ action.action }}</td>
<td>{{ action.date|date("jS F Y H:i:s") }}</td>
<td>{{ action.ip }}</td>
</tr>
{% endfor %}
{% endautoescape %}
</table>
</div>
</div>
<div class="TableShadowContainer" >
<div class="TableBottomShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bl.gif);"></div>
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-br.gif);"></div>
</div>
</div>
</td>
<td align=right>
</td>
</tr>
</table>
</div>
</td>
</tr> </tr>
</table> {% endfor %}
</div> </table>
<br/> <br/>
<a name="Characters" ></a> <table>
<div class="TopButtonContainer"> <tr>
<div class="TopButton" > <td>
<a href="#top"> <form action="{{ getLink('account/character/create') }}" method="post" >
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif" /> <input type="Submit" name="Create Character" value="Create Character" />
</a> </form>
</div> </td>
</div> {% if config.account_change_character_name %}
<div class="TableContainer"> <td>
<table class="Table5" cellpadding="0" cellspacing="0"> <form action="{{ getLink('account/character/name') }}" method="post" >
<div class="CaptionContainer" > <input type="Submit" name="Change Name" value="Change Name" />
<div class="CaptionInnerContainer"> </form>
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> </td>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> {% endif %}
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> {% if config.account_change_character_sex %}
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> <td>
<div class="Text">Characters</div> <form action="{{ getLink('account/character/sex') }}" method="post" >
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span> <input type="Submit" name="Change Sex" value="Change Sex" />
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span> </form>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> </td>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span> {% endif %}
</div> <td>
</div> <form action="{{ getLink('account/character/delete') }}" method="post">
<tr> <input type="Submit" name="Delete Character" value="Delete Character" />
<td> </form>
<div class="InnerTableContainer"> </td>
<table style="width:100%;"> </tr>
<tr> </table>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url({{ template_path }}/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" width="100%">
<tr class="LabelH">
<td style="width:65%">Name</td>
<td style="width:15%">Level</td>
<td style="width:7%">Status</td>
<td style="width:5%">&#160;</td>
</tr>
{% set i = 0 %}
{% for player in players %}
{% set i = i + 1 %}
<tr style="background-color: {{ getStyle(i) }};">
<td>
<nobr>{{ i }}. {{ player.name }}{% if player.deleted %}<font color="red"><b> [ DELETED ] </b></font>{% endif %}</nobr>
</td>
<td>
<nobr>{{ player.level }} {{ player.vocation }}</nobr>
</td>
{% if player.online %}
<td><font color="green"><b>Online</b></font></td>
{% else %}
<td><font color="red"><b>Offline</b></font></td>
{% endif %}
<td>[<a href="?subtopic=accountmanagement&action=changecomment&name={{ player.name_encoded }}" >Edit</a>]</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="TableShadowContainer">
<div class="TableBottomShadow" style="background-image:url('.$template_path.'/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-bl.gif);"></div>
<div class="TableBottomRightShadow" style="background-image:url({{ template_path }}/images/content/table-shadow-br.gif);"></div> </div>
</div>
</td>
</tr>
<tr>
<td>
<table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" >
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=createcharacter" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Create Character" alt="Create Character" src="{{ template_path }}/images/buttons/_sbutton_createcharacter.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
{% if config.account_change_character_name %}
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changename" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Name" alt="Change Name" src="images/buttons/_sbutton_change_name.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
{% endif %}
{% if config.account_change_character_sex %}
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changesex" method="post" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$template_path.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Sex" alt="Change Sex" src="images/buttons/_sbutton_change_sex.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
{% endif %}
<td style="width:100%;" ></td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<form action="?subtopic=accountmanagement&action=deletecharacter" method="post">
<tr>
<td style="border:0px;">
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Delete Character" alt="Delete Character" src="{{ template_path }}/images/buttons/_sbutton_deletecharacter.gif" ></div>
</div>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<br/><br/>

View File

@@ -28,9 +28,9 @@
</div> </div>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
// Automatic redirect // Automatic redirect
setTimeout ("automaticRedirect()", 1000); setTimeout ("automaticRedirect()", 1000);
function automaticRedirect() { function automaticRedirect() {
window.location = "{{ redirect }}"; window.location = "{{ redirect }}";
} }
</script> </script>

View File

@@ -1,21 +1,15 @@
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
tinyMCE.init({ tinymce.init({
mode : "textareas", selector : "textarea",
theme : "advanced", theme : "modern",
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount", plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
relative_urls : false, image_advtab: true,
remove_script_host : false, relative_urls : false,
document_base_url : "{{ constant('BASE_URL') }}", remove_script_host : false,
document_base_url : "{{ constant('BASE_URL') }}"
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor", });
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
</script> </script>
<table width="800" cellspacing="1" cellpadding="2" border="0" align="center"> <table width="800" cellspacing="1" cellpadding="2" border="0" align="center">
<form method="post"> <form method="post">

View File

@@ -0,0 +1,107 @@
{% set use_tinymce = false %}
<!--
//if($action != 'edit' || !$php)
// $use_tinymce = true;
-->
{% if use_tinymce %}
<script type="text/javascript" src="tools/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
$(function() {
$('#news-body').tinymce({
script_url : 'tools/tiny_mce/tiny_mce.js',
forced_root_block : false,
theme : "advanced",
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
<?php /*if($action != 'edit'): ?>
$("#page-edit-table").hide();
$("#page-button").click(function() {
$("#page-edit-table").toggle();
return false;
});
<?php endif; */ ?>
});
</script>
<!--script type="text/javascript">
tinyMCE.init({
forced_root_block : false,
mode : "textareas",
theme : "advanced",
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
</script-->
{% endif %}
<form method="post" action="?p=pages&action={% if action == 'edit' %}edit{% else %}add{% endif %}">
{% if action == 'edit' %}
<input type="hidden" name="id" value="{{ id }}" />
{% endif %}
<table class="table" id="page-edit-table" width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<th><b>{% if action == 'edit' %}Edit{% else %}Add{% endif %} page</b></th>
</tr>
<tr>
<td>
<table border="0" cellpadding="1">
<tr>
<td>Link/name:</td>
<td><input name="name" value="{{ name }}" size="29" maxlength="29"/></td>
</tr>
<tr>
<td>Title:</td>
<td><input name="title" value="{{ title }}" size="29" maxlength="29"/></td>
</tr>
<tr>
<td>PHP:</td>
<td><input type="checkbox" id="news-checkbox" name="php" title="Check if page should be executed as PHP" value="1"{% if php %} checked="true"{% endif %}/></td>
</tr>
<tr>
<td>Content:</td>
<td>
<textarea id="news-body" name="body" maxlength="65000" cols="50" rows="5">{{ body }}</textarea>
{% if use_tinymce %}
<br/>
<a href="javascript:;" onmousedown="$('#news-body').tinymce().hide();">[Hide]</a>
<a href="javascript:;" onmousedown="$('#news-body').tinymce().show();">[Show]</a>
{% endif %}
</td>
<tr/>
<tr>
<td>Access:</td>
<td>
<select name="access">
<?php foreach($groups->getGroups() as $id => $group): ?>
{% for id, group in groups %}
<option value="{{ group.getAccess() }}"{% if access == group.getAccess() %} selected{% endif %}>{{ group.getName() }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td align="right"><input type="submit" class="button" value="Save"/></td>
<td align="left">
<input type="button" onclick="window.location = '{{ constant('ADMIN_URL') }}?p=pages';" class="button" value="Cancel"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,27 @@
<table class="table" width="100%" cellspacing="1" cellpadding="4">
<tr>
<th><b>Name</b></th>
<th><b>Title</b></th>
<th><b>Options</b></th>
</tr>
{% 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">
<img src="{{ constant('BASE_URL') }}images/edit.png"/>
Edit
</a>
<a href="?p=pages&action=delete&id={{ page.id }}" class="ico" onclick="return confirm('Are you sure?');" title="Delete">
<img src="{{ constant('BASE_URL') }}images/del.png"/>
Delete
</a>
<a href="?p=pages&action=hide&id={{ page.id }}" class="ico" title="<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>">
<img src="{{ constant('BASE_URL') }}images/{% if page.hidden != 1 %}success{% else %}error{% endif %}.png"/>
{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
</td>
</tr>
{% endfor %}
</table>

View File

@@ -6,14 +6,16 @@
<th>Version</th> <th>Version</th>
<th>Author</th> <th>Author</th>
<th>Contact</th> <th>Contact</th>
<th>Options</th>
</tr> </tr>
{% for plugin in plugins %} {% for plugin in plugins %}
<tr> <tr>
<td><div title="{{ plugin.description }}">{{ plugin.name }}</div></td> <td><div title="{{ plugin.description }}">{{ plugin.name }}</div></td>
<td>{{ plugin.file }}</td> <td>{{ plugin.file }}.json</td>
<td>{{ plugin.version }}</td> <td>{{ plugin.version }}</td>
<td>{{ plugin.author }}</td> <td>{{ plugin.author }}</td>
<td>{{ plugin.contact }}</td> <td>{{ plugin.contact }}</td>
<td><a href="?p=plugins&uninstall={{ plugin.file }}">Uninstall</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

View File

@@ -2,6 +2,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<td><img src="<{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0"></td> <td><img src="<{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0"></td>
<td> <td>
{{ hook(constant('HOOK_CHARACTERS_BEFORE_INFORMATIONS')) }}
<table border="0" cellspacing="1" cellpadding="4" width="100%"> <table border="0" cellspacing="1" cellpadding="4" width="100%">
{% if config.characters.outfit %} {% if config.characters.outfit %}
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div> <div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
@@ -139,6 +140,7 @@
<td>{% if account.isPremium() %}Premium Account{% else %}Free Account{% endif %}</td> <td>{% if account.isPremium() %}Premium Account{% else %}Free Account{% endif %}</td>
</tr> </tr>
</table> </table>
{{ hook(constant('HOOK_CHARACTERS_AFTER_INFORMATIONS')) }}
<br/> <br/>
<table border="0" width="100%"> <table border="0" width="100%">
<tr> <tr>
@@ -217,21 +219,23 @@
{{ deaths|raw }} {{ deaths|raw }}
{{ frags|raw }} {{ frags|raw }}
{{ hook(constant('HOOK_CHARACTERS_BEFORE_SIGNATURE')) }}
{% if config.signature_enabled %} {% if config.signature_enabled %}
<script type="text/javascript"> <script type="text/javascript">
function showSignLinks() function showSignLinks()
{ {
if(document.getElementById('signLinks').style.display == "none") if(document.getElementById('signLinks').style.display == "none")
{ {
document.getElementById('signLinks').style.display = "inline"; document.getElementById('signLinks').style.display = "inline";
document.getElementById('signText').innerHTML = "Hide links"; document.getElementById('signText').innerHTML = "Hide links";
} }
else else
{ {
document.getElementById('signLinks').style.display = "none"; document.getElementById('signLinks').style.display = "none";
document.getElementById('signText').innerHTML = "Show links"; document.getElementById('signText').innerHTML = "Show links";
} }
} }
</script> </script>
<br/> <br/>
<table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="{{ config.vdarkborder }}"><td colspan=2 class="white"><b>Signature</b></td></tr> <table border="0" cellspacing="1" cellpadding="4" width="100%"><tr bgcolor="{{ config.vdarkborder }}"><td colspan=2 class="white"><b>Signature</b></td></tr>
@@ -257,7 +261,7 @@
</td></tr> </td></tr>
</table> </table>
{% endif %} {% endif %}
{{ hook(constant('HOOK_CHARACTERS_AFTER_SIGNATURE')) }}
{% if hidden != 1 %} {% if hidden != 1 %}
{% set rows = 0 %} {% set rows = 0 %}
<br/><br/> <br/><br/>
@@ -299,6 +303,7 @@
<td>{{ account.getCustomField("created")|date("j F Y, g:i a") ~bannedUntil }}</td> <td>{{ account.getCustomField("created")|date("j F Y, g:i a") ~bannedUntil }}</td>
</tr> </tr>
</table> </table>
{{ hook(constant('HOOK_CHARACTERS_AFTER_ACCOUNT')) }}
<br/><br/> <br/><br/>
<table border="0" cellspacing="1" cellpadding="4" width="100%"> <table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}"> <tr bgcolor="{{ config.vdarkborder }}">
@@ -342,6 +347,7 @@
{% endfor %} {% endfor %}
</table> </table>
{% endif %} {% endif %}
{{ hook(constant('HOOK_CHARACTERS_AFTER_CHARACTERS')) }}
</td> </td>
<td> <td>
<img src="{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0"> <img src="{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0">

View File

@@ -1,5 +1,5 @@
<form action="?" method="post"> <form action="?" method="post">
<input type="hidden" name="action" value="new_topic" /> <input type="hidden" name="action" value="new_thread" />
<input type="hidden" name="section_id" value="{{ section_id }}" /> <input type="hidden" name="section_id" value="{{ section_id }}" />
<input type="hidden" name="subtopic" value="forum" /> <input type="hidden" name="subtopic" value="forum" />
<input type="hidden" name="save" value="save" /> <input type="hidden" name="save" value="save" />

View File

@@ -1,18 +1,11 @@
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
tinyMCE.init({ tinymce.init({
forced_root_block : false, selector : "textarea",
theme : "modern",
mode : "textareas", plugins: 'print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help',
theme : "advanced", toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat',
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount", image_advtab: true
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
}); });
</script> </script>
{% if action != 'edit' %} {% if action != 'edit' %}

Some files were not shown because too many files have changed in this diff Show More