mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 20:43:34 +02:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
739782109e | ||
![]() |
87ba018ab8 | ||
![]() |
041702615f | ||
![]() |
0a82f306f6 | ||
![]() |
856e72150c | ||
![]() |
e2857f8ca5 | ||
![]() |
04d9ec9c94 | ||
![]() |
e984a467ef | ||
![]() |
8342a7b8a8 | ||
![]() |
269af1930c | ||
![]() |
b7bb950abc | ||
![]() |
4a19458c15 | ||
![]() |
b6db420465 | ||
![]() |
7b234ad41f |
@@ -1,33 +1,7 @@
|
||||
Options -Indexes -MultiViews
|
||||
|
||||
RewriteEngine On
|
||||
#RewriteBase /
|
||||
|
||||
# Page parser
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^([A-Za-z0-9-_+']+)\.png/?$ tools/signature/index.php?name=$1 [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]
|
||||
RewriteRule ^.*$ index.php [L]
|
19
CHANGELOG
19
CHANGELOG
@@ -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]
|
||||
- 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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# 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
|
||||
|
||||
|
@@ -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>
|
||||
</div>
|
||||
<?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 id="wrapper">
|
||||
<?php
|
||||
@@ -78,6 +78,19 @@
|
||||
}
|
||||
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>
|
||||
</div>
|
||||
|
@@ -21,14 +21,14 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
session_start();
|
||||
|
||||
define('MYAAC', true);
|
||||
define('MYAAC_VERSION', '0.4.3');
|
||||
define('DATABASE_VERSION', 9);
|
||||
define('MYAAC_VERSION', '0.5.0');
|
||||
define('DATABASE_VERSION', 10);
|
||||
define('TABLE_PREFIX', 'myaac_');
|
||||
define('START_TIME', microtime(true));
|
||||
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
|
||||
|
102
index.php
102
index.php
@@ -21,7 +21,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @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!');
|
||||
}
|
||||
|
||||
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
|
||||
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_GET['p']) ? $_GET['p'] : '');
|
||||
if(empty($page) || preg_match('/[^A-z0-9_\-]/', $page))
|
||||
$page = 'news';
|
||||
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : '');
|
||||
if(empty($page) || preg_match('/[^A-z0-9\/_\-]/', $page)) {
|
||||
if(!$found)
|
||||
$page = '404';
|
||||
else
|
||||
$page = 'news';
|
||||
}
|
||||
|
||||
$page = strtolower($page);
|
||||
define('PAGE', $page);
|
||||
|
||||
$template_place_holders = array();
|
||||
|
||||
require_once(SYSTEM . 'functions.php');
|
||||
require_once(SYSTEM . 'init.php');
|
||||
require_once(SYSTEM . 'login.php');
|
||||
require_once(SYSTEM . 'status.php');
|
||||
@@ -156,7 +244,7 @@ if($config['backward_support']) {
|
||||
$config['site']['screenshot_page'] = true;
|
||||
|
||||
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)
|
||||
$config['status']['serverStatus_' . $key] = $value;
|
||||
@@ -223,7 +311,7 @@ if($load_it)
|
||||
else
|
||||
{
|
||||
$file = SYSTEM . 'pages/' . $page . '.php';
|
||||
if(!@file_exists($file))
|
||||
if(!@file_exists($file) && !$found)
|
||||
{
|
||||
$page = '404';
|
||||
$file = SYSTEM . 'pages/404.php';
|
||||
|
@@ -1,11 +1,22 @@
|
||||
CREATE TABLE `myaac_account_actions`
|
||||
(
|
||||
`account_id` INT(11) NOT NULL,
|
||||
`ip` INT(11) NOT NULL DEFAULT 0,
|
||||
`ipv6` BINARY(16) NOT NULL DEFAULT 0,
|
||||
`date` INT(11) NOT NULL DEFAULT 0,
|
||||
`action` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
KEY (`account_id`)
|
||||
`account_id` INT(11) NOT NULL,
|
||||
`ip` INT(11) NOT NULL DEFAULT 0,
|
||||
`ipv6` BINARY(16) NOT NULL DEFAULT 0,
|
||||
`date` INT(11) NOT NULL DEFAULT 0,
|
||||
`action` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
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;
|
||||
|
||||
CREATE TABLE `myaac_bugtracker`
|
||||
@@ -20,7 +31,7 @@ CREATE TABLE `myaac_bugtracker`
|
||||
`who` INT(11) NOT NULL DEFAULT 0,
|
||||
`uid` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`tag` INT(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`uid`)
|
||||
PRIMARY KEY (`uid`)
|
||||
) ENGINE = MyISAM;
|
||||
|
||||
CREATE TABLE `myaac_changelog`
|
||||
@@ -112,6 +123,7 @@ CREATE TABLE `myaac_hooks`
|
||||
`name` VARCHAR(30) NOT NULL DEFAULT '',
|
||||
`type` INT(2) NOT NULL DEFAULT 0,
|
||||
`file` VARCHAR(100) NOT NULL,
|
||||
`ordering` INT(11) NOT NULL DEFAULT 0,
|
||||
`enabled` INT(1) NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = MyISAM;
|
||||
|
@@ -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'));
|
||||
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;
|
||||
}
|
||||
|
||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
|
||||
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;
|
||||
}
|
||||
|
||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
|
||||
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;
|
||||
}
|
||||
|
||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
|
||||
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;
|
||||
}
|
||||
|
||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
|
||||
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;
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,20 @@
|
||||
{
|
||||
"name": "Example Plugin",
|
||||
"description": "This is just an example of a Plugin for MyAAC.",
|
||||
"version": "1.0",
|
||||
"author": "nobody",
|
||||
"contact": "nobody@example.org",
|
||||
"install": "plugins/example/install.php",
|
||||
"hooks": {
|
||||
"name": "Example Plugin",
|
||||
"description": "This is just an example of a Plugin for MyAAC.",
|
||||
"version": "1.0",
|
||||
"author": "nobody",
|
||||
"contact": "nobody@example.org",
|
||||
"require": {
|
||||
"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": {
|
||||
"type": "BEFORE_PAGE",
|
||||
"file": "plugins/example/before.php"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
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>';
|
||||
}
|
||||
|
||||
function getLink($page, $name, $blank = false) {
|
||||
return generateLink(getPageLink($page), $name, $blank);
|
||||
function getFullLink($page, $name, $blank = false) {
|
||||
return generateLink(getLink($page), $name, $blank);
|
||||
}
|
||||
|
||||
function getPageLink($page, $action = null)
|
||||
function getLink($page, $action = null)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// 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 : '');
|
||||
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . $page . ($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)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$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;
|
||||
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
|
||||
}
|
||||
|
||||
function getForumBoardLink($board_id, $page = NULL)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$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;
|
||||
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
|
||||
}
|
||||
|
||||
function getPlayerLink($name, $generate = true)
|
||||
@@ -91,12 +72,8 @@ function getPlayerLink($name, $generate = true)
|
||||
if($player->isLoaded())
|
||||
$name = $player->getName();
|
||||
}
|
||||
|
||||
$url = '';
|
||||
if($config['friendly_urls'])
|
||||
$url = BASE_URL . 'characters/' . urlencode($name);
|
||||
else
|
||||
$url = BASE_URL . '?subtopic=characters&name=' . urlencode($name);
|
||||
|
||||
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'characters/' . urlencode($name);
|
||||
|
||||
if(!$generate) return $url;
|
||||
return generateLink($url, $name);
|
||||
@@ -115,13 +92,9 @@ function getHouseLink($name, $generate = true)
|
||||
if($house->rowCount() > 0)
|
||||
$name = $house->fetchColumn();
|
||||
}
|
||||
|
||||
$url = '';
|
||||
if($config['friendly_urls'])
|
||||
$url = BASE_URL . 'houses/' . urlencode($name);
|
||||
else
|
||||
$url = BASE_URL . '?subtopic=houses&page=view&house=' . urlencode($name);
|
||||
|
||||
|
||||
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'houses/' . urlencode($name);
|
||||
|
||||
if(!$generate) return $url;
|
||||
return generateLink($url, $name);
|
||||
}
|
||||
@@ -138,11 +111,7 @@ function getGuildLink($name, $generate = true)
|
||||
$name = $guild->fetchColumn();
|
||||
}
|
||||
|
||||
$url = '';
|
||||
if($config['friendly_urls'])
|
||||
$url = BASE_URL . 'guilds/' . urlencode($name);
|
||||
else
|
||||
$url = BASE_URL . '?subtopic=guilds&action=show&guild=' . urlencode($name);
|
||||
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'guilds/' . urlencode($name);
|
||||
|
||||
if(!$generate) return $url;
|
||||
return generateLink($url, $name);
|
||||
@@ -1175,7 +1144,10 @@ function load_config_lua($filename)
|
||||
|
||||
$config_file = $filename;
|
||||
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();
|
||||
$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());
|
||||
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;
|
||||
}
|
||||
?>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -16,8 +16,14 @@ define('HOOK_AFTER_PAGE', 3);
|
||||
define('HOOK_FINISH', 4);
|
||||
define('HOOK_TIBIACOM_ARTICLE', 5);
|
||||
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_LAST', HOOK_TIBIACOM_BORDER_3);
|
||||
define('HOOK_LAST', HOOK_CHARACTERS_AFTER_CHARACTERS);
|
||||
|
||||
$hook_types = array(
|
||||
'STARTUP' => HOOK_STARTUP,
|
||||
@@ -25,7 +31,13 @@ $hook_types = array(
|
||||
'AFTER_PAGE' => HOOK_AFTER_PAGE,
|
||||
'FINISH' => HOOK_FINISH,
|
||||
'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
|
||||
@@ -84,7 +96,7 @@ class Hooks
|
||||
public function load()
|
||||
{
|
||||
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)
|
||||
$this->register($hook['name'], $hook['type'], $hook['file']);
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -42,6 +42,21 @@ $function = new Twig_SimpleFunction('getStyle', function ($i) {
|
||||
});
|
||||
$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
|
||||
if(isset($_POST))
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -334,6 +334,9 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
||||
throw new E_OTS_NotLoaded();
|
||||
}
|
||||
|
||||
if($this->data['lastday'] == 0)
|
||||
return 0;
|
||||
|
||||
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']));
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
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
|
||||
@@ -135,6 +138,7 @@ else
|
||||
|
||||
if($logged) {
|
||||
$logged_flags = $account_logged->getWebFlags();
|
||||
$twig->addGlobal('logged', true);
|
||||
$twig->addGlobal('account_logged', $account_logged);
|
||||
}
|
||||
}
|
||||
|
17
system/migrations/10.php
Normal file
17
system/migrations/10.php
Normal 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;");
|
||||
?>
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -17,7 +17,6 @@ if($config['account_country'])
|
||||
|
||||
$groups = new OTS_Groups_List();
|
||||
|
||||
$errors = array();
|
||||
$show_form = true;
|
||||
$config_salt_enabled = fieldExist('salt', 'accounts');
|
||||
if(!$logged)
|
||||
@@ -29,7 +28,7 @@ if(!$logged)
|
||||
{
|
||||
if(!empty($errors))
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
|
||||
echo $twig->render('account.login.html.twig', array(
|
||||
'redirect' => isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : null,
|
||||
'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
|
||||
@@ -39,6 +38,8 @@ if(!$logged)
|
||||
}
|
||||
}
|
||||
|
||||
$errors = array();
|
||||
|
||||
if(isset($_REQUEST['redirect']))
|
||||
{
|
||||
$redirect = urldecode($_REQUEST['redirect']);
|
||||
@@ -63,7 +64,7 @@ if(!$logged)
|
||||
else
|
||||
{
|
||||
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
|
||||
$account_registered = '<b><font color="green">Yes</font></b>';
|
||||
}
|
||||
@@ -104,18 +105,6 @@ if(!$logged)
|
||||
$players = array();
|
||||
$account_players = $account_logged->getPlayersList();
|
||||
$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(
|
||||
'welcome_message' => $welcome_message,
|
||||
@@ -132,7 +121,7 @@ if(!$logged)
|
||||
'account_rlname' => $account_rlname,
|
||||
'account_location' => $account_location,
|
||||
'actions' => $actions,
|
||||
'players' => $players
|
||||
'players' => $account_players
|
||||
));
|
||||
}
|
||||
//########### CHANGE PASSWORD ##########
|
||||
@@ -146,31 +135,31 @@ if(!$logged)
|
||||
else
|
||||
{
|
||||
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);
|
||||
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) {
|
||||
$show_msgs[] = "New password minimal length is 8 characters.";
|
||||
$errors[] = "New password minimal length is 8 characters.";
|
||||
}
|
||||
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)) {
|
||||
$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);
|
||||
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
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $show_msg));
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
|
||||
//show form
|
||||
echo $twig->render('account.change_password.html.twig');
|
||||
@@ -477,7 +466,7 @@ if($action == "changeemail") {
|
||||
}
|
||||
|
||||
//############## GENERATE NEW RECOVERY KEY ###########
|
||||
if($action == "newreckey")
|
||||
if($action == "registernew")
|
||||
{
|
||||
if(isset($_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 ######
|
||||
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_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL;
|
||||
if(check_name($player_name)) {
|
||||
$player = $ots->createObject('Player');
|
||||
$player->find($player_name);
|
||||
if($player->isLoaded()) {
|
||||
$player_account = $player->getAccount();
|
||||
if($account_logged->getId() == $player_account->getId()) {
|
||||
if(isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) {
|
||||
$player->setCustomField("hidden", $new_hideacc);
|
||||
$player->setCustomField("comment", $new_comment);
|
||||
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
'title' => 'Character Information Changed',
|
||||
'description' => 'The character information has been changed.'
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $twig->render('account.change_comment.html.twig', array(
|
||||
'player' => $player,
|
||||
'player_name' => $player_name
|
||||
));
|
||||
|
||||
if($player_name != null) {
|
||||
if (check_name($player_name)) {
|
||||
$player = $ots->createObject('Player');
|
||||
$player->find($player_name);
|
||||
if ($player->isLoaded()) {
|
||||
$player_account = $player->getAccount();
|
||||
if ($account_logged->getId() == $player_account->getId()) {
|
||||
if (isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) {
|
||||
$player->setCustomField("hidden", $new_hideacc);
|
||||
$player->setCustomField("comment", $new_comment);
|
||||
$account_logged->logAction('Changed comment for character <b>' . $player->getName() . '</b>.');
|
||||
echo $twig->render('success.html.twig', array(
|
||||
'title' => 'Character Information Changed',
|
||||
'description' => 'The character information has been changed.'
|
||||
));
|
||||
$show_form = false;
|
||||
}
|
||||
} else {
|
||||
$errors[] = 'Error. Character <b>' . $player_name . '</b> is not on your account.';
|
||||
}
|
||||
} else {
|
||||
$errors[] = "Error. Character with this name doesn't exist.";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Character <b>".$player_name."</b> is not on your account.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Character with this name doesn't exist.";
|
||||
} else {
|
||||
$errors[] = 'Error. Name contain illegal characters.';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error. Name contain illegal characters.";
|
||||
else {
|
||||
$errors[] = 'Please enter character name.';
|
||||
}
|
||||
|
||||
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
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -26,7 +26,7 @@ $access = 0;
|
||||
if(!empty($action))
|
||||
{
|
||||
if($action == 'delete' || $action == 'edit' || $action == 'hide')
|
||||
$id = $_REQUEST['id'];
|
||||
$id = $_REQUEST['id'];
|
||||
|
||||
if(isset($_REQUEST['name']))
|
||||
$name = $_REQUEST['name'];
|
||||
@@ -83,147 +83,35 @@ if(!empty($action))
|
||||
if(!empty($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): ?>
|
||||
<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 =
|
||||
$query =
|
||||
$db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages'));
|
||||
|
||||
$i = 0;
|
||||
foreach($pages as $_page): ?>
|
||||
<tr>
|
||||
<td><?php echo getLink($_page['name'], $_page['name']); ?></td>
|
||||
<td><i><?php echo substr($_page['title'], 0, 20); ?></i></td>
|
||||
<td>
|
||||
<a href="?p=pages&action=edit&id=<?php echo $_page['id']; ?>" class="ico" title="Edit">
|
||||
<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">
|
||||
<img src="<?php echo BASE_URL; ?>images/del.png"/>
|
||||
Delete
|
||||
</a>
|
||||
<a href="?p=pages&action=hide&id=<?php echo $_page['id']; ?>" class="ico" title="<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>">
|
||||
<img src="<?php echo BASE_URL; ?>images/<?php echo ($_page['hidden'] != 1 ? 'success' : 'error'); ?>.png"/>
|
||||
<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
$pages = array();
|
||||
foreach($query as $_page) {
|
||||
$pages[] = array(
|
||||
'link' => getFullLink($_page['name'], $_page['name']),
|
||||
'title' => substr($_page['title'], 0, 20),
|
||||
'id' => $_page['id'],
|
||||
'hidden' => $_page['hidden']
|
||||
);
|
||||
}
|
||||
|
||||
echo $twig->render('admin.pages.form.html.twig', array(
|
||||
'action' => $action,
|
||||
'id' => $action == 'edit' ? $id : null,
|
||||
'name' => $name,
|
||||
'title' => $p_title,
|
||||
'php' => $php,
|
||||
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
|
||||
'groups' => $groups->getGroups(),
|
||||
'access' => $access
|
||||
));
|
||||
|
||||
echo $twig->render('admin.pages.html.twig', array(
|
||||
'pages' => $pages
|
||||
));
|
||||
|
||||
<?php
|
||||
class Pages
|
||||
{
|
||||
static public function get($id)
|
||||
@@ -243,7 +131,7 @@ class Pages
|
||||
{
|
||||
$query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name));
|
||||
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
|
||||
$errors[] = 'Page with this words already exists.';
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -15,8 +15,54 @@ require(SYSTEM . 'hooks.php');
|
||||
|
||||
echo $twig->render('admin.plugins.form.html.twig');
|
||||
|
||||
$message = '';
|
||||
if(isset($_FILES["plugin"]["name"]))
|
||||
function deleteDirectory($dir) {
|
||||
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"];
|
||||
$filename = $file["name"];
|
||||
@@ -28,7 +74,7 @@ if(isset($_FILES["plugin"]["name"]))
|
||||
|
||||
if(isset($file['error'])) {
|
||||
$error = 'Error uploading file';
|
||||
switch( $file['error'] ) {
|
||||
switch($file['error']) {
|
||||
case UPLOAD_ERR_OK:
|
||||
$error = false;
|
||||
break;
|
||||
@@ -79,33 +125,63 @@ if(isset($_FILES["plugin"]["name"]))
|
||||
$string = file_get_contents($file_name);
|
||||
$plugin = json_decode($string, true);
|
||||
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.');
|
||||
}
|
||||
|
||||
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 {
|
||||
$continue = true;
|
||||
|
||||
if(isset($plugin['require'])) {
|
||||
$require = $plugin['require'];
|
||||
if(isset($require['myaac'])) {
|
||||
$require_myaac = $require['myaac'];
|
||||
if(version_compare(MYAAC_VERSION, $require_myaac, '<')) {
|
||||
warning("This plugin requires MyAAC version " . $require_myaac . ", you're using version " . MYAAC_VERSION . " - please update.");
|
||||
$continue = false;
|
||||
}
|
||||
}
|
||||
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 {
|
||||
@@ -132,8 +208,6 @@ if(isset($_FILES["plugin"]["name"]))
|
||||
}
|
||||
}
|
||||
|
||||
echo $message;
|
||||
|
||||
$plugins = array();
|
||||
$rows = array();
|
||||
|
||||
@@ -146,14 +220,20 @@ foreach(scandir($path) as $file)
|
||||
|
||||
$string = file_get_contents(BASE . 'plugins/' . $file_info[0] . '.json');
|
||||
$plugin_info = json_decode($string, true);
|
||||
$rows[] = array(
|
||||
'name' => $plugin_info['name'],
|
||||
'description' => $plugin_info['description'],
|
||||
'version' => $plugin_info['version'],
|
||||
'author' => $plugin_info['author'],
|
||||
'contact' => $plugin_info['contact'],
|
||||
'file' => $file,
|
||||
);
|
||||
if($plugin_info == false) {
|
||||
warning('Cannot load plugin info ' . $file);
|
||||
}
|
||||
else {
|
||||
$rows[] = array(
|
||||
'name' => $plugin_info['name'],
|
||||
'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(
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -18,7 +18,7 @@ function generate_search_form($autofocus = false)
|
||||
{
|
||||
global $config, $twig;
|
||||
return $twig->render('characters.form.html.twig', array(
|
||||
'link' => getPageLink('characters'),
|
||||
'link' => getLink('characters'),
|
||||
'autofocus' => $autofocus
|
||||
));
|
||||
}
|
||||
@@ -42,7 +42,7 @@ function retrieve_former_name($name)
|
||||
|
||||
$name = '';
|
||||
if(isset($_REQUEST['name']))
|
||||
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
|
||||
$name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
||||
|
||||
if(empty($name))
|
||||
{
|
||||
@@ -370,9 +370,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
||||
|
||||
// signature
|
||||
if($config['signature_enabled']) {
|
||||
$signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName());
|
||||
if($config['friendly_urls'])
|
||||
$signature_url = BASE_URL . urlencode($player->getName()) . '.png';
|
||||
$signature_url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . urlencode($player->getName()) . '.png';
|
||||
}
|
||||
|
||||
$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),
|
||||
'hidden' => $hidden,
|
||||
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
|
||||
'characters_link' => internalLayoutLink('characters'),
|
||||
'characters_link' => getLink('characters'),
|
||||
'account_players' => isset($account_players) ? $account_players : null,
|
||||
'search_form' => generate_search_form()
|
||||
));
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -73,7 +73,7 @@ if($canEdit)
|
||||
}
|
||||
|
||||
echo $twig->render('commands.form.html.twig', array(
|
||||
'link' => getPageLink('commands', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'words' => isset($words) ? $words : null,
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
$title = 'Downloads';
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -174,7 +174,7 @@ if($canEdit)
|
||||
|
||||
if(empty($action) || $action == 'edit_board') {
|
||||
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,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'name' => isset($name) ? $name : null,
|
||||
@@ -253,7 +253,7 @@ if($action == 'show_board')
|
||||
else
|
||||
$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())
|
||||
{
|
||||
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();
|
||||
if(isset($threads[0]['name']))
|
||||
$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> </td></tr>';
|
||||
$player = $ots->createObject('Player');
|
||||
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();
|
||||
$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();
|
||||
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']))
|
||||
{
|
||||
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
||||
@@ -537,7 +537,7 @@ if($action == 'edit_post')
|
||||
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();
|
||||
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())
|
||||
{
|
||||
$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();
|
||||
$section_id = isset($_REQUEST['section_id']) ? $_REQUEST['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 ($sections[$section_id]['closed'] && !Forum::isModerator())
|
||||
$errors[] = 'You cannot create topic on this board.';
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -104,6 +104,8 @@ if($action == '')
|
||||
{
|
||||
foreach($guilds_list as $guild)
|
||||
{
|
||||
$link = ($config['friendly_urls'] ? '' : '?') . 'guilds/' . $guild->getName();
|
||||
|
||||
$guild_logo = $guild->getCustomField('logo_name');
|
||||
if(empty($guild_logo) || !file_exists('images/guilds/' . $guild_logo))
|
||||
$guild_logo = "default.gif";
|
||||
@@ -117,7 +119,7 @@ if($action == '')
|
||||
<TD valign="top"><B>'.$guild->getName().'</B><BR/>'.$description.'';
|
||||
if(admin())
|
||||
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>
|
||||
</TD></TR></FORM></TABLE>
|
||||
</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_guilds">Cleanup guilds</a> - made guild, you are a leader, but you are not on players list? Cleanup guilds!';
|
||||
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>
|
||||
</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>';
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -289,42 +289,32 @@ echo '
|
||||
);
|
||||
|
||||
foreach($types as $link => $name) {
|
||||
if($config['friendly_urls'])
|
||||
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>';
|
||||
echo '<A HREF="' . getLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
||||
}
|
||||
|
||||
if($config['highscores_frags'])
|
||||
if($config['friendly_urls'])
|
||||
echo '<A HREF="' . getPageLink('highscores') . '/frags" CLASS="size_xs">Frags</A><BR>';
|
||||
else
|
||||
echo '<A HREF="' . getPageLink('highscores') . '&list=frags' . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">Frags</A><BR>';
|
||||
|
||||
echo '</TD>
|
||||
</TR>
|
||||
</TABLE><BR>';
|
||||
echo '<a href="' . getLink('highscores') . '/frags' . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">Frags</a><br/>';
|
||||
echo '</td>
|
||||
</tr>
|
||||
</table><br>';
|
||||
|
||||
if($config['highscores_vocation_box'])
|
||||
{
|
||||
echo
|
||||
'<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1>
|
||||
<TR BGCOLOR="' . $config['vdarkborder'] . '">
|
||||
<TD CLASS=whites><B>Choose a vocation</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="'.$config['lightborder'].'">
|
||||
<TD>
|
||||
<A HREF="' . getPageLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" CLASS="size_xs">[ALL]</A><BR>';
|
||||
'<table border="0" width="100%" cellpadding="4" cellspacing="1">
|
||||
<tr bgcolor="' . $config['vdarkborder'] . '">
|
||||
<td class=whites><b>Choose a vocation</b></td>
|
||||
</tr>
|
||||
<tr bgcolor="'.$config['lightborder'].'">
|
||||
<td>
|
||||
<a href="' . getLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" class="size_xs">[ALL]</A><BR>';
|
||||
for($i = 1; $i < count($config_vocations) / 2; $i++) {
|
||||
if($config['friendly_urls'])
|
||||
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 '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
|
||||
}
|
||||
echo '
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>';
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -66,11 +66,9 @@ if(isset($_GET['archive']))
|
||||
}
|
||||
else
|
||||
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>
|
||||
<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">
|
||||
</form></td></tr></tbody></table>
|
||||
</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');
|
||||
foreach($news_DB as $news)
|
||||
{
|
||||
$link = internalLayoutLink('news');
|
||||
if($config['friendly_urls'])
|
||||
$link .= '/archive/' . $news['id'];
|
||||
else
|
||||
$link .= 'archive&id=' . $news['id'];
|
||||
|
||||
$newses[] = array(
|
||||
'link' => $link,
|
||||
'link' => getLink('news') . '/archive/' . $news['id'],
|
||||
'icon_id' => $categories[$news['category']]['icon_id'],
|
||||
'title' => stripslashes($news['title']),
|
||||
'date' => $news['date']
|
||||
@@ -283,8 +275,8 @@ if(!$news_cached)
|
||||
|
||||
echo $twig->render('news.add.html.twig', array(
|
||||
'action' => $action,
|
||||
'news_link' => getPageLink(PAGE),
|
||||
'news_link_form' => getPageLink('news', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'news_link' => getLink(PAGE),
|
||||
'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'news_id' => isset($id) ? $id : null,
|
||||
'title' => isset($p_title) ? $p_title : '',
|
||||
'body' => isset($body) ? $body : '',
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
$_GET['archive'] = true;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Averatec <pervera.pl & otland.net>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
@@ -57,7 +57,7 @@ if($canEdit) {
|
||||
}
|
||||
|
||||
echo $twig->render('screenshots.form.html.twig', array(
|
||||
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
|
||||
'link' => getLink('screenshots/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'comment' => isset($comment) ? $comment : null,
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
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>
|
||||
<h3>
|
||||
<?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; ?>
|
||||
Commands: <a href="<?php echo getPageLink('commands'); ?>">Look here</a><br/>
|
||||
Team: <a href="<?php echo getPageLink('team'); ?>">Look here</a><br/>
|
||||
Commands: <a href="<?php echo getLink('commands'); ?>">Look here</a><br/>
|
||||
Team: <a href="<?php echo getLink('team'); ?>">Look here</a><br/>
|
||||
</h3>
|
||||
</center>
|
||||
|
||||
@@ -184,6 +184,6 @@ if(isset($config['lua']['experience_stages']))
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
<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>
|
||||
</ul>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @author Gesior <jerzyskalski@wp.pl>
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @package MyAAC
|
||||
* @author Slawkens <slawkens@gmail.com>
|
||||
* @copyright 2017 MyAAC
|
||||
* @version 0.4.3
|
||||
* @version 0.5.0
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
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');
|
||||
|
||||
$template = array();
|
||||
$template['link_account_manage'] = internalLayoutLink('account' . ($config['friendly_urls'] ? '/manage' : 'management'));
|
||||
$template['link_account_create'] = internalLayoutLink(($config['friendly_urls'] ? 'account/create' : 'createaccount'));
|
||||
$template['link_account_lost'] = internalLayoutLink(($config['friendly_urls'] ? 'account/lost' : 'lostaccount'));
|
||||
$template['link_account_logout'] = internalLayoutLink(($config['friendly_urls'] ? 'account' : 'accountmanagement'), 'logout');
|
||||
$template['link_account_manage'] = getLink('account/manage');
|
||||
$template['link_account_create'] = getLink('account/create');
|
||||
$template['link_account_lost'] = getLink('account/lost');
|
||||
$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');
|
||||
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(strtolower($config['forum']) == 'site')
|
||||
$template['link_forum'] = "<a href='" . internalLayoutLink('forum') . "'>";
|
||||
$template['link_forum'] = "<a href='" . getLink('forum') . "'>";
|
||||
else
|
||||
$template['link_forum'] = "<a href='" . $config['forum'] . "' target='_blank'>";
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
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/>
|
||||
<form action="?subtopic=accountmanagement&action=changecomment" method="post">
|
||||
<form action="{{ getLink('account/character/comment') }}" method="post">
|
||||
<div class="TableContainer" >
|
||||
<table class="Table5" cellpadding="0" cellspacing="0">
|
||||
<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>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -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/>
|
||||
<form action="?subtopic=accountmanagement&action=changeinfo" method=post>
|
||||
<form action="{{ getLink('account/info') }}" method=post>
|
||||
<div class="TableContainer" >
|
||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||
<div class="CaptionContainer" >
|
||||
@@ -89,7 +89,7 @@ Here you can tell other players about yourself. This information will be display
|
||||
<td>
|
||||
</form>
|
||||
<table border="0" cellspacing="0" cellpadding="0" >
|
||||
<form action="?subtopic=accountmanagement" method="post" >
|
||||
<form action="{{ getLink('account/manage') }}" method="post" >
|
||||
<tr>
|
||||
<td style="border:0px;" >
|
||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" >
|
||||
|
@@ -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/>
|
||||
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
|
||||
<form action="{{ getLink('account/email') }}" method="post">
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<div class="CaptionContainer">
|
||||
@@ -58,7 +58,7 @@ Please enter your password and the new email address. Make sure that you enter a
|
||||
</form>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
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/>
|
||||
<form action="?subtopic=accountmanagement&action=changename" method="post">
|
||||
<form action="{{ getLink('account/character/name') }}" method="post">
|
||||
<input type="hidden" name="changenamesave" value="1">
|
||||
<div class="TableContainer">
|
||||
<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>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
Please enter your current password and a new password. For your security, please enter the new password twice.<br/>
|
||||
<br/>
|
||||
<form action="?subtopic=accountmanagement&action=changepassword" method="post">
|
||||
<form action="{{ getLink('account/password') }}" method="post">
|
||||
<div class="TableContainer">
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<div class="CaptionContainer">
|
||||
@@ -66,7 +66,7 @@ Please enter your current password and a new password. For your security, please
|
||||
</form>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
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/>
|
||||
<form action="?subtopic=accountmanagement&action=changesex" method="post">
|
||||
<form action="{{ getLink('account/character/sex') }}" method="post">
|
||||
<input type="hidden" name="changesexsave" value="1"/>
|
||||
<div class="TableContainer">
|
||||
<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>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
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.
|
||||
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" >
|
||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||
<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 %}
|
||||
</table>
|
||||
</div>
|
||||
</table></div></td></tr><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<table width="100%">
|
||||
<tr align="center">
|
||||
<td>
|
||||
|
@@ -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>
|
||||
{% endif %}
|
||||
<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">
|
||||
<div class="TableContainer">
|
||||
<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>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div></div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
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"/>
|
||||
<div class="TableContainer">
|
||||
<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>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -1,61 +1,61 @@
|
||||
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/>
|
||||
<form action="?subtopic=accountmanagement&action=newreckey" method="post">
|
||||
<form action="{{ getLink('account/register/new') }}" method="post">
|
||||
<input type="hidden" name="registeraccountsave" value="1">
|
||||
<div class="TableContainer" >
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<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" >Generate recovery key</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 class="LabelV" ><span>Password:</span></td>
|
||||
<td><input type="password" name="reg_password" size="30" maxlength="29" ></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<table style="width:100%">
|
||||
<tr align="center">
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<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="Submit" alt="Submit" src="{{ template_path }}/images/buttons/_sbutton_submit.gif" ></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||
<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" >Generate recovery key</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 class="LabelV" ><span>Password:</span></td>
|
||||
<td><input type="password" name="reg_password" size="30" maxlength="29" ></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<table style="width:100%">
|
||||
<tr align="center">
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<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="Submit" alt="Submit" src="{{ template_path }}/images/buttons/_sbutton_submit.gif" ></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@@ -1,5 +1,5 @@
|
||||
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"/>
|
||||
<div class="TableContainer">
|
||||
<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>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=accountmanagement" method="post">
|
||||
<form action="{{ getLink('account/manage') }}" 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="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||
|
@@ -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/>
|
||||
<form action="?subtopic=accountmanagement" method="post" >
|
||||
<form action="{{ getLink('account/manage') }}" method="post" >
|
||||
{% if redirect is not null %}
|
||||
<input type="hidden" name="redirect" value="{{ redirect }}" />
|
||||
{% endif %}
|
||||
@@ -66,7 +66,7 @@ Please enter your account {{ account|lower }} and your password.<br/><a href="?s
|
||||
</td>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<form action="?subtopic=lostaccount" method="post">
|
||||
<form action="{{ getLink('account/lost') }}" 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>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<div class="InnerTableContainer">
|
||||
<table style="width:100%;">
|
||||
<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>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -2,7 +2,7 @@ Please select action.<br/>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<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">
|
||||
</a>
|
||||
</td>
|
||||
|
@@ -1,531 +1,115 @@
|
||||
<div class="SmallBox">
|
||||
<div class="MessageContainer">
|
||||
<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>
|
||||
<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>
|
||||
<h1>My account</h1>
|
||||
<p>Welcome to your account page, {{ account }}<br>
|
||||
You have {{ account_logged.getPremDays() }} days remaining premium account.</p>
|
||||
|
||||
{# if account dont have recovery key show hint #}
|
||||
{% if recovery_key is empty %}
|
||||
<div class="SmallBox">
|
||||
<div class="MessageContainer">
|
||||
<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>
|
||||
<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 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 align="center">
|
||||
You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!<br/>
|
||||
<form action="{{ getLink('account/register') }}" method="post">
|
||||
<input type="submit" value="Register Account" />
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
{% endif %}
|
||||
|
||||
{% if email_request %}
|
||||
<div class="SmallBox">
|
||||
<div class="MessageContainer">
|
||||
<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>
|
||||
<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 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 align="center">
|
||||
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!
|
||||
|
||||
<form action="{{ getLink('account/email') }}" method="post">
|
||||
<input type="submit" value="Edit" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/>
|
||||
{% endif %}
|
||||
<a name="General+Information" ></a>
|
||||
<div class="TopButtonContainer">
|
||||
<div class="TopButton">
|
||||
<a href="#top">
|
||||
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableContainer">
|
||||
<table class="Table3" cellpadding="0" cellspacing="0">
|
||||
<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" >General Information</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 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>
|
||||
<h2>General Information</h2>
|
||||
<table width="100%">
|
||||
<tr style="background-color: {{ config.lightborder }};" >
|
||||
<td>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>Email Address:</td>
|
||||
<td style="width:90%;" >{{ account_email ~ email_change}}</td>
|
||||
</tr>
|
||||
<tr style="background-color: {{ config.lightborder }};" >
|
||||
<td>Created:</td>
|
||||
<td>{{ account_created|date("j F Y, G:i:s") }}</td>
|
||||
</tr>
|
||||
<tr style="background-color: {{ config.darkborder }};" >
|
||||
<td>Last Login:</td>
|
||||
<td>{{ "now"|date("j F Y, G:i:s") }}</td>
|
||||
</tr>
|
||||
{% autoescape false %}
|
||||
<tr style="background-color: {{ config.lightborder }};" >
|
||||
<td>Account Status:</td>
|
||||
<td>{{ account_status }}</td>
|
||||
</tr>
|
||||
<tr style="background-color: {{ config.darkborder }};" >
|
||||
<td>Registered:</td>
|
||||
<td>{{ account_registered }}</td>
|
||||
</tr>
|
||||
{% endautoescape %}
|
||||
</table>
|
||||
<br/>
|
||||
<a name="Public+Information"></a>
|
||||
<div class="TopButtonContainer">
|
||||
<div class="TopButton">
|
||||
<a href="#top">
|
||||
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableContainer">
|
||||
<table class="Table5" cellpadding="0" cellspacing="0">
|
||||
<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" >Public Information</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>
|
||||
<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>
|
||||
<h2>Action Log</h2>
|
||||
<table>
|
||||
<tr bgcolor="{{ config.vdarkborder }}" class="white">
|
||||
<th>Action</th><th>Date</th><th>IP</th>
|
||||
</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>
|
||||
<br/>
|
||||
<a name="Account+Logs" ></a>
|
||||
<div class="TopButtonContainer">
|
||||
<div class="TopButton">
|
||||
<a href="#top">
|
||||
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableContainer">
|
||||
<table class="Table5" cellpadding="0" cellspacing="0">
|
||||
<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>
|
||||
<h2>Character list: {{ players|length }} characters.</h2>
|
||||
<table>
|
||||
<tr bgcolor="{{ config.vdarkborder }}" class="white">
|
||||
<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>
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for player in players %}
|
||||
{% set i = i + 1 %}
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<br/>
|
||||
<a name="Characters" ></a>
|
||||
<div class="TopButtonContainer">
|
||||
<div class="TopButton" >
|
||||
<a href="#top">
|
||||
<img style="border:0px;" src="{{ template_path }}/images/content/back-to-top.gif" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="TableContainer">
|
||||
<table class="Table5" cellpadding="0" cellspacing="0">
|
||||
<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">Characters</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:65%">Name</td>
|
||||
<td style="width:15%">Level</td>
|
||||
<td style="width:7%">Status</td>
|
||||
<td style="width:5%"> </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/>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="{{ getLink('account/character/create') }}" method="post" >
|
||||
<input type="Submit" name="Create Character" value="Create Character" />
|
||||
</form>
|
||||
</td>
|
||||
{% if config.account_change_character_name %}
|
||||
<td>
|
||||
<form action="{{ getLink('account/character/name') }}" method="post" >
|
||||
<input type="Submit" name="Change Name" value="Change Name" />
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if config.account_change_character_sex %}
|
||||
<td>
|
||||
<form action="{{ getLink('account/character/sex') }}" method="post" >
|
||||
<input type="Submit" name="Change Sex" value="Change Sex" />
|
||||
</form>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<form action="{{ getLink('account/character/delete') }}" method="post">
|
||||
<input type="Submit" name="Delete Character" value="Delete Character" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@@ -28,9 +28,9 @@
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
// Automatic redirect
|
||||
setTimeout ("automaticRedirect()", 1000);
|
||||
function automaticRedirect() {
|
||||
window.location = "{{ redirect }}";
|
||||
}
|
||||
// Automatic redirect
|
||||
setTimeout ("automaticRedirect()", 1000);
|
||||
function automaticRedirect() {
|
||||
window.location = "{{ redirect }}";
|
||||
}
|
||||
</script>
|
@@ -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">
|
||||
tinyMCE.init({
|
||||
mode : "textareas",
|
||||
theme : "advanced",
|
||||
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
|
||||
|
||||
relative_urls : false,
|
||||
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,
|
||||
});
|
||||
tinymce.init({
|
||||
selector : "textarea",
|
||||
theme : "modern",
|
||||
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',
|
||||
image_advtab: true,
|
||||
relative_urls : false,
|
||||
remove_script_host : false,
|
||||
document_base_url : "{{ constant('BASE_URL') }}"
|
||||
});
|
||||
</script>
|
||||
<table width="800" cellspacing="1" cellpadding="2" border="0" align="center">
|
||||
<form method="post">
|
||||
|
107
system/templates/admin.pages.form.html.twig
Normal file
107
system/templates/admin.pages.form.html.twig
Normal 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>
|
27
system/templates/admin.pages.html.twig
Normal file
27
system/templates/admin.pages.html.twig
Normal 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>
|
@@ -6,14 +6,16 @@
|
||||
<th>Version</th>
|
||||
<th>Author</th>
|
||||
<th>Contact</th>
|
||||
<th>Options</th>
|
||||
</tr>
|
||||
{% for plugin in plugins %}
|
||||
<tr>
|
||||
<td><div title="{{ plugin.description }}">{{ plugin.name }}</div></td>
|
||||
<td>{{ plugin.file }}</td>
|
||||
<td>{{ plugin.file }}.json</td>
|
||||
<td>{{ plugin.version }}</td>
|
||||
<td>{{ plugin.author }}</td>
|
||||
<td>{{ plugin.contact }}</td>
|
||||
<td><a href="?p=plugins&uninstall={{ plugin.file }}">Uninstall</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
@@ -2,6 +2,7 @@
|
||||
<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>
|
||||
{{ hook(constant('HOOK_CHARACTERS_BEFORE_INFORMATIONS')) }}
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
{% 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>
|
||||
@@ -139,6 +140,7 @@
|
||||
<td>{% if account.isPremium() %}Premium Account{% else %}Free Account{% endif %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{ hook(constant('HOOK_CHARACTERS_AFTER_INFORMATIONS')) }}
|
||||
<br/>
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
@@ -217,21 +219,23 @@
|
||||
{{ deaths|raw }}
|
||||
{{ frags|raw }}
|
||||
|
||||
{{ hook(constant('HOOK_CHARACTERS_BEFORE_SIGNATURE')) }}
|
||||
|
||||
{% if config.signature_enabled %}
|
||||
<script type="text/javascript">
|
||||
function showSignLinks()
|
||||
{
|
||||
if(document.getElementById('signLinks').style.display == "none")
|
||||
{
|
||||
document.getElementById('signLinks').style.display = "inline";
|
||||
document.getElementById('signText').innerHTML = "Hide links";
|
||||
}
|
||||
function showSignLinks()
|
||||
{
|
||||
if(document.getElementById('signLinks').style.display == "none")
|
||||
{
|
||||
document.getElementById('signLinks').style.display = "inline";
|
||||
document.getElementById('signText').innerHTML = "Hide links";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('signLinks').style.display = "none";
|
||||
document.getElementById('signText').innerHTML = "Show links";
|
||||
}
|
||||
}
|
||||
{
|
||||
document.getElementById('signLinks').style.display = "none";
|
||||
document.getElementById('signText').innerHTML = "Show links";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<br/>
|
||||
<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>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{{ hook(constant('HOOK_CHARACTERS_AFTER_SIGNATURE')) }}
|
||||
{% if hidden != 1 %}
|
||||
{% set rows = 0 %}
|
||||
<br/><br/>
|
||||
@@ -299,6 +303,7 @@
|
||||
<td>{{ account.getCustomField("created")|date("j F Y, g:i a") ~bannedUntil }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{ hook(constant('HOOK_CHARACTERS_AFTER_ACCOUNT')) }}
|
||||
<br/><br/>
|
||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
@@ -342,6 +347,7 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{{ hook(constant('HOOK_CHARACTERS_AFTER_CHARACTERS')) }}
|
||||
</td>
|
||||
<td>
|
||||
<img src="{{ template_path }}/images/general/blank.gif" width="10" height="1" border="0">
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<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="subtopic" value="forum" />
|
||||
<input type="hidden" name="save" value="save" />
|
||||
|
@@ -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">
|
||||
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,
|
||||
tinymce.init({
|
||||
selector : "textarea",
|
||||
theme : "modern",
|
||||
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',
|
||||
image_advtab: true
|
||||
});
|
||||
</script>
|
||||
{% if action != 'edit' %}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user