mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 12:33:35 +02:00
Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
42ef8487c8 | ||
![]() |
e92e5d1040 | ||
![]() |
a1950cf27e | ||
![]() |
27fb0ffb06 | ||
![]() |
6c3439acf9 | ||
![]() |
005356ebb3 | ||
![]() |
f0adabf567 | ||
![]() |
739782109e | ||
![]() |
87ba018ab8 | ||
![]() |
041702615f | ||
![]() |
0a82f306f6 | ||
![]() |
856e72150c | ||
![]() |
e2857f8ca5 | ||
![]() |
04d9ec9c94 | ||
![]() |
e984a467ef | ||
![]() |
8342a7b8a8 | ||
![]() |
269af1930c | ||
![]() |
b7bb950abc | ||
![]() |
4a19458c15 | ||
![]() |
b6db420465 | ||
![]() |
7b234ad41f | ||
![]() |
35b0795b51 | ||
![]() |
04a7796665 | ||
![]() |
755deae717 | ||
![]() |
6d66dc9043 | ||
![]() |
bbd9cd2101 | ||
![]() |
b6ccde075d | ||
![]() |
e94b9006e6 | ||
![]() |
e9c8159bf3 | ||
![]() |
919f69ef46 | ||
![]() |
4ac2fe27d5 | ||
![]() |
be2daeb4ab | ||
![]() |
7b96ce9b8c | ||
![]() |
801188f957 | ||
![]() |
c546a46847 |
@@ -1,33 +1,7 @@
|
|||||||
Options -Indexes -MultiViews
|
Options -Indexes -MultiViews
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
#RewriteBase /
|
|
||||||
|
|
||||||
# Page parser
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ^([A-Za-z0-9-_+']+)\.png/?$ tools/signature/index.php?name=$1 [L]
|
RewriteRule ^.*$ index.php [L]
|
||||||
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
|
|
||||||
RewriteRule ^guilds/([A-Za-z0-9-_+']+)$ index.php?subtopic=guilds&action=show&guild=$1
|
|
||||||
RewriteRule ^forum/board/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1
|
|
||||||
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_board&id=$1&page=$2
|
|
||||||
RewriteRule ^forum/thread/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1
|
|
||||||
RewriteRule ^forum/thread/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
|
|
||||||
RewriteRule ^forum/board/([0-9]+)/([0-9]+)$ index.php?subtopic=forum&action=show_thread&id=$1&page=$2
|
|
||||||
RewriteRule ^account/manage$ index.php?subtopic=accountmanagement
|
|
||||||
RewriteRule ^account/create$ index.php?subtopic=createaccount
|
|
||||||
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
|
|
||||||
RewriteRule ^account/logout$ index.php?subtopic=accountmanagement&action=logout
|
|
||||||
RewriteRule ^news/archive/([0-9]+)$ index.php?subtopic=newsarchive&id=$1
|
|
||||||
RewriteRule ^news/archive$ index.php?subtopic=newsarchive
|
|
||||||
RewriteRule ^highscores/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?subtopic=highscores&list=$1&vocation=$2
|
|
||||||
RewriteRule ^highscores/([A-Za-z0-9-_']+)$ index.php?subtopic=highscores&list=$1
|
|
||||||
RewriteRule ^polls/([0-9]+)$ index.php?subtopic=polls&id=$1
|
|
||||||
RewriteRule ^admin/$ admin/index.php
|
|
||||||
RewriteRule ^install/$ install/index.php
|
|
||||||
|
|
||||||
# temp solution >.>
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L]
|
|
||||||
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)?$ index.php?p=$1&action=$2 [L]
|
|
43
CHANGELOG
43
CHANGELOG
@@ -1,3 +1,46 @@
|
|||||||
|
[0.5.1 - 11.10.2017]
|
||||||
|
- fixed forum add/edit board
|
||||||
|
- new configurable: highscores_length, how much highscores to display
|
||||||
|
- fixed highscores links (ALL, previous and next page)
|
||||||
|
- update templates cache when installing/uninstalling plugin
|
||||||
|
- moved character deaths and frags table generation to twig
|
||||||
|
- fixed some bug when you uninstall plugin and then try to install again on the same page
|
||||||
|
- check if plugin exist before uninstalling
|
||||||
|
- fixed some warning in OTS_Base_DB
|
||||||
|
|
||||||
|
[0.5.0 - 10.10.2017]
|
||||||
|
- moved .htaccess rules to plain php (index.php)
|
||||||
|
- updated tinymce to the latest (4.7.0) version, you can now embed code, for example youtube videos
|
||||||
|
- added option to uninstall plugin
|
||||||
|
- added option to require specified myaac, php or database version for plugins, without that plugin won't be installed
|
||||||
|
- change accountmanagement links to use friendly_urls
|
||||||
|
- fixed creating new forum thread
|
||||||
|
- sample characters are now assigned to admin account and have group_id 4 to not be shown on highscores
|
||||||
|
- added links loaded from database to admin panel - for future plugins
|
||||||
|
- print some info to error.log when can't find config.lua
|
||||||
|
- some fixes in account changecomment action
|
||||||
|
- show info when account name/number or password is empty on login
|
||||||
|
- fixed showing account login errors
|
||||||
|
- added few characters hooks
|
||||||
|
- fixed some kathrine template js bug when shop is disabled
|
||||||
|
- you can now use slash '/' in custom pages loaded from database
|
||||||
|
- added new twig function getLink that convert link taking into account config.friendly_urls
|
||||||
|
- internalLayoutLink -> getLink
|
||||||
|
|
||||||
|
[0.4.3 - 05.10.2017]
|
||||||
|
- better config loader taken from latest gesior, you can now include files in your config by doing dofile('config.local.lua')
|
||||||
|
- fixed country detection in create account
|
||||||
|
- fixed showing of character deaths and frags
|
||||||
|
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466303
|
||||||
|
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-13#post-2466313
|
||||||
|
- fixed rook sample, which will now have level 1, 150 health, 0 mana, and 400 cap.
|
||||||
|
- fixed samples being deleted by tfs 1.0+ cause of 'deletion' field set to 1
|
||||||
|
- pages loaded from database have higher priority than normal .php pages, so they will be loaded first if they exist
|
||||||
|
- moved many pages to twig templates
|
||||||
|
- change download client links from clients.halfaway.net to tibia-clients.com
|
||||||
|
- added bugtracker to kathrine template
|
||||||
|
- added CREDITS file
|
||||||
|
|
||||||
[0.4.2 - 14.09.2017]
|
[0.4.2 - 14.09.2017]
|
||||||
- updated version number
|
- updated version number
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# myaac
|
# myaac
|
||||||
MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
|
MyAAC is a free and open-source Automatic Account Creator (AAC) and Content Management System (CMS) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases.
|
||||||
|
|
||||||
Official website: http://my-aac.org
|
Official website: https://my-aac.org
|
||||||
|
|
||||||
### REQUIREMENTS
|
### REQUIREMENTS
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@ require(SYSTEM . 'login.php');
|
|||||||
require(ADMIN . 'includes/functions.php');
|
require(ADMIN . 'includes/functions.php');
|
||||||
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
|
$twig->addGlobal('status', $status);
|
||||||
|
|
||||||
// if we're not logged in - show login box
|
// if we're not logged in - show login box
|
||||||
if(!$logged || !admin()) {
|
if(!$logged || !admin()) {
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
<a href="<?php echo BASE_URL; ?>" target="_blank">Preview</a> <span class="separator">|</span> <a href="?action=logout">Log out<img src="<?php echo BASE_URL; ?>images/icons/logout.png" alt="" title="Log out" /></a>
|
<a href="<?php echo BASE_URL; ?>" target="_blank">Preview</a> <span class="separator">|</span> <a href="?action=logout">Log out<img src="<?php echo BASE_URL; ?>images/icons/logout.png" alt="" title="Log out" /></a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<h1><?php echo $config['lua']['serverName'] . ' - ' . $title; ?> - Admin Panel</h1>
|
<h1><?php echo $config['lua']['serverName'] . (isset($title) ? ' - ' . $title : ''); ?> - Admin Panel</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<?php
|
<?php
|
||||||
@@ -78,6 +78,19 @@
|
|||||||
}
|
}
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$query = $db->query('SELECT `name`, `page`, `flags` FROM `' . TABLE_PREFIX . 'admin_menu` ORDER BY `ordering`');
|
||||||
|
$menu_db = $query->fetchAll();
|
||||||
|
foreach($menu_db as $item) {
|
||||||
|
if($item['flags'] == 0 || hasFlag($item['flags'])) {
|
||||||
|
echo '<li><h3>
|
||||||
|
<a href="?p=' . $item['page'] . '">';
|
||||||
|
if($page == $item['page']) echo '<u>';
|
||||||
|
echo $item['name'];
|
||||||
|
if($page == $item['page']) echo '</u>';
|
||||||
|
echo '</a></h3></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -21,14 +21,14 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
define('MYAAC', true);
|
define('MYAAC', true);
|
||||||
define('MYAAC_VERSION', '0.4.2');
|
define('MYAAC_VERSION', '0.5.1');
|
||||||
define('DATABASE_VERSION', 9);
|
define('DATABASE_VERSION', 10);
|
||||||
define('TABLE_PREFIX', 'myaac_');
|
define('TABLE_PREFIX', 'myaac_');
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));
|
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||||
|
12
config.php
12
config.php
@@ -13,7 +13,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ $config = array(
|
|||||||
|
|
||||||
// gesior backward support (templates & pages)
|
// gesior backward support (templates & pages)
|
||||||
// allows using gesior templates and pages with myaac
|
// allows using gesior templates and pages with myaac
|
||||||
|
// might bring some performance when disabled
|
||||||
'backward_support' => true,
|
'backward_support' => true,
|
||||||
|
|
||||||
// head options (html)
|
// head options (html)
|
||||||
@@ -65,7 +66,7 @@ $config = array(
|
|||||||
'database_password' => '',
|
'database_password' => '',
|
||||||
'database_name' => '',
|
'database_name' => '',
|
||||||
|
|
||||||
// multiworld system
|
// multiworld system (only TFS 0.3)
|
||||||
'multiworld' => false, // use multiworld system?
|
'multiworld' => false, // use multiworld system?
|
||||||
'worlds' => array( // list of worlds
|
'worlds' => array( // list of worlds
|
||||||
//'1' => 'Your World Name',
|
//'1' => 'Your World Name',
|
||||||
@@ -184,6 +185,7 @@ $config = array(
|
|||||||
'highscores_outfit' => true, // show player outfit?
|
'highscores_outfit' => true, // show player outfit?
|
||||||
'highscores_country_box' => false, // doesnt work yet! (not implemented)
|
'highscores_country_box' => false, // doesnt work yet! (not implemented)
|
||||||
'highscores_groups_hidden' => 4, // this group id and higher won't be shown on the highscores
|
'highscores_groups_hidden' => 4, // this group id and higher won't be shown on the highscores
|
||||||
|
'highscores_length' => 100, // how many records per page on highscores
|
||||||
|
|
||||||
// characters page
|
// characters page
|
||||||
'characters' => array( // what things to display on character view page (true/false in each option)
|
'characters' => array( // what things to display on character view page (true/false in each option)
|
||||||
@@ -201,10 +203,10 @@ $config = array(
|
|||||||
),
|
),
|
||||||
|
|
||||||
// news page
|
// news page
|
||||||
'news_limit' => 5, // limit of news on latest news page
|
'news_limit' => 5, // limit of news on the latest news page
|
||||||
'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable)
|
'news_ticker_limit' => 5, // limit of news in tickers (mini news) (0 to disable)
|
||||||
'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this
|
'news_date_format' => 'j.n.Y', // check php manual date() function for more info about this
|
||||||
'news_author' => true,
|
'news_author' => true, // show author of the news
|
||||||
|
|
||||||
// gifts/shop system
|
// gifts/shop system
|
||||||
'gifts_system' => false,
|
'gifts_system' => false,
|
||||||
@@ -231,7 +233,7 @@ $config = array(
|
|||||||
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
'google_analytics_id' => '', // e.g.: UA-XXXXXXX-X
|
||||||
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
|
'experiencetable_columns' => 5, // how many columns to display in experience table page. * experiencetable_rows, 5 = 500 (will show up to 500 level)
|
||||||
'experiencetable_rows' => 100, // till how many levels in one column
|
'experiencetable_rows' => 100, // till how many levels in one column
|
||||||
'date_timezone' => 'Europe/Berlin',
|
'date_timezone' => 'Europe/Berlin', // more info at http://php.net/manual/en/timezones.php
|
||||||
|
|
||||||
'monsters' => array(),
|
'monsters' => array(),
|
||||||
'npc' => array()
|
'npc' => array()
|
||||||
|
BIN
images/items/empty.gif
Normal file
BIN
images/items/empty.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
110
index.php
110
index.php
@@ -21,7 +21,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -39,23 +39,116 @@ if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['i
|
|||||||
die('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!');
|
die('Setup detected that <b>install/</b> directory exists. Please visit <a href="' . BASE_URL . 'install">this</a> url to start MyAAC Installation.<br/>Delete <b>install/</b> directory if you already installed MyAAC.<br/>Remember to REFRESH this page when you\'re done!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_once(SYSTEM . 'functions.php');
|
||||||
|
|
||||||
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
|
if(!empty(BASE_DIR))
|
||||||
|
$uri = str_replace(BASE_DIR . '/', '', $uri);
|
||||||
|
else
|
||||||
|
$uri = str_replace_first('/', '', $uri);
|
||||||
|
|
||||||
|
$uri = str_replace(array('index.php/', '?'), '', $uri);
|
||||||
|
$uri = strtolower($uri);
|
||||||
|
|
||||||
|
$found = false;
|
||||||
|
if(empty($uri) || isset($_REQUEST['template'])) {
|
||||||
|
$_REQUEST['p'] = 'news';
|
||||||
|
$found = true;
|
||||||
|
}
|
||||||
|
else if(!preg_match('/[^A-z0-9_\-]/', $uri) && file_exists(SYSTEM . 'pages/' . $uri . '.php')) {
|
||||||
|
$_REQUEST['p'] = $uri;
|
||||||
|
$found = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$rules = array(
|
||||||
|
'/^account\/manage\/?$/' => array('subtopic' => 'accountmanagement'),
|
||||||
|
'/^account\/create\/?$/' => array('subtopic' => 'createaccount'),
|
||||||
|
'/^account\/lost\/?$/' => array('subtopic' => 'lostaccount'),
|
||||||
|
'/^account\/logout\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'logout'),
|
||||||
|
'/^account\/password\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changepassword'),
|
||||||
|
'/^account\/register\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'registeraccount'),
|
||||||
|
'/^account\/register\/new\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'registernew'),
|
||||||
|
'/^account\/email\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changeemail'),
|
||||||
|
'/^account\/info\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changeinfo'),
|
||||||
|
'/^account\/character\/create\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'createcharacter'),
|
||||||
|
'/^account\/character\/name\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changename'),
|
||||||
|
'/^account\/character\/sex\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changesex'),
|
||||||
|
'/^account\/character\/delete\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'deletecharacter'),
|
||||||
|
'/^account\/character\/comment\/[A-Za-z]+\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changecomment', 'name' => '$3'),
|
||||||
|
'/^account\/character\/comment\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'changecomment'),
|
||||||
|
'/^characters\/[A-Za-z0-9-_%+\']+$/' => array('subtopic' => 'characters', 'name' => '$1'),
|
||||||
|
'/^commands\/add\/?$/' => array('subtopic' => 'commands', 'action' => 'add'),
|
||||||
|
'/^commands\/edit\/?$/' => array('subtopic' => 'commands', 'action' => 'edit'),
|
||||||
|
'/^news\/add\/?$/' => array('subtopic' => 'news', 'action' => 'add'),
|
||||||
|
'/^news\/edit\/?$/' => array('subtopic' => 'news', 'action' => 'edit'),
|
||||||
|
'/^news\/archive\/?$/' => array('subtopic' => 'newsarchive'),
|
||||||
|
'/^news\/archive\/[0-9]+\/?$/' => array('subtopic' => 'newsarchive', 'id' => '$2'),
|
||||||
|
'/^guilds\/[A-Za-z0-9-_%+\']+$/' => array('subtopic' => 'guilds', 'action' => 'show', 'guild' => '$1'),
|
||||||
|
'/^forum\/add_board\/?$/' => array('subtopic' => 'forum', 'action' => 'add_board'),#
|
||||||
|
'/^forum\/edit_board\/?$/' => array('subtopic' => 'forum', 'action' => 'edit_board'),
|
||||||
|
'/^forum\/board\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_board', 'id' => '$2'),
|
||||||
|
'/^forum\/board\/[0-9]+\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_board', 'id' => '$2', 'page' => '$3'),
|
||||||
|
'/^forum\/thread\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2'),
|
||||||
|
'/^forum\/thread\/[0-9]+\/[0-9]+\/?$/' => array('subtopic' => 'forum', 'action' => 'show_thread', 'id' => '$2', 'page' => '$3'),
|
||||||
|
'/^gifts\/history\/?$/' => array('subtopic' => 'gifts', 'action' => 'show_history'),
|
||||||
|
'/^highscores\/[A-Za-z0-9-_]+\/[A-Za-z0-9-_]+\/[0-9]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'vocation' => '$2', 'page' => '$3'),
|
||||||
|
'/^highscores\/[A-Za-z0-9-_]+\/[0-9]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'page' => '$2'),
|
||||||
|
'/^highscores\/[A-Za-z0-9-_]+\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1', 'vocation' => '$2'),
|
||||||
|
'/^highscores\/[A-Za-z0-9-_\']+\/?$/' => array('subtopic' => 'highscores', 'list' => '$1'),
|
||||||
|
'/^polls\/[0-9]+\/?$/' => array('subtopic' => 'polls', 'id' => '$1')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) {
|
||||||
|
$tmp = explode('.', $uri);
|
||||||
|
$_REQUEST['name'] = urldecode($tmp[0]);
|
||||||
|
|
||||||
|
chdir(TOOLS . 'signature');
|
||||||
|
include('index.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($rules as $rule => $redirect) {
|
||||||
|
if (preg_match($rule, $uri)) {
|
||||||
|
$tmp = explode('/', $uri);
|
||||||
|
foreach($redirect as $key => $value) {
|
||||||
|
if(strpos($value, '$') !== false) {
|
||||||
|
$value = str_replace('$' . $value[1], $tmp[$value[1]], $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
$_REQUEST[$key] = $value;
|
||||||
|
$_GET[$key] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$found)
|
||||||
|
$_REQUEST['p'] = $uri;
|
||||||
|
}
|
||||||
|
|
||||||
// define page visited, so it can be used within events system
|
// define page visited, so it can be used within events system
|
||||||
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_GET['p']) ? $_GET['p'] : '');
|
$page = isset($_REQUEST['subtopic']) ? $_REQUEST['subtopic'] : (isset($_REQUEST['p']) ? $_REQUEST['p'] : '');
|
||||||
if(empty($page) || preg_match('/[^A-z0-9_\-]/', $page))
|
if(empty($page) || preg_match('/[^A-z0-9\/_\-]/', $page)) {
|
||||||
|
if(!$found)
|
||||||
|
$page = '404';
|
||||||
|
else
|
||||||
$page = 'news';
|
$page = 'news';
|
||||||
|
}
|
||||||
|
|
||||||
$page = strtolower($page);
|
$page = strtolower($page);
|
||||||
define('PAGE', $page);
|
define('PAGE', $page);
|
||||||
|
|
||||||
$template_place_holders = array();
|
$template_place_holders = array();
|
||||||
|
|
||||||
require_once(SYSTEM . 'functions.php');
|
|
||||||
require_once(SYSTEM . 'init.php');
|
require_once(SYSTEM . 'init.php');
|
||||||
require_once(SYSTEM . 'login.php');
|
require_once(SYSTEM . 'login.php');
|
||||||
require_once(SYSTEM . 'status.php');
|
require_once(SYSTEM . 'status.php');
|
||||||
require_once(SYSTEM . 'template.php');
|
require_once(SYSTEM . 'template.php');
|
||||||
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
|
$twig->addGlobal('status', $status);
|
||||||
|
|
||||||
// database migrations
|
// database migrations
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
@@ -155,7 +248,7 @@ if($config['backward_support']) {
|
|||||||
$config['site']['screenshot_page'] = true;
|
$config['site']['screenshot_page'] = true;
|
||||||
|
|
||||||
if($config['forum'] != '')
|
if($config['forum'] != '')
|
||||||
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? internalLayoutLink('forum') : $config['forum']);
|
$config['forum_link'] = (strtolower($config['forum']) == 'site' ? getLink('forum') : $config['forum']);
|
||||||
|
|
||||||
foreach($status as $key => $value)
|
foreach($status as $key => $value)
|
||||||
$config['status']['serverStatus_' . $key] = $value;
|
$config['status']['serverStatus_' . $key] = $value;
|
||||||
@@ -170,9 +263,7 @@ if($load_it)
|
|||||||
require(SYSTEM . 'compat_pages.php');
|
require(SYSTEM . 'compat_pages.php');
|
||||||
|
|
||||||
$ignore = false;
|
$ignore = false;
|
||||||
$file = SYSTEM . 'pages/' . $page . '.php';
|
|
||||||
if(!@file_exists($file))
|
|
||||||
{
|
|
||||||
$logged_access = 0;
|
$logged_access = 0;
|
||||||
if($logged && $account_logged && $account_logged->isLoaded()) {
|
if($logged && $account_logged && $account_logged->isLoaded()) {
|
||||||
$logged_access = $account_logged->getAccess();
|
$logged_access = $account_logged->getAccess();
|
||||||
@@ -222,6 +313,9 @@ if($load_it)
|
|||||||
$content .= $query['body']; // plain html
|
$content .= $query['body']; // plain html
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
$file = SYSTEM . 'pages/' . $page . '.php';
|
||||||
|
if(!@file_exists($file) && !$found)
|
||||||
{
|
{
|
||||||
$page = '404';
|
$page = '404';
|
||||||
$file = SYSTEM . 'pages/404.php';
|
$file = SYSTEM . 'pages/404.php';
|
||||||
|
@@ -8,6 +8,17 @@ CREATE TABLE `myaac_account_actions`
|
|||||||
KEY (`account_id`)
|
KEY (`account_id`)
|
||||||
) ENGINE = MyISAM;
|
) ENGINE = MyISAM;
|
||||||
|
|
||||||
|
CREATE TABLE `myaac_admin_menu`
|
||||||
|
(
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`page` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`ordering` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`flags` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`enabled` INT(1) NOT NULL DEFAULT 1,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = MyISAM;
|
||||||
|
|
||||||
CREATE TABLE `myaac_bugtracker`
|
CREATE TABLE `myaac_bugtracker`
|
||||||
(
|
(
|
||||||
`account` VARCHAR(255) NOT NULL,
|
`account` VARCHAR(255) NOT NULL,
|
||||||
@@ -112,6 +123,7 @@ CREATE TABLE `myaac_hooks`
|
|||||||
`name` VARCHAR(30) NOT NULL DEFAULT '',
|
`name` VARCHAR(30) NOT NULL DEFAULT '',
|
||||||
`type` INT(2) NOT NULL DEFAULT 0,
|
`type` INT(2) NOT NULL DEFAULT 0,
|
||||||
`file` VARCHAR(100) NOT NULL,
|
`file` VARCHAR(100) NOT NULL,
|
||||||
|
`ordering` INT(11) NOT NULL DEFAULT 0,
|
||||||
`enabled` INT(1) NOT NULL DEFAULT 1,
|
`enabled` INT(1) NOT NULL DEFAULT 1,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE = MyISAM;
|
) ENGINE = MyISAM;
|
||||||
|
@@ -230,9 +230,9 @@ if(!$error) {
|
|||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '$config[\'client_download\'] = \'http://clients.halfaway.net/windows.php?tibia=\'. $config[\'client\'];';
|
$content .= '$config[\'client_download\'] = \'http://tibia-clients.com/clients/download/\'. $config[\'client\'] . \'/exe/windows\';';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
$content .= '$config[\'client_download_linux\'] = \'http://clients.halfaway.net/linux.php?tibia=\'. $config[\'client\'];';
|
$content .= '$config[\'client_download_linux\'] = \'http://tibia-clients.com/clients/download/\'. $config[\'client\'] . \'/tar/linux\';';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
$content .= '// place for your configuration directives, so you can later easily update myaac';
|
$content .= '// place for your configuration directives, so you can later easily update myaac';
|
||||||
$content .= PHP_EOL;
|
$content .= PHP_EOL;
|
||||||
|
@@ -146,31 +146,31 @@ INSERT INTO `myaac_news` (`id`, `type`, `date`, `category`, `title`, `body`, `pl
|
|||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Rook Sample', 1, 1, 8, 0, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179613, 2453925456, 1, 1255179614, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
if(!query($insert_into_players . "(null, 'Rook Sample', 4, " . $_SESSION['account'] . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 11, 2200, 1298, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, 1, 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 4, " . $_SESSION['account'] . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Druid Sample', 1, 1, 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
if(!query($insert_into_players . "(null, 'Druid Sample', 4, " . $_SESSION['account'] . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Paladin Sample', 1, 1, 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
if(!query($insert_into_players . "(null, 'Paladin Sample', 4, " . $_SESSION['account'] . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
|
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
|
||||||
if($query->rowCount() == 0) {
|
if($query->rowCount() == 0) {
|
||||||
if(!query($insert_into_players . "(null, 'Knight Sample', 1, 1, 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 1, UNIX_TIMESTAMP(), 1, '');"))
|
if(!query($insert_into_players . "(null, 'Knight Sample', 4, " . $_SESSION['account'] . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 11, 2200, 1298, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');"))
|
||||||
$success = false;
|
$success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,16 @@
|
|||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"author": "nobody",
|
"author": "nobody",
|
||||||
"contact": "nobody@example.org",
|
"contact": "nobody@example.org",
|
||||||
|
"require": {
|
||||||
|
"myaac": "0.4.3",
|
||||||
|
"php": "5.2.0"
|
||||||
|
},
|
||||||
"install": "plugins/example/install.php",
|
"install": "plugins/example/install.php",
|
||||||
|
"uninstall": [
|
||||||
|
"plugins/example.json",
|
||||||
|
"plugins/example/install.php",
|
||||||
|
"plugins/example/before.php"
|
||||||
|
],
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"Example Hook": {
|
"Example Hook": {
|
||||||
"type": "BEFORE_PAGE",
|
"type": "BEFORE_PAGE",
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -38,46 +38,27 @@ function generateLink($url, $name, $blank = false) {
|
|||||||
return '<a href="' . $url . '"' . ($blank ? ' target="_blank"' : '') . '>' . $name . '</a>';
|
return '<a href="' . $url . '"' . ($blank ? ' target="_blank"' : '') . '>' . $name . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLink($page, $name, $blank = false) {
|
function getFullLink($page, $name, $blank = false) {
|
||||||
return generateLink(getPageLink($page), $name, $blank);
|
return generateLink(getLink($page), $name, $blank);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPageLink($page, $action = null)
|
function getLink($page, $action = null)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . $page . ($action ? '/' . $action : '');
|
||||||
// TODO: tibiacom template is not working correctly with this
|
|
||||||
if($config['friendly_urls'])
|
|
||||||
return BASE_URL . $page . ($action ? '/' . $action : '');
|
|
||||||
|
|
||||||
return BASE_URL . '?subtopic=' . $page . ($action ? '&action=' . $action : '');
|
|
||||||
}
|
}
|
||||||
function internalLayoutLink($page, $action = null) {return getPageLink($page, $action);}
|
function internalLayoutLink($page, $action = null) {return getLink($page, $action);}
|
||||||
|
|
||||||
function getForumThreadLink($thread_id, $page = NULL)
|
function getForumThreadLink($thread_id, $page = NULL)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
|
||||||
$url = '';
|
|
||||||
if($config['friendly_urls'])
|
|
||||||
$url = BASE_URL . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
|
|
||||||
else
|
|
||||||
$url = BASE_URL . '?subtopic=forum&action=show_thread&id=' . (int)$thread_id . (isset($page) ? '&page=' . $page : '');
|
|
||||||
|
|
||||||
return $url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getForumBoardLink($board_id, $page = NULL)
|
function getForumBoardLink($board_id, $page = NULL)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
return BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
|
||||||
$url = '';
|
|
||||||
if($config['friendly_urls'])
|
|
||||||
$url = BASE_URL . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
|
|
||||||
else
|
|
||||||
$url = BASE_URL . '?subtopic=forum&action=show_board&id=' . (int)$board_id . (isset($page) ? '&page=' . $page : '');
|
|
||||||
|
|
||||||
return $url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPlayerLink($name, $generate = true)
|
function getPlayerLink($name, $generate = true)
|
||||||
@@ -92,11 +73,7 @@ function getPlayerLink($name, $generate = true)
|
|||||||
$name = $player->getName();
|
$name = $player->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = '';
|
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'characters/' . urlencode($name);
|
||||||
if($config['friendly_urls'])
|
|
||||||
$url = BASE_URL . 'characters/' . urlencode($name);
|
|
||||||
else
|
|
||||||
$url = BASE_URL . '?subtopic=characters&name=' . urlencode($name);
|
|
||||||
|
|
||||||
if(!$generate) return $url;
|
if(!$generate) return $url;
|
||||||
return generateLink($url, $name);
|
return generateLink($url, $name);
|
||||||
@@ -116,11 +93,7 @@ function getHouseLink($name, $generate = true)
|
|||||||
$name = $house->fetchColumn();
|
$name = $house->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = '';
|
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'houses/' . urlencode($name);
|
||||||
if($config['friendly_urls'])
|
|
||||||
$url = BASE_URL . 'houses/' . urlencode($name);
|
|
||||||
else
|
|
||||||
$url = BASE_URL . '?subtopic=houses&page=view&house=' . urlencode($name);
|
|
||||||
|
|
||||||
if(!$generate) return $url;
|
if(!$generate) return $url;
|
||||||
return generateLink($url, $name);
|
return generateLink($url, $name);
|
||||||
@@ -133,18 +106,12 @@ function getGuildLink($name, $generate = true)
|
|||||||
if(is_numeric($name))
|
if(is_numeric($name))
|
||||||
{
|
{
|
||||||
$guild = $db->query(
|
$guild = $db->query(
|
||||||
'SELECT ' . $db->fieldName('name') .
|
'SELECT `name` FROM `guilds` WHERE `id` = ' . (int)$name);
|
||||||
' FROM ' . $db->tableName('guilds') .
|
|
||||||
' WHERE ' . $db->fieldName('id') . ' = ' . (int)$name);
|
|
||||||
if($guild->rowCount() > 0)
|
if($guild->rowCount() > 0)
|
||||||
$name = $guild->fetchColumn();
|
$name = $guild->fetchColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = '';
|
$url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . 'guilds/' . urlencode($name);
|
||||||
if($config['friendly_urls'])
|
|
||||||
$url = BASE_URL . 'guilds/' . urlencode($name);
|
|
||||||
else
|
|
||||||
$url = BASE_URL . '?subtopic=guilds&action=show&guild=' . urlencode($name);
|
|
||||||
|
|
||||||
if(!$generate) return $url;
|
if(!$generate) return $url;
|
||||||
return generateLink($url, $name);
|
return generateLink($url, $name);
|
||||||
@@ -802,11 +769,7 @@ function template_header($is_admin = false)
|
|||||||
Please turn it on, or be aware that some features on this website will not work correctly.</div>
|
Please turn it on, or be aware that some features on this website will not work correctly.</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
';
|
';
|
||||||
if(admin())
|
|
||||||
$ret .= '<!--script type="text/javascript" src="' . BASE_URL . 'tools/tiny_mce/tiny_mce.js"></script>
|
|
||||||
<script type="text/javascript" src="' . BASE_URL . 'tools/jquery.qtip.js" ></script>
|
|
||||||
<script type="text/javascript" src="' . BASE_URL . 'tools/admin.js"></script-->
|
|
||||||
';
|
|
||||||
if($config['recaptcha_enabled'])
|
if($config['recaptcha_enabled'])
|
||||||
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
|
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
|
||||||
return $ret;
|
return $ret;
|
||||||
@@ -817,13 +780,14 @@ function template_header($is_admin = false)
|
|||||||
*/
|
*/
|
||||||
function template_footer()
|
function template_footer()
|
||||||
{
|
{
|
||||||
global $visitors, $config, $views_counter;
|
global $config, $views_counter;
|
||||||
$ret = '';
|
$ret = '';
|
||||||
if(admin())
|
if(admin())
|
||||||
$ret .= generateLink(ADMIN_URL, 'Admin Panel', true);
|
$ret .= generateLink(ADMIN_URL, 'Admin Panel', true);
|
||||||
|
|
||||||
if($config['visitors_counter'])
|
if($config['visitors_counter'])
|
||||||
{
|
{
|
||||||
|
global $visitors;
|
||||||
$amount = $visitors->getAmountVisitors();
|
$amount = $visitors->getAmountVisitors();
|
||||||
$ret .= '<br/>Currently there ' . ($amount > 1 ? 'are' : 'is') . ' ' . $amount . ' visitor' . ($amount > 1 ? 's' : '') . '.';
|
$ret .= '<br/>Currently there ' . ($amount > 1 ? 'are' : 'is') . ' ' . $amount . ' visitor' . ($amount > 1 ? 's' : '') . '.';
|
||||||
}
|
}
|
||||||
@@ -843,21 +807,11 @@ function template_footer()
|
|||||||
|
|
||||||
function template_ga_code()
|
function template_ga_code()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config, $twig;
|
||||||
if(!isset($config['google_analytics_id'][0]))
|
if(!isset($config['google_analytics_id'][0]))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
return "
|
return $twig->render('google_analytics.html.twig');
|
||||||
<script>
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', '" . $config['google_analytics_id'] . "', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
|
|
||||||
</script>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function template_form()
|
function template_form()
|
||||||
@@ -899,6 +853,8 @@ function getCreatureName($killer, $showStatus = false, $extendedInfo = false)
|
|||||||
{
|
{
|
||||||
global $vowels, $ots, $config;
|
global $vowels, $ots, $config;
|
||||||
$str = "";
|
$str = "";
|
||||||
|
$players_rows = '';
|
||||||
|
|
||||||
if(is_numeric($killer))
|
if(is_numeric($killer))
|
||||||
{
|
{
|
||||||
$player = $ots->createObject('Player');
|
$player = $ots->createObject('Player');
|
||||||
@@ -1104,11 +1060,8 @@ function get_templates()
|
|||||||
function getWorldName($id)
|
function getWorldName($id)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
foreach($config['worlds'] as $_id => $details)
|
if(isset($config['worlds'][$id]))
|
||||||
{
|
return $config['worlds'][$id];
|
||||||
if($id == $_id)
|
|
||||||
return $details['name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $config['lua']['serverName'];
|
return $config['lua']['serverName'];
|
||||||
}
|
}
|
||||||
@@ -1191,23 +1144,66 @@ function load_config_lua($filename)
|
|||||||
|
|
||||||
$config_file = $filename;
|
$config_file = $filename;
|
||||||
if(!@file_exists($config_file))
|
if(!@file_exists($config_file))
|
||||||
die('ERROR: Cannot find ' . $filename . ' file.');
|
{
|
||||||
|
log_append('error.log', '[load_config_file] Fatal error: Cannot load config.lua (' . $filename . '). Error: ' . print_r(error_get_last(), true));
|
||||||
$tempFile = @tempnam('/tmp', 'lua');
|
die('ERROR: Cannot find ' . $filename . ' file. More info in system/logs/error.log');
|
||||||
$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.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: new parser that will also load dofile() includes
|
$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 = "'";
|
||||||
|
|
||||||
// strip lua comments to prevent parsing errors
|
$tmp = explode($delimiter, $line);
|
||||||
fwrite($file, preg_replace('/(-)(-)(.*)/', '', file_get_contents($config_file)));
|
$result = array_merge($result, load_config_lua($config['server_path'] . $tmp[1]));
|
||||||
fclose($file);
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$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;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function str_replace_first($search, $replace, $subject) {
|
||||||
|
$pos = strpos($subject, $search);
|
||||||
|
if ($pos !== false) {
|
||||||
|
return substr_replace($subject, $replace, $pos, strlen($search));
|
||||||
|
}
|
||||||
|
return $subject;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -16,8 +16,14 @@ define('HOOK_AFTER_PAGE', 3);
|
|||||||
define('HOOK_FINISH', 4);
|
define('HOOK_FINISH', 4);
|
||||||
define('HOOK_TIBIACOM_ARTICLE', 5);
|
define('HOOK_TIBIACOM_ARTICLE', 5);
|
||||||
define('HOOK_TIBIACOM_BORDER_3', 6);
|
define('HOOK_TIBIACOM_BORDER_3', 6);
|
||||||
|
define('HOOK_CHARACTERS_BEFORE_INFORMATIONS', 7);
|
||||||
|
define('HOOK_CHARACTERS_AFTER_INFORMATIONS', 8);
|
||||||
|
define('HOOK_CHARACTERS_BEFORE_SIGNATURE', 9);
|
||||||
|
define('HOOK_CHARACTERS_AFTER_SIGNATURE', 10);
|
||||||
|
define('HOOK_CHARACTERS_AFTER_ACCOUNT', 11);
|
||||||
|
define('HOOK_CHARACTERS_AFTER_CHARACTERS', 12);
|
||||||
define('HOOK_FIRST', HOOK_STARTUP);
|
define('HOOK_FIRST', HOOK_STARTUP);
|
||||||
define('HOOK_LAST', HOOK_TIBIACOM_BORDER_3);
|
define('HOOK_LAST', HOOK_CHARACTERS_AFTER_CHARACTERS);
|
||||||
|
|
||||||
$hook_types = array(
|
$hook_types = array(
|
||||||
'STARTUP' => HOOK_STARTUP,
|
'STARTUP' => HOOK_STARTUP,
|
||||||
@@ -25,7 +31,13 @@ $hook_types = array(
|
|||||||
'AFTER_PAGE' => HOOK_AFTER_PAGE,
|
'AFTER_PAGE' => HOOK_AFTER_PAGE,
|
||||||
'FINISH' => HOOK_FINISH,
|
'FINISH' => HOOK_FINISH,
|
||||||
'TIBIACOM_ARTICLE' => HOOK_TIBIACOM_ARTICLE,
|
'TIBIACOM_ARTICLE' => HOOK_TIBIACOM_ARTICLE,
|
||||||
'TIBIACOM_BORDER_3' => HOOK_TIBIACOM_BORDER_3
|
'TIBIACOM_BORDER_3' => HOOK_TIBIACOM_BORDER_3,
|
||||||
|
'CHARACTERS_BEFORE_INFORMATIONS' => HOOK_CHARACTERS_BEFORE_INFORMATIONS,
|
||||||
|
'CHARACTERS_AFTER_INFORMATIONS' => HOOK_CHARACTERS_AFTER_INFORMATIONS,
|
||||||
|
'CHARACTERS_BEFORE_SIGNATURE' => HOOK_CHARACTERS_BEFORE_SIGNATURE,
|
||||||
|
'CHARACTERS_AFTER_SIGNATURE' => HOOK_CHARACTERS_AFTER_SIGNATURE,
|
||||||
|
'CHARACTERS_AFTER_ACCOUNT' => HOOK_CHARACTERS_AFTER_ACCOUNT,
|
||||||
|
'CHARACTERS_AFTER_CHARACTERS' => HOOK_CHARACTERS_AFTER_CHARACTERS
|
||||||
);
|
);
|
||||||
|
|
||||||
class Hook
|
class Hook
|
||||||
@@ -46,7 +58,7 @@ class Hook
|
|||||||
$ret = $tmp($params);
|
$ret = $tmp($params);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
global $db, $config, $template_path, $ots;
|
global $db, $config, $template_path, $ots, $content;
|
||||||
if(file_exists(BASE . $this->_file)) {
|
if(file_exists(BASE . $this->_file)) {
|
||||||
require(BASE . $this->_file);
|
require(BASE . $this->_file);
|
||||||
}
|
}
|
||||||
@@ -84,7 +96,7 @@ class Hooks
|
|||||||
public function load()
|
public function load()
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
$hooks = $db->query('SELECT `name`, `type`, `file` FROM `' . TABLE_PREFIX . 'hooks` WHERE `enabled` = 1;');
|
$hooks = $db->query('SELECT `name`, `type`, `file` FROM `' . TABLE_PREFIX . 'hooks` WHERE `enabled` = 1 ORDER BY `ordering`;');
|
||||||
foreach($hooks as $hook)
|
foreach($hooks as $hook)
|
||||||
$this->register($hook['name'], $hook['type'], $hook['file']);
|
$this->register($hook['name'], $hook['type'], $hook['file']);
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -33,7 +33,8 @@ Twig_Autoloader::register();
|
|||||||
|
|
||||||
$twig_loader = new Twig_Loader_Filesystem(SYSTEM . 'templates');
|
$twig_loader = new Twig_Loader_Filesystem(SYSTEM . 'templates');
|
||||||
$twig = new Twig_Environment($twig_loader, array(
|
$twig = new Twig_Environment($twig_loader, array(
|
||||||
'cache' => CACHE . 'twig/'
|
'cache' => CACHE . 'twig/',
|
||||||
|
'auto_reload' => true
|
||||||
));
|
));
|
||||||
|
|
||||||
$function = new Twig_SimpleFunction('getStyle', function ($i) {
|
$function = new Twig_SimpleFunction('getStyle', function ($i) {
|
||||||
@@ -41,6 +42,21 @@ $function = new Twig_SimpleFunction('getStyle', function ($i) {
|
|||||||
});
|
});
|
||||||
$twig->addFunction($function);
|
$twig->addFunction($function);
|
||||||
|
|
||||||
|
$function = new Twig_SimpleFunction('getLink', function ($s) {
|
||||||
|
global $config;
|
||||||
|
if($config['friendly_urls'])
|
||||||
|
return $s;
|
||||||
|
|
||||||
|
return '?' . $s;
|
||||||
|
});
|
||||||
|
$twig->addFunction($function);
|
||||||
|
|
||||||
|
$function = new Twig_SimpleFunction('hook', function ($hook) {
|
||||||
|
global $hooks;
|
||||||
|
$hooks->trigger($hook);
|
||||||
|
});
|
||||||
|
$twig->addFunction($function);
|
||||||
|
|
||||||
// trim values we receive
|
// trim values we receive
|
||||||
if(isset($_POST))
|
if(isset($_POST))
|
||||||
{
|
{
|
||||||
@@ -87,10 +103,12 @@ unset($tmp);
|
|||||||
if(isset($config['lua']['servername']))
|
if(isset($config['lua']['servername']))
|
||||||
$config['lua']['serverName'] = $config['lua']['servername'];
|
$config['lua']['serverName'] = $config['lua']['servername'];
|
||||||
|
|
||||||
|
|
||||||
if(isset($config['lua']['houserentperiod']))
|
if(isset($config['lua']['houserentperiod']))
|
||||||
$config['lua']['houseRentPeriod'] = $config['lua']['houserentperiod'];
|
$config['lua']['houseRentPeriod'] = $config['lua']['houserentperiod'];
|
||||||
|
|
||||||
|
if($config['item_images_url'][strlen($config['item_images_url']) - 1] != '/')
|
||||||
|
$config['item_images_url'] .= '/';
|
||||||
|
|
||||||
// localize data/ directory
|
// localize data/ directory
|
||||||
if(isset($config['lua']['dataDirectory'][0]))
|
if(isset($config['lua']['dataDirectory'][0]))
|
||||||
{
|
{
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -334,6 +334,9 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
throw new E_OTS_NotLoaded();
|
throw new E_OTS_NotLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->data['lastday'] == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
return round(($this->data['lastday'] - time()) / (24 * 60 * 60), 3);
|
return round(($this->data['lastday'] - time()) / (24 * 60 * 60), 3);
|
||||||
//return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));
|
//return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $prefix = '';
|
protected $prefix = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query counter
|
* Query counter
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -113,6 +113,9 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = 'Please enter your account ' . (USE_ACCOUNT_NAME ? 'name' : 'password') . ' and password.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// stay-logged with sessions
|
// stay-logged with sessions
|
||||||
@@ -135,6 +138,7 @@ else
|
|||||||
|
|
||||||
if($logged) {
|
if($logged) {
|
||||||
$logged_flags = $account_logged->getWebFlags();
|
$logged_flags = $account_logged->getWebFlags();
|
||||||
|
$twig->addGlobal('logged', true);
|
||||||
$twig->addGlobal('account_logged', $account_logged);
|
$twig->addGlobal('account_logged', $account_logged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
system/migrations/10.php
Normal file
17
system/migrations/10.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
if(!fieldExist('ordering', TABLE_PREFIX . 'hooks'))
|
||||||
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `ordering` INT(11) NOT NULL DEFAULT 0 AFTER `file`;");
|
||||||
|
|
||||||
|
if(!tableExist(TABLE_PREFIX . 'admin_menu'))
|
||||||
|
$db->query("
|
||||||
|
CREATE TABLE `myaac_admin_menu`
|
||||||
|
(
|
||||||
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`page` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
|
`ordering` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`flags` INT(11) NOT NULL DEFAULT 0,
|
||||||
|
`enabled` INT(1) NOT NULL DEFAULT 1,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE = MyISAM;");
|
||||||
|
?>
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -17,7 +17,6 @@ if($config['account_country'])
|
|||||||
|
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
|
|
||||||
$errors = array();
|
|
||||||
$show_form = true;
|
$show_form = true;
|
||||||
$config_salt_enabled = fieldExist('salt', 'accounts');
|
$config_salt_enabled = fieldExist('salt', 'accounts');
|
||||||
if(!$logged)
|
if(!$logged)
|
||||||
@@ -39,6 +38,8 @@ if(!$logged)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$errors = array();
|
||||||
|
|
||||||
if(isset($_REQUEST['redirect']))
|
if(isset($_REQUEST['redirect']))
|
||||||
{
|
{
|
||||||
$redirect = urldecode($_REQUEST['redirect']);
|
$redirect = urldecode($_REQUEST['redirect']);
|
||||||
@@ -63,7 +64,7 @@ if(!$logged)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($config['generate_new_reckey'] && $config['mail_enabled'])
|
if($config['generate_new_reckey'] && $config['mail_enabled'])
|
||||||
$account_registered = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Recovery Key </a> )</font></b>';
|
$account_registered = '<b><font color="green">Yes ( <a href="' . getLink('account/register/new') . '"> Buy new Recovery Key </a> )</font></b>';
|
||||||
else
|
else
|
||||||
$account_registered = '<b><font color="green">Yes</font></b>';
|
$account_registered = '<b><font color="green">Yes</font></b>';
|
||||||
}
|
}
|
||||||
@@ -104,18 +105,6 @@ if(!$logged)
|
|||||||
$players = array();
|
$players = array();
|
||||||
$account_players = $account_logged->getPlayersList();
|
$account_players = $account_logged->getPlayersList();
|
||||||
$account_players->orderBy('id');
|
$account_players->orderBy('id');
|
||||||
//show list of players on account
|
|
||||||
foreach($account_players as $player)
|
|
||||||
{
|
|
||||||
$players[] = array(
|
|
||||||
'name' => $player->getName(),
|
|
||||||
'name_encoded' => urlencode($player->getName()),
|
|
||||||
'deleted' => $player->isDeleted(),
|
|
||||||
'level' => $player->getLevel(),
|
|
||||||
'vocation' => $config['vocations'][$player->getVocation()],
|
|
||||||
'online' => $player->isOnline()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $twig->render('account.management.html.twig', array(
|
echo $twig->render('account.management.html.twig', array(
|
||||||
'welcome_message' => $welcome_message,
|
'welcome_message' => $welcome_message,
|
||||||
@@ -132,7 +121,7 @@ if(!$logged)
|
|||||||
'account_rlname' => $account_rlname,
|
'account_rlname' => $account_rlname,
|
||||||
'account_location' => $account_location,
|
'account_location' => $account_location,
|
||||||
'actions' => $actions,
|
'actions' => $actions,
|
||||||
'players' => $players
|
'players' => $account_players
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
//########### CHANGE PASSWORD ##########
|
//########### CHANGE PASSWORD ##########
|
||||||
@@ -146,31 +135,31 @@ if(!$logged)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(empty($new_password) || empty($new_password2) || empty($old_password)){
|
if(empty($new_password) || empty($new_password2) || empty($old_password)){
|
||||||
$show_msgs[] = "Please fill in form.";
|
$errors[] = "Please fill in form.";
|
||||||
}
|
}
|
||||||
$password_strlen = strlen($new_password);
|
$password_strlen = strlen($new_password);
|
||||||
if($new_password != $new_password2) {
|
if($new_password != $new_password2) {
|
||||||
$show_msgs[] = "The new passwords do not match!";
|
$errors[] = "The new passwords do not match!";
|
||||||
}
|
}
|
||||||
else if($password_strlen < 8) {
|
else if($password_strlen < 8) {
|
||||||
$show_msgs[] = "New password minimal length is 8 characters.";
|
$errors[] = "New password minimal length is 8 characters.";
|
||||||
}
|
}
|
||||||
else if($password_strlen > 32) {
|
else if($password_strlen > 32) {
|
||||||
$show_msgs[] = "New password maximal length is 32 characters.";
|
$errors[] = "New password maximal length is 32 characters.";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($show_msgs)) {
|
if(empty($errors)) {
|
||||||
if(!check_password($new_password)) {
|
if(!check_password($new_password)) {
|
||||||
$show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!). Minimum password length is 7 characters and maximum 32.";
|
$errors[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!). Minimum password length is 7 characters and maximum 32.";
|
||||||
}
|
}
|
||||||
$old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password);
|
$old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password);
|
||||||
if($old_password != $account_logged->getPassword()) {
|
if($old_password != $account_logged->getPassword()) {
|
||||||
$show_msgs[] = "Current password is incorrect!";
|
$errors[] = "Current password is incorrect!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($show_msgs)){
|
if(!empty($errors)){
|
||||||
//show errors
|
//show errors
|
||||||
echo $twig->render('error_box.html.twig', array('errors' => $show_msg));
|
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||||
|
|
||||||
//show form
|
//show form
|
||||||
echo $twig->render('account.change_password.html.twig');
|
echo $twig->render('account.change_password.html.twig');
|
||||||
@@ -477,7 +466,7 @@ if($action == "changeemail") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//############## GENERATE NEW RECOVERY KEY ###########
|
//############## GENERATE NEW RECOVERY KEY ###########
|
||||||
if($action == "newreckey")
|
if($action == "registernew")
|
||||||
{
|
{
|
||||||
if(isset($_POST['reg_password']))
|
if(isset($_POST['reg_password']))
|
||||||
$reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']);
|
$reg_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $_POST['reg_password']);
|
||||||
@@ -542,11 +531,13 @@ if($action == "changeemail") {
|
|||||||
|
|
||||||
//###### CHANGE CHARACTER COMMENT ######
|
//###### CHANGE CHARACTER COMMENT ######
|
||||||
if($action == "changecomment") {
|
if($action == "changecomment") {
|
||||||
$player_name = stripslashes($_REQUEST['name']);
|
$player_name = isset($_REQUEST['name']) ? stripslashes($_REQUEST['name']) : null;
|
||||||
$new_comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'],0,2000))) : NULL;
|
$new_comment = isset($_POST['comment']) ? htmlspecialchars(stripslashes(substr($_POST['comment'],0,2000))) : NULL;
|
||||||
$new_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL;
|
$new_hideacc = isset($_POST['accountvisible']) ? (int)$_POST['accountvisible'] : NULL;
|
||||||
|
|
||||||
|
if($player_name != null) {
|
||||||
if (check_name($player_name)) {
|
if (check_name($player_name)) {
|
||||||
$player = $ots->createObject('Player');
|
$player = new OTS_Player();
|
||||||
$player->find($player_name);
|
$player->find($player_name);
|
||||||
if ($player->isLoaded()) {
|
if ($player->isLoaded()) {
|
||||||
$player_account = $player->getAccount();
|
$player_account = $player->getAccount();
|
||||||
@@ -559,29 +550,33 @@ if($action == "changeemail") {
|
|||||||
'title' => 'Character Information Changed',
|
'title' => 'Character Information Changed',
|
||||||
'description' => 'The character information has been changed.'
|
'description' => 'The character information has been changed.'
|
||||||
));
|
));
|
||||||
|
$show_form = false;
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
$errors[] = 'Error. Character <b>' . $player_name . '</b> is not on your account.';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$errors[] = "Error. Character with this name doesn't exist.";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$errors[] = 'Error. Name contain illegal characters.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$errors[] = 'Please enter character name.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($show_form) {
|
||||||
|
if(!empty($errors)) {
|
||||||
|
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($player)) {
|
||||||
echo $twig->render('account.change_comment.html.twig', array(
|
echo $twig->render('account.change_comment.html.twig', array(
|
||||||
'player' => $player,
|
'player' => $player
|
||||||
'player_name' => $player_name
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Error. Character <b>".$player_name."</b> is not on your account.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Error. Character with this name doesn't exist.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "Error. Name contain illegal characters.";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($action == "changename") {
|
if($action == "changename") {
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -83,147 +83,35 @@ if(!empty($action))
|
|||||||
if(!empty($errors))
|
if(!empty($errors))
|
||||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
$use_tinymce = false;
|
|
||||||
//if($action != 'edit' || !$php)
|
|
||||||
// $use_tinymce = true;
|
|
||||||
|
|
||||||
if($use_tinymce): ?>
|
$query =
|
||||||
<script type="text/javascript" src="tools/tiny_mce/jquery.tinymce.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$('#news-body').tinymce({
|
|
||||||
script_url : 'tools/tiny_mce/tiny_mce.js',
|
|
||||||
forced_root_block : false,
|
|
||||||
|
|
||||||
theme : "advanced",
|
|
||||||
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
|
|
||||||
|
|
||||||
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
});
|
|
||||||
|
|
||||||
<?php /*if($action != 'edit'): ?>
|
|
||||||
$("#page-edit-table").hide();
|
|
||||||
$("#page-button").click(function() {
|
|
||||||
$("#page-edit-table").toggle();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
<?php endif; */ ?>
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!--script type="text/javascript">
|
|
||||||
tinyMCE.init({
|
|
||||||
forced_root_block : false,
|
|
||||||
|
|
||||||
mode : "textareas",
|
|
||||||
theme : "advanced",
|
|
||||||
plugins: "safari,advimage,emotions,insertdatetime,preview,wordcount",
|
|
||||||
|
|
||||||
theme_advanced_buttons3_add : "emotions,insertdate,inserttime,preview,|,forecolor,backcolor",
|
|
||||||
|
|
||||||
theme_advanced_toolbar_location : "top",
|
|
||||||
theme_advanced_toolbar_align : "left",
|
|
||||||
theme_advanced_statusbar_location : "bottom",
|
|
||||||
theme_advanced_resizing : true,
|
|
||||||
});
|
|
||||||
</script-->
|
|
||||||
<?php endif; ?>
|
|
||||||
<form method="post" action="?p=pages&action=<?php echo ($action == 'edit' ? 'edit' : 'add'); ?>">
|
|
||||||
<?php if($action == 'edit'): ?>
|
|
||||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
|
||||||
<?php endif; ?>
|
|
||||||
<table class="table" id="page-edit-table" width="100%" border="0" cellspacing="1" cellpadding="4">
|
|
||||||
<tr>
|
|
||||||
<th><b><?php echo ($action == 'edit' ? 'Edit' : 'Add'); ?> page</b></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="1">
|
|
||||||
<tr>
|
|
||||||
<td>Link/name:</td>
|
|
||||||
<td><input name="name" value="<?php echo $name; ?>" size="29" maxlength="29"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Title:</td>
|
|
||||||
<td><input name="title" value="<?php echo $p_title; ?>" size="29" maxlength="29"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>PHP:</td>
|
|
||||||
<td><input type="checkbox" id="news-checkbox" name="php" title="Check if page should be executed as PHP" value="1" <?php if($php) echo 'checked="true"'; ?>/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Content:</td>
|
|
||||||
<td>
|
|
||||||
<textarea id="news-body" name="body" maxlength="65000" <?php /*if($use_tinymce) echo 'class="tinymce"';*/ ?> cols="50" rows="5"><?php echo htmlentities(isset($body) ? $body : '', ENT_COMPAT, 'UTF-8'); ?></textarea>
|
|
||||||
<?php if($use_tinymce): ?>
|
|
||||||
<br/>
|
|
||||||
<a href="javascript:;" onmousedown="$('#news-body').tinymce().hide();">[Hide]</a>
|
|
||||||
<a href="javascript:;" onmousedown="$('#news-body').tinymce().show();">[Show]</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
|
||||||
<tr/>
|
|
||||||
<tr>
|
|
||||||
<td>Access:</td>
|
|
||||||
<td>
|
|
||||||
<select name="access">
|
|
||||||
<?php foreach($groups->getGroups() as $id => $group): ?>
|
|
||||||
<option value="<?php echo $group->getAccess(); ?>" <?php echo ($access == $group->getAccess() ? 'selected' : ''); ?>><?php echo $group->getName(); ?></option>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="right"><input type="submit" class="button" value="Save"/></td>
|
|
||||||
<td align="left">
|
|
||||||
<input type="button" onclick="window.location = '<?php echo getPageLink(PAGE) . ($config['friendly_urls'] ? '?' : '&'); ?>p=pages';" class="button" value="Cancel"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<table class="table" width="100%" cellspacing="1" cellpadding="4">
|
|
||||||
<tr>
|
|
||||||
<th><b>Name</b></th>
|
|
||||||
<th><b>Title</b></th>
|
|
||||||
<th><b>Options</b></th>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$pages =
|
|
||||||
$db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages'));
|
$db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'pages'));
|
||||||
|
|
||||||
$i = 0;
|
$pages = array();
|
||||||
foreach($pages as $_page): ?>
|
foreach($query as $_page) {
|
||||||
<tr>
|
$pages[] = array(
|
||||||
<td><?php echo getLink($_page['name'], $_page['name']); ?></td>
|
'link' => getFullLink($_page['name'], $_page['name']),
|
||||||
<td><i><?php echo substr($_page['title'], 0, 20); ?></i></td>
|
'title' => substr($_page['title'], 0, 20),
|
||||||
<td>
|
'id' => $_page['id'],
|
||||||
<a href="?p=pages&action=edit&id=<?php echo $_page['id']; ?>" class="ico" title="Edit">
|
'hidden' => $_page['hidden']
|
||||||
<img src="<?php echo BASE_URL; ?>images/edit.png"/>
|
);
|
||||||
Edit
|
}
|
||||||
</a>
|
|
||||||
<a href="<?php echo ADMIN_URL; ?>?p=pages&action=delete&id=<?php echo $_page['id']; ?>" class="ico" onclick="return confirm('Are you sure?');" title="Delete">
|
echo $twig->render('admin.pages.form.html.twig', array(
|
||||||
<img src="<?php echo BASE_URL; ?>images/del.png"/>
|
'action' => $action,
|
||||||
Delete
|
'id' => $action == 'edit' ? $id : null,
|
||||||
</a>
|
'name' => $name,
|
||||||
<a href="?p=pages&action=hide&id=<?php echo $_page['id']; ?>" class="ico" title="<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>">
|
'title' => $p_title,
|
||||||
<img src="<?php echo BASE_URL; ?>images/<?php echo ($_page['hidden'] != 1 ? 'success' : 'error'); ?>.png"/>
|
'php' => $php,
|
||||||
<?php echo ($_page['hidden'] != 1 ? 'Hide' : 'Show'); ?>
|
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
|
||||||
</a>
|
'groups' => $groups->getGroups(),
|
||||||
</td>
|
'access' => $access
|
||||||
</tr>
|
));
|
||||||
<?php endforeach; ?>
|
|
||||||
</table>
|
echo $twig->render('admin.pages.html.twig', array(
|
||||||
|
'pages' => $pages
|
||||||
|
));
|
||||||
|
|
||||||
<?php
|
|
||||||
class Pages
|
class Pages
|
||||||
{
|
{
|
||||||
static public function get($id)
|
static public function get($id)
|
||||||
@@ -243,7 +131,7 @@ class Pages
|
|||||||
{
|
{
|
||||||
$query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name));
|
$query = $db->select(TABLE_PREFIX . 'pages', array('name' => $name));
|
||||||
if($query === false)
|
if($query === false)
|
||||||
$db->insert(TABLE_PREFIX . 'pages', array('name' => $name, 'title' => $title, 'body' => $body, 'player_id' => $player_id, 'php' => $php, 'access' => $access));
|
$db->insert(TABLE_PREFIX . 'pages', array('name' => $name, 'title' => $title, 'body' => $body, 'player_id' => $player_id, 'php' => $php ? '1' : '0', 'access' => $access));
|
||||||
else
|
else
|
||||||
$errors[] = 'Page with this words already exists.';
|
$errors[] = 'Page with this words already exists.';
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -15,8 +15,63 @@ require(SYSTEM . 'hooks.php');
|
|||||||
|
|
||||||
echo $twig->render('admin.plugins.form.html.twig');
|
echo $twig->render('admin.plugins.form.html.twig');
|
||||||
|
|
||||||
$message = '';
|
function deleteDirectory($dir) {
|
||||||
if(isset($_FILES["plugin"]["name"]))
|
if(!file_exists($dir)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_dir($dir)) {
|
||||||
|
return unlink($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(scandir($dir) as $item) {
|
||||||
|
if($item == '.' || $item == '..') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rmdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_REQUEST['uninstall'])){
|
||||||
|
$uninstall = $_REQUEST['uninstall'];
|
||||||
|
|
||||||
|
$filename = BASE . 'plugins/' . $uninstall . '.json';
|
||||||
|
if(!file_exists($filename)) {
|
||||||
|
error('Plugin ' . $uninstall . ' does not exist.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$string = file_get_contents($filename);
|
||||||
|
$plugin_info = json_decode($string, true);
|
||||||
|
if($plugin_info == false) {
|
||||||
|
warning('Cannot load plugin info ' . $uninstall . '.json');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$success = true;
|
||||||
|
foreach($plugin_info['uninstall'] as $file) {
|
||||||
|
$file = BASE . $file;
|
||||||
|
if(!deleteDirectory($file)) {
|
||||||
|
$success = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($success) {
|
||||||
|
if($cache->enabled()) {
|
||||||
|
$cache->delete('templates');
|
||||||
|
}
|
||||||
|
success('Successfully uninstalled plugin ' . $uninstall);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error('Error while uninstalling plugin ' . $uninstall . ': ' . error_get_last());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(isset($_FILES["plugin"]["name"]))
|
||||||
{
|
{
|
||||||
$file = $_FILES["plugin"];
|
$file = $_FILES["plugin"];
|
||||||
$filename = $file["name"];
|
$filename = $file["name"];
|
||||||
@@ -79,9 +134,39 @@ if(isset($_FILES["plugin"]["name"]))
|
|||||||
$string = file_get_contents($file_name);
|
$string = file_get_contents($file_name);
|
||||||
$plugin = json_decode($string, true);
|
$plugin = json_decode($string, true);
|
||||||
if ($plugin == null) {
|
if ($plugin == null) {
|
||||||
warning('Cannot load ' . $file_name . '. File might be not valid json code.');
|
warning('Cannot load ' . $file_name . '. File might be not a valid json code.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$continue = true;
|
||||||
|
|
||||||
|
if(isset($plugin['require'])) {
|
||||||
|
$require = $plugin['require'];
|
||||||
|
if(isset($require['myaac'])) {
|
||||||
|
$require_myaac = $require['myaac'];
|
||||||
|
if(version_compare(MYAAC_VERSION, $require_myaac, '<')) {
|
||||||
|
warning("This plugin requires MyAAC version " . $require_myaac . ", you're using version " . MYAAC_VERSION . " - please update.");
|
||||||
|
$continue = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($require['php'])) {
|
||||||
|
$require_php = $require['php'];
|
||||||
|
if(version_compare(phpversion(), $require_php, '<')) {
|
||||||
|
warning("This plugin requires PHP version " . $require_php . ", you're using version " . phpversion() . " - please update.");
|
||||||
|
$continue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($require['database'])) {
|
||||||
|
$require_database = $require['database'];
|
||||||
|
if($require_database < DATABASE_VERSION) {
|
||||||
|
warning("This plugin requires database version " . $require_database . ", you're using version " . DATABASE_VERSION . " - please update.");
|
||||||
|
$continue = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($continue) {
|
||||||
if (isset($plugin['install'])) {
|
if (isset($plugin['install'])) {
|
||||||
if (file_exists(BASE . $plugin['install']))
|
if (file_exists(BASE . $plugin['install']))
|
||||||
require(BASE . $plugin['install']);
|
require(BASE . $plugin['install']);
|
||||||
@@ -96,18 +181,22 @@ if(isset($_FILES["plugin"]["name"]))
|
|||||||
if ($query->rowCount() == 1) { // found something
|
if ($query->rowCount() == 1) { // found something
|
||||||
$query = $query->fetch();
|
$query = $query->fetch();
|
||||||
$db->query('UPDATE `' . TABLE_PREFIX . 'hooks` SET `type` = ' . $hook_types[$info['type']] . ', `file` = ' . $db->quote($info['file']) . ' WHERE `id` = ' . (int)$query['id'] . ';');
|
$db->query('UPDATE `' . TABLE_PREFIX . 'hooks` SET `type` = ' . $hook_types[$info['type']] . ', `file` = ' . $db->quote($info['file']) . ' WHERE `id` = ' . (int)$query['id'] . ';');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$db->query('INSERT INTO `' . TABLE_PREFIX . 'hooks` (`id`, `name`, `type`, `file`) VALUES (NULL, ' . $db->quote($_name) . ', ' . $hook_types[$info['type']] . ', ' . $db->quote($info['file']) . ');');
|
$db->query('INSERT INTO `' . TABLE_PREFIX . 'hooks` (`id`, `name`, `type`, `file`) VALUES (NULL, ' . $db->quote($_name) . ', ' . $hook_types[$info['type']] . ', ' . $db->quote($info['file']) . ');');
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
warning('Unknown event type: ' . $info['type']);
|
warning('Unknown event type: ' . $info['type']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($cache->enabled()) {
|
||||||
|
$cache->delete('templates');
|
||||||
|
}
|
||||||
success('<strong>' . $plugin['name'] . '</strong> plugin has been successfully installed.');
|
success('<strong>' . $plugin['name'] . '</strong> plugin has been successfully installed.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
error('There was a problem with extracting zip archive.');
|
error('There was a problem with extracting zip archive.');
|
||||||
}
|
}
|
||||||
@@ -132,8 +221,6 @@ if(isset($_FILES["plugin"]["name"]))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $message;
|
|
||||||
|
|
||||||
$plugins = array();
|
$plugins = array();
|
||||||
$rows = array();
|
$rows = array();
|
||||||
|
|
||||||
@@ -146,15 +233,21 @@ foreach(scandir($path) as $file)
|
|||||||
|
|
||||||
$string = file_get_contents(BASE . 'plugins/' . $file_info[0] . '.json');
|
$string = file_get_contents(BASE . 'plugins/' . $file_info[0] . '.json');
|
||||||
$plugin_info = json_decode($string, true);
|
$plugin_info = json_decode($string, true);
|
||||||
|
if($plugin_info == false) {
|
||||||
|
warning('Cannot load plugin info ' . $file);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
'name' => $plugin_info['name'],
|
'name' => $plugin_info['name'],
|
||||||
'description' => $plugin_info['description'],
|
'description' => $plugin_info['description'],
|
||||||
'version' => $plugin_info['version'],
|
'version' => $plugin_info['version'],
|
||||||
'author' => $plugin_info['author'],
|
'author' => $plugin_info['author'],
|
||||||
'contact' => $plugin_info['contact'],
|
'contact' => $plugin_info['contact'],
|
||||||
'file' => $file,
|
'file' => $file_info[0],
|
||||||
|
'uninstall' => isset($plugin_info['uninstall'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo $twig->render('admin.plugins.html.twig', array(
|
echo $twig->render('admin.plugins.html.twig', array(
|
||||||
'plugins' => $rows
|
'plugins' => $rows
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -149,7 +149,7 @@ function getBanReason($reasonId)
|
|||||||
|
|
||||||
function getBanType($typeId)
|
function getBanType($typeId)
|
||||||
{
|
{
|
||||||
switch($reasonId)
|
switch($typeId)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return "IP Banishment";
|
return "IP Banishment";
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -40,7 +40,7 @@ $showed = $post = $reply = false;
|
|||||||
if(!empty($_REQUEST['reply']))
|
if(!empty($_REQUEST['reply']))
|
||||||
$reply=true;
|
$reply=true;
|
||||||
|
|
||||||
$account = $ots->createObject('Account');
|
$account = new OTS_Account();
|
||||||
$account->load($_REQUEST['acc']);
|
$account->load($_REQUEST['acc']);
|
||||||
$account->isLoaded();
|
$account->isLoaded();
|
||||||
$players = $account->getPlayersList();
|
$players = $account->getPlayersList();
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -18,9 +18,7 @@ function generate_search_form($autofocus = false)
|
|||||||
{
|
{
|
||||||
global $config, $twig;
|
global $config, $twig;
|
||||||
return $twig->render('characters.form.html.twig', array(
|
return $twig->render('characters.form.html.twig', array(
|
||||||
'link' => getPageLink('characters'),
|
'link' => getLink('characters'),
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'autofocus' => $autofocus
|
'autofocus' => $autofocus
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -44,7 +42,7 @@ function retrieve_former_name($name)
|
|||||||
|
|
||||||
$name = '';
|
$name = '';
|
||||||
if(isset($_REQUEST['name']))
|
if(isset($_REQUEST['name']))
|
||||||
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
|
$name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
||||||
|
|
||||||
if(empty($name))
|
if(empty($name))
|
||||||
{
|
{
|
||||||
@@ -58,7 +56,7 @@ $name = str_replace('/', '', $name);
|
|||||||
|
|
||||||
$oldName = '';
|
$oldName = '';
|
||||||
|
|
||||||
$player = $ots->createObject('Player');
|
$player = new OTS_Player();
|
||||||
$player->find($name);
|
$player->find($name);
|
||||||
if(!$player->isLoaded())
|
if(!$player->isLoaded())
|
||||||
{
|
{
|
||||||
@@ -163,8 +161,10 @@ if($player->isLoaded() && !$player->isDeleted())
|
|||||||
$skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
|
$skills[] = array('skillid' => $skillid, 'value' => $skills_db[$field_name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$skills = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
|
$skills_db = $db->query('SELECT `skillid`, `value` FROM `player_skills` WHERE `player_id` = ' . $player->getId() . ' LIMIT 7');
|
||||||
|
$skills = $skills_db->fetchAll();
|
||||||
|
}
|
||||||
|
|
||||||
foreach($skills as &$skill) {
|
foreach($skills as &$skill) {
|
||||||
$skill['name'] = getSkillName($skill['skillid']);
|
$skill['name'] = getSkillName($skill['skillid']);
|
||||||
@@ -229,22 +229,19 @@ if($player->isLoaded() && !$player->isDeleted())
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dead_add_content = '';
|
$dead_add_content = '';
|
||||||
|
$deaths = array();
|
||||||
if(tableExist('killers')) {
|
if(tableExist('killers')) {
|
||||||
$player_deaths = $db->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
|
$player_deaths = $db->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
|
||||||
if(count($player_deaths))
|
if(count($player_deaths))
|
||||||
{
|
{
|
||||||
$dead_add_content = '<br/><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor='.$config['vdarkborder'].'><td colspan=2 class="white"><b>Character Deaths</b></td></tr>';
|
|
||||||
|
|
||||||
$number_of_rows = 0;
|
$number_of_rows = 0;
|
||||||
foreach($player_deaths as $death)
|
foreach($player_deaths as $death)
|
||||||
{
|
{
|
||||||
$dead_add_content .= '<tr bgcolor="'.getStyle($number_of_rows++).'">
|
|
||||||
<td width="20%" align="center">'.date("j M Y, H:i", $death['date']).'</td>
|
|
||||||
<td> ';
|
|
||||||
$killers = $db->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
|
$killers = $db->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
|
||||||
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
|
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
|
||||||
WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
|
WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
|
||||||
|
|
||||||
|
$description = '';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$count = count($killers);
|
$count = count($killers);
|
||||||
foreach($killers as $killer)
|
foreach($killers as $killer)
|
||||||
@@ -253,41 +250,36 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
if($killer['player_name'] != "")
|
if($killer['player_name'] != "")
|
||||||
{
|
{
|
||||||
if($i == 1)
|
if($i == 1)
|
||||||
$dead_add_content .= "Killed at level <b>".$death['level']."</b>";
|
$description .= "Killed at level <b>".$death['level']."</b>";
|
||||||
else if($i == $count)
|
else if($i == $count)
|
||||||
$dead_add_content .= " and";
|
$description .= " and";
|
||||||
else
|
else
|
||||||
$dead_add_content .= ",";
|
$description .= ",";
|
||||||
|
|
||||||
$dead_add_content .= " by ";
|
$description .= " by ";
|
||||||
if($killer['monster_name'] != "")
|
if($killer['monster_name'] != "")
|
||||||
$dead_add_content .= $killer['monster_name']." summoned by ";
|
$description .= $killer['monster_name']." summoned by ";
|
||||||
|
|
||||||
if($killer['player_exists'] == 0)
|
if($killer['player_exists'] == 0)
|
||||||
$dead_add_content .= getPlayerLink($killer['player_name']);
|
$description .= getPlayerLink($killer['player_name']);
|
||||||
else
|
else
|
||||||
$dead_add_content .= $killer['player_name'];
|
$description .= $killer['player_name'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($i == 1)
|
if($i == 1)
|
||||||
$dead_add_content .= "Died at level <b>".$death['level']."</b>";
|
$description .= "Died at level <b>".$death['level']."</b>";
|
||||||
else if($i == $count)
|
else if($i == $count)
|
||||||
$dead_add_content .= " and";
|
$description .= " and";
|
||||||
else
|
else
|
||||||
$dead_add_content .= ",";
|
$description .= ",";
|
||||||
|
|
||||||
$dead_add_content .= " by ".$killer['monster_name'];
|
$description .= " by ".$killer['monster_name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$dead_add_content .= ".</td></tr>";
|
$deaths[] = array('time' => $death['date'], 'description' => $description . '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($number_of_rows > 0)
|
|
||||||
$dead_add_content += '</table>';
|
|
||||||
else
|
|
||||||
$dead_add_content = '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -301,45 +293,35 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
|
|
||||||
if(count($deaths_db))
|
if(count($deaths_db))
|
||||||
{
|
{
|
||||||
$dead_add_content = '<br/><table border=0 cellspacing=1 cellpadding=4 width=100%><tr bgcolor="'.$config['vdarkborder'].'"><td colspan="2" class="white"><b>Character Deaths</b></td></tr>';
|
|
||||||
|
|
||||||
$number_of_rows = 0;
|
$number_of_rows = 0;
|
||||||
foreach($deaths_db as $death)
|
foreach($deaths_db as $death)
|
||||||
{
|
{
|
||||||
$dead_add_content .= '<tr bgcolor="'.getStyle($number_of_rows++).'">
|
|
||||||
<td width="20%" align="center">'.date("j M Y, H:i", $death['time']).'</td>
|
|
||||||
<td> ';
|
|
||||||
|
|
||||||
$lasthit = ($death['is_player']) ? getPlayerLink($death['killed_by']) : $death['killed_by'];
|
$lasthit = ($death['is_player']) ? getPlayerLink($death['killed_by']) : $death['killed_by'];
|
||||||
$dead_add_content .= 'Killed at level ' . $death['level'] . ' by ' . $lasthit;
|
$description = 'Killed at level ' . $death['level'] . ' by ' . $lasthit;
|
||||||
if($death['unjustified']) {
|
if($death['unjustified']) {
|
||||||
$dead_add_content .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
$description .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$mostdmg = ($death['mostdamage_by'] !== $death['killed_by']) ? true : false;
|
$mostdmg = ($death['mostdamage_by'] !== $death['killed_by']) ? true : false;
|
||||||
if($mostdmg)
|
if($mostdmg)
|
||||||
{
|
{
|
||||||
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
|
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
|
||||||
$dead_add_content .= ' and by ' . $mostdmg;
|
$description .= ' and by ' . $mostdmg;
|
||||||
|
|
||||||
if ($death['mostdamage_unjustified']) {
|
if ($death['mostdamage_unjustified']) {
|
||||||
$dead_add_content .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
$description .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$dead_add_content .= " <b>(soloed)</b>";
|
$description .= " <b>(soloed)</b>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$dead_add_content .= ".</td></tr>";
|
$deaths[] = array('time' => $death['time'], 'description' => $description);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($number_of_rows > 0)
|
|
||||||
$dead_add_content += '</table>';
|
|
||||||
else
|
|
||||||
$dead_add_content = '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$frags = array();
|
||||||
$frag_add_content = '';
|
$frag_add_content = '';
|
||||||
if($config['characters']['frags'])
|
if($config['characters']['frags'])
|
||||||
{
|
{
|
||||||
@@ -349,30 +331,18 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
$player_frags = $db->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
|
$player_frags = $db->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';');
|
||||||
if(count($player_frags))
|
if(count($player_frags))
|
||||||
{
|
{
|
||||||
$frags = 0;
|
$row_count = 0;
|
||||||
$frag_add_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><br><TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Victims</B></TD></TR>';
|
|
||||||
foreach($player_frags as $frag)
|
foreach($player_frags as $frag)
|
||||||
{
|
{
|
||||||
$frags++;
|
$description = 'Fragged <a href="' . getPlayerLink($frag[name], false) . '">' . $frag[name] . '</a> at level ' . $frag[level];
|
||||||
$frag_add_content .= '<tr bgcolor="' . getStyle($frags) . '">
|
$frags[] = array('time' => $frag['date'], 'description' => $description, 'unjustified' => $frag['unjustified'] != 0);
|
||||||
<td width="20%" align="center">' . date("j M Y, H:i", $frag['date']) . '</td>
|
|
||||||
<td>Fragged <a href="' . getPlayerLink($frag[name], false) . '">' . $frag[name] . '</a> at level ' . $frag[level];
|
|
||||||
|
|
||||||
$frag_add_content .= ". (".(($frag['unjustified'] == 0) ? "<font size=\"1\" color=\"green\">Justified</font>" : "<font size=\"1\" color=\"red\">Unjustified</font>").")</td></tr>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($frags > 0)
|
|
||||||
$frag_add_content += '</table>';
|
|
||||||
else
|
|
||||||
$frag_add_content = '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// signature
|
// signature
|
||||||
if($config['signature_enabled']) {
|
if($config['signature_enabled']) {
|
||||||
$signature_url = BASE_URL . 'tools/signature/?name=' . urlencode($player->getName());
|
$signature_url = BASE_URL . ($config['friendly_urls'] ? '' : '?') . urlencode($player->getName()) . '.png';
|
||||||
if($config['friendly_urls'])
|
|
||||||
$signature_url = BASE_URL . urlencode($player->getName()) . '.png';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$hidden = $player->getCustomField('hidden');
|
$hidden = $player->getCustomField('hidden');
|
||||||
@@ -425,13 +395,13 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
|
|||||||
'quests' => isset($quests) ? $quests : null,
|
'quests' => isset($quests) ? $quests : null,
|
||||||
'equipment' => isset($equipment) ? $equipment : null,
|
'equipment' => isset($equipment) ? $equipment : null,
|
||||||
'skull' => $player->getSkullTime() > 0 && ($player->getSkull() == 4 || $player->getSkull() == 5) ? $skulls[$player->getSkull()] : null,
|
'skull' => $player->getSkullTime() > 0 && ($player->getSkull() == 4 || $player->getSkull() == 5) ? $skulls[$player->getSkull()] : null,
|
||||||
'deaths' => $dead_add_content,
|
'deaths' => $deaths,
|
||||||
'frags' => $frag_add_content,
|
'frags' => $frags,
|
||||||
'signature_url' => isset($signature_url) ? $signature_url : null,
|
'signature_url' => isset($signature_url) ? $signature_url : null,
|
||||||
'player_link' => getPlayerLink($player->getName(), false),
|
'player_link' => getPlayerLink($player->getName(), false),
|
||||||
'hidden' => $hidden,
|
'hidden' => $hidden,
|
||||||
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
|
'bannedUntil' => isset($bannedUntil) ? $bannedUntil : null,
|
||||||
'characters_link' => internalLayoutLink('characters'),
|
'characters_link' => getLink('characters'),
|
||||||
'account_players' => isset($account_players) ? $account_players : null,
|
'account_players' => isset($account_players) ? $account_players : null,
|
||||||
'search_form' => generate_search_form()
|
'search_form' => generate_search_form()
|
||||||
));
|
));
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -73,7 +73,7 @@ if($canEdit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo $twig->render('commands.form.html.twig', array(
|
echo $twig->render('commands.form.html.twig', array(
|
||||||
'link' => getPageLink('commands', ($action == 'edit' ? 'edit' : 'add')),
|
'link' => getLink('commands/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'id' => isset($id) ? $id : null,
|
'id' => isset($id) ? $id : null,
|
||||||
'words' => isset($words) ? $words : null,
|
'words' => isset($words) ? $words : null,
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -101,7 +101,7 @@ if($step == 'save')
|
|||||||
{
|
{
|
||||||
if($config['account_mail_unique'])
|
if($config['account_mail_unique'])
|
||||||
{
|
{
|
||||||
$test_email_account = $ots->createObject('Account');
|
$test_email_account = new OTS_Account();
|
||||||
$test_email_account->findByEmail($email);
|
$test_email_account->findByEmail($email);
|
||||||
if($test_email_account->isLoaded())
|
if($test_email_account->isLoaded())
|
||||||
$errors['email'] = 'Account with this e-mail address already exist.';
|
$errors['email'] = 'Account with this e-mail address already exist.';
|
||||||
@@ -126,7 +126,7 @@ if($step == 'save')
|
|||||||
|
|
||||||
if(empty($errors))
|
if(empty($errors))
|
||||||
{
|
{
|
||||||
$new_account = $ots->createObject('Account');
|
$new_account = new OTS_Account();
|
||||||
if(USE_ACCOUNT_NAME)
|
if(USE_ACCOUNT_NAME)
|
||||||
$new_account->create($account_name);
|
$new_account->create($account_name);
|
||||||
else
|
else
|
||||||
@@ -172,44 +172,21 @@ if($step == 'save')
|
|||||||
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
|
$verify_url = BASE_URL . '?p=account&action=confirm_email&v=' . $hash;
|
||||||
$server_name = $config['lua']['serverName'];
|
$server_name = $config['lua']['serverName'];
|
||||||
|
|
||||||
$body_plain = "Hello!
|
$body_plain = $twig->render('mail.account.verify.plain.html.twig', array(
|
||||||
|
'account' => $tmp_account,
|
||||||
|
'verify_url' => $verify_url
|
||||||
|
));
|
||||||
|
|
||||||
Thank you for registering on $server_name!
|
$body_html = $twig->render('mail.account.verify.html.twig', array(
|
||||||
|
'account' => $tmp_account,
|
||||||
Here are the details of your account:
|
'verify_url' => generateLink($verify_url, $verify_url, true)
|
||||||
Account" . (USE_ACCOUNT_NAME ? ' Name' : '') . ": $tmp_account
|
));
|
||||||
Password: ************ (hidden for security reasons)
|
|
||||||
|
|
||||||
To verify your email address please click the link below:
|
|
||||||
$verify_url
|
|
||||||
If you haven't registered on $server_name please ignore this email.";
|
|
||||||
|
|
||||||
$body_html = 'Hello!<br/>
|
|
||||||
<br/>
|
|
||||||
Thank you for registering on ' . $config['lua']['serverName'] . '!<br/>
|
|
||||||
<br/>
|
|
||||||
Here are the details of your account:<br/>
|
|
||||||
Account' . (USE_ACCOUNT_NAME ? ' Name' : '') . ': ' . $tmp_account . '<br/>
|
|
||||||
Password: ************ (hidden for security reasons)<br/>
|
|
||||||
<br/>
|
|
||||||
To verify your email address please click the link below:<br/>
|
|
||||||
' . generateLink($verify_url, $verify_url, true) . '<br/>
|
|
||||||
If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore this email.';
|
|
||||||
|
|
||||||
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
|
if(_mail($email, 'New account on ' . $config['lua']['serverName'], $body_html, $body_plain))
|
||||||
{
|
{
|
||||||
?>
|
echo $twig->render('account.created.verify.html.twig', array(
|
||||||
Your account has been created.<br/><br/>
|
'account' => $tmp_account
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
));
|
||||||
<tr><td bgcolor="<?php echo $config['vdarkborder']; ?>" class="white"><b>Account Created</b></td></tr>
|
|
||||||
<tr><td bgcolor="<?php echo $config['darkborder']; ?>">
|
|
||||||
<table border="0" cellpadding="1"><tr><td>
|
|
||||||
<br/>Your account<?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> is <b><?php echo $tmp_account; ?></b>.
|
|
||||||
|
|
||||||
You will need the account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and your password to play on <?php echo $config['lua']['serverName']; ?>.
|
|
||||||
Please keep your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> and password in a safe place and
|
|
||||||
never give your account <?php echo (USE_ACCOUNT_NAME ? 'name' : 'number'); ?> or password to anybody.<br/><br/>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -219,25 +196,15 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo 'Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>';
|
echo $twig->render('account.created.html.twig', array(
|
||||||
echo '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
|
'account' => $tmp_account
|
||||||
<TR><TD BGCOLOR="'.$config['vdarkborder'].'" class="white"><B>Account Created</B></TD></TR>
|
));
|
||||||
<TR><TD BGCOLOR="'.$config['darkborder'].'">
|
|
||||||
<TABLE BORDER=0 CELLPADDING=1><TR><TD>
|
|
||||||
<br/>Your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' is <b>'.$tmp_account.'</b><br/>You will need the account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and your password to play on '.$config['lua']['serverName'].'.
|
|
||||||
Please keep your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' and password in a safe place and
|
|
||||||
never give your account ' . (USE_ACCOUNT_NAME ? 'name' : 'number') . ' or password to anybody.<br/><br/>';
|
|
||||||
|
|
||||||
if($config['mail_enabled'] && $config['account_welcome_mail'])
|
if($config['mail_enabled'] && $config['account_welcome_mail'])
|
||||||
{
|
{
|
||||||
$mailBody = '
|
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
|
||||||
<h3>Dear player,</h3>
|
'account' => $tmp_account
|
||||||
<p>Thanks for your registration at <a href=" ' . BASE_URL . '"><b>' . $config['lua']['serverName'] . '</b></a></p>
|
));
|
||||||
<br/><br/>
|
|
||||||
Your login details:
|
|
||||||
<p>Account' . (USE_ACCOUNT_NAME ? ' name' : '') . ': <b>' . $tmp_account . '</b></p>
|
|
||||||
<p>Password: <b>' . str_repeat('*', strlen(trim($password))) . '</b> (hidden for security reasons)</p>
|
|
||||||
<p>Kind Regards,</p>';
|
|
||||||
|
|
||||||
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
if(_mail($email, 'Your account on ' . $config['lua']['serverName'], $mailBody))
|
||||||
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
echo '<br /><small>These informations were send on email address <b>' . $email . '</b>.';
|
||||||
@@ -245,7 +212,6 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
echo '<br /><p class="error">An error occorred while sending email (<b>' . $email . '</b>)! Error:<br/>' . $mailer->ErrorInfo . '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</TD></TR></TABLE></TD></TR></TABLE><br/><br/>';
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -253,7 +219,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
|
|
||||||
$country_recognized = null;
|
$country_recognized = null;
|
||||||
if($config['account_country_recognize']) {
|
if($config['account_country_recognize']) {
|
||||||
$info = json_decode(@file_get_contents('http://ispinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
$info = json_decode(@file_get_contents('http://ipinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
||||||
if(isset($info['country'])) {
|
if(isset($info['country'])) {
|
||||||
$country_recognized = strtolower($info['country']);
|
$country_recognized = strtolower($info['country']);
|
||||||
}
|
}
|
||||||
@@ -279,6 +245,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
|||||||
'countries' => isset($countries) ? $countries : null,
|
'countries' => isset($countries) ? $countries : null,
|
||||||
'accept_rules' => isset($_POST['accept_rules']) ? $_POST['accept_rules'] : false,
|
'accept_rules' => isset($_POST['accept_rules']) ? $_POST['accept_rules'] : false,
|
||||||
'country_recognized' => $country_recognized,
|
'country_recognized' => $country_recognized,
|
||||||
|
'country' => isset($country) ? $country : null,
|
||||||
'errors' => $errors
|
'errors' => $errors
|
||||||
));
|
));
|
||||||
?>
|
?>
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -44,14 +44,15 @@ function printLoot($level, $itemid, $count, $chance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($rarity as $lootRarity => $percent) {
|
foreach($rarity as $lootRarity => $percent) {
|
||||||
if($chance >= $percent)
|
if($chance >= $percent) {
|
||||||
{
|
if(isset($itemid))
|
||||||
//echo str_repeat("... ", $level) . '<u>' . ($count ? $count : 1) . '</u> <span style="color: #7878FF; font-weight: bold;">' . $itemList[(int)$itemid] . '</span> ' . $itemid . ' <span style="color: #C45; font-weight: bold;">' . $lootRarity . '</span> (<span style="color: #FF9A9A;">' . $chance . '%</span>)<br />';
|
echo str_repeat("... ", $level) . '<u>' . ($count ? $count : 1) . '</u> <span style="color: #7878FF; font-weight: bold;">' . $itemList[(int)$itemid] . '</span> ' . $itemid . ' <span style="color: #C45; font-weight: bold;">' . $lootRarity . '</span> (<span style="color: #FF9A9A;">' . $chance . '%</span>)<br />';
|
||||||
|
|
||||||
if($i % 6 == 0)
|
if($i % 6 == 0)
|
||||||
{
|
{
|
||||||
if($i != 0)
|
if($i != 0)
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
echo '<tr BGCOLOR="'.getStyle(0).'"><td width="100">';
|
echo '<tr bgcolor="'.getStyle(0).'"><td width="100">';
|
||||||
}
|
}
|
||||||
echo getItemImage($itemid);
|
echo getItemImage($itemid);
|
||||||
$i++;
|
$i++;
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Custom pages loader
|
|
||||||
*
|
|
||||||
* @package MyAAC
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
|
||||||
* @copyright 2017 MyAAC
|
|
||||||
* @version 0.4.2
|
|
||||||
* @link http://my-aac.org
|
|
||||||
*/
|
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
|
||||||
|
|
||||||
$query = $db->query('SELECT `title`, `body`, `php` FROM `' . TABLE_PREFIX . 'pages` WHERE `name` LIKE ' . $db->quote($page) . ' AND `hidden` != 1');
|
|
||||||
if($query->rowCount() > 0) // found page
|
|
||||||
{
|
|
||||||
$query = $query->fetch();
|
|
||||||
$title = $query['title'];
|
|
||||||
|
|
||||||
if($query['php'] == '1') // execute it as php code
|
|
||||||
eval($query['body']);
|
|
||||||
else
|
|
||||||
echo $query['body']; // plain html
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
?>
|
|
@@ -3,21 +3,12 @@
|
|||||||
* Downloads
|
* Downloads
|
||||||
*
|
*
|
||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Gesior <jerzyskalski@wp.pl>
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$title = 'Downloads';
|
$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>
|
|
@@ -6,19 +6,22 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Experience Stages';
|
$title = 'Experience Stages';
|
||||||
|
|
||||||
|
if(file_exists($config['data_path'] . 'XML/stages.xml')) {
|
||||||
|
$stages = new DOMDocument();
|
||||||
|
$stages->load($config['data_path'] . 'XML/stages.xml');
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['experienceStages']))
|
if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['experienceStages']))
|
||||||
{
|
{
|
||||||
$enabled = false;
|
$enabled = false;
|
||||||
|
|
||||||
if(file_exists($config['data_path'] . 'XML/stages.xml')) {
|
if(isset($stages)) {
|
||||||
$stages = new DOMDocument();
|
|
||||||
$stages->load($config['data_path'] . 'XML/stages.xml');
|
|
||||||
foreach($stages->getElementsByTagName('config') as $node) {
|
foreach($stages->getElementsByTagName('config') as $node) {
|
||||||
if($node->getAttribute('enabled'))
|
if($node->getAttribute('enabled'))
|
||||||
$enabled = true;
|
$enabled = true;
|
||||||
@@ -34,23 +37,18 @@ if(!isset($config['lua']['experienceStages']) || !getBoolean($config['lua']['exp
|
|||||||
else if(isset($config['lua']['rate_exp']))
|
else if(isset($config['lua']['rate_exp']))
|
||||||
$rate_exp = $config['lua']['rate_exp'];
|
$rate_exp = $config['lua']['rate_exp'];
|
||||||
|
|
||||||
$content .= 'Server is not configured to use experience stages.<br/>Current experience rate is: <b>x' . $rate_exp . '</b>';
|
echo 'Server is not configured to use experience stages.<br/>Current experience rate is: <b>x' . $rate_exp . '</b>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($stages)) {
|
|
||||||
$stages = new DOMDocument();
|
|
||||||
$stages->load($config['data_path'] . 'XML/stages.xml');
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$stages)
|
if(!$stages)
|
||||||
{
|
{
|
||||||
echo 'Error: cannot load <b>stages.xml</b>!';
|
echo 'Error: cannot load <b>stages.xml</b>!';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '<center><h3>Experience stages</h3></center>
|
echo '<center><h3>Experience stages</h3></center>
|
||||||
<table bgcolor="'.$config['darkborder'].'" border="0" cellpadding="4" cellspacing="1" width="100%"><tbody>
|
<table bgcolor="'.$config['darkborder'].'" border="0" cellpadding="4" cellspacing="1" width="100%"><tbody>
|
||||||
<tr bgcolor="'.$config['vdarkborder'].'">
|
<tr bgcolor="'.$config['vdarkborder'].'">
|
||||||
<td class="white" colspan="5"><b>Stages table</b></td>
|
<td class="white" colspan="5"><b>Stages table</b></td>
|
||||||
@@ -61,11 +59,11 @@ $content .= '<center><h3>Experience stages</h3></center>
|
|||||||
foreach($stages->getElementsByTagName('stage') as $stage)
|
foreach($stages->getElementsByTagName('stage') as $stage)
|
||||||
{
|
{
|
||||||
$maxlevel = $stage->getAttribute('maxlevel');
|
$maxlevel = $stage->getAttribute('maxlevel');
|
||||||
$content .= '<tr bgcolor="'.$config['lightborder'].'">
|
echo '<tr bgcolor="'.$config['lightborder'].'">
|
||||||
<td>'.$stage->getAttribute('minlevel') . '-'. (isset($maxlevel[0]) ? $maxlevel : '*') . '</td><td>x'.$stage->getAttribute('multiplier').'</td>
|
<td>'.$stage->getAttribute('minlevel') . '-'. (isset($maxlevel[0]) ? $maxlevel : '*') . '</td><td>x'.$stage->getAttribute('multiplier').'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
$content .= '
|
echo '
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody></table>';
|
</tbody></table>';
|
||||||
|
@@ -3,50 +3,23 @@
|
|||||||
* Experience table
|
* Experience table
|
||||||
*
|
*
|
||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Gesior <jerzyskalski@wp.pl>
|
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Experience Table';
|
$title = 'Experience Table';
|
||||||
?>
|
|
||||||
|
|
||||||
This is a list of the experience points that are required to advance to the various levels.
|
$experience = array();
|
||||||
Remember you can also check the respective skill bar in your skill window of the client to check your progress towards the next level.<br/><br/>
|
|
||||||
|
|
||||||
<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'];
|
$columns = $config['experiencetable_columns'];
|
||||||
for($i = 0; $i < $columns; $i++)
|
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);
|
||||||
<td>
|
|
||||||
<table border="0" cellpadding="2" cellspacing="1" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td><b>Level</b></td>
|
|
||||||
<td><b>Experience</b></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
for($level = $i * $config['experiencetable_rows'] + 1; $level < $i * $config['experiencetable_rows'] + ($config['experiencetable_rows'] + 1); $level++)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td><?php echo $level; ?></td>
|
|
||||||
<td><?php echo OTS_Toolbox::experienceForLevel($level); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo $twig->render('experience_table.html.twig', array(
|
||||||
|
'experience' => $experience
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -20,47 +20,10 @@ if(!$faqs->rowCount())
|
|||||||
There are no questions added yet.
|
There are no questions added yet.
|
||||||
<?php
|
<?php
|
||||||
if(admin())
|
if(admin())
|
||||||
echo ' You can add new faq questions in phpmyadmin under ' . TABLE_PREFIX . 'faq table.';
|
echo ' You can add new faq questions in phpmyadmin under <b>' . TABLE_PREFIX . 'faq</b> table.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo $twig->render('faq.html.twig', array(
|
||||||
|
'faqs' => $faqs
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white">
|
|
||||||
<b>FAQ</b>
|
|
||||||
</td>
|
|
||||||
<td align="right">
|
|
||||||
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$i = 0;
|
|
||||||
foreach($faqs as $faq): ?>
|
|
||||||
<tr bgcolor="<?php echo getStyle(++$i); ?>">
|
|
||||||
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_<?php echo $i; ?>'); return false;">
|
|
||||||
<b><?php echo $faq['question']; ?></b>
|
|
||||||
<div id="faq_<?php echo $i; ?>" style="display: none;"><?php echo $faq['answer']; ?></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var expanded = false;
|
|
||||||
|
|
||||||
function toggleVisibility(id)
|
|
||||||
{
|
|
||||||
var tmp = document.getElementById(id);
|
|
||||||
if(tmp)
|
|
||||||
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleAll()
|
|
||||||
{
|
|
||||||
for(i = 1; i < <?php echo $i + 1; ?>; i++)
|
|
||||||
{
|
|
||||||
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
expanded = !expanded;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -174,7 +174,7 @@ if($canEdit)
|
|||||||
|
|
||||||
if(empty($action) || $action == 'edit_board') {
|
if(empty($action) || $action == 'edit_board') {
|
||||||
echo $twig->render('forum.add_board.html.twig', array(
|
echo $twig->render('forum.add_board.html.twig', array(
|
||||||
'link' => getPageLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
'link' => getLink('forum', ($action == 'edit_board' ? 'edit_board' : 'add_board')),
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'id' => isset($id) ? $id : null,
|
'id' => isset($id) ? $id : null,
|
||||||
'name' => isset($name) ? $name : null,
|
'name' => isset($name) ? $name : null,
|
||||||
@@ -253,7 +253,7 @@ if($action == 'show_board')
|
|||||||
else
|
else
|
||||||
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
||||||
}
|
}
|
||||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
|
||||||
if(!$sections[$section_id]['closed'] || Forum::isModerator())
|
if(!$sections[$section_id]['closed'] || Forum::isModerator())
|
||||||
{
|
{
|
||||||
echo '<br /><br />
|
echo '<br /><br />
|
||||||
@@ -324,7 +324,7 @@ if($action == 'show_thread')
|
|||||||
$threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll();
|
$threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `players`.`account_id`, `players`.`vocation`" . (fieldExist('promotion', 'players') ? ", `players`.`promotion`" : "") . ", `players`.`level`, `" . TABLE_PREFIX . "forum`.`id`,`" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`section`,`" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_date`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`last_edit_aid`, `" . TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll();
|
||||||
if(isset($threads[0]['name']))
|
if(isset($threads[0]['name']))
|
||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
|
||||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($threads[0]['section']) . '">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
|
||||||
echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td> </td></tr>';
|
echo '<br /><br /><a href="?subtopic=forum&action=new_post&thread_id='.$thread_id.'"><img src="images/forum/post.gif" border="0" /></a><br /><br />Page: '.$links_to_pages.'<br /><table width="100%"><tr bgcolor="'.$config['lightborder'].'" width="100%"><td colspan="2"><font size="4"><b>'.htmlspecialchars($thread_name['post_topic']).'</b></font><font size="1"><br />by ' . getPlayerLink($thread_name['name']) . '</font></td></tr><tr bgcolor="'.$config['vdarkborder'].'"><td width="200"><font color="white" size="1"><b>Author</b></font></td><td> </td></tr>';
|
||||||
$player = $ots->createObject('Player');
|
$player = $ots->createObject('Player');
|
||||||
foreach($threads as $thread)
|
foreach($threads as $thread)
|
||||||
@@ -421,7 +421,7 @@ if($action == 'new_post')
|
|||||||
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
||||||
$thread_id = (int) $_REQUEST['thread_id'];
|
$thread_id = (int) $_REQUEST['thread_id'];
|
||||||
$thread = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch();
|
$thread = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch();
|
||||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread_id) . '">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
||||||
if(isset($thread['id']))
|
if(isset($thread['id']))
|
||||||
{
|
{
|
||||||
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
||||||
@@ -537,7 +537,7 @@ if($action == 'edit_post')
|
|||||||
if(isset($thread['id']))
|
if(isset($thread['id']))
|
||||||
{
|
{
|
||||||
$first_post = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch();
|
$first_post = $db->query("SELECT `" . TABLE_PREFIX . "forum`.`author_guid`, `" . TABLE_PREFIX . "forum`.`author_aid`, `" . TABLE_PREFIX . "forum`.`first_post`, `" . TABLE_PREFIX . "forum`.`post_topic`, `" . TABLE_PREFIX . "forum`.`post_text`, `" . TABLE_PREFIX . "forum`.`post_smile`, `" . TABLE_PREFIX . "forum`.`id`, `" . TABLE_PREFIX . "forum`.`section` FROM `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch();
|
||||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($thread['section']) . '">'.$sections[$thread['section']]['name'].'</a> >> <a href="' . getForumThreadLink($thread['first_post']) . '">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
|
||||||
if($account_logged->getId() == $thread['author_aid'] || Forum::isModerator())
|
if($account_logged->getId() == $thread['author_aid'] || Forum::isModerator())
|
||||||
{
|
{
|
||||||
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
|
||||||
@@ -634,7 +634,7 @@ if($action == 'new_thread')
|
|||||||
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
$players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll();
|
||||||
$section_id = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null;
|
$section_id = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null;
|
||||||
if($section_id !== null) {
|
if($section_id !== null) {
|
||||||
echo '<a href="' . getPageLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
echo '<a href="' . getLink('forum') . '">Boards</a> >> <a href="' . getForumBoardLink($section_id) . '">' . $sections[$section_id]['name'] . '</a> >> <b>Post new thread</b><br />';
|
||||||
if (isset($sections[$section_id]['name'])) {
|
if (isset($sections[$section_id]['name'])) {
|
||||||
if ($sections[$section_id]['closed'] && !Forum::isModerator())
|
if ($sections[$section_id]['closed'] && !Forum::isModerator())
|
||||||
$errors[] = 'You cannot create topic on this board.';
|
$errors[] = 'You cannot create topic on this board.';
|
||||||
@@ -737,7 +737,6 @@ if($action == 'move_thread')
|
|||||||
'post_id' => $post['id'],
|
'post_id' => $post['id'],
|
||||||
'sections' => $sections,
|
'sections' => $sections,
|
||||||
'section_link' => getForumBoardLink($post['section']),
|
'section_link' => getForumBoardLink($post['section']),
|
||||||
'config' => $config
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -109,7 +109,7 @@ if($config['highscores_outfit']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$offset = $_page * 100;
|
$offset = $_page * $config['highscores_length'];
|
||||||
if($skill <= POT::SKILL_LAST) { // skills
|
if($skill <= POT::SKILL_LAST) { // skills
|
||||||
if(fieldExist('skill_fist', 'players')) {// tfs 1.0
|
if(fieldExist('skill_fist', 'players')) {// tfs 1.0
|
||||||
$skill_ids = array(
|
$skill_ids = array(
|
||||||
@@ -186,7 +186,7 @@ foreach($skills as $player)
|
|||||||
$player['online'] = $query->rowCount() > 0;
|
$player['online'] = $query->rowCount() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(++$i <= 100)
|
if(++$i <= $config['highscores_length'])
|
||||||
{
|
{
|
||||||
if($skill == POT::SKILL__MAGIC)
|
if($skill == POT::SKILL__MAGIC)
|
||||||
$player['value'] = $player['maglevel'];
|
$player['value'] = $player['maglevel'];
|
||||||
@@ -238,11 +238,11 @@ if(!$i)
|
|||||||
<?php
|
<?php
|
||||||
//link to previous page if actual page is not first
|
//link to previous page if actual page is not first
|
||||||
if($_page > 0)
|
if($_page > 0)
|
||||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($_page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
|
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="' . getLink('highscores') . '/' . $list . (isset($vocation) ? '/' . $vocation : '') . '/' . ($_page - 1) . '" CLASS="size_xxs">Previous Page</A></TD></TR>';
|
||||||
|
|
||||||
//link to next page if any result will be on next page
|
//link to next page if any result will be on next page
|
||||||
if($show_link_to_next_page)
|
if($show_link_to_next_page)
|
||||||
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($_page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
|
echo '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="' . getLink('highscores') . '/' . $list . (isset($vocation) ? '/' . $vocation : '') . '/' . ($_page + 1) . '" CLASS="size_xxs">Next Page</A></TD></TR>';
|
||||||
|
|
||||||
//end of page
|
//end of page
|
||||||
echo '</TABLE>
|
echo '</TABLE>
|
||||||
@@ -289,42 +289,32 @@ echo '
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach($types as $link => $name) {
|
foreach($types as $link => $name) {
|
||||||
if($config['friendly_urls'])
|
echo '<A HREF="' . getLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '/' . $link . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
|
||||||
else
|
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $link . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">' . $name . '</A><BR>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($config['highscores_frags'])
|
if($config['highscores_frags'])
|
||||||
if($config['friendly_urls'])
|
echo '<a href="' . getLink('highscores') . '/frags' . (isset($vocation) ? '/' . $vocation : '') . '" CLASS="size_xs">Frags</a><br/>';
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '/frags" CLASS="size_xs">Frags</A><BR>';
|
echo '</td>
|
||||||
else
|
</tr>
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '&list=frags' . (isset($vocation) ? '&vocation=' . $vocation : '') . '" CLASS="size_xs">Frags</A><BR>';
|
</table><br>';
|
||||||
|
|
||||||
echo '</TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE><BR>';
|
|
||||||
|
|
||||||
if($config['highscores_vocation_box'])
|
if($config['highscores_vocation_box'])
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
'<TABLE BORDER=0 width="100%" CELLPADDING=4 CELLSPACING=1>
|
'<table border="0" width="100%" cellpadding="4" cellspacing="1">
|
||||||
<TR BGCOLOR="' . $config['vdarkborder'] . '">
|
<tr bgcolor="' . $config['vdarkborder'] . '">
|
||||||
<TD CLASS=whites><B>Choose a vocation</B></TD>
|
<td class=whites><b>Choose a vocation</b></td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR BGCOLOR="'.$config['lightborder'].'">
|
<tr bgcolor="'.$config['lightborder'].'">
|
||||||
<TD>
|
<td>
|
||||||
<A HREF="' . getPageLink('highscores') . ($config['friendly_urls'] ? '/' : '&list=') . $list . '" CLASS="size_xs">[ALL]</A><BR>';
|
<a href="' . getLink('highscores') . '/' . $list . '" class="size_xs">[ALL]</A><BR>';
|
||||||
for($i = 1; $i < count($config_vocations) / 2; $i++) {
|
for($i = 1; $i <= $config['vocations_amount']; $i++) {
|
||||||
if($config['friendly_urls'])
|
echo '<a href="' . getLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" class="size_xs">' . $config_vocations[$i] . '</a><br/>';
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '/' . $list . '/' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
|
|
||||||
else
|
|
||||||
echo '<A HREF="' . getPageLink('highscores') . '&list=' . $list . '&vocation=' . strtolower($config_vocations[$i]) . '" CLASS="size_xs">' . $config_vocations[$i] . '</A><BR>';
|
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>';
|
</table>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -22,16 +22,10 @@ $config_salt_enabled = fieldExist('salt', 'accounts');
|
|||||||
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
|
$action_type = isset($_REQUEST['action_type']) ? $_REQUEST['action_type'] : '';
|
||||||
if($action == '')
|
if($action == '')
|
||||||
{
|
{
|
||||||
echo $twig->render('account.lost.form.html.twig', array(
|
echo $twig->render('account.lost.form.html.twig');
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'template_path' => $template_path
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
else if($action == 'step1' && $action_type == '') {
|
else if($action == 'step1' && $action_type == '') {
|
||||||
echo $twig->render('account.lost.noaction.html.twig', array(
|
echo $twig->render('account.lost.noaction.html.twig');
|
||||||
'template_path' => $template_path
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
elseif($action == 'step1' && $action_type == 'email')
|
elseif($action == 'step1' && $action_type == 'email')
|
||||||
{
|
{
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -21,11 +21,8 @@ There are no movies added yet.
|
|||||||
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
|
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo $twig->render('movies.html.twig', array(
|
||||||
|
'movies' => $movies
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<div style="text-align: center;">
|
|
||||||
<?php foreach($movies as $movie): ?>
|
|
||||||
<?php echo $movie['title']; ?><br/>
|
|
||||||
Author: <?php echo $movie['author']; ?><br/>
|
|
||||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $movie['youtube_id']; ?>" frameborder="0" allowfullscreen></iframe><br/><br/>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -66,11 +66,9 @@ if(isset($_GET['archive']))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo "This news doesn't exist or is hidden.<br/>";
|
echo "This news doesn't exist or is hidden.<br/>";
|
||||||
|
|
||||||
//echo '<br /><a href="' . internalLayoutLink('news') . ($config['friendly_urls'] ? '/' : '') . 'archive' . '"><font size="2"><b>Back to Archive</b></font></a>';
|
|
||||||
?>
|
?>
|
||||||
<center>
|
<center>
|
||||||
<table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo internalLayoutLink('news') . ($config['friendly_urls'] ? '' : '') . 'archive'; ?>"><tbody><tr><td>
|
<table cellspacing="0" cellpadding="0" border="0"><form method="post" action="<?php echo getLink('news/archive'); ?>"><tbody><tr><td>
|
||||||
<input width="120" height="18" border="0" type="image" src="<?php echo $template_path; ?>/images/buttons/sbutton_back.gif" alt="Back" name="Back">
|
<input width="120" height="18" border="0" type="image" src="<?php echo $template_path; ?>/images/buttons/sbutton_back.gif" alt="Back" name="Back">
|
||||||
</form></td></tr></tbody></table>
|
</form></td></tr></tbody></table>
|
||||||
</center>
|
</center>
|
||||||
@@ -85,14 +83,8 @@ if(isset($_GET['archive']))
|
|||||||
$news_DB = $db->query('SELECT * FROM '.$db->tableName(TABLE_PREFIX . 'news').' WHERE `type` = 1 AND `hidden` != 1 ORDER BY `date` DESC');
|
$news_DB = $db->query('SELECT * FROM '.$db->tableName(TABLE_PREFIX . 'news').' WHERE `type` = 1 AND `hidden` != 1 ORDER BY `date` DESC');
|
||||||
foreach($news_DB as $news)
|
foreach($news_DB as $news)
|
||||||
{
|
{
|
||||||
$link = internalLayoutLink('news');
|
|
||||||
if($config['friendly_urls'])
|
|
||||||
$link .= '/archive/' . $news['id'];
|
|
||||||
else
|
|
||||||
$link .= 'archive&id=' . $news['id'];
|
|
||||||
|
|
||||||
$newses[] = array(
|
$newses[] = array(
|
||||||
'link' => $link,
|
'link' => getLink('news') . '/archive/' . $news['id'],
|
||||||
'icon_id' => $categories[$news['category']]['icon_id'],
|
'icon_id' => $categories[$news['category']]['icon_id'],
|
||||||
'title' => stripslashes($news['title']),
|
'title' => stripslashes($news['title']),
|
||||||
'date' => $news['date']
|
'date' => $news['date']
|
||||||
@@ -283,8 +275,8 @@ if(!$news_cached)
|
|||||||
|
|
||||||
echo $twig->render('news.add.html.twig', array(
|
echo $twig->render('news.add.html.twig', array(
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'news_link' => getPageLink(PAGE),
|
'news_link' => getLink(PAGE),
|
||||||
'news_link_form' => getPageLink('news', ($action == 'edit' ? 'edit' : 'add')),
|
'news_link_form' => getLink('news/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||||
'news_id' => isset($id) ? $id : null,
|
'news_id' => isset($id) ? $id : null,
|
||||||
'title' => isset($p_title) ? $p_title : '',
|
'title' => isset($p_title) ? $p_title : '',
|
||||||
'body' => isset($body) ? $body : '',
|
'body' => isset($body) ? $body : '',
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$_GET['archive'] = true;
|
$_GET['archive'] = true;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -14,13 +14,7 @@ $title = 'Who is online?';
|
|||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require(SYSTEM . 'countries.conf.php');
|
||||||
?>
|
|
||||||
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white"><b>Server Status</b></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$promotion = '';
|
$promotion = '';
|
||||||
if(fieldExist('promotion', 'players'))
|
if(fieldExist('promotion', 'players'))
|
||||||
$promotion = '`promotion`,';
|
$promotion = '`promotion`,';
|
||||||
@@ -63,6 +57,7 @@ if(tableExist('players_online')) // tfs 1.0
|
|||||||
else
|
else
|
||||||
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
|
||||||
|
|
||||||
|
$players_data = array();
|
||||||
$players = 0;
|
$players = 0;
|
||||||
$data = '';
|
$data = '';
|
||||||
foreach($playersOnline as $player)
|
foreach($playersOnline as $player)
|
||||||
@@ -70,72 +65,46 @@ foreach($playersOnline as $player)
|
|||||||
$skull = '';
|
$skull = '';
|
||||||
if($config['online_skulls'])
|
if($config['online_skulls'])
|
||||||
{
|
{
|
||||||
if($player['skulltime'] > 0 && $player['skull'] == 3)
|
if($player['skulltime'] > 0)
|
||||||
|
{
|
||||||
|
if($player['skull'] == 3)
|
||||||
$skull = ' <img style="border: 0;" src="images/white_skull.gif"/>';
|
$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"/>';
|
$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"/>';
|
$skull = ' <img style="border: 0;" src="images/black_skull.gif"/>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($player['promotion'])) {
|
if(isset($player['promotion'])) {
|
||||||
if((int)$player['promotion'] > 0)
|
if((int)$player['promotion'] > 0)
|
||||||
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
|
$players_data[] = array(
|
||||||
if($config['account_country'])
|
'name' => getPlayerLink($player['name']),
|
||||||
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
|
'player' => $player,
|
||||||
|
'level' => $player['level'],
|
||||||
if($config['online_outfit'])
|
'vocation' => $config['vocations'][$player['vocation']],
|
||||||
$data .= '<TD WIDTH=5%><img style="position:absolute;margin-top:' . (in_array($player['looktype'], array(75, 266, 302)) ? '-20px;margin-left:-0px;' : '-45px;margin-left:-25px;') . '" src="' . $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" /></td>';
|
'country_image' => $config['account_country'] ? getFlagImage($player['country']) : null,
|
||||||
|
'outfit' => $config['online_outfit'] ? $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
|
||||||
$data .= '<td>' . getPlayerLink($player['name']) . $skull . '</td>
|
);
|
||||||
<td>'.$player['level'].'</td>
|
|
||||||
<td>'.$config['vocations'][$player['vocation']].'</td>
|
|
||||||
</tr>';
|
|
||||||
|
|
||||||
if($config['online_vocations'])
|
if($config['online_vocations'])
|
||||||
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$players): ?>
|
$record = '';
|
||||||
<tr bgcolor="<?php echo $config['darkborder']; ?>"><td>Currently no one is playing on <?php echo $config['lua']['serverName']; ?>.</td></tr></table>
|
if($players > 0)
|
||||||
<?php else:
|
|
||||||
?>
|
|
||||||
<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/>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config['online_record'])
|
if($config['online_record'])
|
||||||
{
|
{
|
||||||
$timestamp = false;
|
$timestamp = false;
|
||||||
if(tableExist('server_record')) {
|
if(tableExist('server_record')) {
|
||||||
$query =
|
$query =
|
||||||
$db->query(
|
$db->query(
|
||||||
'SELECT ' . $db->fieldName('record') . ', ' . $db->fieldName('timestamp') .
|
'SELECT `record`, `timestamp` FROM `server_record` WHERE `world_id` = ' . (int)$config['lua']['worldId'] .
|
||||||
' FROM ' . $db->tableName('server_record') .
|
' ORDER BY `record` DESC LIMIT 1');
|
||||||
' WHERE ' . $db->fieldName('world_id') . ' = ' . (int)$config['lua']['worldId'] .
|
|
||||||
' ORDER BY ' . $db->fieldName('record') . ' DESC LIMIT 1');
|
|
||||||
$timestamp = true;
|
$timestamp = true;
|
||||||
}
|
}
|
||||||
else if(tableExist('server_config')) { // tfs 1.0
|
else if(tableExist('server_config')) { // tfs 1.0
|
||||||
@@ -147,125 +116,40 @@ if(!$players): ?>
|
|||||||
if(isset($query) && $query->rowCount() > 0)
|
if(isset($query) && $query->rowCount() > 0)
|
||||||
{
|
{
|
||||||
$result = $query->fetch();
|
$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
|
echo $twig->render('online.html.twig', array(
|
||||||
// vocation statistics
|
'players' => $players_data,
|
||||||
if($config['online_vocations']): ?>
|
'record' => $record
|
||||||
<br/>
|
));
|
||||||
<?php if($config['online_vocations_images']): ?>
|
|
||||||
<table width="200" cellspacing="1" cellpadding="0" border="0" align="center">
|
|
||||||
<tr bgcolor="<?php echo $config['darkborder']; ?>">
|
|
||||||
<td><img src="images/sorcerer.png" /></td>
|
|
||||||
<td><img src="images/druid.png" /></td>
|
|
||||||
<td><img src="images/palladin.png" /></td>
|
|
||||||
<td><img src="images/knight.png" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white" style="text-align: center;"><strong>Sorcerers<br /></strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Druids</strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Paladins</strong></td>
|
|
||||||
<td class="white" style="text-align: center;"><strong>Knights</strong></td>
|
|
||||||
</tr>
|
|
||||||
<tr bgcolor="<?php echo $config['lightborder']; ?>">
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[1]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[2]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[3]; ?></td>
|
|
||||||
<td style="text-align: center;"><?php echo $vocs[4]; ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<div style="text-align: center;"> </div>
|
|
||||||
<?php else: ?>
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<td class="white" colspan="2"><b>Vocation statistics</b></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
for($i = 1; $i <= $config['vocations_amount']; $i++)
|
|
||||||
echo '<tr bgcolor="' . getStyle($i) . '">
|
|
||||||
<td width="25%">' . $config['vocations'][$i] . '</td>
|
|
||||||
<td width="75%">' . $vocs[$i] . '</td>
|
|
||||||
</tr>';
|
|
||||||
?>
|
|
||||||
</table><br/>
|
|
||||||
<?php endif;
|
|
||||||
endif;
|
|
||||||
|
|
||||||
// frags counter
|
|
||||||
if($config['online_skulls']): ?>
|
|
||||||
<table width="100%" cellspacing="1">
|
|
||||||
<tr>
|
|
||||||
<td style="background: <?php echo $config['darkborder']; ?>;" align="center">
|
|
||||||
<img src="images/white_skull.gif"/> - 1 - 6 Frags<br/>
|
|
||||||
<img src="images/red_skull.gif"/> - 6+ Frags or Red Skull<br/>
|
|
||||||
<img src="images/black_skull.gif"/> - 10+ Frags or Black Skull
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
|
||||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
|
||||||
<?php if($config['account_country']): ?>
|
|
||||||
<td width="11px"><a href="?subtopic=online&order=country" class="white">#</A></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if($config['online_outfit']): ?>
|
|
||||||
<td class="white"><b>Outfit</b></td>
|
|
||||||
<?php endif; ?>
|
|
||||||
<td width="60%"><a href="?subtopic=online&order=name" class="white">Name</A></td>
|
|
||||||
<td width="20%"><a href="?subtopic=online&order=level" class="white">Level</A></td>
|
|
||||||
<td width="20%"><a href="?subtopic=online&order=vocation" class="white">Vocation</td>
|
|
||||||
</tr>
|
|
||||||
<?php echo $data; ?>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
endif;
|
|
||||||
|
|
||||||
//search bar
|
//search bar
|
||||||
echo '<br/>
|
echo '<br/>
|
||||||
<FORM ACTION="?subtopic=characters" METHOD=post>
|
<form action="?subtopic=characters" method=post>
|
||||||
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
<TR>
|
<tr>
|
||||||
<TD BGCOLOR="'.$config['vdarkborder'].'" class="white">
|
<td bgcolor="'.$config['vdarkborder'].'" class="white">
|
||||||
<B>Search Character</B>
|
<b>Search Character</b>
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
<TR>
|
<tr>
|
||||||
<TD BGCOLOR="'.$config['darkborder'].'">
|
<td bgcolor="'.$config['darkborder'].'">
|
||||||
<TABLE BORDER=0 CELLPADDING=1>
|
<table border=0 cellpadding=1>
|
||||||
<TR>
|
<tr>
|
||||||
<TD>Name:</TD>
|
<td>Name:</td>
|
||||||
<TD>
|
<td>
|
||||||
<INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29>
|
<input name="name" value=""size=29 maxlength=29>
|
||||||
</TD>
|
</td>
|
||||||
<TD>
|
<td>
|
||||||
<INPUT TYPE=image NAME="Submit" SRC="'.$template_path.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
|
<input type="image" name="Submit" src="'.$template_path.'/images/buttons/sbutton_submit.gif" border="0" width="120" height="18">
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>
|
</table>
|
||||||
</TD>
|
</td>
|
||||||
</TR>
|
</tr>
|
||||||
</TABLE>
|
</table>
|
||||||
</FORM>';
|
</form>';
|
||||||
|
|
||||||
/* temporary disable it - shows server offline
|
|
||||||
// update online players counter
|
|
||||||
if($players > 0)
|
|
||||||
{
|
|
||||||
$status['players'] = $players;
|
|
||||||
if($cache->enabled())
|
|
||||||
$cache->set('status', serialize($status));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach($status as $key => $value)
|
|
||||||
updateDatabaseConfig('serverStatus_' . $key, $value);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
?>
|
?>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Averatec <pervera.pl & otland.net>
|
* @author Averatec <pervera.pl & otland.net>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -6,42 +6,10 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Server Rules';
|
$title = 'Server Rules';
|
||||||
|
|
||||||
if(PAGE == 'rules'): ?>
|
echo $twig->render('rules.html.twig');
|
||||||
<b><?php echo $config['lua']['serverName']; ?> Rules</b><br/>
|
|
||||||
<textarea rows="25" wrap="physical" cols="70" readonly="true">
|
|
||||||
<?php endif; ?>
|
|
||||||
1. Names
|
|
||||||
a) Names which contain insulting (e.g. "Bastard"), racist (e.g. "Nigger"), extremely right-wing (e.g. "Hitler"), sexist (e.g. "Bitch") or offensive (e.g. "Copkiller") language.
|
|
||||||
b) Names containing parts of sentences (e.g. "Mike returns"), nonsensical combinations of letters (e.g. "Fgfshdsfg") or invalid formattings (e.g. "Thegreatknight").
|
|
||||||
c) Names that obviously do not describe a person (e.g. "Christmastree", "Matrix"), names of real life celebrities (e.g. "Britney Spears"), names that refer to real countries (e.g. "Swedish Druid"), names which were created to fake other players' identities (e.g. "Arieswer" instead of "Arieswar") or official positions (e.g. "System Admin").
|
|
||||||
|
|
||||||
2. Cheating
|
|
||||||
a) Exploiting obvious errors of the game ("bugs"), for instance to duplicate items. If you find an error you must report it to CipSoft immediately.
|
|
||||||
b) Intentional abuse of weaknesses in the gameplay, for example arranging objects or players in a way that other players cannot move them.
|
|
||||||
c) Using tools to automatically perform or repeat certain actions without any interaction by the player ("macros").
|
|
||||||
d) Manipulating the client program or using additional software to play the game.
|
|
||||||
e) Trying to steal other players' account data ("hacking").
|
|
||||||
f) Playing on more than one account at the same time ("multi-clienting").
|
|
||||||
g) Offering account data to other players or accepting other players' account data ("account-trading/sharing").
|
|
||||||
|
|
||||||
3. Gamemasters
|
|
||||||
a) Threatening a gamemaster because of his or her actions or position as a gamemaster.
|
|
||||||
b) Pretending to be a gamemaster or to have influence on the decisions of a gamemaster.
|
|
||||||
c) Intentionally giving wrong or misleading information to a gamemaster concerning his or her investigations or making false reports about rule violations.
|
|
||||||
|
|
||||||
4. Player Killing
|
|
||||||
a) Excessive killing of characters who are not marked with a "skull" on worlds which are not PvP-enforced. Please note that killing marked characters is not a reason for a banishment.
|
|
||||||
|
|
||||||
A violation of the Tibia Rules may lead to temporary banishment of characters and accounts. In severe cases removal or modification of character skills, attributes and belongings, as well as the permanent removal of accounts without any compensation may be considered. The sanction is based on the seriousness of the rule violation and the previous record of the player. It is determined by the gamemaster imposing the banishment.
|
|
||||||
|
|
||||||
These rules may be changed at any time. All changes will be announced on the official website.
|
|
||||||
<?php
|
|
||||||
if(PAGE == 'rules'): ?>
|
|
||||||
</textarea>
|
|
||||||
<?php endif;?>
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -57,11 +57,9 @@ if($canEdit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo $twig->render('screenshots.form.html.twig', array(
|
echo $twig->render('screenshots.form.html.twig', array(
|
||||||
'link' => getPageLink('screenshots', ($action == 'edit' ? 'edit' : 'add')),
|
'link' => getLink('screenshots/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'id' => isset($id) ? $id : null,
|
'id' => isset($id) ? $id : null,
|
||||||
'vdarkborder' => $config['vdarkborder'],
|
|
||||||
'darkborder' => $config['darkborder'],
|
|
||||||
'comment' => isset($comment) ? $comment : null,
|
'comment' => isset($comment) ? $comment : null,
|
||||||
'image' => isset($image) ? $image : null,
|
'image' => isset($image) ? $image : null,
|
||||||
'author' => isset($author) ? $author : null
|
'author' => isset($author) ? $author : null
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -20,10 +20,10 @@ if(isset($config['lua']['experience_stages']))
|
|||||||
<h1><?php echo $config['lua']['serverName']; ?></h1>
|
<h1><?php echo $config['lua']['serverName']; ?></h1>
|
||||||
<h3>
|
<h3>
|
||||||
<?php if(isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages'])): ?>
|
<?php if(isset($config['lua']['experienceStages']) && getBoolean($config['lua']['experienceStages'])): ?>
|
||||||
Experience stages: <a href="<?php echo getPageLink('experienceStages'); ?>">Look here</a><br/>
|
Experience stages: <a href="<?php echo getLink('experienceStages'); ?>">Look here</a><br/>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
Commands: <a href="<?php echo getPageLink('commands'); ?>">Look here</a><br/>
|
Commands: <a href="<?php echo getLink('commands'); ?>">Look here</a><br/>
|
||||||
Team: <a href="<?php echo getPageLink('team'); ?>">Look here</a><br/>
|
Team: <a href="<?php echo getLink('team'); ?>">Look here</a><br/>
|
||||||
</h3>
|
</h3>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
@@ -184,6 +184,6 @@ if(isset($config['lua']['experience_stages']))
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<br/>
|
<br/>
|
||||||
<h2>Other</h2>
|
<h2>Other</h2>
|
||||||
<li>Respect our <a href="<?php echo getPageLink('rules'); ?>">rules</a>.</li>
|
<li>Respect our <a href="<?php echo getLink('rules'); ?>">rules</a>.</li>
|
||||||
<li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li>
|
<li>Please report rule violations (Botters, players breaking rules etc) with <b>CTRL + R</b>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -69,7 +69,7 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
$type = 2;
|
$type = 2;
|
||||||
$count = $spell->getConjureCount();
|
$count = $spell->getConjureCount();
|
||||||
try {
|
try {
|
||||||
$db->query('INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (' . $db->quote($spell_txt) . ', ' . $db-quote($name) . ', ' . $db->quote($spell_txt) , ', ' . $db->quote($type) . ', ' . $db->quote($mana) . ', ' . $db->quote($lvl) . ', ' . $db->quote($mlvl) . ', ' . $db->quote($soul) . ', ' . $db>quote($pacc) . ', ' . $db->quote($vocations_to_db) . ', ' . $db->quote($count) . ', ' . $db->quote($hide_spell) . ')');
|
$db->query('INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (' . $db->quote($spell_txt) . ', ' . $db->quote($name) . ', ' . $db->quote($spell_txt) . ', ' . $db->quote($type) . ', ' . $db->quote($mana) . ', ' . $db->quote($lvl) . ', ' . $db->quote($mlvl) . ', ' . $db->quote($soul) . ', ' . $db->quote($pacc) . ', ' . $db->quote($vocations_to_db) . ', ' . $db->quote($count) . ', ' . $db->quote($hide_spell) . ')');
|
||||||
success("Added: " . $name . "<br>");
|
success("Added: " . $name . "<br>");
|
||||||
}
|
}
|
||||||
catch(PDOException $error) {
|
catch(PDOException $error) {
|
||||||
@@ -143,7 +143,7 @@ if($canEdit)
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$vocation_id = (int) (isset($_REQUEST['vocation_id']) ? $_REQUEST['vocation_id'] : 'All');
|
$vocation_id = (isset($_REQUEST['vocation_id']) ? (int)$_REQUEST['vocation_id'] : 'All');
|
||||||
$order = 'spell';
|
$order = 'spell';
|
||||||
if(isset($_GET['order']))
|
if(isset($_GET['order']))
|
||||||
$order = $_GET['order'];
|
$order = $_GET['order'];
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Gesior <jerzyskalski@wp.pl>
|
* @author Gesior <jerzyskalski@wp.pl>
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package MyAAC
|
* @package MyAAC
|
||||||
* @author Slawkens <slawkens@gmail.com>
|
* @author Slawkens <slawkens@gmail.com>
|
||||||
* @copyright 2017 MyAAC
|
* @copyright 2017 MyAAC
|
||||||
* @version 0.4.2
|
* @version 0.5.1
|
||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
@@ -72,23 +72,23 @@ else if(file_exists($template_path . '/config.php'))
|
|||||||
require($template_path . '/config.php');
|
require($template_path . '/config.php');
|
||||||
|
|
||||||
$template = array();
|
$template = array();
|
||||||
$template['link_account_manage'] = internalLayoutLink('account' . ($config['friendly_urls'] ? '/manage' : 'management'));
|
$template['link_account_manage'] = getLink('account/manage');
|
||||||
$template['link_account_create'] = internalLayoutLink(($config['friendly_urls'] ? 'account/create' : 'createaccount'));
|
$template['link_account_create'] = getLink('account/create');
|
||||||
$template['link_account_lost'] = internalLayoutLink(($config['friendly_urls'] ? 'account/lost' : 'lostaccount'));
|
$template['link_account_lost'] = getLink('account/lost');
|
||||||
$template['link_account_logout'] = internalLayoutLink(($config['friendly_urls'] ? 'account' : 'accountmanagement'), 'logout');
|
$template['link_account_logout'] = getLink('account/logout');
|
||||||
|
|
||||||
$template['link_news_archive'] = internalLayoutLink('news' . ($config['friendly_urls'] ? '/' : '') . 'archive');
|
$template['link_news_archive'] = getLink('news/archive');
|
||||||
|
|
||||||
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'screenshots', 'movies', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker');
|
$links = array('news', 'changelog', 'rules', 'downloads', 'characters', 'online', 'highscores', 'powergamers', 'lastkills', 'houses', 'guilds', 'wars', 'polls', 'bans', 'team', 'creatures', 'spells', 'commands', 'experienceStages', 'freeHouses', 'screenshots', 'movies', 'serverInfo', 'experienceTable', 'faq', 'points', 'gifts', 'bugtracker');
|
||||||
foreach($links as $link) {
|
foreach($links as $link) {
|
||||||
$template['link_' . $link] = internalLayoutLink($link);
|
$template['link_' . $link] = getLink($link);
|
||||||
}
|
}
|
||||||
|
|
||||||
$template['link_gifts_history'] = internalLayoutLink('gifts', 'show_history');
|
$template['link_gifts_history'] = getLink('gifts', 'history');
|
||||||
if($config['forum'] != '')
|
if($config['forum'] != '')
|
||||||
{
|
{
|
||||||
if(strtolower($config['forum']) == 'site')
|
if(strtolower($config['forum']) == 'site')
|
||||||
$template['link_forum'] = "<a href='" . internalLayoutLink('forum') . "'>";
|
$template['link_forum'] = "<a href='" . getLink('forum') . "'>";
|
||||||
else
|
else
|
||||||
$template['link_forum'] = "<a href='" . $config['forum'] . "' target='_blank'>";
|
$template['link_forum'] = "<a href='" . $config['forum'] . "' target='_blank'>";
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
Here you can see and edit the information about your character.<br/>
|
Here you can see and edit the information about your character.<br/>
|
||||||
If you do not want to specify a certain field, just leave it blank.<br/><br/>
|
If you do not want to specify a certain field, just leave it blank.<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changecomment" method="post">
|
<form action="{{ getLink('account/character/comment') }}" method="post">
|
||||||
<div class="TableContainer" >
|
<div class="TableContainer" >
|
||||||
<table class="Table5" cellpadding="0" cellspacing="0">
|
<table class="Table5" cellpadding="0" cellspacing="0">
|
||||||
<div class="CaptionContainer">
|
<div class="CaptionContainer">
|
||||||
@@ -30,7 +30,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
|
|||||||
<table class="TableContent" width="100%">
|
<table class="TableContent" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="LabelV">Name:</td>
|
<td class="LabelV">Name:</td>
|
||||||
<td style="width:80%;" >{{ player_name }}</td>
|
<td style="width:80%;" >{{ player.getName() }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="LabelV" >Hide Account:</td>
|
<td class="LabelV" >Hide Account:</td>
|
||||||
@@ -99,7 +99,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/>
|
Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changeinfo" method=post>
|
<form action="{{ getLink('account/info') }}" method=post>
|
||||||
<div class="TableContainer" >
|
<div class="TableContainer" >
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||||
<div class="CaptionContainer" >
|
<div class="CaptionContainer" >
|
||||||
@@ -89,7 +89,7 @@ Here you can tell other players about yourself. This information will be display
|
|||||||
<td>
|
<td>
|
||||||
</form>
|
</form>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" >
|
<table border="0" cellspacing="0" cellpadding="0" >
|
||||||
<form action="?subtopic=accountmanagement" method="post" >
|
<form action="{{ getLink('account/manage') }}" method="post" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;" >
|
<td style="border:0px;" >
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" >
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" >
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.</b><br/><br/>
|
Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.</b><br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changeemail" method="post">
|
<form action="{{ getLink('account/email') }}" method="post">
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
<div class="CaptionContainer">
|
<div class="CaptionContainer">
|
||||||
@@ -58,7 +58,7 @@ Please enter your password and the new email address. Make sure that you enter a
|
|||||||
</form>
|
</form>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
To change a name of character select player and choose a new name.<br/>
|
To change a name of character select player and choose a new name.<br/>
|
||||||
<font color="red">Change name cost {{ config.account_change_character_name_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
|
<font color="red">Change name cost {{ config.account_change_character_name_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changename" method="post">
|
<form action="{{ getLink('account/character/name') }}" method="post">
|
||||||
<input type="hidden" name="changenamesave" value="1">
|
<input type="hidden" name="changenamesave" value="1">
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
@@ -62,7 +62,7 @@ To change a name of character select player and choose a new name.<br/>
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
Please enter your current password and a new password. For your security, please enter the new password twice.<br/>
|
Please enter your current password and a new password. For your security, please enter the new password twice.<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changepassword" method="post">
|
<form action="{{ getLink('account/password') }}" method="post">
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
<div class="CaptionContainer">
|
<div class="CaptionContainer">
|
||||||
@@ -66,7 +66,7 @@ Please enter your current password and a new password. For your security, please
|
|||||||
</form>
|
</form>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
To change a sex of character select player and choose a new sex.<br/>
|
To change a sex of character select player and choose a new sex.<br/>
|
||||||
<font color="red">Change sex cost {{ config.account_change_character_sex_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
|
<font color="red">Change sex cost {{ config.account_change_character_sex_points }} premium points. You have {{ points }} premium points.</font><br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=changesex" method="post">
|
<form action="{{ getLink('account/character/sex') }}" method="post">
|
||||||
<input type="hidden" name="changesexsave" value="1"/>
|
<input type="hidden" name="changesexsave" value="1"/>
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
@@ -64,7 +64,7 @@ To change a sex of character select player and choose a new sex.<br/>
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;" >
|
<td style="border:0px;" >
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
To play on {{ config.lua.serverName }} you need an account.
|
To play on {{ config.lua.serverName }} you need an account.
|
||||||
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
|
All you have to do to create your new account is to enter an account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %}, password{% if config.recaptcha_enabled %}, confirm reCAPTCHA{% endif %}{% if config.account_country %}, country{% endif %} and your email address.
|
||||||
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
|
Also you have to agree to the terms presented below. If you have done so, your account {% if constant('USE_ACCOUNT_NAME') %}name{% else %}number{% endif %} will be shown on the following page and your account password will be sent to your email address along with further instructions. If you do not receive the email with your password, please check your spam filter.<br/><br/>
|
||||||
<form action="?subtopic=createaccount" method="post" >
|
<form action="{{ getLink('account/create') }}" method="post" id="createaccount">
|
||||||
<div class="TableContainer" >
|
<div class="TableContainer" >
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||||
<div class="CaptionContainer" >
|
<div class="CaptionContainer" >
|
||||||
@@ -10,7 +10,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
|||||||
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||||
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||||
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||||
<div class="Text" >Create <?php echo $config['lua']['serverName']; ?> Account</div>
|
<div class="Text" >Create {{ config.lua.serverName }} Account</div>
|
||||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
|
||||||
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
|
||||||
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
|
||||||
@@ -53,7 +53,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
|||||||
<td>
|
<td>
|
||||||
<select name="country" id="account_country">
|
<select name="country" id="account_country">
|
||||||
{% for code, country_ in countries %}
|
{% for code, country_ in countries %}
|
||||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is not defined and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<img src="" id="account_country_img"/>
|
<img src="" id="account_country_img"/>
|
||||||
@@ -139,7 +139,11 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</table></div></td></tr><br/>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td>
|
<td>
|
||||||
|
@@ -2,9 +2,11 @@
|
|||||||
eventId = 0;
|
eventId = 0;
|
||||||
lastSend = 0;
|
lastSend = 0;
|
||||||
|
|
||||||
|
$(function() {
|
||||||
$('#createaccount').submit(function () {
|
$('#createaccount').submit(function () {
|
||||||
return validate_form(this);
|
return validate_form(this);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
function checkAccount()
|
function checkAccount()
|
||||||
{
|
{
|
||||||
@@ -21,19 +23,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// anti flood
|
// anti flood
|
||||||
date = new Date;
|
var date = new Date;
|
||||||
timeNow = parseInt(date.getTime());
|
var timeNow = parseInt(date.getTime());
|
||||||
|
|
||||||
if(lastSend != 0)
|
if(lastSend != 0)
|
||||||
{
|
{
|
||||||
if(timeNow - lastSend < 1100)
|
if(timeNow - lastSend < 1100)
|
||||||
{
|
{
|
||||||
eventId = setInterval('checkAccount()', 1100)
|
eventId = setInterval('checkAccount()', 1100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
account = document.getElementById("account_input").value;
|
var account = document.getElementById("account_input").value;
|
||||||
$.get("tools/validate.php", { account: account, uid: Math.random() },
|
$.get("tools/validate.php", { account: account, uid: Math.random() },
|
||||||
function(data){
|
function(data){
|
||||||
document.getElementById("acc_check").innerHTML = data;
|
document.getElementById("acc_check").innerHTML = data;
|
||||||
@@ -56,8 +58,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//anti flood
|
//anti flood
|
||||||
date = new Date;
|
var date = new Date;
|
||||||
timeNow = parseInt(date.getTime());
|
vartimeNow = parseInt(date.getTime());
|
||||||
|
|
||||||
if(lastSend != 0)
|
if(lastSend != 0)
|
||||||
{
|
{
|
||||||
@@ -68,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
email = document.getElementById("email").value;
|
var email = document.getElementById("email").value;
|
||||||
$.get("tools/validate.php", { email: email, uid: Math.random() },
|
$.get("tools/validate.php", { email: email, uid: Math.random() },
|
||||||
function(data){
|
function(data){
|
||||||
document.getElementById("email_check").innerHTML = data;
|
document.getElementById("email_check").innerHTML = data;
|
||||||
|
@@ -6,7 +6,7 @@ In any case the name must not violate the naming conventions stated in the <a hr
|
|||||||
<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>
|
<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=createcharacter" method="post">
|
<form action="{{ getLink('account/character/create') }}" method="post">
|
||||||
<input type="hidden" name=savecharacter value="1">
|
<input type="hidden" name=savecharacter value="1">
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table3" cellpadding="0" cellspacing="0">
|
<table class="Table3" cellpadding="0" cellspacing="0">
|
||||||
@@ -134,7 +134,7 @@ In any case the name must not violate the naming conventions stated in the <a hr
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div></div>
|
||||||
|
25
system/templates/account.created.html.twig
Normal file
25
system/templates/account.created.html.twig
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Your account has been created. Now you can login and create your first character. See you in Tibia!<br/><br/>
|
||||||
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
|
<table border="0" cellpadding="1">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if constant('USE_ACCOUNT_NAME') %}
|
||||||
|
{% set account_type = 'name' %}
|
||||||
|
{% else %}
|
||||||
|
{% set account_type = 'number' %}
|
||||||
|
{% endif %}
|
||||||
|
<br/>Your account {{ account_type }} is <b>{{ account }}</b><br/>You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
|
||||||
|
Please keep your account {{ account_type }} and password in a safe place and
|
||||||
|
never give your account {{ account_type }} or password to anybody.<br/><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/><br/>
|
27
system/templates/account.created.verify.html.twig
Normal file
27
system/templates/account.created.verify.html.twig
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Your account has been created.<br/><br/>
|
||||||
|
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Account Created</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="{{ config.darkborder }}">
|
||||||
|
<table border="0" cellpadding="1">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if constant('USE_ACCOUNT_NAME') %}
|
||||||
|
{% set account_type = 'name' %}
|
||||||
|
{% else %}
|
||||||
|
{% set account_type = 'number' %}
|
||||||
|
{% endif %}
|
||||||
|
<br/>Your account {{ account_type }} is <b>{{ account }}</b>.
|
||||||
|
|
||||||
|
You will need the account {{ account_type }} and your password to play on {{ config.lua.serverName }}.
|
||||||
|
Please keep your account {{ account_type }} and password in a safe place and
|
||||||
|
never give your account {{ account_type }} or password to anybody.<br/><br/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/><br/>
|
@@ -1,5 +1,5 @@
|
|||||||
To delete a character enter the name of the character and your password.<br/><br/>
|
To delete a character enter the name of the character and your password.<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=deletecharacter" method="post">
|
<form action="{{ getLink('account/character/delete') }}" method="post">
|
||||||
<input type="hidden" name="deletecharactersave" value="1"/>
|
<input type="hidden" name="deletecharactersave" value="1"/>
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" >
|
<table class="Table1" cellpadding="0" cellspacing="0" >
|
||||||
@@ -54,7 +54,7 @@ To delete a character enter the name of the character and your password.<br/><br
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
To generate new recovery key for your account please enter your password.<br/>
|
To generate new recovery key for your account please enter your password.<br/>
|
||||||
<font color="red"><b>New recovery key cost {{ config.generate_new_reckey_price }} Premium Points.</font> You have {{ points }} premium points. You will receive e-mail with this recovery key.</b><br/>
|
<font color="red"><b>New recovery key cost {{ config.generate_new_reckey_price }} Premium Points.</font> You have {{ points }} premium points. You will receive e-mail with this recovery key.</b><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=newreckey" method="post">
|
<form action="{{ getLink('account/register/new') }}" method="post">
|
||||||
<input type="hidden" name="registeraccountsave" value="1">
|
<input type="hidden" name="registeraccountsave" value="1">
|
||||||
<div class="TableContainer" >
|
<div class="TableContainer" >
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
@@ -47,7 +47,7 @@ To generate new recovery key for your account please enter your password.<br/>
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)"><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
To generate recovery key for your account please enter your password.<br/><br/>
|
To generate recovery key for your account please enter your password.<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement&action=registeraccount" method="post">
|
<form action="{{ getLink('account/register') }}" method="post">
|
||||||
<input type="hidden" name="registeraccountsave" value="1"/>
|
<input type="hidden" name="registeraccountsave" value="1"/>
|
||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0">
|
<table class="Table1" cellpadding="0" cellspacing="0">
|
||||||
@@ -50,7 +50,7 @@ To generate recovery key for your account please enter your password.<br/><br/>
|
|||||||
</form>
|
</form>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=accountmanagement" method="post">
|
<form action="{{ getLink('account/manage') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: 0px;">
|
<td style="border: 0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Please enter your account {{ account|lower }} and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/>
|
Please enter your account {{ account|lower }} and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/>
|
||||||
<form action="?subtopic=accountmanagement" method="post" >
|
<form action="{{ getLink('account/manage') }}" method="post" >
|
||||||
{% if redirect is not null %}
|
{% if redirect is not null %}
|
||||||
<input type="hidden" name="redirect" value="{{ redirect }}" />
|
<input type="hidden" name="redirect" value="{{ redirect }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -66,7 +66,7 @@ Please enter your account {{ account|lower }} and your password.<br/><a href="?s
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<form action="?subtopic=lostaccount" method="post">
|
<form action="{{ getLink('account/lost') }}" method="post">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:0px;">
|
<td style="border:0px;">
|
||||||
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
|
<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div>
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<div class="InnerTableContainer">
|
<div class="InnerTableContainer">
|
||||||
<table style="width:100%;">
|
<table style="width:100%;">
|
||||||
<tr>
|
<tr>
|
||||||
<td>You have logged out of your {{ config.serverName }} account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td>
|
<td>You have logged out of your {{ config.serverName }} account. In order to view your account you need to <a href="{{ getLink('account/manage') }}" >log in</a> again.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user