Compare commits

...

14 Commits

Author SHA1 Message Date
slawkens
35b0795b51 * update to 0.4.3 2017-10-05 17:19:49 +02:00
slawkens
04a7796665 * moved some guild pages and account to twig
* fixed account create javascript warnings when fields are empty
2017-10-05 17:07:49 +02:00
slawkens1
755deae717 * enable auto_reload option for twig 2017-10-05 00:48:34 +02:00
slawkens1
6d66dc9043 * fixed country detection (was a little typo) 2017-10-05 00:38:48 +02:00
slawkens1
bbd9cd2101 * fixed showing of character deaths and frags 2017-10-04 20:52:36 +02:00
slawkens
b6ccde075d * moved some more pages to twig
* moved online, movies, google_analytics code, faq, experience_table, downloads to twig
* added new global variabl to twig (status)
* removed some unused page (custom.php)
* automatically append trailing slash at config.item_images_url
* moved downloads from clients.halfaway.net to tibia-clients.com
* show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name)
* some more unimportant fixes
2017-10-04 17:49:54 +02:00
slawkens1
e94b9006e6 * set deletion = 0 on sample characters, so it won't be deleted by tfs 1.0 on startup 2017-09-30 14:06:52 +02:00
slawkens1
e9c8159bf3 * new, better config.lua parser from latest gesior
you can also now include files in your config.lua file by using
dofile('config.local.lua') and it will be loaded by aac
2017-09-30 00:32:26 +02:00
slawkens1
919f69ef46 * first check if page to load exist in database, then in pages/ dir 2017-09-29 22:33:25 +02:00
slawkens1
4ac2fe27d5 * fixed rook sample
* rook sample will now have level 1, 150 health, 0 mana, and 400 cap.
2017-09-29 18:30:53 +02:00
slawkens1
be2daeb4ab * fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466303
and https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466313
2017-09-26 03:02:51 +02:00
slawkens1
7b96ce9b8c * added CREDITS file 2017-09-14 20:13:23 +02:00
slawkens
801188f957 * fixed country selection in create account
* deleted some useless code
2017-09-14 16:37:01 +02:00
slawkens
c546a46847 * moved rules to twig
* added bugtracker to kathrine template
2017-09-14 15:03:09 +02:00
106 changed files with 1704 additions and 1390 deletions

View File

@@ -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]
- updated version number

2
CREDITS Normal file
View File

@@ -0,0 +1,2 @@
* Gesior.pl (2007 - 2008)
* Slawkens (2009 - 2017)

View File

@@ -26,6 +26,7 @@ require(SYSTEM . 'login.php');
require(ADMIN . 'includes/functions.php');
$twig->addGlobal('config', $config);
$twig->addGlobal('status', $status);
// if we're not logged in - show login box
if(!$logged || !admin()) {

View File

@@ -21,13 +21,13 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
session_start();
define('MYAAC', true);
define('MYAAC_VERSION', '0.4.2');
define('MYAAC_VERSION', '0.4.3');
define('DATABASE_VERSION', 9);
define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true));

View File

@@ -13,7 +13,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
@@ -35,6 +35,7 @@ $config = array(
// gesior backward support (templates & pages)
// allows using gesior templates and pages with myaac
// might bring some performance when disabled
'backward_support' => true,
// head options (html)
@@ -65,7 +66,7 @@ $config = array(
'database_password' => '',
'database_name' => '',
// multiworld system
// multiworld system (only TFS 0.3)
'multiworld' => false, // use multiworld system?
'worlds' => array( // list of worlds
//'1' => 'Your World Name',
@@ -201,10 +202,10 @@ $config = array(
),
// 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_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_system' => false,
@@ -231,7 +232,7 @@ $config = array(
'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_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(),
'npc' => array()

BIN
images/items/empty.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -21,7 +21,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
@@ -56,6 +56,7 @@ require_once(SYSTEM . 'status.php');
require_once(SYSTEM . 'template.php');
$twig->addGlobal('config', $config);
$twig->addGlobal('status', $status);
// database migrations
$tmp = '';
@@ -170,9 +171,7 @@ if($load_it)
require(SYSTEM . 'compat_pages.php');
$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();
@@ -222,6 +221,9 @@ if($load_it)
$content .= $query['body']; // plain html
}
else
{
$file = SYSTEM . 'pages/' . $page . '.php';
if(!@file_exists($file))
{
$page = '404';
$file = SYSTEM . 'pages/404.php';

View File

@@ -230,9 +230,9 @@ if(!$error) {
$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 .= '$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 .= '// place for your configuration directives, so you can later easily update myaac';
$content .= PHP_EOL;

View File

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

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -133,9 +133,7 @@ function getGuildLink($name, $generate = true)
if(is_numeric($name))
{
$guild = $db->query(
'SELECT ' . $db->fieldName('name') .
' FROM ' . $db->tableName('guilds') .
' WHERE ' . $db->fieldName('id') . ' = ' . (int)$name);
'SELECT `name` FROM `guilds` WHERE `id` = ' . (int)$name);
if($guild->rowCount() > 0)
$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>
</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'])
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
return $ret;
@@ -817,13 +811,14 @@ function template_header($is_admin = false)
*/
function template_footer()
{
global $visitors, $config, $views_counter;
global $config, $views_counter;
$ret = '';
if(admin())
$ret .= generateLink(ADMIN_URL, 'Admin Panel', true);
if($config['visitors_counter'])
{
global $visitors;
$amount = $visitors->getAmountVisitors();
$ret .= '<br/>Currently there ' . ($amount > 1 ? 'are' : 'is') . ' ' . $amount . ' visitor' . ($amount > 1 ? 's' : '') . '.';
}
@@ -843,21 +838,11 @@ function template_footer()
function template_ga_code()
{
global $config;
global $config, $twig;
if(!isset($config['google_analytics_id'][0]))
return '';
return "
<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>";
return $twig->render('google_analytics.html.twig');
}
function template_form()
@@ -899,6 +884,8 @@ function getCreatureName($killer, $showStatus = false, $extendedInfo = false)
{
global $vowels, $ots, $config;
$str = "";
$players_rows = '';
if(is_numeric($killer))
{
$player = $ots->createObject('Player');
@@ -1104,11 +1091,8 @@ function get_templates()
function getWorldName($id)
{
global $config;
foreach($config['worlds'] as $_id => $details)
{
if($id == $_id)
return $details['name'];
}
if(isset($config['worlds'][$id]))
return $config['worlds'][$id];
return $config['lua']['serverName'];
}
@@ -1193,21 +1177,53 @@ function load_config_lua($filename)
if(!@file_exists($config_file))
die('ERROR: Cannot find ' . $filename . ' file.');
$tempFile = @tempnam('/tmp', 'lua');
$file = @fopen($tempFile, 'w');
if(!$file) {
log_append('error.log', '[functions.php] Cannot load config.lua file. Error: ' . print_r(error_get_last(), true));
die('Cannot load server config! More info in system/logs/error.log file.');
$result = array();
$config_string = file_get_contents($filename);
$config_string = str_replace("\r\n", "\n", $config_string);
$config_string = str_replace("\r", "\n", $config_string);
$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
// 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);
$result = array_merge($result, isset($config['lua']) ? $config['lua'] : array());
return $result;
}
?>

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -46,7 +46,7 @@ class Hook
$ret = $tmp($params);
}*/
global $db, $config, $template_path, $ots;
global $db, $config, $template_path, $ots, $content;
if(file_exists(BASE . $this->_file)) {
require(BASE . $this->_file);
}

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -33,7 +33,8 @@ Twig_Autoloader::register();
$twig_loader = new Twig_Loader_Filesystem(SYSTEM . 'templates');
$twig = new Twig_Environment($twig_loader, array(
'cache' => CACHE . 'twig/'
'cache' => CACHE . 'twig/',
'auto_reload' => true
));
$function = new Twig_SimpleFunction('getStyle', function ($i) {
@@ -87,10 +88,12 @@ unset($tmp);
if(isset($config['lua']['servername']))
$config['lua']['serverName'] = $config['lua']['servername'];
if(isset($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
if(isset($config['lua']['dataDirectory'][0]))
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -149,7 +149,7 @@ function getBanReason($reasonId)
function getBanType($typeId)
{
switch($reasonId)
switch($typeId)
{
case 1:
return "IP Banishment";

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -40,7 +40,7 @@ $showed = $post = $reply = false;
if(!empty($_REQUEST['reply']))
$reply=true;
$account = $ots->createObject('Account');
$account = new OTS_Account();
$account->load($_REQUEST['acc']);
$account->isLoaded();
$players = $account->getPlayersList();

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -19,8 +19,6 @@ function generate_search_form($autofocus = false)
global $config, $twig;
return $twig->render('characters.form.html.twig', array(
'link' => getPageLink('characters'),
'vdarkborder' => $config['vdarkborder'],
'darkborder' => $config['darkborder'],
'autofocus' => $autofocus
));
}
@@ -58,7 +56,7 @@ $name = str_replace('/', '', $name);
$oldName = '';
$player = $ots->createObject('Player');
$player = new OTS_Player();
$player->find($name);
if(!$player->isLoaded())
{
@@ -163,8 +161,10 @@ if($player->isLoaded() && !$player->isDeleted())
$skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
}
}
else
$skills = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
else {
$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) {
$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)
$dead_add_content += '</table>';
$dead_add_content .= '</table>';
else
$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)
$dead_add_content += '</table>';
$dead_add_content .= '</table>';
else
$dead_add_content = '';
}
@@ -362,7 +362,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
}
if($frags > 0)
$frag_add_content += '</table>';
$frag_add_content .= '</table>';
else
$frag_add_content = '';
}

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -101,7 +101,7 @@ if($step == 'save')
{
if($config['account_mail_unique'])
{
$test_email_account = $ots->createObject('Account');
$test_email_account = new OTS_Account();
$test_email_account->findByEmail($email);
if($test_email_account->isLoaded())
$errors['email'] = 'Account with this e-mail address already exist.';
@@ -126,7 +126,7 @@ if($step == 'save')
if(empty($errors))
{
$new_account = $ots->createObject('Account');
$new_account = new OTS_Account();
if(USE_ACCOUNT_NAME)
$new_account->create($account_name);
else
@@ -172,44 +172,21 @@ if($step == 'save')
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
$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!
Here are the details of your account:
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.';
$body_html = $twig->render('mail.account.verify.html.twig', array(
'account' => $tmp_account,
'verify_url' => generateLink($verify_url, $verify_url, true)
));
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
{
?>
Your account has been created.<br/><br/>
<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
echo $twig->render('account.created.verify.html.twig', array(
'account' => $tmp_account
));
}
else
{
@@ -219,25 +196,15 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
}
else
{
echo 'Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>';
echo '<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>
<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/>';
echo $twig->render('account.created.html.twig', array(
'account' => $tmp_account
));
if($config['mail_enabled'] && $config['account_welcome_mail'])
{
$mailBody = '
<h3>Dear player,</h3>
<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>';
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
'account' => $tmp_account
));
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
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 '</TD></TR></TABLE></TD></TR></TABLE><br/><br/>';
return;
}
@@ -253,7 +219,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
$country_recognized = null;
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'])) {
$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,
'accept_rules' => isset($_POST['accept_rules']) ? $_POST['accept_rules'] : false,
'country_recognized' => $country_recognized,
'country' => isset($country) ? $country : null,
'errors' => $errors
));
?>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -43,15 +43,16 @@ function printLoot($level, $itemid, $count, $chance)
$chance *= $lootRate;
}
foreach($rarity as $lootRarity => $percent){
if($chance >= $percent)
{
//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 />';
foreach($rarity as $lootRarity => $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 />';
if($i % 6 == 0)
{
if($i != 0)
echo '</td></tr>';
echo '<tr BGCOLOR="'.getStyle(0).'"><td width="100">';
echo '<tr bgcolor="'.getStyle(0).'"><td width="100">';
}
echo getItemImage($itemid);
$i++;

View File

@@ -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;
?>

View File

@@ -3,21 +3,12 @@
* Downloads
*
* @package MyAAC
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
$title = 'Downloads';
echo $twig->render('downloads.html.twig');
?>
<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>
<a href="https://static.otland.net/ipchanger.exe" target="_blank">HERE</a>
</center>

View File

@@ -6,19 +6,22 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$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']))
{
$enabled = false;
if(file_exists($config['data_path'] . 'XML/stages.xml')) {
$stages = new DOMDocument();
$stages->load($config['data_path'] . 'XML/stages.xml');
if(isset($stages)) {
foreach($stages->getElementsByTagName('config') as $node) {
if($node->getAttribute('enabled'))
$enabled = true;
@@ -34,23 +37,18 @@ if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['exp
else if(isset($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;
}
}
if(!isset($stages)) {
$stages = new DOMDocument();
$stages->load($config['data_path'] . 'XML/stages.xml');
}
if(!$stages)
{
echo 'Error: cannot load <b>stages.xml</b>!';
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>
<tr bgcolor="'.$config['vdarkborder'].'">
<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)
{
$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>
</tr>';
}
$content .= '
echo '
</tbody></table>
</td></tr>
</tbody></table>';

View File

@@ -3,50 +3,23 @@
* Experience table
*
* @package MyAAC
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Experience Table';
?>
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/>
$experience = array();
$columns = $config['experiencetable_columns'];
for($i = 0; $i < $columns; $i++) {
for($level = $i * $config['experiencetable_rows'] + 1; $level < $i * $config['experiencetable_rows'] + ($config['experiencetable_rows'] + 1); $level++) {
$experience[$level] = OTS_Toolbox::experienceForLevel($level);
}
}
<table bgcolor="<?php echo $config['darkborder']; ?>" border="0" cellpadding="4" cellspacing="1" width="100%">
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
<td class="white" colspan="5"><b>Experience Table</b></td>
</tr>
<tr>
<?php
$columns = $config['experiencetable_columns'];
for($i = 0; $i < $columns; $i++)
{
echo $twig->render('experience_table.html.twig', array(
'experience' => $experience
));
?>
<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
}
?>
</tr>
</table>

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -20,47 +20,10 @@ if(!$faqs->rowCount())
There are no questions added yet.
<?php
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>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -737,7 +737,6 @@ if($action == 'move_thread')
'post_id' => $post['id'],
'sections' => $sections,
'section_link' => getForumBoardLink($post['section']),
'config' => $config
));
}
}

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
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'] : '';
if($action == '')
{
echo $twig->render('account.lost.form.html.twig', array(
'vdarkborder' => $config['vdarkborder'],
'darkborder' => $config['darkborder'],
'template_path' => $template_path
));
echo $twig->render('account.lost.form.html.twig');
}
else if($action == 'step1' && $action_type == '') {
echo $twig->render('account.lost.noaction.html.twig', array(
'template_path' => $template_path
));
echo $twig->render('account.lost.noaction.html.twig');
}
elseif($action == 'step1' && $action_type == 'email')
{

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
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.';
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>

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -14,13 +14,7 @@ $title = 'Who is online?';
if($config['account_country'])
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 = '';
if(fieldExist('promotion', 'players'))
$promotion = '`promotion`,';
@@ -63,6 +57,7 @@ if(tableExist('players_online')) // tfs 1.0
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);
$players_data = array();
$players = 0;
$data = '';
foreach($playersOnline as $player)
@@ -70,72 +65,46 @@ foreach($playersOnline as $player)
$skull = '';
if($config['online_skulls'])
{
if($player['skulltime'] > 0 && $player['skull'] == 3)
if($player['skulltime'] > 0)
{
if($player['skull'] == 3)
$skull = ' <img style="border: 0;" src="images/white_skull.gif"/>';
elseif($player['skulltime'] > 0 && $player['skull'] == 4)
elseif($player['skull'] == 4)
$skull = ' <img style="border: 0;" src="images/red_skull.gif"/>';
elseif($player['skulltime'] > 0 && $player['skull'] == 5)
elseif($player['skull'] == 5)
$skull = ' <img style="border: 0;" src="images/black_skull.gif"/>';
}
}
if(isset($player['promotion'])) {
if((int)$player['promotion'] > 0)
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
}
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
if($config['account_country'])
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
if($config['online_outfit'])
$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>';
$data .= '<td>' . getPlayerLink($player['name']) . $skull . '</td>
<td>'.$player['level'].'</td>
<td>'.$config['vocations'][$player['vocation']].'</td>
</tr>';
$players_data[] = array(
'name' => getPlayerLink($player['name']),
'player' => $player,
'level' => $player['level'],
'vocation' => $config['vocations'][$player['vocation']],
'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
);
if($config['online_vocations'])
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
}
if(!$players): ?>
<tr bgcolor="<?php echo $config['darkborder']; ?>"><td>Currently no one is playing on <?php echo $config['lua']['serverName']; ?>.</td></tr></table>
<?php else:
?>
<tr bgcolor="<?php echo $config['darkborder']; ?>">
<td>
<?php
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/>';
}
$record = '';
if($players > 0)
{
if($config['online_record'])
{
$timestamp = false;
if(tableExist('server_record')) {
$query =
$db->query(
'SELECT ' . $db->fieldName('record') . ', ' . $db->fieldName('timestamp') .
' FROM ' . $db->tableName('server_record') .
' WHERE ' . $db->fieldName('world_id') . ' = ' . (int)$config['lua']['worldId'] .
' ORDER BY ' . $db->fieldName('record') . ' DESC LIMIT 1');
'SELECT `record`, `timestamp` FROM `server_record` WHERE `world_id` = ' . (int)$config['lua']['worldId'] .
' ORDER BY `record` DESC LIMIT 1');
$timestamp = true;
}
else if(tableExist('server_config')) { // tfs 1.0
@@ -147,125 +116,40 @@ if(!$players): ?>
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']) . '.' : '.');
$record = 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.');
}
}
?>
</td>
</tr>
</table>
}
<?php
// vocation statistics
if($config['online_vocations']): ?>
<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;">&nbsp;</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;
echo $twig->render('online.html.twig', array(
'players' => $players_data,
'record' => $record
));
//search bar
echo '<br/>
<FORM ACTION="?subtopic=characters" METHOD=post>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
<TR>
<TD BGCOLOR="'.$config['vdarkborder'].'" class="white">
<B>Search Character</B>
</TD>
</TR>
<TR>
<TD BGCOLOR="'.$config['darkborder'].'">
<TABLE BORDER=0 CELLPADDING=1>
<TR>
<TD>Name:</TD>
<TD>
<INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29>
</TD>
<TD>
<INPUT TYPE=image NAME="Submit" SRC="'.$template_path.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</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);
}
}*/
<form action="?subtopic=characters" method=post>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td bgcolor="'.$config['vdarkborder'].'" class="white">
<b>Search Character</b>
</td>
</tr>
<tr>
<td bgcolor="'.$config['darkborder'].'">
<table border=0 cellpadding=1>
<tr>
<td>Name:</td>
<td>
<input name="name" value=""size=29 maxlength=29>
</td>
<td>
<input type="image" name="Submit" src="'.$template_path.'/images/buttons/sbutton_submit.gif" border="0" width="120" height="18">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>';
?>

View File

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

View File

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

View File

@@ -6,42 +6,10 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Server Rules';
if(PAGE == 'rules'): ?>
<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;?>
echo $twig->render('rules.html.twig');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -60,8 +60,6 @@ if($canEdit) {
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
'action' => $action,
'id' => isset($id) ? $id : null,
'vdarkborder' => $config['vdarkborder'],
'darkborder' => $config['darkborder'],
'comment' => isset($comment) ? $comment : null,
'image' => isset($image) ? $image : null,
'author' => isset($author) ? $author : null

View File

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

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.4.2
* @version 0.4.3
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -69,7 +69,7 @@ if(isset($_POST['reload_spells']) && $canEdit)
$type = 2;
$count = $spell->getConjureCount();
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>");
}
catch(PDOException $error) {
@@ -143,7 +143,7 @@ if($canEdit)
<?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';
if(isset($_GET['order']))
$order = $_GET['order'];

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,9 +2,11 @@
eventId = 0;
lastSend = 0;
$('#createaccount').submit(function(){
$(function() {
$('#createaccount').submit(function () {
return validate_form(this);
});
});
function checkAccount()
{
@@ -21,19 +23,19 @@
}
// anti flood
date = new Date;
timeNow = parseInt(date.getTime());
var date = new Date;
var timeNow = parseInt(date.getTime());
if(lastSend != 0)
{
if(timeNow - lastSend < 1100)
{
eventId = setInterval('checkAccount()', 1100)
eventId = setInterval('checkAccount()', 1100);
return;
}
}
account = document.getElementById("account_input").value;
var account = document.getElementById("account_input").value;
$.get("tools/validate.php", { account: account, uid: Math.random() },
function(data){
document.getElementById("acc_check").innerHTML = data;
@@ -56,8 +58,8 @@
}
//anti flood
date = new Date;
timeNow = parseInt(date.getTime());
var date = new Date;
vartimeNow = parseInt(date.getTime());
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() },
function(data){
document.getElementById("email_check").innerHTML = data;

View 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/>

View 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/>

View File

@@ -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="">
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<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>
<td bgcolor="{{ darkborder }}">
<td bgcolor="{{ config.darkborder }}">
<input type="text" name="nick" size="40" autofocus/><br>
</td>
</tr>
</table>
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<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>
<td bgcolor="{{ darkborder }}">
<td bgcolor="{{ config.darkborder }}">
<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/>
<input type=radio name="action_type" id="action_type_key" value="reckey">

View 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>

View File

@@ -1,7 +1,7 @@
<form action="{{ link }}" method="post">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr><td bgcolor="{{ vdarkborder }}" class="white"><B>Search Character</B></TD></TR>
<tr><td bgcolor="{{ darkborder }}">
<tr><td bgcolor="{{ config.vdarkborder }}" class="white"><B>Search Character</B></TD></TR>
<tr><td bgcolor="{{ config.darkborder }}">
<table border="0" cellpadding="1">
<tr>
<td>Name:</td><td><input name="name" value="" size="29" maxlength="29"{% if autofocus %} autofocus{% endif %}></TD>

View File

@@ -4,7 +4,7 @@
<td>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
{% if config.characters.outfit %}
<div style="width:64px;height:64px;border:2px solid #F1E0C6; border-radius:50px; padding:13px; margin-top:38px;margin-left:376px;position:absolute;"><img style="margin-left:{% if player.getLookType() in [75, 266, 302] %}-0px;margin-top:-0px;width:64px;height:64px;{% else %}-60px;margin-top:-60px;width:128px;height:128px;{% endif %}" src="{{ outfit }}"></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 %}
<tr bgcolor="{{ config.vdarkborder }}">
@@ -246,11 +246,11 @@
<td><input type="text" value="<a href=&quot;{{ player_link }}&quot;><img src=&quot;{{ signature_url }}&quot;></a>" style="width: 400px;" onclick="this.select()"></td>
</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>
</tr>
<tr>
<td>Direct link::</td>
<td>Direct link:</td>
<td><input type="text" value="{{ signature_url }}" style="width: 400px;" onclick="this.select()"></td>
</tr>
</table>

View 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>

View 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>

View 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>

View 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>

View 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 %}

View 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>

View 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 %}

View 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>

View 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 %}

View 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;</td>
<td>&nbsp;</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>

View 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>

View 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.

View 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.

View 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>

View File

@@ -1,7 +1,7 @@
<div class="NewsHeadline">
<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" />
<div class="NewsHeadlineDate">{{ date|date(news_date_format) }} - </div>
<div class="NewsHeadlineDate">{{ date|date(config.news_date_format) }} - </div>
<div class="NewsHeadlineText">{{ title }}</div>
{% if author is not empty %}
<div class="NewsHeadlineAuthor"><b>Author: </b><i>{{ author }}</i></div>

View 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;">&nbsp;</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