mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 12:33:35 +02:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
35b0795b51 | ||
![]() |
04a7796665 | ||
![]() |
755deae717 | ||
![]() |
6d66dc9043 | ||
![]() |
bbd9cd2101 | ||
![]() |
b6ccde075d | ||
![]() |
e94b9006e6 | ||
![]() |
e9c8159bf3 | ||
![]() |
919f69ef46 | ||
![]() |
4ac2fe27d5 | ||
![]() |
be2daeb4ab | ||
![]() |
7b96ce9b8c | ||
![]() |
801188f957 | ||
![]() |
c546a46847 |
14
CHANGELOG
14
CHANGELOG
@@ -1,3 +1,17 @@
|
|||||||
|
[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
|
||||||
|
- fixed showing of character deaths and frags
|
||||||
|
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466303
|
||||||
|
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466313
|
||||||
|
- fixed rook sample, which will now have level 1, 150 health, 0 mana, and 400 cap.
|
||||||
|
- fixed samples being deleted by tfs 1.0+ cause of 'deletion' field set to 1
|
||||||
|
- pages loaded from database have higher priority than normal .php pages, so they will be loaded first if they exist
|
||||||
|
- moved many pages to twig templates
|
||||||
|
- change download client links from clients.halfaway.net to tibia-clients.com
|
||||||
|
- added bugtracker to kathrine template
|
||||||
|
- added CREDITS file
|
||||||
|
|
||||||
[0.4.2 - 14.09.2017]
|
[0.4.2 - 14.09.2017]
|
||||||
- updated version number
|
- updated version number
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@ require(SYSTEM . 'login.php');
|
|||||||
require(ADMIN . 'includes/functions.php');
|
require(ADMIN . 'includes/functions.php');
|
||||||
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
|
$twig->addGlobal('status', $status);
|
||||||
|
|
||||||
// if we're not logged in - show login box
|
// if we're not logged in - show login box
|
||||||
if(!$logged || !admin()) {
|
if(!$logged || !admin()) {
|
||||||
|
@@ -21,13 +21,13 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
define('MYAAC', true);
|
define('MYAAC', true);
|
||||||
define('MYAAC_VERSION', '0.4.2');
|
define('MYAAC_VERSION', '0.4.3');
|
||||||
define('DATABASE_VERSION', 9);
|
define('DATABASE_VERSION', 9);
|
||||||
define('TABLE_PREFIX', 'myaac_');
|
define('TABLE_PREFIX', 'myaac_');
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
|
11
config.php
11
config.php
@@ -13,7 +13,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ $config = array(
|
|||||||
|
|
||||||
// gesior backward support (templates & pages)
|
// gesior backward support (templates & pages)
|
||||||
// allows using gesior templates and pages with myaac
|
// allows using gesior templates and pages with myaac
|
||||||
|
// might bring some performance when disabled
|
||||||
'backward_support' => true,
|
'backward_support' => true,
|
||||||
|
|
||||||
// head options (html)
|
// head options (html)
|
||||||
@@ -65,7 +66,7 @@ $config = array(
|
|||||||
'database_password' => '',
|
'database_password' => '',
|
||||||
'database_name' => '',
|
'database_name' => '',
|
||||||
|
|
||||||
// multiworld system
|
// multiworld system (only TFS 0.3)
|
||||||
'multiworld' => false, // use multiworld system?
|
'multiworld' => false, // use multiworld system?
|
||||||
'worlds' => array( // list of worlds
|
'worlds' => array( // list of worlds
|
||||||
//'1' => 'Your World Name',
|
//'1' => 'Your World Name',
|
||||||
@@ -201,10 +202,10 @@ $config = array(
|
|||||||
),
|
),
|
||||||
|
|
||||||
// news page
|
// news page
|
||||||
'news_limit' => 5, // limit of news on latest news page
|
'news_limit' => 5, // limit of news on the latest news page
|
||||||
'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable)
|
'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable)
|
||||||
'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this
|
'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this
|
||||||
'news_author' => true,
|
'news_author' => true, // show author of the news
|
||||||
|
|
||||||
// gifts/shop system
|
// gifts/shop system
|
||||||
'gifts_system' => false,
|
'gifts_system' => false,
|
||||||
@@ -231,7 +232,7 @@ $config = array(
|
|||||||
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
||||||
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
|
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
|
||||||
'experiencetable_rows' => 100, // till how many levels in one column
|
'experiencetable_rows' => 100, // till how many levels in one column
|
||||||
'date_timezone' => 'Europe/Berlin',
|
'date_timezone' => 'Europe/Berlin', // more info at http://php.net/manual/en/timezones.php
|
||||||
|
|
||||||
'monsters' => array(),
|
'monsters' => array(),
|
||||||
'npc' => array()
|
'npc' => array()
|
||||||
|
BIN
images/items/empty.gif
Normal file
BIN
images/items/empty.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
94
index.php
94
index.php
@@ -21,7 +21,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -56,6 +56,7 @@ require_once(SYSTEM . 'status.php');
|
|||||||
require_once(SYSTEM . 'template.php');
|
require_once(SYSTEM . 'template.php');
|
||||||
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
|
$twig->addGlobal('status', $status);
|
||||||
|
|
||||||
// database migrations
|
// database migrations
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
@@ -170,58 +171,59 @@ if($load_it)
|
|||||||
require(SYSTEM . 'compat_pages.php');
|
require(SYSTEM . 'compat_pages.php');
|
||||||
|
|
||||||
$ignore = false;
|
$ignore = false;
|
||||||
$file = SYSTEM . 'pages/' . $page . '.php';
|
|
||||||
if(!@file_exists($file))
|
$logged_access = 0;
|
||||||
|
if($logged && $account_logged && $account_logged->isLoaded()) {
|
||||||
|
$logged_access = $account_logged->getAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
$query =
|
||||||
|
$db->query(
|
||||||
|
'SELECT `title`, `body`, `php`' .
|
||||||
|
' FROM `' . TABLE_PREFIX . 'pages`' .
|
||||||
|
' WHERE `name` LIKE ' . $db->quote($page) . ' AND `hidden` != 1 AND `access` <= ' . $db->quote($logged_access));
|
||||||
|
if($query->rowCount() > 0) // found page
|
||||||
{
|
{
|
||||||
$logged_access = 0;
|
$ignore = true;
|
||||||
if($logged && $account_logged && $account_logged->isLoaded()) {
|
$query = $query->fetch();
|
||||||
$logged_access = $account_logged->getAccess();
|
$title = $query['title'];
|
||||||
}
|
|
||||||
|
|
||||||
$query =
|
if($query['php'] == '1') // execute it as php code
|
||||||
$db->query(
|
|
||||||
'SELECT `title`, `body`, `php`' .
|
|
||||||
' FROM `' . TABLE_PREFIX . 'pages`' .
|
|
||||||
' WHERE `name` LIKE ' . $db->quote($page) . ' AND `hidden` != 1 AND `access` <= ' . $db->quote($logged_access));
|
|
||||||
if($query->rowCount() > 0) // found page
|
|
||||||
{
|
{
|
||||||
$ignore = true;
|
$tmp = substr($query['body'], 0, 10);
|
||||||
$query = $query->fetch();
|
if(($pos = strpos($tmp, '<?php')) !== false) {
|
||||||
$title = $query['title'];
|
$tmp = preg_replace('/<\?php/', '', $query['body'], 1);
|
||||||
|
}
|
||||||
if($query['php'] == '1') // execute it as php code
|
else if(($pos = strpos($tmp, '<?')) !== false) {
|
||||||
{
|
$tmp = preg_replace('/<\?/', '', $query['body'], 1);
|
||||||
$tmp = substr($query['body'], 0, 10);
|
|
||||||
if(($pos = strpos($tmp, '<?php')) !== false) {
|
|
||||||
$tmp = preg_replace('/<\?php/', '', $query['body'], 1);
|
|
||||||
}
|
|
||||||
else if(($pos = strpos($tmp, '<?')) !== false) {
|
|
||||||
$tmp = preg_replace('/<\?/', '', $query['body'], 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$tmp = $query['body'];
|
|
||||||
|
|
||||||
$php_errors = array();
|
|
||||||
function error_handler($errno, $errstr) {
|
|
||||||
global $php_errors;
|
|
||||||
$php_errors[] = array('errno' => $errno, 'errstr' => $errstr);
|
|
||||||
}
|
|
||||||
set_error_handler('error_handler');
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
eval($tmp);
|
|
||||||
$content .= ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
|
|
||||||
restore_error_handler();
|
|
||||||
if(isset($php_errors[0]) && superAdmin()) {
|
|
||||||
var_dump($php_errors);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$content .= $query['body']; // plain html
|
$tmp = $query['body'];
|
||||||
|
|
||||||
|
$php_errors = array();
|
||||||
|
function error_handler($errno, $errstr) {
|
||||||
|
global $php_errors;
|
||||||
|
$php_errors[] = array('errno' => $errno, 'errstr' => $errstr);
|
||||||
|
}
|
||||||
|
set_error_handler('error_handler');
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
eval($tmp);
|
||||||
|
$content .= ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
restore_error_handler();
|
||||||
|
if(isset($php_errors[0]) && superAdmin()) {
|
||||||
|
var_dump($php_errors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
$content .= $query['body']; // plain html
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$file = SYSTEM . 'pages/' . $page . '.php';
|
||||||
|
if(!@file_exists($file))
|
||||||
{
|
{
|
||||||
$page = '404';
|
$page = '404';
|
||||||
$file = SYSTEM . 'pages/404.php';
|
$file = SYSTEM . 'pages/404.php';
|
||||||
|
@@ -230,9 +230,9 @@ if(!$error) {
|
|||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '$config[\'client_download\'] = \'http://clients.halfaway.net/windows.php?tibia=\'. $config[\'client\'];';
|
$content .= '$config[\'client_download\'] = \'http://tibia-clients.com/clients/download/\'. $config[\'client\'] . \'/exe/windows\';';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
$content .= '$config[\'client_download_linux\'] = \'http://clients.halfaway.net/linux.php?tibia=\'. $config[\'client\'];';
|
$content .= '$config[\'client_download_linux\'] = \'http://tibia-clients.com/clients/download/\'. $config[\'client\'] . \'/tar/linux\';';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
$content .= '// place for your configuration directives, so you can later easily update myaac';
|
$content .= '// place for your configuration directives, so you can later easily update myaac';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
|
@@ -146,31 +146,31 @@ INSERT INTO `myaac_news` (`id`, `type`, `date`, `category`, `title`, `body`, `pl
|
|||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Rook Sample', 1, 1, 8, 0, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179613, 2453925456, 1, 1255179614, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
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, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, 1, 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
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, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Druid Sample', 1, 1, 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
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, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Paladin Sample', 1, 1, 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
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, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Knight Sample', 1, 1, 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
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, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -133,9 +133,7 @@ function getGuildLink($name, $generate = true)
|
|||||||
if(is_numeric($name))
|
if(is_numeric($name))
|
||||||
{
|
{
|
||||||
$guild = $db->query(
|
$guild = $db->query(
|
||||||
'SELECT ' . $db->fieldName('name') .
|
'SELECT `name` FROM `guilds` WHERE `id` = ' . (int)$name);
|
||||||
' FROM ' . $db->tableName('guilds') .
|
|
||||||
' WHERE ' . $db->fieldName('id') . ' = ' . (int)$name);
|
|
||||||
if($guild->rowCount() > 0)
|
if($guild->rowCount() > 0)
|
||||||
$name = $guild->fetchColumn();
|
$name = $guild->fetchColumn();
|
||||||
}
|
}
|
||||||
@@ -802,11 +800,7 @@ function template_header($is_admin = false)
|
|||||||
Please turn it on, or be aware that some features on this website will not work correctly.</div>
|
Please turn it on, or be aware that some features on this website will not work correctly.</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
';
|
';
|
||||||
if(admin())
|
|
||||||
$ret .= '<!--script type="text/javascript" src="' . BASE_URL . 'tools/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript" src="' . BASE_URL . 'tools/jquery.qtip.js" ></script>
|
|
||||||
<script type="text/javascript" src="' . BASE_URL . 'tools/admin.js"></script-->
|
|
||||||
';
|
|
||||||
if($config['recaptcha_enabled'])
|
if($config['recaptcha_enabled'])
|
||||||
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
|
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
|
||||||
return $ret;
|
return $ret;
|
||||||
@@ -817,13 +811,14 @@ function template_header($is_admin = false)
|
|||||||
*/
|
*/
|
||||||
function template_footer()
|
function template_footer()
|
||||||
{
|
{
|
||||||
global $visitors, $config, $views_counter;
|
global $config, $views_counter;
|
||||||
$ret = '';
|
$ret = '';
|
||||||
if(admin())
|
if(admin())
|
||||||
$ret .= generateLink(ADMIN_URL, 'Admin Panel', true);
|
$ret .= generateLink(ADMIN_URL, 'Admin Panel', true);
|
||||||
|
|
||||||
if($config['visitors_counter'])
|
if($config['visitors_counter'])
|
||||||
{
|
{
|
||||||
|
global $visitors;
|
||||||
$amount = $visitors->getAmountVisitors();
|
$amount = $visitors->getAmountVisitors();
|
||||||
$ret .= '<br/>Currently there ' . ($amount > 1 ? 'are' : 'is') . ' ' . $amount . ' visitor' . ($amount > 1 ? 's' : '') . '.';
|
$ret .= '<br/>Currently there ' . ($amount > 1 ? 'are' : 'is') . ' ' . $amount . ' visitor' . ($amount > 1 ? 's' : '') . '.';
|
||||||
}
|
}
|
||||||
@@ -843,21 +838,11 @@ function template_footer()
|
|||||||
|
|
||||||
function template_ga_code()
|
function template_ga_code()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config, $twig;
|
||||||
if(!isset($config['google_analytics_id'][0]))
|
if(!isset($config['google_analytics_id'][0]))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
return "
|
return $twig->render('google_analytics.html.twig');
|
||||||
<script>
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '" . $config['google_analytics_id'] . "', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
|
|
||||||
</script>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function template_form()
|
function template_form()
|
||||||
@@ -899,6 +884,8 @@ function getCreatureName($killer, $showStatus = false, $extendedInfo = false)
|
|||||||
{
|
{
|
||||||
global $vowels, $ots, $config;
|
global $vowels, $ots, $config;
|
||||||
$str = "";
|
$str = "";
|
||||||
|
$players_rows = '';
|
||||||
|
|
||||||
if(is_numeric($killer))
|
if(is_numeric($killer))
|
||||||
{
|
{
|
||||||
$player = $ots->createObject('Player');
|
$player = $ots->createObject('Player');
|
||||||
@@ -1104,12 +1091,9 @@ function get_templates()
|
|||||||
function getWorldName($id)
|
function getWorldName($id)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
foreach($config['worlds'] as $_id => $details)
|
if(isset($config['worlds'][$id]))
|
||||||
{
|
return $config['worlds'][$id];
|
||||||
if($id == $_id)
|
|
||||||
return $details['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $config['lua']['serverName'];
|
return $config['lua']['serverName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1193,21 +1177,53 @@ function load_config_lua($filename)
|
|||||||
if(!@file_exists($config_file))
|
if(!@file_exists($config_file))
|
||||||
die('ERROR: Cannot find ' . $filename . ' file.');
|
die('ERROR: Cannot find ' . $filename . ' file.');
|
||||||
|
|
||||||
$tempFile = @tempnam('/tmp', 'lua');
|
$result = array();
|
||||||
$file = @fopen($tempFile, 'w');
|
$config_string = file_get_contents($filename);
|
||||||
if(!$file) {
|
$config_string = str_replace("\r\n", "\n", $config_string);
|
||||||
log_append('error.log', '[functions.php] Cannot load config.lua file. Error: ' . print_r(error_get_last(), true));
|
$config_string = str_replace("\r", "\n", $config_string);
|
||||||
die('Cannot load server config! More info in system/logs/error.log file.');
|
$lines = explode("\n", $config_string);
|
||||||
}
|
if(count($lines) > 0)
|
||||||
|
foreach($lines as $ln => $line)
|
||||||
|
{
|
||||||
|
$tmp_exp = explode('=', $line, 2);
|
||||||
|
if(strpos($line, 'dofile') !== false)
|
||||||
|
{
|
||||||
|
$delimiter = '"';
|
||||||
|
if(strpos($line, $delimiter) === false)
|
||||||
|
$delimiter = "'";
|
||||||
|
|
||||||
|
$tmp = explode($delimiter, $line);
|
||||||
|
$result = array_merge($result, load_config_lua($config['server_path'] . $tmp[1]));
|
||||||
|
}
|
||||||
|
else if(count($tmp_exp) >= 2)
|
||||||
|
{
|
||||||
|
$key = trim($tmp_exp[0]);
|
||||||
|
if(substr($key, 0, 2) != '--')
|
||||||
|
{
|
||||||
|
$value = trim($tmp_exp[1]);
|
||||||
|
if(is_numeric($value))
|
||||||
|
$result[$key] = (float) $value;
|
||||||
|
elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"')))
|
||||||
|
$result[$key] = (string) substr(substr($value, 1), 0, -1);
|
||||||
|
elseif(in_array($value, array('true', 'false')))
|
||||||
|
$result[$key] = ($value == 'true') ? true : false;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach($result as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull
|
||||||
|
$value = str_replace($tmp_key, $tmp_value, $value);
|
||||||
|
$ret = @eval("return $value;");
|
||||||
|
if((string) $ret == '') // = parser error
|
||||||
|
{
|
||||||
|
die('ERROR: Loading config.lua file. Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]');
|
||||||
|
}
|
||||||
|
$result[$key] = $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: new parser that will also load dofile() includes
|
$result = array_merge($result, isset($config['lua']) ? $config['lua'] : array());
|
||||||
|
|
||||||
// strip lua comments to prevent parsing errors
|
|
||||||
fwrite($file, preg_replace('/(-)(-)(.*)/', '', file_get_contents($config_file)));
|
|
||||||
fclose($file);
|
|
||||||
|
|
||||||
$result = array_merge(parse_ini_file($tempFile, true), isset($config['lua']) ? $config['lua'] : array());
|
|
||||||
@unlink($tempFile);
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -46,7 +46,7 @@ class Hook
|
|||||||
$ret = $tmp($params);
|
$ret = $tmp($params);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
global $db, $config, $template_path, $ots;
|
global $db, $config, $template_path, $ots, $content;
|
||||||
if(file_exists(BASE . $this->_file)) {
|
if(file_exists(BASE . $this->_file)) {
|
||||||
require(BASE . $this->_file);
|
require(BASE . $this->_file);
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -33,7 +33,8 @@ Twig_Autoloader::register();
|
|||||||
|
|
||||||
$twig_loader = new Twig_Loader_Filesystem(SYSTEM . 'templates');
|
$twig_loader = new Twig_Loader_Filesystem(SYSTEM . 'templates');
|
||||||
$twig = new Twig_Environment($twig_loader, array(
|
$twig = new Twig_Environment($twig_loader, array(
|
||||||
'cache' => CACHE . 'twig/'
|
'cache' => CACHE . 'twig/',
|
||||||
|
'auto_reload' => true
|
||||||
));
|
));
|
||||||
|
|
||||||
$function = new Twig_SimpleFunction('getStyle', function ($i) {
|
$function = new Twig_SimpleFunction('getStyle', function ($i) {
|
||||||
@@ -87,10 +88,12 @@ unset($tmp);
|
|||||||
if(isset($config['lua']['servername']))
|
if(isset($config['lua']['servername']))
|
||||||
$config['lua']['serverName'] = $config['lua']['servername'];
|
$config['lua']['serverName'] = $config['lua']['servername'];
|
||||||
|
|
||||||
|
|
||||||
if(isset($config['lua']['houserentperiod']))
|
if(isset($config['lua']['houserentperiod']))
|
||||||
$config['lua']['houseRentPeriod'] = $config['lua']['houserentperiod'];
|
$config['lua']['houseRentPeriod'] = $config['lua']['houserentperiod'];
|
||||||
|
|
||||||
|
if($config['item_images_url'][strlen($config['item_images_url']) - 1] != '/')
|
||||||
|
$config['item_images_url'] .= '/';
|
||||||
|
|
||||||
// localize data/ directory
|
// localize data/ directory
|
||||||
if(isset($config['lua']['dataDirectory'][0]))
|
if(isset($config['lua']['dataDirectory'][0]))
|
||||||
{
|
{
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -149,7 +149,7 @@ function getBanReason($reasonId)
|
|||||||
|
|
||||||
function getBanType($typeId)
|
function getBanType($typeId)
|
||||||
{
|
{
|
||||||
switch($reasonId)
|
switch($typeId)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return "IP Banishment";
|
return "IP Banishment";
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -40,7 +40,7 @@ $showed = $post = $reply = false;
|
|||||||
if(!empty($_REQUEST['reply']))
|
if(!empty($_REQUEST['reply']))
|
||||||
$reply=true;
|
$reply=true;
|
||||||
|
|
||||||
$account = $ots->createObject('Account');
|
$account = new OTS_Account();
|
||||||
$account->load($_REQUEST['acc']);
|
$account->load($_REQUEST['acc']);
|
||||||
$account->isLoaded();
|
$account->isLoaded();
|
||||||
$players = $account->getPlayersList();
|
$players = $account->getPlayersList();
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -19,8 +19,6 @@ function generate_search_form($autofocus = false)
|
|||||||
global $config, $twig;
|
global $config, $twig;
|
||||||
return $twig->render('characters.form.html.twig', array(
|
return $twig->render('characters.form.html.twig', array(
|
||||||
'link' => getPageLink('characters'),
|
'link' => getPageLink('characters'),
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'autofocus' => $autofocus
|
'autofocus' => $autofocus
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -58,7 +56,7 @@ $name = str_replace('/', '', $name);
|
|||||||
|
|
||||||
$oldName = '';
|
$oldName = '';
|
||||||
|
|
||||||
$player = $ots->createObject('Player');
|
$player = new OTS_Player();
|
||||||
$player->find($name);
|
$player->find($name);
|
||||||
if(!$player->isLoaded())
|
if(!$player->isLoaded())
|
||||||
{
|
{
|
||||||
@@ -163,8 +161,10 @@ if($player->isLoaded() && !$player->isDeleted())
|
|||||||
$skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
|
$skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$skills = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
|
$skills_db = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
|
||||||
|
$skills = $skills_db->fetchAll();
|
||||||
|
}
|
||||||
|
|
||||||
foreach($skills as &$skill) {
|
foreach($skills as &$skill) {
|
||||||
$skill['name'] = getSkillName($skill['skillid']);
|
$skill['name'] = getSkillName($skill['skillid']);
|
||||||
@@ -285,7 +285,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($number_of_rows > 0)
|
if($number_of_rows > 0)
|
||||||
$dead_add_content += '</table>';
|
$dead_add_content .= '</table>';
|
||||||
else
|
else
|
||||||
$dead_add_content = '';
|
$dead_add_content = '';
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($number_of_rows > 0)
|
if($number_of_rows > 0)
|
||||||
$dead_add_content += '</table>';
|
$dead_add_content .= '</table>';
|
||||||
else
|
else
|
||||||
$dead_add_content = '';
|
$dead_add_content = '';
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($frags > 0)
|
if($frags > 0)
|
||||||
$frag_add_content += '</table>';
|
$frag_add_content .= '</table>';
|
||||||
else
|
else
|
||||||
$frag_add_content = '';
|
$frag_add_content = '';
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -101,7 +101,7 @@ if($step == 'save')
|
|||||||
{
|
{
|
||||||
if($config['account_mail_unique'])
|
if($config['account_mail_unique'])
|
||||||
{
|
{
|
||||||
$test_email_account = $ots->createObject('Account');
|
$test_email_account = new OTS_Account();
|
||||||
$test_email_account->findByEmail($email);
|
$test_email_account->findByEmail($email);
|
||||||
if($test_email_account->isLoaded())
|
if($test_email_account->isLoaded())
|
||||||
$errors['email'] = 'Account with this e-mail address already exist.';
|
$errors['email'] = 'Account with this e-mail address already exist.';
|
||||||
@@ -126,7 +126,7 @@ if($step == 'save')
|
|||||||
|
|
||||||
if(empty($errors))
|
if(empty($errors))
|
||||||
{
|
{
|
||||||
$new_account = $ots->createObject('Account');
|
$new_account = new OTS_Account();
|
||||||
if(USE_ACCOUNT_NAME)
|
if(USE_ACCOUNT_NAME)
|
||||||
$new_account->create($account_name);
|
$new_account->create($account_name);
|
||||||
else
|
else
|
||||||
@@ -172,44 +172,21 @@ if($step == 'save')
|
|||||||
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
|
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
|
||||||
$server_name = $config['lua']['serverName'];
|
$server_name = $config['lua']['serverName'];
|
||||||
|
|
||||||
$body_plain = "Hello!
|
$body_plain = $twig->render('mail.account.verify.plain.html.twig', array(
|
||||||
|
'account' => $tmp_account,
|
||||||
|
'verify_url' => $verify_url
|
||||||
|
));
|
||||||
|
|
||||||
Thank you for registering on $server_name!
|
$body_html = $twig->render('mail.account.verify.html.twig', array(
|
||||||
|
'account' => $tmp_account,
|
||||||
Here are the details of your account:
|
'verify_url' => generateLink($verify_url, $verify_url, true)
|
||||||
Account" . (USE_ACCOUNT_NAME ? ' Name' : '') . ": $tmp_account
|
));
|
||||||
Password: ************ (hidden for security reasons)
|
|
||||||
|
|
||||||
To verify your email address please click the link below:
|
|
||||||
$verify_url
|
|
||||||
If you haven't registered on $server_name please ignore this email.";
|
|
||||||
|
|
||||||
$body_html = 'Hello!<br/>
|
|
||||||
<br/>
|
|
||||||
Thank you for registering on ' . $config['lua']['serverName'] . '!<br/>
|
|
||||||
<br/>
|
|
||||||
Here are the details of your account:<br/>
|
|
||||||
Account' . (USE_ACCOUNT_NAME ? ' Name' : '') . ': ' . $tmp_account . '<br/>
|
|
||||||
Password: ************ (hidden for security reasons)<br/>
|
|
||||||
<br/>
|
|
||||||
To verify your email address please click the link below:<br/>
|
|
||||||
' . generateLink($verify_url, $verify_url, true) . '<br/>
|
|
||||||
If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore this email.';
|
|
||||||
|
|
||||||
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
|
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
|
||||||
{
|
{
|
||||||
?>
|
echo $twig->render('account.created.verify.html.twig', array(
|
||||||
Your account has been created.<br/><br/>
|
'account' => $tmp_account
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
));
|
||||||
<tr><td bgcolor="<?php echo $config['vdarkborder']; ?>" class="white"><b>Account Created</b></td></tr>
|
|
||||||
<tr><td bgcolor="<?php echo $config['darkborder']; ?>">
|
|
||||||
<table border="0" cellpadding="1"><tr><td>
|
|
||||||
<br/>Your account<?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> is <b><?php echo $tmp_account; ?></b>.
|
|
||||||
|
|
||||||
You will need the account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and your password to play on <?php echo $config['lua']['serverName']; ?>.
|
|
||||||
Please keep your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and password in a safe place and
|
|
||||||
never give your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> or password to anybody.<br/><br/>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -219,25 +196,15 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo 'Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>';
|
echo $twig->render('account.created.html.twig', array(
|
||||||
echo '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
|
'account' => $tmp_account
|
||||||
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Account Created</B></TD></TR>
|
));
|
||||||
<TR><TD BGCOLOR="'.$config['darkborder'].'">
|
|
||||||
<TABLE BORDER=0 CELLPADDING=1><TR><TD>
|
|
||||||
<br/>Your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' is <b>'.$tmp_account.'</b><br/>You will need the account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and your password to play on '.$config['lua']['serverName'].'.
|
|
||||||
Please keep your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and password in a safe place and
|
|
||||||
never give your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' or password to anybody.<br/><br/>';
|
|
||||||
|
|
||||||
if($config['mail_enabled'] && $config['account_welcome_mail'])
|
if($config['mail_enabled'] && $config['account_welcome_mail'])
|
||||||
{
|
{
|
||||||
$mailBody = '
|
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
|
||||||
<h3>Dear player,</h3>
|
'account' => $tmp_account
|
||||||
<p>Thanks for your registration at <a href=" ' . BASE_URL . '"><b>' . $config['lua']['serverName'] . '</b></a></p>
|
));
|
||||||
<br/><br/>
|
|
||||||
Your login details:
|
|
||||||
<p>Account' . (USE_ACCOUNT_NAME ? ' name' : '') . ': <b>' . $tmp_account . '</b></p>
|
|
||||||
<p>Password: <b>' . str_repeat('*', strlen(trim($password))) . '</b> (hidden for security reasons)</p>
|
|
||||||
<p>Kind Regards,</p>';
|
|
||||||
|
|
||||||
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
||||||
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
||||||
@@ -245,7 +212,6 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</TD></TR></TABLE></TD></TR></TABLE><br/><br/>';
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -253,7 +219,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
|
|
||||||
$country_recognized = null;
|
$country_recognized = null;
|
||||||
if($config['account_country_recognize']) {
|
if($config['account_country_recognize']) {
|
||||||
$info = json_decode(@file_get_contents('http://ispinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
$info = json_decode(@file_get_contents('http://ipinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
||||||
if(isset($info['country'])) {
|
if(isset($info['country'])) {
|
||||||
$country_recognized = strtolower($info['country']);
|
$country_recognized = strtolower($info['country']);
|
||||||
}
|
}
|
||||||
@@ -279,6 +245,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
'countries' => isset($countries) ? $countries : null,
|
'countries' => isset($countries) ? $countries : null,
|
||||||
'accept_rules' => isset($_POST['accept_rules']) ? $_POST['accept_rules'] : false,
|
'accept_rules' => isset($_POST['accept_rules']) ? $_POST['accept_rules'] : false,
|
||||||
'country_recognized' => $country_recognized,
|
'country_recognized' => $country_recognized,
|
||||||
|
'country' => isset($country) ? $country : null,
|
||||||
'errors' => $errors
|
'errors' => $errors
|
||||||
));
|
));
|
||||||
?>
|
?>
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -43,15 +43,16 @@ function printLoot($level, $itemid, $count, $chance)
|
|||||||
$chance *= $lootRate;
|
$chance *= $lootRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($rarity as $lootRarity => $percent){
|
foreach($rarity as $lootRarity => $percent) {
|
||||||
if($chance >= $percent)
|
if($chance >= $percent) {
|
||||||
{
|
if(isset($itemid))
|
||||||
//echo str_repeat("... ", $level) . '<u>' . ($count ? $count : 1) . '</u> <span style="color: #7878FF; font-weight: bold;">' . $itemList[(int)$itemid] . '</span> ' . $itemid . ' <span style="color: #C45; font-weight: bold;">' . $lootRarity . '</span> (<span style="color: #FF9A9A;">' . $chance . '%</span>)<br />';
|
echo str_repeat("... ", $level) . '<u>' . ($count ? $count : 1) . '</u> <span style="color: #7878FF; font-weight: bold;">' . $itemList[(int)$itemid] . '</span> ' . $itemid . ' <span style="color: #C45; font-weight: bold;">' . $lootRarity . '</span> (<span style="color: #FF9A9A;">' . $chance . '%</span>)<br />';
|
||||||
|
|
||||||
if($i % 6 == 0)
|
if($i % 6 == 0)
|
||||||
{
|
{
|
||||||
if($i != 0)
|
if($i != 0)
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
echo '<tr BGCOLOR="'.getStyle(0).'"><td width="100">';
|
echo '<tr bgcolor="'.getStyle(0).'"><td width="100">';
|
||||||
}
|
}
|
||||||
echo getItemImage($itemid);
|
echo getItemImage($itemid);
|
||||||
$i++;
|
$i++;
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Custom pages loader
|
|
||||||
*
|
|
||||||
* @package MyAAC
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
|
||||||
* @copyright 2017 MyAAC
|
|
||||||
* @version 0.4.2
|
|
||||||
* @link http://my-aac.org
|
|
||||||
*/
|
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
|
||||||
|
|
||||||
$query = $db->query('SELECT `title`, `body`, `php` FROM `' . TABLE_PREFIX . 'pages` WHERE `name` LIKE ' . $db->quote($page) . ' AND `hidden` != 1');
|
|
||||||
if($query->rowCount() > 0) // found page
|
|
||||||
{
|
|
||||||
$query = $query->fetch();
|
|
||||||
$title = $query['title'];
|
|
||||||
|
|
||||||
if($query['php'] == '1') // execute it as php code
|
|
||||||
eval($query['body']);
|
|
||||||
else
|
|
||||||
echo $query['body']; // plain html
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
?>
|
|
@@ -3,21 +3,12 @@
|
|||||||
* Downloads
|
* Downloads
|
||||||
*
|
*
|
||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Gesior <jerzyskalski@wp.pl>
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$title = 'Downloads';
|
$title = 'Downloads';
|
||||||
?>
|
|
||||||
<br/><br/>
|
|
||||||
<center>
|
|
||||||
We're using official Tibia Client <strong><?php echo $config['client'] / 100; ?></strong><br/>
|
|
||||||
<p>Download Tibia client <?php echo ($config['client'] / 100); ?> for windows <a href="<?php echo $config['client_download']; ?>">HERE</a>.</p>
|
|
||||||
<p>Download Tibia client <?php echo ($config['client'] / 100); ?> for linux <a href="<?php echo $config['client_download_linux']; ?>">HERE</a>.</p>
|
|
||||||
|
|
||||||
<h2>IP Changer:</h2>
|
echo $twig->render('downloads.html.twig');
|
||||||
|
?>
|
||||||
<a href="https://static.otland.net/ipchanger.exe" target="_blank">HERE</a>
|
|
||||||
</center>
|
|
@@ -6,19 +6,22 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Experience Stages';
|
$title = 'Experience Stages';
|
||||||
|
|
||||||
|
if(file_exists($config['data_path'] . 'XML/stages.xml')) {
|
||||||
|
$stages = new DOMDocument();
|
||||||
|
$stages->load($config['data_path'] . 'XML/stages.xml');
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['experienceStages']))
|
if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['experienceStages']))
|
||||||
{
|
{
|
||||||
$enabled = false;
|
$enabled = false;
|
||||||
|
|
||||||
if(file_exists($config['data_path'] . 'XML/stages.xml')) {
|
if(isset($stages)) {
|
||||||
$stages = new DOMDocument();
|
|
||||||
$stages->load($config['data_path'] . 'XML/stages.xml');
|
|
||||||
foreach($stages->getElementsByTagName('config') as $node) {
|
foreach($stages->getElementsByTagName('config') as $node) {
|
||||||
if($node->getAttribute('enabled'))
|
if($node->getAttribute('enabled'))
|
||||||
$enabled = true;
|
$enabled = true;
|
||||||
@@ -34,23 +37,18 @@ if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['exp
|
|||||||
else if(isset($config['lua']['rate_exp']))
|
else if(isset($config['lua']['rate_exp']))
|
||||||
$rate_exp = $config['lua']['rate_exp'];
|
$rate_exp = $config['lua']['rate_exp'];
|
||||||
|
|
||||||
$content .= 'Server is not configured to use experience stages.<br/>Current experience rate is: <b>x' . $rate_exp . '</b>';
|
echo 'Server is not configured to use experience stages.<br/>Current experience rate is: <b>x' . $rate_exp . '</b>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($stages)) {
|
|
||||||
$stages = new DOMDocument();
|
|
||||||
$stages->load($config['data_path'] . 'XML/stages.xml');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$stages)
|
if(!$stages)
|
||||||
{
|
{
|
||||||
echo 'Error: cannot load <b>stages.xml</b>!';
|
echo 'Error: cannot load <b>stages.xml</b>!';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '<center><h3>Experience stages</h3></center>
|
echo '<center><h3>Experience stages</h3></center>
|
||||||
<table bgcolor="'.$config['darkborder'].'" border="0" cellpadding="4" cellspacing="1" width="100%"><tbody>
|
<table bgcolor="'.$config['darkborder'].'" border="0" cellpadding="4" cellspacing="1" width="100%"><tbody>
|
||||||
<tr bgcolor="'.$config['vdarkborder'].'">
|
<tr bgcolor="'.$config['vdarkborder'].'">
|
||||||
<td class="white" colspan="5"><b>Stages table</b></td>
|
<td class="white" colspan="5"><b>Stages table</b></td>
|
||||||
@@ -61,11 +59,11 @@ $content .= '<center><h3>Experience stages</h3></center>
|
|||||||
foreach($stages->getElementsByTagName('stage') as $stage)
|
foreach($stages->getElementsByTagName('stage') as $stage)
|
||||||
{
|
{
|
||||||
$maxlevel = $stage->getAttribute('maxlevel');
|
$maxlevel = $stage->getAttribute('maxlevel');
|
||||||
$content .= '<tr bgcolor="'.$config['lightborder'].'">
|
echo '<tr bgcolor="'.$config['lightborder'].'">
|
||||||
<td>'.$stage->getAttribute('minlevel') . '-'. (isset($maxlevel[0]) ? $maxlevel : '*') . '</td><td>x'.$stage->getAttribute('multiplier').'</td>
|
<td>'.$stage->getAttribute('minlevel') . '-'. (isset($maxlevel[0]) ? $maxlevel : '*') . '</td><td>x'.$stage->getAttribute('multiplier').'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
$content .= '
|
echo '
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody></table>';
|
</tbody></table>';
|
||||||
|
@@ -3,50 +3,23 @@
|
|||||||
* Experience table
|
* Experience table
|
||||||
*
|
*
|
||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Gesior <jerzyskalski@wp.pl>
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Experience Table';
|
$title = 'Experience Table';
|
||||||
?>
|
|
||||||
|
|
||||||
This is a list of the experience points that are required to advance to the various levels.
|
$experience = array();
|
||||||
Remember you can also check the respective skill bar in your skill window of the client to check your progress towards the next level.<br/><br/>
|
$columns = $config['experiencetable_columns'];
|
||||||
|
for($i = 0; $i < $columns; $i++) {
|
||||||
<table bgcolor="<?php echo $config['darkborder']; ?>" border="0" cellpadding="4" cellspacing="1" width="100%">
|
for($level = $i * $config['experiencetable_rows'] + 1; $level < $i * $config['experiencetable_rows'] + ($config['experiencetable_rows'] + 1); $level++) {
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
$experience[$level] = OTS_Toolbox::experienceForLevel($level);
|
||||||
<td class="white" colspan="5"><b>Experience Table</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<?php
|
|
||||||
$columns = $config['experiencetable_columns'];
|
|
||||||
for($i = 0; $i < $columns; $i++)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td><b>Level</b></td>
|
|
||||||
<td><b>Experience</b></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
for($level = $i * $config['experiencetable_rows'] + 1; $level < $i * $config['experiencetable_rows'] + ($config['experiencetable_rows'] + 1); $level++)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td><?php echo $level; ?></td>
|
|
||||||
<td><?php echo OTS_Toolbox::experienceForLevel($level); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $twig->render('experience_table.html.twig', array(
|
||||||
|
'experience' => $experience
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -20,47 +20,10 @@ if(!$faqs->rowCount())
|
|||||||
There are no questions added yet.
|
There are no questions added yet.
|
||||||
<?php
|
<?php
|
||||||
if(admin())
|
if(admin())
|
||||||
echo ' You can add new faq questions in phpmyadmin under ' . TABLE_PREFIX . 'faq table.';
|
echo ' You can add new faq questions in phpmyadmin under <b>' . TABLE_PREFIX . 'faq</b> table.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo $twig->render('faq.html.twig', array(
|
||||||
|
'faqs' => $faqs
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white">
|
|
||||||
<b>FAQ</b>
|
|
||||||
</td>
|
|
||||||
<td align="right">
|
|
||||||
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$i = 0;
|
|
||||||
foreach($faqs as $faq): ?>
|
|
||||||
<tr bgcolor="<?php echo getStyle(++$i); ?>">
|
|
||||||
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_<?php echo $i; ?>'); return false;">
|
|
||||||
<b><?php echo $faq['question']; ?></b>
|
|
||||||
<div id="faq_<?php echo $i; ?>" style="display: none;"><?php echo $faq['answer']; ?></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var expanded = false;
|
|
||||||
|
|
||||||
function toggleVisibility(id)
|
|
||||||
{
|
|
||||||
var tmp = document.getElementById(id);
|
|
||||||
if(tmp)
|
|
||||||
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleAll()
|
|
||||||
{
|
|
||||||
for(i = 1; i < <?php echo $i + 1; ?>; i++)
|
|
||||||
{
|
|
||||||
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
expanded = !expanded;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -737,7 +737,6 @@ if($action == 'move_thread')
|
|||||||
'post_id' => $post['id'],
|
'post_id' => $post['id'],
|
||||||
'sections' => $sections,
|
'sections' => $sections,
|
||||||
'section_link' => getForumBoardLink($post['section']),
|
'section_link' => getForumBoardLink($post['section']),
|
||||||
'config' => $config
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -22,16 +22,10 @@ $config_salt_enabled = fieldExist('salt', 'accounts');
|
|||||||
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
|
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
|
||||||
if($action == '')
|
if($action == '')
|
||||||
{
|
{
|
||||||
echo $twig->render('account.lost.form.html.twig', array(
|
echo $twig->render('account.lost.form.html.twig');
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'template_path' => $template_path
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
else if($action == 'step1' && $action_type == '') {
|
else if($action == 'step1' && $action_type == '') {
|
||||||
echo $twig->render('account.lost.noaction.html.twig', array(
|
echo $twig->render('account.lost.noaction.html.twig');
|
||||||
'template_path' => $template_path
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
elseif($action == 'step1' && $action_type == 'email')
|
elseif($action == 'step1' && $action_type == 'email')
|
||||||
{
|
{
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -21,11 +21,8 @@ There are no movies added yet.
|
|||||||
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
|
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo $twig->render('movies.html.twig', array(
|
||||||
|
'movies' => $movies
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<div style="text-align: center;">
|
|
||||||
<?php foreach($movies as $movie): ?>
|
|
||||||
<?php echo $movie['title']; ?><br/>
|
|
||||||
Author: <?php echo $movie['author']; ?><br/>
|
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $movie['youtube_id']; ?>" frameborder="0" allowfullscreen></iframe><br/><br/>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$_GET['archive'] = true;
|
$_GET['archive'] = true;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -14,13 +14,7 @@ $title = 'Who is online?';
|
|||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require(SYSTEM . 'countries.conf.php');
|
||||||
?>
|
|
||||||
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white"><b>Server Status</b></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$promotion = '';
|
$promotion = '';
|
||||||
if(fieldExist('promotion', 'players'))
|
if(fieldExist('promotion', 'players'))
|
||||||
$promotion = '`promotion`,';
|
$promotion = '`promotion`,';
|
||||||
@@ -63,6 +57,7 @@ if(tableExist('players_online')) // tfs 1.0
|
|||||||
else
|
else
|
||||||
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
||||||
|
|
||||||
|
$players_data = array();
|
||||||
$players = 0;
|
$players = 0;
|
||||||
$data = '';
|
$data = '';
|
||||||
foreach($playersOnline as $player)
|
foreach($playersOnline as $player)
|
||||||
@@ -70,202 +65,91 @@ foreach($playersOnline as $player)
|
|||||||
$skull = '';
|
$skull = '';
|
||||||
if($config['online_skulls'])
|
if($config['online_skulls'])
|
||||||
{
|
{
|
||||||
if($player['skulltime'] > 0 && $player['skull'] == 3)
|
if($player['skulltime'] > 0)
|
||||||
$skull = ' <img style="border: 0;" src="images/white_skull.gif"/>';
|
{
|
||||||
elseif($player['skulltime'] > 0 && $player['skull'] == 4)
|
if($player['skull'] == 3)
|
||||||
$skull = ' <img style="border: 0;" src="images/red_skull.gif"/>';
|
$skull = ' <img style="border: 0;" src="images/white_skull.gif"/>';
|
||||||
elseif($player['skulltime'] > 0 && $player['skull'] == 5)
|
elseif($player['skull'] == 4)
|
||||||
$skull = ' <img style="border: 0;" src="images/black_skull.gif"/>';
|
$skull = ' <img style="border: 0;" src="images/red_skull.gif"/>';
|
||||||
|
elseif($player['skull'] == 5)
|
||||||
|
$skull = ' <img style="border: 0;" src="images/black_skull.gif"/>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($player['promotion'])) {
|
if(isset($player['promotion'])) {
|
||||||
if((int)$player['promotion'] > 0)
|
if((int)$player['promotion'] > 0)
|
||||||
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
|
$players_data[] = array(
|
||||||
if($config['account_country'])
|
'name' => getPlayerLink($player['name']),
|
||||||
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
|
'player' => $player,
|
||||||
|
'level' => $player['level'],
|
||||||
if($config['online_outfit'])
|
'vocation' => $config['vocations'][$player['vocation']],
|
||||||
$data .= '<TD WIDTH=5%><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-20px;margin-left:-0px;' : '-45px;margin-left:-25px;') . '" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
'country_image' => $config['account_country'] ? getFlagImage($player['country']) : null,
|
||||||
|
'outfit' => $config['online_outfit'] ? $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
|
||||||
$data .= '<td>' . getPlayerLink($player['name']) . $skull . '</td>
|
);
|
||||||
<td>'.$player['level'].'</td>
|
|
||||||
<td>'.$config['vocations'][$player['vocation']].'</td>
|
|
||||||
</tr>';
|
|
||||||
|
|
||||||
if($config['online_vocations'])
|
if($config['online_vocations'])
|
||||||
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$players): ?>
|
$record = '';
|
||||||
<tr bgcolor="<?php echo $config['darkborder']; ?>"><td>Currently no one is playing on <?php echo $config['lua']['serverName']; ?>.</td></tr></table>
|
if($players > 0)
|
||||||
<?php else:
|
{
|
||||||
?>
|
if($config['online_record'])
|
||||||
<tr bgcolor="<?php echo $config['darkborder']; ?>">
|
{
|
||||||
<td>
|
$timestamp = false;
|
||||||
<?php
|
if(tableExist('server_record')) {
|
||||||
if(!$status['online'])
|
|
||||||
echo 'Server is offline.<br/>';
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($config['online_afk'])
|
|
||||||
{
|
|
||||||
$afk = $players - $status['players'];
|
|
||||||
if($afk < 0) {
|
|
||||||
$players += abs($afk);
|
|
||||||
$afk = 0;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
Currently there are <b><?php echo $status['players']; ?></b> active and <b><?php echo $afk ?></b> AFK players.<br/>
|
|
||||||
Total number of players: <b><?php echo $players; ?></b>.<br/>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
else
|
|
||||||
echo 'Currently ' . $players . ' players are online.<br/>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config['online_record'])
|
|
||||||
{
|
|
||||||
$timestamp = false;
|
|
||||||
if(tableExist('server_record')) {
|
|
||||||
$query =
|
$query =
|
||||||
$db->query(
|
$db->query(
|
||||||
'SELECT ' . $db->fieldName('record') . ', ' . $db->fieldName('timestamp') .
|
'SELECT `record`, `timestamp` FROM `server_record` WHERE `world_id` = ' . (int)$config['lua']['worldId'] .
|
||||||
' FROM ' . $db->tableName('server_record') .
|
' ORDER BY `record` DESC LIMIT 1');
|
||||||
' WHERE ' . $db->fieldName('world_id') . ' = ' . (int)$config['lua']['worldId'] .
|
$timestamp = true;
|
||||||
' ORDER BY ' . $db->fieldName('record') . ' DESC LIMIT 1');
|
|
||||||
$timestamp = true;
|
|
||||||
}
|
|
||||||
else if(tableExist('server_config')) { // tfs 1.0
|
|
||||||
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$query = NULL;
|
|
||||||
|
|
||||||
if(isset($query) && $query->rowCount() > 0)
|
|
||||||
{
|
|
||||||
$result = $query->fetch();
|
|
||||||
echo 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
else if(tableExist('server_config')) { // tfs 1.0
|
||||||
</td>
|
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
|
||||||
</tr>
|
}
|
||||||
</table>
|
else
|
||||||
|
$query = NULL;
|
||||||
|
|
||||||
|
if(isset($query) && $query->rowCount() > 0)
|
||||||
|
{
|
||||||
|
$result = $query->fetch();
|
||||||
|
$record = 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<?php
|
echo $twig->render('online.html.twig', array(
|
||||||
// vocation statistics
|
'players' => $players_data,
|
||||||
if($config['online_vocations']): ?>
|
'record' => $record
|
||||||
<br/>
|
));
|
||||||
<?php if($config['online_vocations_images']): ?>
|
|
||||||
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
|
|
||||||
<tr bgcolor="<?php echo $config['darkborder']; ?>">
|
|
||||||
<td><img src="images/sorcerer.png" /></td>
|
|
||||||
<td><img src="images/druid.png" /></td>
|
|
||||||
<td><img src="images/palladin.png" /></td>
|
|
||||||
<td><img src="images/knight.png" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white" style="text-align: center;"><strong>Sorcerers<br /></strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Druids</strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Paladins</strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Knights</strong></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[1]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[2]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[3]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[4]; ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div style="text-align: center;"> </div>
|
|
||||||
<?php else: ?>
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white" colspan="2"><b>Vocation statistics</b></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
for($i = 1; $i <= $config['vocations_amount']; $i++)
|
|
||||||
echo '<tr bgcolor="' . getStyle($i) . '">
|
|
||||||
<td width="25%">' . $config['vocations'][$i] . '</td>
|
|
||||||
<td width="75%">' . $vocs[$i] . '</td>
|
|
||||||
</tr>';
|
|
||||||
?>
|
|
||||||
</table><br/>
|
|
||||||
<?php endif;
|
|
||||||
endif;
|
|
||||||
|
|
||||||
// frags counter
|
|
||||||
if($config['online_skulls']): ?>
|
|
||||||
<table width="100%" cellspacing="1">
|
|
||||||
<tr>
|
|
||||||
<td style="background: <?php echo $config['darkborder']; ?>;" align="center">
|
|
||||||
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
|
|
||||||
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
|
|
||||||
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<?php if($config['account_country']): ?>
|
|
||||||
<td width="11px"><a href="?subtopic=online&order=country" class="white">#</A></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if($config['online_outfit']): ?>
|
|
||||||
<td class="white"><b>Outfit</b></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<td width="60%"><a href="?subtopic=online&order=name" class="white">Name</A></td>
|
|
||||||
<td width="20%"><a href="?subtopic=online&order=level" class="white">Level</A></td>
|
|
||||||
<td width="20%"><a href="?subtopic=online&order=vocation" class="white">Vocation</td>
|
|
||||||
</tr>
|
|
||||||
<?php echo $data; ?>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
|
|
||||||
//search bar
|
//search bar
|
||||||
echo '<br/>
|
echo '<br/>
|
||||||
<FORM ACTION="?subtopic=characters" METHOD=post>
|
<form action="?subtopic=characters" method=post>
|
||||||
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
<TR>
|
<tr>
|
||||||
<TD BGCOLOR="'.$config['vdarkborder'].'" class="white">
|
<td bgcolor="'.$config['vdarkborder'].'" class="white">
|
||||||
<B>Search Character</B>
|
<b>Search Character</b>
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR>
|
<tr>
|
||||||
<TD BGCOLOR="'.$config['darkborder'].'">
|
<td bgcolor="'.$config['darkborder'].'">
|
||||||
<TABLE BORDER=0 CELLPADDING=1>
|
<table border=0 cellpadding=1>
|
||||||
<TR>
|
<tr>
|
||||||
<TD>Name:</TD>
|
<td>Name:</td>
|
||||||
<TD>
|
<td>
|
||||||
<INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29>
|
<input name="name" value=""size=29 maxlength=29>
|
||||||
</TD>
|
</td>
|
||||||
<TD>
|
<td>
|
||||||
<INPUT TYPE=image NAME="Submit" SRC="'.$template_path.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
|
<input type="image" name="Submit" src="'.$template_path.'/images/buttons/sbutton_submit.gif" border="0" width="120" height="18">
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>
|
</table>
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>
|
</table>
|
||||||
</FORM>';
|
</form>';
|
||||||
|
|
||||||
/* temporary disable it - shows server offline
|
|
||||||
// update online players counter
|
|
||||||
if($players > 0)
|
|
||||||
{
|
|
||||||
$status['players'] = $players;
|
|
||||||
if($cache->enabled())
|
|
||||||
$cache->set('status', serialize($status));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach($status as $key => $value)
|
|
||||||
updateDatabaseConfig('serverStatus_' . $key, $value);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
?>
|
?>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Averatec <pervera.pl & otland.net>
|
* @author Averatec <pervera.pl & otland.net>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,42 +6,10 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Server Rules';
|
$title = 'Server Rules';
|
||||||
|
|
||||||
if(PAGE == 'rules'): ?>
|
echo $twig->render('rules.html.twig');
|
||||||
<b><?php echo $config['lua']['serverName']; ?> Rules</b><br/>
|
|
||||||
<textarea rows="25" wrap="physical" cols="70" readonly="true">
|
|
||||||
<?php endif; ?>
|
|
||||||
1. Names
|
|
||||||
a) Names which contain insulting (e.g. "Bastard"), racist (e.g. "Nigger"), extremely right-wing (e.g. "Hitler"), sexist (e.g. "Bitch") or offensive (e.g. "Copkiller") language.
|
|
||||||
b) Names containing parts of sentences (e.g. "Mike returns"), nonsensical combinations of letters (e.g. "Fgfshdsfg") or invalid formattings (e.g. "Thegreatknight").
|
|
||||||
c) Names that obviously do not describe a person (e.g. "Christmastree", "Matrix"), names of real life celebrities (e.g. "Britney Spears"), names that refer to real countries (e.g. "Swedish Druid"), names which were created to fake other players' identities (e.g. "Arieswer" instead of "Arieswar") or official positions (e.g. "System Admin").
|
|
||||||
|
|
||||||
2. Cheating
|
|
||||||
a) Exploiting obvious errors of the game ("bugs"), for instance to duplicate items. If you find an error you must report it to CipSoft immediately.
|
|
||||||
b) Intentional abuse of weaknesses in the gameplay, for example arranging objects or players in a way that other players cannot move them.
|
|
||||||
c) Using tools to automatically perform or repeat certain actions without any interaction by the player ("macros").
|
|
||||||
d) Manipulating the client program or using additional software to play the game.
|
|
||||||
e) Trying to steal other players' account data ("hacking").
|
|
||||||
f) Playing on more than one account at the same time ("multi-clienting").
|
|
||||||
g) Offering account data to other players or accepting other players' account data ("account-trading/sharing").
|
|
||||||
|
|
||||||
3. Gamemasters
|
|
||||||
a) Threatening a gamemaster because of his or her actions or position as a gamemaster.
|
|
||||||
b) Pretending to be a gamemaster or to have influence on the decisions of a gamemaster.
|
|
||||||
c) Intentionally giving wrong or misleading information to a gamemaster concerning his or her investigations or making false reports about rule violations.
|
|
||||||
|
|
||||||
4. Player Killing
|
|
||||||
a) Excessive killing of characters who are not marked with a "skull" on worlds which are not PvP-enforced. Please note that killing marked characters is not a reason for a banishment.
|
|
||||||
|
|
||||||
A violation of the Tibia Rules may lead to temporary banishment of characters and accounts. In severe cases removal or modification of character skills, attributes and belongings, as well as the permanent removal of accounts without any compensation may be considered. The sanction is based on the seriousness of the rule violation and the previous record of the player. It is determined by the gamemaster imposing the banishment.
|
|
||||||
|
|
||||||
These rules may be changed at any time. All changes will be announced on the official website.
|
|
||||||
<?php
|
|
||||||
if(PAGE == 'rules'): ?>
|
|
||||||
</textarea>
|
|
||||||
<?php endif;?>
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -60,8 +60,6 @@ if($canEdit) {
|
|||||||
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
|
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'id' => isset($id) ? $id : null,
|
'id' => isset($id) ? $id : null,
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'comment' => isset($comment) ? $comment : null,
|
'comment' => isset($comment) ? $comment : null,
|
||||||
'image' => isset($image) ? $image : null,
|
'image' => isset($image) ? $image : null,
|
||||||
'author' => isset($author) ? $author : null
|
'author' => isset($author) ? $author : null
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -69,7 +69,7 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
$type = 2;
|
$type = 2;
|
||||||
$count = $spell->getConjureCount();
|
$count = $spell->getConjureCount();
|
||||||
try {
|
try {
|
||||||
$db->query('INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (' . $db->quote($spell_txt) . ', ' . $db-quote($name) . ', ' . $db->quote($spell_txt) , ', ' . $db->quote($type) . ', ' . $db->quote($mana) . ', ' . $db->quote($lvl) . ', ' . $db->quote($mlvl) . ', ' . $db->quote($soul) . ', ' . $db>quote($pacc) . ', ' . $db->quote($vocations_to_db) . ', ' . $db->quote($count) . ', ' . $db->quote($hide_spell) . ')');
|
$db->query('INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (' . $db->quote($spell_txt) . ', ' . $db->quote($name) . ', ' . $db->quote($spell_txt) . ', ' . $db->quote($type) . ', ' . $db->quote($mana) . ', ' . $db->quote($lvl) . ', ' . $db->quote($mlvl) . ', ' . $db->quote($soul) . ', ' . $db->quote($pacc) . ', ' . $db->quote($vocations_to_db) . ', ' . $db->quote($count) . ', ' . $db->quote($hide_spell) . ')');
|
||||||
success("Added: " . $name . "<br>");
|
success("Added: " . $name . "<br>");
|
||||||
}
|
}
|
||||||
catch(PDOException $error) {
|
catch(PDOException $error) {
|
||||||
@@ -143,7 +143,7 @@ if($canEdit)
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$vocation_id = (int) (isset($_REQUEST['vocation_id']) ? $_REQUEST['vocation_id'] : 'All');
|
$vocation_id = (isset($_REQUEST['vocation_id']) ? (int)$_REQUEST['vocation_id'] : 'All');
|
||||||
$order = 'spell';
|
$order = 'spell';
|
||||||
if(isset($_GET['order']))
|
if(isset($_GET['order']))
|
||||||
$order = $_GET['order'];
|
$order = $_GET['order'];
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.4.3
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
To play on {{ config.lua.serverName }} you need an account.
|
To play on {{ config.lua.serverName }} you need an account.
|
||||||
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
|
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
|
||||||
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
|
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
|
||||||
<form action="?subtopic=createaccount" method="post" >
|
<form action="?subtopic=createaccount" method="post" id="createaccount">
|
||||||
<div class="TableContainer" >
|
<div class="TableContainer" >
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||||
<div class="CaptionContainer" >
|
<div class="CaptionContainer" >
|
||||||
@@ -10,7 +10,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
|||||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||||
<div class="Text" >Create <?php echo $config['lua']['serverName']; ?> Account</div>
|
<div class="Text" >Create {{ config.lua.serverName }} Account</div>
|
||||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||||
@@ -53,7 +53,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
|||||||
<td>
|
<td>
|
||||||
<select name="country" id="account_country">
|
<select name="country" id="account_country">
|
||||||
{% for code, country_ in countries %}
|
{% for code, country_ in countries %}
|
||||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is not defined and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<img src="" id="account_country_img"/>
|
<img src="" id="account_country_img"/>
|
||||||
|
@@ -2,8 +2,10 @@
|
|||||||
eventId = 0;
|
eventId = 0;
|
||||||
lastSend = 0;
|
lastSend = 0;
|
||||||
|
|
||||||
$('#createaccount').submit(function(){
|
$(function() {
|
||||||
return validate_form(this);
|
$('#createaccount').submit(function () {
|
||||||
|
return validate_form(this);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkAccount()
|
function checkAccount()
|
||||||
@@ -21,19 +23,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// anti flood
|
// anti flood
|
||||||
date = new Date;
|
var date = new Date;
|
||||||
timeNow = parseInt(date.getTime());
|
var timeNow = parseInt(date.getTime());
|
||||||
|
|
||||||
if(lastSend != 0)
|
if(lastSend != 0)
|
||||||
{
|
{
|
||||||
if(timeNow - lastSend < 1100)
|
if(timeNow - lastSend < 1100)
|
||||||
{
|
{
|
||||||
eventId = setInterval('checkAccount()', 1100)
|
eventId = setInterval('checkAccount()', 1100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
account = document.getElementById("account_input").value;
|
var account = document.getElementById("account_input").value;
|
||||||
$.get("tools/validate.php", { account: account, uid: Math.random() },
|
$.get("tools/validate.php", { account: account, uid: Math.random() },
|
||||||
function(data){
|
function(data){
|
||||||
document.getElementById("acc_check").innerHTML = data;
|
document.getElementById("acc_check").innerHTML = data;
|
||||||
@@ -56,8 +58,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//anti flood
|
//anti flood
|
||||||
date = new Date;
|
var date = new Date;
|
||||||
timeNow = parseInt(date.getTime());
|
vartimeNow = parseInt(date.getTime());
|
||||||
|
|
||||||
if(lastSend != 0)
|
if(lastSend != 0)
|
||||||
{
|
{
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
email = document.getElementById("email").value;
|
var email = document.getElementById("email").value;
|
||||||
$.get("tools/validate.php", { email: email, uid: Math.random() },
|
$.get("tools/validate.php", { email: email, uid: Math.random() },
|
||||||
function(data){
|
function(data){
|
||||||
document.getElementById("email_check").innerHTML = data;
|
document.getElementById("email_check").innerHTML = data;
|
||||||
|
25
system/templates/account.created.html.twig
Normal file
25
system/templates/account.created.html.twig
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>
|
||||||
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
|
<table border="0" cellpadding="1">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if constant('USE_ACCOUNT_NAME') %}
|
||||||
|
{% set account_type = 'name' %}
|
||||||
|
{% else %}
|
||||||
|
{% set account_type = 'number' %}
|
||||||
|
{% endif %}
|
||||||
|
<br/>Your account {{ account_type }} is <b>{{ account }}</b><br/>You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
|
||||||
|
Please keep your account {{ account_type }} and password in a safe place and
|
||||||
|
never give your account {{ account_type }} or password to anybody.<br/><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/><br/>
|
27
system/templates/account.created.verify.html.twig
Normal file
27
system/templates/account.created.verify.html.twig
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Your account has been created.<br/><br/>
|
||||||
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
|
<table border="0" cellpadding="1">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if constant('USE_ACCOUNT_NAME') %}
|
||||||
|
{% set account_type = 'name' %}
|
||||||
|
{% else %}
|
||||||
|
{% set account_type = 'number' %}
|
||||||
|
{% endif %}
|
||||||
|
<br/>Your account {{ account_type }} is <b>{{ account }}</b>.
|
||||||
|
|
||||||
|
You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
|
||||||
|
Please keep your account {{ account_type }} and password in a safe place and
|
||||||
|
never give your account {{ account_type }} or password to anybody.<br/><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/><br/>
|
@@ -3,20 +3,20 @@ The Lost Account Interface can help you to get back your account name and passwo
|
|||||||
<input type="hidden" name="character" value="">
|
<input type="hidden" name="character" value="">
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ vdarkborder }}" class="white"><b>Please enter your character name</b></td>
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Please enter your character name</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ darkborder }}">
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
<input type="text" name="nick" size="40" autofocus/><br>
|
<input type="text" name="nick" size="40" autofocus/><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
<table cellspacing="1" cellpadding="4" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ vdarkborder }}" class="white"><b>What do you want?</b></td>
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>What do you want?</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="{{ darkborder }}">
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
<input type="radio" name="action_type" id="action_type_email" value="email">
|
<input type="radio" name="action_type" id="action_type_email" value="email">
|
||||||
<label for="action_type_email"> Send me new password and my account name to account e-mail adress.</label><br/>
|
<label for="action_type_email"> Send me new password and my account name to account e-mail adress.</label><br/>
|
||||||
<input type=radio name="action_type" id="action_type_key" value="reckey">
|
<input type=radio name="action_type" id="action_type_key" value="reckey">
|
||||||
|
7
system/templates/account.welcome_mail.html.twig
Normal file
7
system/templates/account.welcome_mail.html.twig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<h3>Dear player,</h3>
|
||||||
|
<p>Thanks for your registration at <a href="{{ constant('BASE_URL') }}"><b>{{ config.lua.serverName }}</b></a></p>
|
||||||
|
<br/><br/>
|
||||||
|
Your login details:
|
||||||
|
<p>Account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}: <b>{{ account }}</b></p>
|
||||||
|
<p>Password: <b>************</b> (hidden for security reasons)</p>
|
||||||
|
<p>Kind Regards,</p>
|
@@ -1,7 +1,7 @@
|
|||||||
<form action="{{ link }}" method="post">
|
<form action="{{ link }}" method="post">
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
<tr><td bgcolor="{{ vdarkborder }}" class="white"><B>Search Character</B></TD></TR>
|
<tr><td bgcolor="{{ config.vdarkborder }}" class="white"><B>Search Character</B></TD></TR>
|
||||||
<tr><td bgcolor="{{ darkborder }}">
|
<tr><td bgcolor="{{ config.darkborder }}">
|
||||||
<table border="0" cellpadding="1">
|
<table border="0" cellpadding="1">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name:</td><td><input name="name" value="" size="29" maxlength="29"{% if autofocus %} autofocus{% endif %}></TD>
|
<td>Name:</td><td><input name="name" value="" size="29" maxlength="29"{% if autofocus %} autofocus{% endif %}></TD>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
{% if config.characters.outfit %}
|
{% if config.characters.outfit %}
|
||||||
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}"></div>
|
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}" alt="player outfit"/></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
@@ -246,11 +246,11 @@
|
|||||||
<td><input type="text" value="<a href="{{ player_link }}"><img src="{{ signature_url }}"></a>" style="width: 400px;" onclick="this.select()"></td>
|
<td><input type="text" value="<a href="{{ player_link }}"><img src="{{ signature_url }}"></a>" style="width: 400px;" onclick="this.select()"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Forum::</td>
|
<td>Forum:</td>
|
||||||
<td><input type="text" value="[URL={{ player_link }}][IMG]{{ signature_url }}[/IMG][/URL]" style="width: 400px;" onclick="this.select()"></td>
|
<td><input type="text" value="[URL={{ player_link }}][IMG]{{ signature_url }}[/IMG][/URL]" style="width: 400px;" onclick="this.select()"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Direct link::</td>
|
<td>Direct link:</td>
|
||||||
<td><input type="text" value="{{ signature_url }}" style="width: 400px;" onclick="this.select()"></td>
|
<td><input type="text" value="{{ signature_url }}" style="width: 400px;" onclick="this.select()"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
10
system/templates/downloads.html.twig
Normal file
10
system/templates/downloads.html.twig
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<br/><br/>
|
||||||
|
<center>
|
||||||
|
We're using official Tibia Client <strong>{{ config.client / 100 }}</strong><br/>
|
||||||
|
<p>Download Tibia client {{ config.client / 100 }} for windows <a href="{{ config.client_download }}">HERE</a>.</p>
|
||||||
|
<p>Download Tibia client {{ config.client / 100 }} for linux <a href="{{ config.client_download_linux }}">HERE</a>.</p>
|
||||||
|
|
||||||
|
<h2>IP Changer:</h2>
|
||||||
|
|
||||||
|
<a href="https://static.otland.net/ipchanger.exe" target="_blank">HERE</a>
|
||||||
|
</center>
|
26
system/templates/experience_table.html.twig
Normal file
26
system/templates/experience_table.html.twig
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
This is a list of the experience points that are required to advance to the various levels.
|
||||||
|
Remember you can also check the respective skill bar in your skill window of the client to check your progress towards the next level.<br/><br/>
|
||||||
|
|
||||||
|
<table bgcolor="{{ config.darkborder }}" border="0" cellpadding="4" cellspacing="1" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td class="white" colspan="5"><b>Experience Table</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
{% for i in 0..config.experiencetable_columns-1 %}
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td><b>Level</b></td>
|
||||||
|
<td><b>Experience</b></td>
|
||||||
|
</tr>
|
||||||
|
{% for level in i * config.experiencetable_rows + 1..i * config.experiencetable_rows + (config.experiencetable_rows + 1) - 1 %}
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td>{{ level }}</td>
|
||||||
|
<td>{{ experience[level] }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
</tr>
|
||||||
|
</table>
|
41
system/templates/faq.html.twig
Normal file
41
system/templates/faq.html.twig
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td class="white">
|
||||||
|
<b>FAQ</b>
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% set i = 0 %}
|
||||||
|
{% for faq in faqs %}
|
||||||
|
{% set i = i + 1 %}
|
||||||
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
|
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_{{ i }}'); return false;">
|
||||||
|
<b>{{ faq.question }}</b>
|
||||||
|
<div id="faq_{{ i }}" style="display: none;">{{ faq.answer }}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var expanded = false;
|
||||||
|
|
||||||
|
function toggleVisibility(id)
|
||||||
|
{
|
||||||
|
var tmp = document.getElementById(id);
|
||||||
|
if(tmp)
|
||||||
|
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleAll()
|
||||||
|
{
|
||||||
|
for(i = 1; i < {{ i + 1 }}; i++)
|
||||||
|
{
|
||||||
|
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
expanded = !expanded;
|
||||||
|
}
|
||||||
|
</script>
|
9
system/templates/google_analytics.html.twig
Normal file
9
system/templates/google_analytics.html.twig
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', '{{ config.google_analytics_id }}', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
</script>
|
19
system/templates/guilds.change_description.html.twig
Normal file
19
system/templates/guilds.change_description.html.twig
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<center><h2>Change guild description</h2></center>
|
||||||
|
Here you can change description of your guild.<br/>
|
||||||
|
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changedescription" method="post">
|
||||||
|
<input type="hidden" name="todo" value="save"/>
|
||||||
|
<textarea name="description" cols="60" rows="{{ rows }}">{{ guild.getCustomField('description')|raw }}</textarea><br>
|
||||||
|
(max. {{ config.guild_description_lines_limit }} lines, max. {{ config.guild_description_chars_limit }} chars) <input type="submit" value="Save description"/></form><br/>
|
||||||
|
<br/>
|
||||||
|
{% spaceless %}
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&guild='.$guild->getName().'&action=manager" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
{% endspaceless %}
|
40
system/templates/guilds.change_logo.html.twig
Normal file
40
system/templates/guilds.change_logo.html.twig
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<center><h2>Change guild logo</h2></center>
|
||||||
|
Here you can change logo of your guild.<br/>Actuall logo: <img src="images/guilds/{{ guild_logo }}" height="64" width="64"><br/><br/>
|
||||||
|
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changelogo" method="post" id="upload_form">
|
||||||
|
<input type="hidden" name="todo" value="save" />
|
||||||
|
<input type="hidden" name="MAX_FILE_SIZE" value="{{ max_image_size_b }}" />
|
||||||
|
Select new logo: <input name="newlogo" id="newlogo" type="file" />
|
||||||
|
<input type="submit" value="Send new logo" />
|
||||||
|
</form>
|
||||||
|
Only <b>jpg, gif, png, bmp</b> pictures. Max. size: <b>{{ config.guild_image_size_kb }} KB</b><br>
|
||||||
|
<br/>
|
||||||
|
{% spaceless %}
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
{% endspaceless %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$('#upload_form').submit(function (event) {
|
||||||
|
var max_img_size = {{ config.guild_image_size_kb * 1024 }};
|
||||||
|
var input = document.getElementById("newlogo");
|
||||||
|
// check for browser support (may need to be modified)
|
||||||
|
if (input.files && input.files.length == 1) {
|
||||||
|
if (input.files[0].size > max_img_size) {
|
||||||
|
alert("The file must be less than " + (max_img_size / 1024) + "KB");
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
19
system/templates/guilds.change_motd.html.twig
Normal file
19
system/templates/guilds.change_motd.html.twig
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<center><h2>Change guild MOTD</h2></center>
|
||||||
|
Here you can change MOTD (Message of the Day, showed in game!) of your guild.<br/>
|
||||||
|
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=changemotd" method="post">
|
||||||
|
<input type="hidden" name="todo" value="save"/>
|
||||||
|
<textarea name="motd" cols="60" rows="3">{{ guild.getCustomField('motd')|raw }}</textarea><br/>
|
||||||
|
(max. {{ config.guild_motd_chars_limit }} chars) <input type="submit" value="Save MOTD" /></form><br/>
|
||||||
|
<br/>
|
||||||
|
{% spaceless %}
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
{% endspaceless %}
|
57
system/templates/guilds.create_guild.html.twig
Normal file
57
system/templates/guilds.create_guild.html.twig
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<form action="?subtopic=guilds&action=createguild&todo=save" method="post">
|
||||||
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><B>Create a {{ config.lua.serverName }} Guild</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
|
<table border="0" cellspacing="8" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellspacing="5" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td width="150" valign="top">
|
||||||
|
<b>Leader: </b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select name="name">
|
||||||
|
{% for player in players %}
|
||||||
|
<option>{{ player }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select><br/>
|
||||||
|
<font size="1" face="verdana,arial,helvetica">(Name of leader of new guild.)</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150" valign="top"><b>Guild name: </b></td>
|
||||||
|
<td>
|
||||||
|
<input name="guild" value="" size="30" maxlength="50"/><br/>
|
||||||
|
<font size="1" face="verdana,arial,helvetica">(Here write name of your new guild.)</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<table border=0 width=100%>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<img src="{{ template_path }}/images/general/blank.gif" width=120 height=1 border=0><br/>
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
<input type=image name="Submit" src="{{ template_path }}/images/buttons/sbutton_submit.gif" border="0" width="120" height="18"/>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<form action="?subtopic=guilds" method="post">
|
||||||
|
<input type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/sbutton_back.gif" border="0" width="120" height="18"/>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<img src="{{ template_path }}/images/general/blank.gif" width="120" height="1" border="0"><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
46
system/templates/guilds.delete_guild.html.twig
Normal file
46
system/templates/guilds.delete_guild.html.twig
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<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" >Delete Guild</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>Are you sure you want delete guild <b>{{ guild.getName() }}</b>?<br/>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=deleteguild" method="post">
|
||||||
|
<input type="hidden" name="todo" value="save"/>
|
||||||
|
<input type="submit" value="Yes, delete"/>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
{% spaceless %}
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
{% endspaceless %}
|
169
system/templates/guilds.manager.html.twig
Normal file
169
system/templates/guilds.manager.html.twig
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<center><h2>Welcome to guild manager!</h2></center>
|
||||||
|
Here you can change names of ranks, delete and add ranks, pass leadership to other guild member and delete guild.
|
||||||
|
<br/><br/>
|
||||||
|
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<font color="red"><b>Option</b></font>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<font color="red"><b>Description</b></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=passleadership">Pass Leadership</a></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>Pass leadership of guild to other guild member.</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleteguild">Delete Guild</a></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>Delete guild, kick all members.</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changedescription">Change Description</a></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>Change description of guild.</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% if constant('MOTD_EXISTS') %}
|
||||||
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changemotd">Change MOTD</a></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>Change MOTD of guild.</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td width="170">
|
||||||
|
<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changelogo">Change guild logo</a></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<b>Upload new guild logo.</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<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" >Add new rank</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 width="120" valign="top">New rank name:</td>
|
||||||
|
<td>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=addrank" method="post">
|
||||||
|
<input type="text" name="rank_name" size="20"/>
|
||||||
|
<input type="submit" value="Add"/>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<center><h3>Change rank names and levels</h3></center>
|
||||||
|
<form action="?subtopic=guilds&action=saveranks&guild={{ guild.getName() }}" method="post">
|
||||||
|
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td rowspan="2" width="120" align="center">
|
||||||
|
<font color="white"><b>ID/Delete Rank</b></font>
|
||||||
|
</td>
|
||||||
|
<td rowspan="2" width="300">
|
||||||
|
<font color="white"><b> Name</b></font>
|
||||||
|
</td>
|
||||||
|
<td colspan="3" align="center">
|
||||||
|
<font color="white"><b>Level of RANK in guild</b></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td align="center" bgcolor="red">
|
||||||
|
<font color="white"><b>Leader (3)</b></font>
|
||||||
|
</td>
|
||||||
|
<td align="center" bgcolor="yellow">
|
||||||
|
<font color="black"><b>Vice (2)</b></font>
|
||||||
|
</td>
|
||||||
|
<td align="center" bgcolor="green">
|
||||||
|
<font color="white"><b>Member (1)</b></font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% set i = 0 %}
|
||||||
|
{% for rank in rank_list %}
|
||||||
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
|
<td align="center">{{ rank.getId() }} // <a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleterank&rankid={{ rank.getId() }}" border="0"><img src="{{ template_path }}/images/news/delete.png" border="0" alt="Delete Rank"></a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="{{ rank.getId() }}_name" value="{{ rank.getName() }}" size="35"/>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<input type="radio" name="{{ rank.getId() }}_level" value="3"
|
||||||
|
{% if rank.getLevel() == 3 %} checked="checked"{% endif %}/>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<input type="radio" name="{{ rank.getId() }}_level" value="2"
|
||||||
|
{% if rank.getLevel() == 2 %} checked="checked"{% endif %}/>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<input type="radio" name="{{ rank.getId() }}_level" value="1"
|
||||||
|
{% if rank.getLevel() == 1 %} checked="checked"{% endif %}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% set i = i + 1 %}
|
||||||
|
{% endfor %}
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="3" align="center">
|
||||||
|
<input type="submit" value="Save All"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<h3>Ranks info:</h3>
|
||||||
|
<b>0. Owner of guild</b> - it's highest rank, only one player in guild may has this rank. Player with this rank can:
|
||||||
|
<li>Invite/Cancel Invitation/Kick Player from guild</li>
|
||||||
|
<li>Change ranks of all players in guild</li>
|
||||||
|
<li>Delete guild or pass leadership to other guild member</li>
|
||||||
|
<li>Change names, levels (leader, vice, member), add and delete ranks</li>
|
||||||
|
<li>Change {% if constant('MOTD_EXISTS') %}MOTD, {% endif %}logo and description of guild</li>
|
||||||
|
<hr/>
|
||||||
|
<b>1. Leader</b> - it's second rank in guild. Player with this rank can:
|
||||||
|
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
|
||||||
|
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
|
||||||
|
<b>2. Vice Leader</b> - it's third rank in guild. Player with this rank can:
|
||||||
|
<li>Invite/Cancel Invitation
|
||||||
|
<li>Change ranks of players with lower rank level ("member") in guild<hr>
|
||||||
|
<b>3. Member</b> - it's lowest rank in guild. Player with this rank can:
|
||||||
|
<li>Be a member of guild
|
||||||
|
<br/>
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&action=show&guild={{ guild.getName() }}" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
41
system/templates/guilds.pass_leadership.html.twig
Normal file
41
system/templates/guilds.pass_leadership.html.twig
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<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" >Pass leadership</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>Pass leadership to: </b><br>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=passleadership" method="post">
|
||||||
|
<input type="hidden" name="todo" value="save"/>
|
||||||
|
<input type="text" size="40" name="player"/>
|
||||||
|
<input type="submit" value="Save">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<center>
|
||||||
|
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
</center>
|
11
system/templates/mail.account.verify.html.twig
Normal file
11
system/templates/mail.account.verify.html.twig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Hello!<br/>
|
||||||
|
<br/>
|
||||||
|
Thank you for registering on {{ config.lua.serverName }}!<br/>
|
||||||
|
<br/>
|
||||||
|
Here are the details of your account:<br/>
|
||||||
|
Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: {{ account }}<br/>
|
||||||
|
Password: ************ (hidden for security reasons)<br/>
|
||||||
|
<br/>
|
||||||
|
To verify your email address please click the link below:<br/>
|
||||||
|
{{ verify_url|raw }}<br/>
|
||||||
|
If you haven't registered on {{ config.lua.serverName }} please ignore this email.
|
11
system/templates/mail.account.verify.plain.html.twig
Normal file
11
system/templates/mail.account.verify.plain.html.twig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Hello!
|
||||||
|
|
||||||
|
Thank you for registering on {{ config.lua.serverName }}!
|
||||||
|
|
||||||
|
Here are the details of your account:
|
||||||
|
Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: {{ account }}
|
||||||
|
Password: ************ (hidden for security reasons)
|
||||||
|
|
||||||
|
To verify your email address please click the link below:
|
||||||
|
{{ verify_url }}
|
||||||
|
If you haven't registered on {{ config.lua.serverName }} please ignore this email.
|
7
system/templates/movies.html.twig
Normal file
7
system/templates/movies.html.twig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<div style="text-align: center;">
|
||||||
|
{% for movie in movies %}
|
||||||
|
<h2>{{ movie.title }}</h2>
|
||||||
|
Author: {{ movie.author }}<br/>
|
||||||
|
<iframe width="560" height="315" src="https://www.youtube.com/embed/{{ movie.youtube_id }}" frameborder="0" allowfullscreen></iframe><br/><br/>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="NewsHeadline">
|
<div class="NewsHeadline">
|
||||||
<div class="NewsHeadlineBackground" style="background-image:url({{ template_path }}/images/news/newsheadline_background.gif)">
|
<div class="NewsHeadlineBackground" style="background-image:url({{ template_path }}/images/news/newsheadline_background.gif)">
|
||||||
<img src="{{ template_path }}/images/news/icon_{{ icon }}.gif" class="NewsHeadlineIcon" />
|
<img src="{{ template_path }}/images/news/icon_{{ icon }}.gif" class="NewsHeadlineIcon" />
|
||||||
<div class="NewsHeadlineDate">{{ date|date(news_date_format) }} - </div>
|
<div class="NewsHeadlineDate">{{ date|date(config.news_date_format) }} - </div>
|
||||||
<div class="NewsHeadlineText">{{ title }}</div>
|
<div class="NewsHeadlineText">{{ title }}</div>
|
||||||
{% if author is not empty %}
|
{% if author is not empty %}
|
||||||
<div class="NewsHeadlineAuthor"><b>Author: </b><i>{{ author }}</i></div>
|
<div class="NewsHeadlineAuthor"><b>Author: </b><i>{{ author }}</i></div>
|
||||||
|
112
system/templates/online.html.twig
Normal file
112
system/templates/online.html.twig
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td class="white"><b>Server Status</b></td>
|
||||||
|
</tr>
|
||||||
|
{% if players|length == 0 %}
|
||||||
|
<tr bgcolor="{{ config.darkborder }}"><td>Currently no one is playing on {{ config.lua.serverName }}.</td></tr></table>
|
||||||
|
{% else %}
|
||||||
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
|
<td>
|
||||||
|
{% if not status.online %}
|
||||||
|
Server is offline.<br/>
|
||||||
|
{% else %}
|
||||||
|
{% if config.online_afk %}
|
||||||
|
{% set players_count = players|length %}
|
||||||
|
{% set afk = players_count - status.players %}
|
||||||
|
{% if afk < 0 %}
|
||||||
|
{% set players = players + afk|abs %}
|
||||||
|
{% set afk = 0 %}
|
||||||
|
{% endif %}
|
||||||
|
Currently there are <b>{{ status.players }}</b> active and <b>{{ afk }}</b> AFK players.<br/>
|
||||||
|
Total number of players: <b>{{ players_count }}</b>.<br/>
|
||||||
|
{% else %}
|
||||||
|
Currently {{ players|length }} players are online.<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{# vocation statistics #}
|
||||||
|
{% if config.online_vocations %}
|
||||||
|
<br/>
|
||||||
|
{% if config.online_vocations_images %}
|
||||||
|
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
|
||||||
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
|
<td><img src="images/sorcerer.png" /></td>
|
||||||
|
<td><img src="images/druid.png" /></td>
|
||||||
|
<td><img src="images/paladin.png" /></td>
|
||||||
|
<td><img src="images/knight.png" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td class="white" style="text-align: center;"><strong>Sorcerers</strong></td>
|
||||||
|
<td class="white" style="text-align: center;"><strong>Druids</strong></td>
|
||||||
|
<td class="white" style="text-align: center;"><strong>Paladins</strong></td>
|
||||||
|
<td class="white" style="text-align: center;"><strong>Knights</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="{{ config.lightborder }}">
|
||||||
|
<td style="text-align: center;">{{ vocs[1] }}</td>
|
||||||
|
<td style="text-align: center;">{{ vocs[2] }}</td>
|
||||||
|
<td style="text-align: center;">{{ vocs[3] }}</td>
|
||||||
|
<td style="text-align: center;">{{ vocs[4] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="text-align: center;"> </div>
|
||||||
|
{% else %}
|
||||||
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
<td class="white" colspan="2"><b>Vocation statistics</b></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% for i in 1..config.vocations_amount %}
|
||||||
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
|
<td width="25%">{{ config.vocations[i] }}</td>
|
||||||
|
<td width="75%">{{ vocs[i] }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# show skulls #}
|
||||||
|
{% if config.online_skulls %}
|
||||||
|
<table width="100%" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td style="background: {{ config.darkborder }};" align="center">
|
||||||
|
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
|
||||||
|
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
|
||||||
|
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
|
{% if config.account_country %}
|
||||||
|
<td width="11px"><a href="?subtopic=online&order=country" class="white">#</A></td>
|
||||||
|
{% endif %}
|
||||||
|
{% if config.online_outfit %}
|
||||||
|
<td class="white"><b>Outfit</b></td>
|
||||||
|
{% endif %}
|
||||||
|
<td width="60%"><a href="?subtopic=online&order=name" class="white">Name</A></td>
|
||||||
|
<td width="20%"><a href="?subtopic=online&order=level" class="white">Level</A></td>
|
||||||
|
<td width="20%"><a href="?subtopic=online&order=vocation" class="white">Vocation</td>
|
||||||
|
</tr>
|
||||||
|
{% set i = 0 %}
|
||||||
|
{% for player in players %}
|
||||||
|
{% set i = i + 1 %}
|
||||||
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
|
{% if config.account_country %}
|
||||||
|
<td>{{ player.country_image|raw }}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% if config.online_outfit %}
|
||||||
|
<td width="5%"><img style="position:absolute;margin-top:{% if player.looktype in [75, 266, 302] %}-20px;margin-left:-0px;{% else %}-45px;margin-left:-25px;{% endif %}" src="{{ player.outfit }}" alt="player outfit"/></td>
|
||||||
|
{% endif %}
|
||||||
|
<td>{{ player.name|raw }}{{ player.skull }}</td>
|
||||||
|
<td>{{ player.level }}</td>
|
||||||
|
<td>{{ player.vocation }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user