mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Version v0.0.2
* updated forum links to use friendly_urls * some more info will be shown when cannot connect to database * show more error infos when creating character * fixed forum link on newses * fixed spells loading when there's vocation name instead of id * fixed bug when you have changed template but it doesn't exist anymore * fixed vocations with promotion loading * fixed support for gesior pages and templates * added function OTS_Acount:getGroupId()
This commit is contained in:
parent
cd25eebdcb
commit
e808904f76
@ -11,6 +11,9 @@ RewriteRule ^images/items/([0-9]+)\.gif$ tools/item.php?id=$1
|
|||||||
RewriteRule ^characters/([A-Za-z0-9-_+']+)$ index.php?subtopic=characters&name=$1
|
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 ^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]+)$ 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/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/manage$ index.php?subtopic=accountmanagement
|
||||||
RewriteRule ^account/create$ index.php?subtopic=createaccount
|
RewriteRule ^account/create$ index.php?subtopic=createaccount
|
||||||
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
|
RewriteRule ^account/lost$ index.php?subtopic=lostaccount
|
||||||
|
@ -48,7 +48,7 @@ $config = array(
|
|||||||
'site_closed_title' => 'Closed',
|
'site_closed_title' => 'Closed',
|
||||||
'site_closed_message' => 'Server is under maintance, please visit later.<br/><br/>',
|
'site_closed_message' => 'Server is under maintance, please visit later.<br/><br/>',
|
||||||
|
|
||||||
'debug_level' => 0, // 0 - disabled, 1 - show load time, 2 - show db query counter, 3 - both
|
'debug_level' => 0, // 0 - disabled, 1 - show load time, 2 - show db query counter, 3 - both, 4 - memory usage, 5 - load time & load time, 6 - queries & memory usage, 7 - all
|
||||||
|
|
||||||
'language' => 'en', // default language (currently only 'en' available)
|
'language' => 'en', // default language (currently only 'en' available)
|
||||||
'language_allow_change' => false,
|
'language_allow_change' => false,
|
||||||
|
@ -45,6 +45,32 @@ function getPageLink($page, $action = null)
|
|||||||
}
|
}
|
||||||
function internalLayoutLink($page, $action = null) {return getPageLink($page, $action);}
|
function internalLayoutLink($page, $action = null) {return getPageLink($page, $action);}
|
||||||
|
|
||||||
|
function getForumThreadLink($thread_id, $page = NULL)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$url = '';
|
||||||
|
if($config['friendly_urls'])
|
||||||
|
$url = BASE_URL . 'forum/thread/' . (int)$thread_id . (isset($page) ? '/' . $page : '');
|
||||||
|
else
|
||||||
|
$url = BASE_URL . '?subtopic=forum&action=show_thread&id=' . (int)$thread_id . (isset($page) ? '&page=' . $page : '');
|
||||||
|
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getForumBoardLink($board_id, $page = NULL)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$url = '';
|
||||||
|
if($config['friendly_urls'])
|
||||||
|
$url = BASE_URL . 'forum/board/' . (int)$board_id . (isset($page) ? '/' . $page : '');
|
||||||
|
else
|
||||||
|
$url = BASE_URL . '?subtopic=forum&action=show_board&id=' . (int)$board_id . (isset($page) ? '&page=' . $page : '');
|
||||||
|
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
function getPlayerLink($name, $generate = true)
|
function getPlayerLink($name, $generate = true)
|
||||||
{
|
{
|
||||||
global $ots, $config;
|
global $ots, $config;
|
||||||
@ -455,7 +481,7 @@ function check_account_name($name, &$error = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
//is it valid nick for new char?
|
//is it valid nick for new char?
|
||||||
function check_name_new_char($name)
|
function check_name_new_char($name, &$error = '')
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
|
||||||
@ -464,92 +490,127 @@ function check_name_new_char($name)
|
|||||||
$first_words_blocked = array('admin ', 'administrator ', 'gm ', 'cm ', 'god ','tutor ', "'", '-');
|
$first_words_blocked = array('admin ', 'administrator ', 'gm ', 'cm ', 'god ','tutor ', "'", '-');
|
||||||
foreach($first_words_blocked as $word)
|
foreach($first_words_blocked as $word)
|
||||||
{
|
{
|
||||||
if($word == substr($name_lower, 0, strlen($word)))
|
if($word == substr($name_lower, 0, strlen($word))) {
|
||||||
|
$error = 'Your name contains blocked words.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(substr($name_lower, -1) == "'" || substr($name_lower, -1) == "-") {
|
||||||
|
$error = 'Your name contains illegal characters.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(substr($name_lower, -1) == "'" || substr($name_lower, -1) == "-")
|
if(substr($name_lower, 1, 1) == ' ') {
|
||||||
|
$error = 'Your name contains illegal space.';
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(substr($name_lower, 1, 1) == ' ')
|
if(substr($name_lower, -2, 1) == " ") {
|
||||||
|
$error = 'Your name contains illegal space.';
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(substr($name_lower, -2, 1) == " ")
|
if(strtolower($config['lua']['serverName']) == $name_lower) {
|
||||||
return false;
|
$error = 'Your name cannot be same as server name.';
|
||||||
|
|
||||||
if(strtolower($config['lua']['serverName']) == $name_lower)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$names_blocked = array('admin', 'administrator', 'gm', 'cm', 'god', 'tutor');
|
$names_blocked = array('admin', 'administrator', 'gm', 'cm', 'god', 'tutor');
|
||||||
foreach($names_blocked as $word)
|
foreach($names_blocked as $word)
|
||||||
{
|
{
|
||||||
if($word == $name_lower)
|
if($word == $name_lower) {
|
||||||
|
$error = 'Your name contains blocked words.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$name_length = strlen($name_lower);
|
|
||||||
for($i = 0; $i < $name_length; $i++)
|
|
||||||
{
|
|
||||||
if(isset($name_lower[$i - 1]) && $name_lower[$i - 1] == ' ' && isset($name_lower[$i + 1]) && $name_lower[$i + 1] == ' ')
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$words_blocked = array('admin', 'administrator', 'gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
|
$words_blocked = array('admin', 'administrator', 'gamemaster', 'game master', 'game-master', "game'master", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor');
|
||||||
foreach($words_blocked as $word)
|
foreach($words_blocked as $word)
|
||||||
{
|
{
|
||||||
if(!(strpos($name_lower, $word) === false))
|
if(!(strpos($name_lower, $word) === false)) {
|
||||||
|
$error = 'Your name contains illegal words.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$name_length = strlen($name_lower);
|
||||||
|
for($i = 0; $i < $name_length; $i++)
|
||||||
|
{
|
||||||
|
if(isset($name_lower[$i]) && isset($name_lower[$i + 1]) && $name_lower[$i] == $name_lower[$i + 1] && isset($name_lower[$i + 2]) && $name_lower[$i] == $name_lower[$i + 2]) {
|
||||||
|
$error = 'Your name is invalid.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for($i = 0; $i < $name_length; $i++)
|
for($i = 0; $i < $name_length; $i++)
|
||||||
{
|
{
|
||||||
if(isset($name_lower[$i]) && isset($name_lower[$i + 1]) && $name_lower[$i] == $name_lower[$i + 1] && isset($name_lower[$i + 2]) && $name_lower[$i] == $name_lower[$i + 2])
|
if(isset($name_lower[$i - 1]) && $name_lower[$i - 1] == ' ' && isset($name_lower[$i + 1]) && $name_lower[$i + 1] == ' ') {
|
||||||
|
$error = 'Your name contains too many spaces.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for($i = 0; $i < $name_length; $i++)
|
|
||||||
{
|
|
||||||
if(isset($name_lower[$i - 1]) && $name_lower[$i - 1] == ' ' && isset($name_lower[$i + 1]) && $name_lower[$i + 1] == ' ')
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($config['monsters']))
|
if(isset($config['monsters']))
|
||||||
{
|
{
|
||||||
if(in_array($name_lower, $config['monsters']))
|
if(in_array($name_lower, $config['monsters'])) {
|
||||||
|
$error = 'Your name cannot contains monster name.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$monsters = $db->query(
|
$monsters = $db->query(
|
||||||
'SELECT ' . $db->fieldName('name') .
|
'SELECT ' . $db->fieldName('name') .
|
||||||
' FROM ' . $db->tableName(TABLE_PREFIX . 'monsters') .
|
' FROM ' . $db->tableName(TABLE_PREFIX . 'monsters') .
|
||||||
' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($name_lower));
|
' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($name_lower));
|
||||||
if($monsters->rowCount() > 0)
|
if($monsters->rowCount() > 0) {
|
||||||
|
$error = 'Your name cannot contains monster name.';
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$spells_name = $db->query(
|
$spells_name = $db->query(
|
||||||
'SELECT ' . $db->fieldName('name') .
|
'SELECT ' . $db->fieldName('name') .
|
||||||
' FROM ' . $db->tableName(TABLE_PREFIX . 'spells') .
|
' FROM ' . $db->tableName(TABLE_PREFIX . 'spells') .
|
||||||
' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($name_lower));
|
' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($name_lower));
|
||||||
if($spells_name->rowCount() > 0)
|
if($spells_name->rowCount() > 0) {
|
||||||
|
$error = 'Your name cannot contains spell name.';
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$spells_words = $db->query(
|
$spells_words = $db->query(
|
||||||
'SELECT ' . $db->fieldName('words') .
|
'SELECT ' . $db->fieldName('words') .
|
||||||
' FROM ' . $db->tableName(TABLE_PREFIX . 'spells') .
|
' FROM ' . $db->tableName(TABLE_PREFIX . 'spells') .
|
||||||
' WHERE ' . $db->fieldName('words') . ' = ' . $db->quote($name_lower));
|
' WHERE ' . $db->fieldName('words') . ' = ' . $db->quote($name_lower));
|
||||||
if($spells_words->rowCount() > 0)
|
if($spells_words->rowCount() > 0) {
|
||||||
return false;
|
$error = 'Your name cannot contains spell name.';
|
||||||
|
|
||||||
if(isset($config['npc']))
|
|
||||||
{
|
|
||||||
if(in_array($name_lower, $config['npc']))
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '") != $name_length)
|
if(isset($config['npc']))
|
||||||
|
{
|
||||||
|
if(in_array($name_lower, $config['npc'])) {
|
||||||
|
$error = 'Your name cannot contains NPC name.';
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return preg_match("/[A-z ']{3,28}/", $name);
|
if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '") != $name_length) {
|
||||||
|
$error = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name_length < 3 || $name_length > 28) {
|
||||||
|
$error = 'Your name cannot be shorter than 3 characters and longer than 28 characters.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!preg_match("/[A-z ']{3,28}/", $name)) {
|
||||||
|
$error = 'Your name containst illegal characters.';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_rank_name($name)
|
function check_rank_name($name)
|
||||||
@ -778,7 +839,7 @@ function template_form()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$templates = get_templates();
|
$templates = get_templates();
|
||||||
$cache->set('templates', serialize($templates), 120);
|
$cache->set('templates', serialize($templates), 30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -121,10 +121,10 @@ else {
|
|||||||
$config['vocations'] = array();
|
$config['vocations'] = array();
|
||||||
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
|
||||||
$id = $vocation->getAttribute('id');
|
$id = $vocation->getAttribute('id');
|
||||||
if($id == $vocation->getAttribute('fromvoc'))
|
//if($id == $vocation->getAttribute('fromvoc'))
|
||||||
$config['vocations'][$id] = $vocation->getAttribute('name');
|
$config['vocations'][$id] = $vocation->getAttribute('name');
|
||||||
else
|
//else
|
||||||
$config['vocations'][$id + 4] = $vocation->getAttribute('name');
|
// $config['vocations'][$id] = $vocation->getAttribute('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($cache->enabled()) {
|
if($cache->enabled()) {
|
||||||
|
@ -167,7 +167,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
public function load($id)
|
public function load($id)
|
||||||
{
|
{
|
||||||
// SELECT query on database
|
// SELECT query on database
|
||||||
$this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('salt') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('web_flags') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch();
|
$this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('web_flags') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -247,13 +247,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UPDATE query on database
|
// UPDATE query on database
|
||||||
<<<<<<< .mine
|
|
||||||
$this->db->query('UPDATE `accounts` SET `name` = ' . $this->db->quote($this->data['name']) . ', `password` = ' . $this->db->quote($this->data['password']) . ', `email` = ' . $this->db->quote($this->data['email']) . ', `blocked` = ' . (int) $this->data['blocked'] . ', `rlname` = ' . $this->db->quote($this->data['rlname']) . ', `location` = ' . $this->db->quote($this->data['location']) . ', `web_flags` = ' . (int) $this->data['web_flags'] . ', `premdays` = ' . (int) $this->data['premdays'] . ', `lastday` = ' . (int) $this->data['lastday'] . ' WHERE `id` = ' . $this->data['id']);
|
$this->db->query('UPDATE `accounts` SET `name` = ' . $this->db->quote($this->data['name']) . ', `password` = ' . $this->db->quote($this->data['password']) . ', `email` = ' . $this->db->quote($this->data['email']) . ', `blocked` = ' . (int) $this->data['blocked'] . ', `rlname` = ' . $this->db->quote($this->data['rlname']) . ', `location` = ' . $this->db->quote($this->data['location']) . ', `web_flags` = ' . (int) $this->data['web_flags'] . ', `premdays` = ' . (int) $this->data['premdays'] . ', `lastday` = ' . (int) $this->data['lastday'] . ' WHERE `id` = ' . $this->data['id']);
|
||||||
||||||| .r19
|
|
||||||
$this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('web_flags') . ' = ' . (int) $this->data['web_flags'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']);
|
|
||||||
=======
|
|
||||||
$this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('salt') . ' = ' . $this->db->quote($this->data['salt']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('web_flags') . ' = ' . (int) $this->data['web_flags'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']);
|
|
||||||
>>>>>>> .r40
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -449,16 +443,6 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
$this->data['password'] = (string) $password;
|
$this->data['password'] = (string) $password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSalt()
|
|
||||||
{
|
|
||||||
if( !isset($this->data['salt']) )
|
|
||||||
{
|
|
||||||
throw new E_OTS_NotLoaded();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->data['salt'];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setSalt($salt)
|
public function setSalt($salt)
|
||||||
{
|
{
|
||||||
$this->data['salt'] = (string) $salt;
|
$this->data['salt'] = (string) $salt;
|
||||||
@ -801,21 +785,21 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
*/
|
*/
|
||||||
public function getAccess()
|
public function getAccess()
|
||||||
{
|
{
|
||||||
|
global $groups;
|
||||||
|
if(!isset($groups))
|
||||||
|
$groups = new OTS_Groups_List();
|
||||||
|
|
||||||
// by default
|
// by default
|
||||||
$access = 0;
|
$access = 0;
|
||||||
if(fieldExist('group_id', 'accounts')) {
|
if(fieldExist('group_id', 'accounts')) {
|
||||||
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
|
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
|
||||||
// if anything was found
|
// if anything was found
|
||||||
if(isset($query['group_id']))
|
|
||||||
$access = $query['group_id'];
|
|
||||||
|
|
||||||
return $access;
|
$group = $groups->getGroup($query['group_id']);
|
||||||
|
if(!$group) return 0;
|
||||||
|
return $group->getAccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
global $groups;
|
|
||||||
if(!isset($groups))
|
|
||||||
$groups = new OTS_Groups_List();
|
|
||||||
|
|
||||||
// finds groups of all characters
|
// finds groups of all characters
|
||||||
foreach( $this->getPlayersList() as $player)
|
foreach( $this->getPlayersList() as $player)
|
||||||
{
|
{
|
||||||
@ -831,6 +815,35 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
return $access;
|
return $access;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getGroupId()
|
||||||
|
{
|
||||||
|
global $groups;
|
||||||
|
if(!isset($groups))
|
||||||
|
$groups = new OTS_Groups_List();
|
||||||
|
|
||||||
|
$group_id = 0;
|
||||||
|
if(fieldExist('group_id', 'accounts')) {
|
||||||
|
$query = $this->db->query('SELECT `group_id` FROM `accounts` WHERE `id` = ' . (int) $this->getId())->fetch();
|
||||||
|
// if anything was found
|
||||||
|
if(isset($query['group_id']))
|
||||||
|
return $query['group_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// finds groups of all characters
|
||||||
|
foreach( $this->getPlayersList() as $player)
|
||||||
|
{
|
||||||
|
$group = $player->getGroup();
|
||||||
|
|
||||||
|
// checks if group's access level is higher then previouls found highest
|
||||||
|
if( $group->getId() > $group_id)
|
||||||
|
{
|
||||||
|
$group_id = $group->getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $group_id;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks highest access level of account in given guild.
|
* Checks highest access level of account in given guild.
|
||||||
*
|
*
|
||||||
|
@ -92,17 +92,8 @@ class OTS_DB_MySQL extends OTS_Base_DB
|
|||||||
$this->prefix = $params['prefix'];
|
$this->prefix = $params['prefix'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// PDO constructor
|
|
||||||
try
|
|
||||||
{
|
|
||||||
parent::__construct('mysql:' . implode(';', $dns), $user, $password);
|
parent::__construct('mysql:' . implode(';', $dns), $user, $password);
|
||||||
}
|
}
|
||||||
catch(PDOException $error)
|
|
||||||
{
|
|
||||||
echo 'Can\'t connect to MySQL database.';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query-quoted field name.
|
* Query-quoted field name.
|
||||||
|
@ -833,8 +833,9 @@ function checkName()
|
|||||||
|
|
||||||
if(empty($newchar_errors))
|
if(empty($newchar_errors))
|
||||||
{
|
{
|
||||||
if(!check_name_new_char($newchar_name))
|
$error = '';
|
||||||
$newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
|
if(!check_name_new_char($newchar_name, $error))
|
||||||
|
$newchar_errors[] = $error;
|
||||||
if($newchar_sex != 1 && $newchar_sex != "0")
|
if($newchar_sex != 1 && $newchar_sex != "0")
|
||||||
$newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.';
|
$newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.';
|
||||||
if(!in_array($newchar_town, $config['character_towns']))
|
if(!in_array($newchar_town, $config['character_towns']))
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Changelog';
|
$title = 'Changelog';
|
||||||
|
|
||||||
$_page = $_GET['page'];
|
$_page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||||
$id = $_GET['id'];
|
$id = isset($_GET['id']) ? $_GET['id'] : 0;
|
||||||
$limit = 30;
|
$limit = 30;
|
||||||
$offset = $_page * $limit;
|
$offset = $_page * $limit;
|
||||||
?>
|
?>
|
||||||
|
@ -138,7 +138,7 @@ if(empty($action))
|
|||||||
foreach($sections as $id => $section)
|
foreach($sections as $id => $section)
|
||||||
{
|
{
|
||||||
$last_post = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`section` = ".(int) $id." AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch();
|
$last_post = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`section` = ".(int) $id." AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch();
|
||||||
echo '<tr bgcolor="'.getStyle(++$number_of_rows).'"><td><a href="?subtopic=forum&action=show_board&id='.$id.'">'.$section['name'].'</a><br /><small>'.$section['description'].'</small></td><td>'.(int) (isset($counters[$id]['posts']) ? $counters[$id]['posts'] : 0).'</td><td>'.(int) (isset($counters[$id]['threads']) ? $counters[$id]['threads'] : 0).'</td><td>';
|
echo '<tr bgcolor="'.getStyle(++$number_of_rows).'"><td><a href="' . getForumBoardLink($id) . '">'.$section['name'].'</a><br /><small>'.$section['description'].'</small></td><td>'.(int) (isset($counters[$id]['posts']) ? $counters[$id]['posts'] : 0).'</td><td>'.(int) (isset($counters[$id]['threads']) ? $counters[$id]['threads'] : 0).'</td><td>';
|
||||||
if(isset($last_post['name']))
|
if(isset($last_post['name']))
|
||||||
echo date('d.m.y H:i:s', $last_post['post_date']).'<br />by ' . getPlayerLink($last_post['name']);
|
echo date('d.m.y H:i:s', $last_post['post_date']).'<br />by ' . getPlayerLink($last_post['name']);
|
||||||
else
|
else
|
||||||
@ -158,11 +158,11 @@ if($action == 'show_board')
|
|||||||
for($i = 0; $i < $threads_count['threads_count'] / $config['forum_threads_per_page']; $i++)
|
for($i = 0; $i < $threads_count['threads_count'] / $config['forum_threads_per_page']; $i++)
|
||||||
{
|
{
|
||||||
if($i != $_page)
|
if($i != $_page)
|
||||||
$links_to_pages .= '<a href="?subtopic=forum&action=show_board&id='.$section_id.'&page='.$i.'">'.($i + 1).'</a> ';
|
$links_to_pages .= '<a href="' . getForumBoardLink($section_id, $i) . '">'.($i + 1).'</a> ';
|
||||||
else
|
else
|
||||||
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
||||||
}
|
}
|
||||||
echo '<a href="?subtopic=forum">Boards</a> >> <b>'.$sections[$section_id]['name'].'</b>';
|
echo '<a href="' . getPageLink('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 />
|
||||||
@ -182,7 +182,7 @@ if($action == 'show_board')
|
|||||||
echo '<a href="?subtopic=forum&action=move_thread&id='.$thread['id'].'"\')"><span style="color:darkgreen">[MOVE]</span></a>';
|
echo '<a href="?subtopic=forum&action=move_thread&id='.$thread['id'].'"\')"><span style="color:darkgreen">[MOVE]</span></a>';
|
||||||
echo '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><font color="red">[REMOVE]</font></a> ';
|
echo '<a href="?subtopic=forum&action=remove_post&id='.$thread['id'].'" onclick="return confirm(\'Are you sure you want remove thread > '.$thread['post_topic'].' <?\')"><font color="red">[REMOVE]</font></a> ';
|
||||||
}
|
}
|
||||||
echo '<a href="?subtopic=forum&action=show_thread&id='.$thread['id'].'">'.htmlspecialchars($thread['post_topic']).'</a><br /><small>'.htmlspecialchars(substr($thread['post_text'], 0, 50)).'...</small></td><td>' . getPlayerLink($thread['name']) . '</td><td>'.(int) $thread['replies'].'</td><td>'.(int) $thread['views'].'</td><td>';
|
echo '<a href="' . getForumThreadLink($thread['id']) . '">'.htmlspecialchars($thread['post_topic']).'</a><br /><small>'.htmlspecialchars(substr($thread['post_text'], 0, 50)).'...</small></td><td>' . getPlayerLink($thread['name']) . '</td><td>'.(int) $thread['replies'].'</td><td>'.(int) $thread['views'].'</td><td>';
|
||||||
if($thread['last_post'] > 0)
|
if($thread['last_post'] > 0)
|
||||||
{
|
{
|
||||||
$last_post = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id']." AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch();
|
$last_post = $db->query("SELECT `players`.`name`, `" . TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id']." AND `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch();
|
||||||
@ -214,14 +214,14 @@ if($action == 'show_thread')
|
|||||||
for($i = 0; $i < $posts_count['posts_count'] / $config['forum_threads_per_page']; $i++)
|
for($i = 0; $i < $posts_count['posts_count'] / $config['forum_threads_per_page']; $i++)
|
||||||
{
|
{
|
||||||
if($i != $_page)
|
if($i != $_page)
|
||||||
$links_to_pages .= '<a href="?subtopic=forum&action=show_thread&id='.$thread_id.'&page='.$i.'">'.($i + 1).'</a> ';
|
$links_to_pages .= '<a href="' . getForumThreadLink($thread_id, $i) . '">'.($i + 1).'</a> ';
|
||||||
else
|
else
|
||||||
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
$links_to_pages .= '<b>'.($i + 1).' </b>';
|
||||||
}
|
}
|
||||||
$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="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$threads[0]['section'].'">'.$sections[$threads[0]['section']]['name'].'</a> >> <b>'.$thread_name['post_topic'].'</b>';
|
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 '<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)
|
||||||
@ -296,14 +296,14 @@ if($action == 'remove_post')
|
|||||||
if($post['id'] == $post['first_post'])
|
if($post['id'] == $post['first_post'])
|
||||||
{
|
{
|
||||||
$db->query("DELETE FROM `" . TABLE_PREFIX . "forum` WHERE `first_post` = ".$post['id']);
|
$db->query("DELETE FROM `" . TABLE_PREFIX . "forum` WHERE `first_post` = ".$post['id']);
|
||||||
header('Location: ?subtopic=forum&action=show_board&id='.$post['section']);
|
header('Location: ' . getForumBoardLink($post['section']));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`id` < ".$id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $post['first_post'])->fetch();
|
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`id` < ".$id." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $post['first_post'])->fetch();
|
||||||
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
||||||
$db->query("DELETE FROM `" . TABLE_PREFIX . "forum` WHERE `id` = ".$post['id']);
|
$db->query("DELETE FROM `" . TABLE_PREFIX . "forum` WHERE `id` = ".$post['id']);
|
||||||
header('Location: ?subtopic=forum&action=show_thread&id='.$post['first_post'].'&page='.(int) $_page);
|
header('Location: ' . getForumThreadLink($post['first_post'], (int) $_page));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -319,7 +319,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="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$thread['section'].'">'.$sections[$thread['section']]['name'].'</a> >> <a href="?subtopic=forum&action=show_thread&id='.$thread_id.'">'.$thread['post_topic'].'</a> >> <b>Post new reply</b><br /><h3>'.$thread['post_topic'].'</h3>';
|
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>';
|
||||||
if(isset($thread['id']))
|
if(isset($thread['id']))
|
||||||
{
|
{
|
||||||
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
$quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL;
|
||||||
@ -374,8 +374,8 @@ if($action == 'new_post')
|
|||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".(int) $thread_id);
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".(int) $thread_id);
|
||||||
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`post_date` <= ".time()." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id'])->fetch();
|
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`post_date` <= ".time()." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id'])->fetch();
|
||||||
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
||||||
header('Location: ?subtopic=forum&action=show_thread&id='.$thread_id.'&page='.$_page);
|
header('Location: ' . getForumThreadLink($thread_id, $_page));
|
||||||
echo '<br />Thank you for posting.<br /><a href="?subtopic=forum&action=show_thread&id='.$thread_id.'">GO BACK TO LAST THREAD</a>';
|
echo '<br />Thank you for posting.<br /><a href="' . getForumThreadLink($thread_id, $_page) . '">GO BACK TO LAST THREAD</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!$saved)
|
if(!$saved)
|
||||||
@ -435,7 +435,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="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$thread['section'].'">'.$sections[$thread['section']]['name'].'</a> >> <a href="?subtopic=forum&action=show_thread&id='.$thread['first_post'].'">'.$first_post['post_topic'].'</a> >> <b>Edit post</b>';
|
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>';
|
||||||
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();
|
||||||
@ -483,8 +483,8 @@ if($action == 'edit_post')
|
|||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `author_guid` = ".(int) $char_id.", `post_text` = ".$db->quote($text).", `post_topic` = ".$db->quote($post_topic).", `post_smile` = ".(int) $smile.", `last_edit_aid` = ".(int) $account_logged->getId().",`edit_date` = ".time()." WHERE `id` = ".(int) $thread['id']);
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `author_guid` = ".(int) $char_id.", `post_text` = ".$db->quote($text).", `post_topic` = ".$db->quote($post_topic).", `post_smile` = ".(int) $smile.", `last_edit_aid` = ".(int) $account_logged->getId().",`edit_date` = ".time()." WHERE `id` = ".(int) $thread['id']);
|
||||||
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`post_date` <= ".$thread['post_date']." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['first_post'])->fetch();
|
$post_page = $db->query("SELECT COUNT(`" . TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . TABLE_PREFIX . "forum`.`author_guid` AND `" . TABLE_PREFIX . "forum`.`post_date` <= ".$thread['post_date']." AND `" . TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['first_post'])->fetch();
|
||||||
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
$_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1;
|
||||||
header('Location: ?subtopic=forum&action=show_thread&id='.$thread['first_post'].'&page='.$_page);
|
header('Location: ' . getForumThreadLink($thread['first_post'], $_page));
|
||||||
echo '<br />Thank you for editing post.<br /><a href="?subtopic=forum&action=show_thread&id='.$thread['first_post'].'">GO BACK TO LAST THREAD</a>';
|
echo '<br />Thank you for editing post.<br /><a href="' . getForumThreadLink($thread['first_post'], $_page) . '">GO BACK TO LAST THREAD</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -531,7 +531,7 @@ if($action == 'new_topic')
|
|||||||
{
|
{
|
||||||
$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 = (int) $_REQUEST['section_id'];
|
$section_id = (int) $_REQUEST['section_id'];
|
||||||
echo '<a href="?subtopic=forum">Boards</a> >> <a href="?subtopic=forum&action=show_board&id='.$section_id.'">'.$sections[$section_id]['name'].'</a> >> <b>Post new thread</b><br />';
|
echo '<a href="' . getPageLink('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())
|
||||||
@ -590,8 +590,8 @@ if($action == 'new_topic')
|
|||||||
$db->query("INSERT INTO `" . TABLE_PREFIX . "forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`) VALUES ('null', '0', '".time()."', '".(int) $section_id."', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$db->quote($text).", ".$db->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."')");
|
$db->query("INSERT INTO `" . TABLE_PREFIX . "forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`) VALUES ('null', '0', '".time()."', '".(int) $section_id."', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$db->quote($text).", ".$db->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."')");
|
||||||
$thread_id = $db->lastInsertId();
|
$thread_id = $db->lastInsertId();
|
||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);
|
||||||
header('Location: ?subtopic=forum&action=show_thread&id='.$thread_id);
|
header('Location: ' . getForumThreadLink($thread_id));
|
||||||
echo '<br />Thank you for posting.<br /><a href="?subtopic=forum&action=show_thread&id='.$thread_id.'">GO BACK TO LAST THREAD</a>';
|
echo '<br />Thank you for posting.<br /><a href="' . getForumThreadLink($thread_id) . '">GO BACK TO LAST THREAD</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!$saved)
|
if(!$saved)
|
||||||
@ -648,7 +648,7 @@ if($action == 'move_thread')
|
|||||||
<br/><strong>Select the new board: </strong><SELECT NAME=sektion>';
|
<br/><strong>Select the new board: </strong><SELECT NAME=sektion>';
|
||||||
foreach($sections as $id => $section) { echo '<OPTION value="'.$id.'">'.$section['name'].'</OPTION>'; } echo '</SELECT>
|
foreach($sections as $id => $section) { echo '<OPTION value="'.$id.'">'.$section['name'].'</OPTION>'; } echo '</SELECT>
|
||||||
<INPUT TYPE="submit" VALUE="Move Thread"></FORM>
|
<INPUT TYPE="submit" VALUE="Move Thread"></FORM>
|
||||||
<form action="?subtopic=forum&action=show_board&id='.$post['section'].'" method="POST">
|
<form action="' . getForumBoardLink($post['section']) . '" method="POST">
|
||||||
<input type="submit" value="Cancel"></form></td></tr></table></td></tr></table>';
|
<input type="submit" value="Cancel"></form></td></tr></table></td></tr></table>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -672,7 +672,7 @@ if($action == 'moved_thread')
|
|||||||
{
|
{
|
||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `section` = ".$board." WHERE `id` = ".$post['id']."") or die(mysql_error());
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `section` = ".$board." WHERE `id` = ".$post['id']."") or die(mysql_error());
|
||||||
$nPost = $db->query( 'SELECT `section` FROM `' . TABLE_PREFIX . 'forum` WHERE `id` = \''.$id.'\' LIMIT 1;' )->fetch();
|
$nPost = $db->query( 'SELECT `section` FROM `' . TABLE_PREFIX . 'forum` WHERE `id` = \''.$id.'\' LIMIT 1;' )->fetch();
|
||||||
header('Location: ?subtopic=forum&action=show_board&id='.$nPost['section']);
|
header('Location: ' . getForumBoardLink($nPost['section']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -48,7 +48,7 @@ if(isset($_GET['archive']))
|
|||||||
$author = $query['name'];
|
$author = $query['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
echo news_parse($news['title'], $news['body'], $news['date'], $categories[$news['category']]['icon_id'], $config['news_author'] ? $author : '', $news['comments']);
|
echo news_parse($news['title'], $news['body'], $news['date'], $categories[$news['category']]['icon_id'], $config['news_author'] ? $author : '', getForumThreadLink($news['comments']));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
echo 'This news doesn\'t exist or is hidden.<br>';
|
echo 'This news doesn\'t exist or is hidden.<br>';
|
||||||
@ -444,7 +444,7 @@ if(!$news_cached)
|
|||||||
</a>';
|
</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo news_parse($news['title'], $news['body'] . $admin_options, $news['date'], $categories[$news['category']]['icon_id'], $config['news_author'] ? $author : '', $news['comments']);
|
echo news_parse($news['title'], $news['body'] . $admin_options, $news['date'], $categories[$news['category']]['icon_id'], $config['news_author'] ? $author : '', getForumThreadLink($news['comments']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
foreach($config_vocations as $voc_id => $voc_name) {
|
foreach($config_vocations as $voc_id => $voc_name) {
|
||||||
$vocations_ids[$voc_name] = $voc_id;
|
$vocations_ids[$voc_name] = $voc_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$allspells = new OTS_SpellsList($config['data_path'].'spells/spells.xml');
|
$allspells = new OTS_SpellsList($config['data_path'].'spells/spells.xml');
|
||||||
//add conjure spells
|
//add conjure spells
|
||||||
$conjurelist = $allspells->getConjuresList();
|
$conjurelist = $allspells->getConjuresList();
|
||||||
@ -89,8 +90,12 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
$nr_of_vocations = count($vocations);
|
$nr_of_vocations = count($vocations);
|
||||||
$vocations_to_db = "";
|
$vocations_to_db = "";
|
||||||
$voc_nr = 0;
|
$voc_nr = 0;
|
||||||
foreach($vocations as $vocation_to_add_name) {
|
foreach($vocations as $vocation_to_add) {
|
||||||
$vocations_to_db .= $vocation_to_add_name;
|
if(check_number($vocation_to_add)) {
|
||||||
|
$vocations_to_db .= $vocation_to_add;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$vocations_to_db .= $vocations_ids[$vocation_to_add];
|
||||||
$voc_nr++;
|
$voc_nr++;
|
||||||
|
|
||||||
if($voc_nr != $nr_of_vocations) {
|
if($voc_nr != $nr_of_vocations) {
|
||||||
@ -234,8 +239,10 @@ else
|
|||||||
$showed_vocations = 0;
|
$showed_vocations = 0;
|
||||||
foreach($spell_vocations as $spell_vocation)
|
foreach($spell_vocations as $spell_vocation)
|
||||||
{
|
{
|
||||||
|
if(isset($config_vocations[$spell_vocation])) {
|
||||||
echo $config_vocations[$spell_vocation];
|
echo $config_vocations[$spell_vocation];
|
||||||
$showed_vocations++;
|
$showed_vocations++;
|
||||||
|
}
|
||||||
if($showed_vocations != count($spell_vocations))
|
if($showed_vocations != count($spell_vocations))
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,22 @@ if($config['template_allow_change'])
|
|||||||
}
|
}
|
||||||
else if(isset($_SESSION['template']))
|
else if(isset($_SESSION['template']))
|
||||||
{
|
{
|
||||||
if(!preg_match("/[^A-z0-9_\-]/", $_SESSION['template']))
|
if(!preg_match("/[^A-z0-9_\-]/", $_SESSION['template'])) {
|
||||||
$template_name = $_SESSION['template'];
|
$template_name = $_SESSION['template'];
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
$template_name = $config['template'];
|
$template_name = $config['template'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$template_path = 'templates/' . $template_name;
|
$template_path = 'templates/' . $template_name;
|
||||||
|
|
||||||
|
if(!file_exists($template_path . '/config.php'))
|
||||||
|
{
|
||||||
|
$template_name = 'kathrine';
|
||||||
|
$template_path = 'templates/' . $template_name;
|
||||||
|
}
|
||||||
|
|
||||||
$file = $template_path . '/config.ini';
|
$file = $template_path . '/config.ini';
|
||||||
$exists = file_exists($file);
|
$exists = file_exists($file);
|
||||||
if($exists || ($config['backward_support'] && file_exists($template_path . '/layout_config.ini')))
|
if($exists || ($config['backward_support'] && file_exists($template_path . '/layout_config.ini')))
|
||||||
@ -92,6 +100,7 @@ $template['link_screenshots'] = internalLayoutLink('screenshots');
|
|||||||
$template['link_movies'] = internalLayoutLink('movies');
|
$template['link_movies'] = internalLayoutLink('movies');
|
||||||
$template['link_serverInfo'] = internalLayoutLink('serverInfo');
|
$template['link_serverInfo'] = internalLayoutLink('serverInfo');
|
||||||
$template['link_experienceTable'] = internalLayoutLink('experienceTable');
|
$template['link_experienceTable'] = internalLayoutLink('experienceTable');
|
||||||
|
$template['link_faq'] = internalLayoutLink('faq');
|
||||||
$template['link_points'] = internalLayoutLink('points');
|
$template['link_points'] = internalLayoutLink('points');
|
||||||
$template['link_gifts'] = internalLayoutLink('gifts');
|
$template['link_gifts'] = internalLayoutLink('gifts');
|
||||||
$template['link_gifts_history'] = internalLayoutLink('gifts', 'show_history');
|
$template['link_gifts_history'] = internalLayoutLink('gifts', 'show_history');
|
||||||
|
@ -3,7 +3,6 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
function news_parse($title, $content, $date, $icon = 0, $author = '', $comments = '')
|
function news_parse($title, $content, $date, $icon = 0, $author = '', $comments = '')
|
||||||
{
|
{
|
||||||
global $template_path, $config;
|
global $template_path, $config;
|
||||||
|
|
||||||
//$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
|
//$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
|
||||||
//if(file_exists($tmp)) {
|
//if(file_exists($tmp)) {
|
||||||
// $firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
|
// $firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
|
||||||
|
@ -75,16 +75,16 @@ if(isset($config['boxes']))
|
|||||||
function LoginButtonAction()
|
function LoginButtonAction()
|
||||||
{
|
{
|
||||||
if(loginStatus == "false") {
|
if(loginStatus == "false") {
|
||||||
window.location = "<?php echo internalLayoutLink('accountmanagement'); ?>";
|
window.location = "<?php echo $template['link_account_manage']; ?>";
|
||||||
} else {
|
} else {
|
||||||
window.location = "<?php echo internalLayoutLink('accountmanagement'); ?>";
|
window.location = "<?php echo $template['link_account_manage']; ?>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function LoginstatusTextAction(source) {
|
function LoginstatusTextAction(source) {
|
||||||
if(loginStatus == "false") {
|
if(loginStatus == "false") {
|
||||||
window.location = "<?php echo internalLayoutLink('createaccount'); ?>";
|
window.location = "<?php echo $template['link_account_create']; ?>";
|
||||||
} else {
|
} else {
|
||||||
window.location = "<?php echo internalLayoutLink('createaccount'); ?>&action=logout";
|
window.location = "<?php echo $template['link_account_logout']; ?>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ if(isset($config['boxes']))
|
|||||||
</head>
|
</head>
|
||||||
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();">
|
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();">
|
||||||
<?php echo template_place_holder('body_start'); ?>
|
<?php echo template_place_holder('body_start'); ?>
|
||||||
<a name="top" ></a>
|
<div id="top"></div>
|
||||||
<div id="ArtworkHelper" style="background-image:url(<?php echo $template_path; ?>/images/header/<?php echo $config['background_image']; ?>);" >
|
<div id="ArtworkHelper" style="background-image:url(<?php echo $template_path; ?>/images/header/<?php echo $config['background_image']; ?>);" >
|
||||||
<div id="Bodycontainer">
|
<div id="Bodycontainer">
|
||||||
<div id="ContentRow">
|
<div id="ContentRow">
|
||||||
@ -268,7 +268,7 @@ if(isset($config['boxes']))
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div id='news_Submenu' class='Submenu'>
|
<div id='news_Submenu' class='Submenu'>
|
||||||
<a href='<?php echo internalLayoutLink('news')?>'>
|
<a href='<?php echo $template['link_news']; ?>'>
|
||||||
<div id='submenu_news' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_news' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_news' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_news' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -276,7 +276,7 @@ if(isset($config['boxes']))
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('news' . ($config['friendly_urls'] ? '' : '') . 'archive')?>'>
|
<a href='<?php echo $template['link_news_archive'];?>'>
|
||||||
<div id='submenu_newsarchive' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_newsarchive' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_newsarchive' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_newsarchive' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -284,7 +284,7 @@ if(isset($config['boxes']))
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<!--a href='<?php echo internalLayoutLink('changelog')?>'>
|
<!--a href='<?php echo $template['link_changelog'];?>'>
|
||||||
<div id='submenu_changelog' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_changelog' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_changelog' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_changelog' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -314,7 +314,7 @@ if(isset($config['boxes']))
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div id='account_Submenu' class='Submenu'>
|
<div id='account_Submenu' class='Submenu'>
|
||||||
<a href='<?php echo internalLayoutLink('account' . ($config['friendly_urls'] ? '/manage' : 'management')); ?>'>
|
<a href='<?php echo $template['link_account_manage']; ?>'>
|
||||||
<div id='submenu_accountmanagement' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_accountmanagement' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_accountmanagement' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_accountmanagement' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -322,7 +322,7 @@ if(isset($config['boxes']))
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink(($config['friendly_urls'] ? 'account/create' : 'createaccount')); ?>'>
|
<a href='<?php echo $template['link_account_create']; ?>'>
|
||||||
<div id='submenu_createaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_createaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_createaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_createaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -330,7 +330,7 @@ if(isset($config['boxes']))
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink(($config['friendly_urls'] ? 'account/lost' : 'lostaccount')); ?>'>
|
<a href='<?php echo $template['link_account_lost']; ?>'>
|
||||||
<div id='submenu_lostaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_lostaccount' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_lostaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_lostaccount' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -338,7 +338,7 @@ if(isset($config['boxes']))
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('rules')?>'>
|
<a href='<?php echo $template['link_rules']; ?>'>
|
||||||
<div id='submenu_rules' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_rules' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_rules' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_rules' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -347,7 +347,7 @@ if(isset($config['boxes']))
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
echo "<a href='" . internalLayoutLink('downloads') . "'>
|
echo "<a href='" . $template['link_downloads'] . "'>
|
||||||
<div id='submenu_downloads' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_downloads' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_downloads' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_downloads' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -377,7 +377,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div id='community_Submenu' class='Submenu'>
|
<div id='community_Submenu' class='Submenu'>
|
||||||
<a href='<?php echo internalLayoutLink('characters')?>'>
|
<a href='<?php echo $template['link_characters']; ?>'>
|
||||||
<div id='submenu_characters' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_characters' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_characters' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_characters' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -386,7 +386,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('online')?>'>
|
<a href='<?php echo $template['link_online']; ?>'>
|
||||||
<div id='submenu_online' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_online' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_online' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_online' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -394,7 +394,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('highscores')?>'>
|
<a href='<?php echo $template['link_highscores']; ?>'>
|
||||||
<div id='submenu_highscores' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_highscores' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -403,7 +403,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php if(isset($config['powergamers'])): ?>
|
<?php if(isset($config['powergamers'])): ?>
|
||||||
<a href='<?php echo internalLayoutLink('powergamers')?>'>
|
<a href='<?php echo $template['link_powergamers']; ?>'>
|
||||||
<div id='submenu_powergamers' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_powergamers' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_powergamers' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_powergamers' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -412,7 +412,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a href='<?php echo internalLayoutLink('lastkills')?>'>
|
<a href='<?php echo $template['link_lastkills']; ?>'>
|
||||||
<div id='submenu_lastkills' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_lastkills' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_lastkills' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_lastkills' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -420,7 +420,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('houses')?>'>
|
<a href='<?php echo $template['link_houses']; ?>'>
|
||||||
<div id='submenu_houses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_houses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_houses' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_houses' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -428,7 +428,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('guilds')?>'>
|
<a href='<?php echo $template['link_guilds']; ?>'>
|
||||||
<div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
|
|
||||||
@ -438,7 +438,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php if(isset($config['wars'])): ?>
|
<?php if(isset($config['wars'])): ?>
|
||||||
<a href='<?php echo internalLayoutLink('wars')?>'>
|
<a href='<?php echo $template['link_wars']; ?>'>
|
||||||
<div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if(isset($config['polls'])): ?>
|
<?php if(isset($config['polls'])): ?>
|
||||||
<a href='<?php echo internalLayoutLink('polls')?>'>
|
<a href='<?php echo $template['link_polls']; ?>'>
|
||||||
<div id='submenu_polls' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_polls' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
|
|
||||||
@ -459,7 +459,8 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a href='<?php echo internalLayoutLink('bans')?>'>
|
<?php if(tableExist('bans')): ?>
|
||||||
|
<a href='<?php echo $template['link_bans']; ?>'>
|
||||||
<div id='submenu_bans' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_bans' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
|
|
||||||
@ -468,7 +469,8 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('team')?>'>
|
<?php endif; ?>
|
||||||
|
<a href='<?php echo $template['link_team']; ?>'>
|
||||||
<div id='submenu_team' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_team' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_team' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_team' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -479,15 +481,6 @@ echo "<a href='" . internalLayoutLink('downloads') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
if($config['forum'] != '')
|
|
||||||
{
|
|
||||||
if(strtolower($config['forum']) == 'site')
|
|
||||||
$forum_link = "<a href='" . internalLayoutLink('forum') . "'>";
|
|
||||||
else
|
|
||||||
$forum_link = "<a href='" . $config['forum'] . "' target='_blank'>";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div id='forum' class='menuitem'>
|
<div id='forum' class='menuitem'>
|
||||||
<span onClick="MenuItemAction('forum')">
|
<span onClick="MenuItemAction('forum')">
|
||||||
<div class='MenuButton' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background.gif);'>
|
<div class='MenuButton' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background.gif);'>
|
||||||
@ -506,7 +499,7 @@ if($config['forum'] != '')
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div id='forum_Submenu' class='Submenu'>
|
<div id='forum_Submenu' class='Submenu'>
|
||||||
<?php echo $forum_link; ?>
|
<?php echo $template['link_forum']; ?>
|
||||||
<div id='submenu_forum' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_forum' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_forum' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_forum' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -516,9 +509,6 @@ if($config['forum'] != '')
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div id='library' class='menuitem'>
|
<div id='library' class='menuitem'>
|
||||||
<span onClick="MenuItemAction('library')">
|
<span onClick="MenuItemAction('library')">
|
||||||
<div class='MenuButton' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background.gif);'>
|
<div class='MenuButton' style='background-image:url(<?php echo $template_path; ?>/images/menu/button-background.gif);'>
|
||||||
@ -535,7 +525,7 @@ if($config['forum'] != '')
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div id='library_Submenu' class='Submenu'>
|
<div id='library_Submenu' class='Submenu'>
|
||||||
<a href='<?php echo internalLayoutLink('creatures')?>'>
|
<a href='<?php echo $template['link_creatures']; ?>'>
|
||||||
<div id='submenu_creatures' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_creatures' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_creatures' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_creatures' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -543,7 +533,7 @@ if($config['forum'] != '')
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('spells')?>'>
|
<a href='<?php echo $template['link_spells']; ?>'>
|
||||||
<div id='submenu_spells' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_spells' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_spells' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_spells' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -551,7 +541,7 @@ if($config['forum'] != '')
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='<?php echo internalLayoutLink('commands')?>'>
|
<a href='<?php echo $template['link_commands']; ?>'>
|
||||||
<div id='submenu_commands' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_commands' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_commands' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_commands' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -559,10 +549,7 @@ if($config['forum'] != '')
|
|||||||
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<a href='<?php echo $template['link_experienceStages']; ?>'>
|
||||||
if(getBoolean($config['lua']['experienceStages'])):
|
|
||||||
?>
|
|
||||||
<a href='<?php echo internalLayoutLink('experienceStages')?>'>
|
|
||||||
<div id='submenu_experiencestages' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_experiencestages' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_experiencestages' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_experiencestages' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -571,10 +558,9 @@ if(getBoolean($config['lua']['experienceStages'])):
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
|
||||||
|
|
||||||
if(isset($config['freehouses'])): ?>
|
if(isset($config['freehouses'])): ?>
|
||||||
<a href='<?php echo internalLayoutLink('freehouses')?>'>
|
<a href='<?php echo $template['link_freehouses']; ?>'>
|
||||||
<div id='submenu_freehouses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_freehouses' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_freehouses' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_freehouses' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -587,7 +573,7 @@ endif;
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo "<a href='" . internalLayoutLink('screenshots') . "'>
|
echo "<a href='" . $template['link_screenshots'] . "'>
|
||||||
<div id='submenu_screenshots' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_screenshots' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_screenshots' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_screenshots' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -596,7 +582,7 @@ echo "<a href='" . internalLayoutLink('screenshots') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
if(isset($config['movies']))
|
if(isset($config['movies']))
|
||||||
echo "<a href='" . internalLayoutLink('movies') . "'>
|
echo "<a href='" . $template['link_movies'] . "'>
|
||||||
<div id='submenu_movies' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_movies' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_movies' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_movies' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -605,7 +591,7 @@ echo "<a href='" . internalLayoutLink('movies') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
|
|
||||||
echo "<a href='" . internalLayoutLink('serverInfo') . "'>
|
echo "<a href='" . $template['link_serverInfo'] . "'>
|
||||||
<div id='submenu_serverinfo' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_serverinfo' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_serverinfo' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_serverinfo' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -614,7 +600,7 @@ echo "<a href='" . internalLayoutLink('serverInfo') . "'>
|
|||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
?>
|
?>
|
||||||
<a href='<?php echo internalLayoutLink('experienceTable')?>'>
|
<a href='<?php echo $template['link_experienceTable']; ?>'>
|
||||||
<div id='submenu_experiencetable' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_experiencetable' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(<?php echo $template_path; ?>/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_experiencetable' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_experiencetable' class='ActiveSubmenuItemIcon' style='background-image:url(<?php echo $template_path; ?>/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -644,7 +630,7 @@ echo "<div id='shops' class='menuitem'>
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id='shops_Submenu' class='Submenu'>
|
<div id='shops_Submenu' class='Submenu'>
|
||||||
<a href='" . internalLayoutLink('points') . "'>
|
<a href='" . $template['link_points'] . "'>
|
||||||
<div id='submenu_points' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_points' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_points' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_points' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -652,7 +638,7 @@ echo "<div id='shops' class='menuitem'>
|
|||||||
<div class='RightChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='RightChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href='" . internalLayoutLink('gifts') . "'>
|
<a href='" . $template['link_gifts'] . "'>
|
||||||
<div id='submenu_gifts' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_gifts' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_gifts' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_gifts' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -661,7 +647,7 @@ echo "<div id='shops' class='menuitem'>
|
|||||||
</div>
|
</div>
|
||||||
</a>";
|
</a>";
|
||||||
if($logged)
|
if($logged)
|
||||||
echo "<a href='?subtopic=gifts&action=show_history'>
|
echo "<a href='" . $template['link_gifts_history'] . "'>
|
||||||
<div id='submenu_gifts' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
<div id='submenu_gifts' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
|
||||||
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
<div class='LeftChain' style='background-image:url(".$template_path."/images/general/chain.gif);'></div>
|
||||||
<div id='ActiveSubmenuItemIcon_gifts' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
<div id='ActiveSubmenuItemIcon_gifts' class='ActiveSubmenuItemIcon' style='background-image:url(".$template_path."/images/menu/icon-activesubmenu.gif);'></div>
|
||||||
@ -726,7 +712,7 @@ echo "</div>";
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if($db->query('SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = ' . $db->quote($config['lua']['sqlDatabase']) . ' AND TABLE_NAME = ' . $db->quote('wodz_exphistory'))->rowCount())
|
if(tableExist('wodz_exphistory'))
|
||||||
{
|
{
|
||||||
$top_enabled = true;
|
$top_enabled = true;
|
||||||
function write_top($name, $list, $colspan = 2)
|
function write_top($name, $list, $colspan = 2)
|
||||||
@ -858,7 +844,7 @@ echo "</div>";
|
|||||||
?>
|
?>
|
||||||
<img id="Monster" src="images/monsters/<?php echo logo_monster() ?>.gif" onClick="window.location = '?subtopic=creatures&creature=<?php echo $config['logo_monster'] ?>';" alt="Monster of the Week" />
|
<img id="Monster" src="images/monsters/<?php echo logo_monster() ?>.gif" onClick="window.location = '?subtopic=creatures&creature=<?php echo $config['logo_monster'] ?>';" alt="Monster of the Week" />
|
||||||
<img id="PedestalAndOnline" src="<?php echo $template_path; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
|
<img id="PedestalAndOnline" src="<?php echo $template_path; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
|
||||||
<div id="PlayersOnline" onClick="window.location = '<?php echo internalLayoutLink('online')?>'">
|
<div id="PlayersOnline" onClick="window.location = '<?php echo $template['link_online']; ?>'">
|
||||||
<?php
|
<?php
|
||||||
if($status['online'])
|
if($status['online'])
|
||||||
echo '<div id="players" style="display: inline;">' . $status['players'] . '</div><br>Players Online';
|
echo '<div id="players" style="display: inline;">' . $status['players'] . '</div><br>Players Online';
|
||||||
@ -870,7 +856,7 @@ echo "</div>";
|
|||||||
<div id="Themeboxes">
|
<div id="Themeboxes">
|
||||||
<?php if(in_array("newcomer", $config['boxes'])): ?>
|
<?php if(in_array("newcomer", $config['boxes'])): ?>
|
||||||
<div id="NewcomerBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
|
<div id="NewcomerBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
|
||||||
<a class="ThemeboxButton" href="<?php echo internalLayoutLink('createaccount'); ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/buttons/sbutton.gif);">
|
<a class="ThemeboxButton" href="<?php echo $template['link_account_create']; ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/buttons/sbutton.gif);">
|
||||||
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/buttons/sbutton_over.gif);"></div>
|
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/buttons/sbutton_over.gif);"></div>
|
||||||
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/buttons/_sbutton_jointibia.gif);"></div>
|
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/buttons/_sbutton_jointibia.gif);"></div>
|
||||||
</a>
|
</a>
|
||||||
@ -895,7 +881,7 @@ echo "</div>";
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if(PAGE == 'news' && in_array("poll", $config['boxes'])):
|
<?php if(PAGE == 'news' && in_array("poll", $config['boxes'])):
|
||||||
$poll = $db->query('SELECT id, question FROM '.$db->tableName('z_polls') . ' WHERE end > ' . time() . ' ORDER BY end LIMIT 1');
|
$poll = $db->query('SELECT id, question FROM '.$db->tableName(TABLE_PREFIX . 'polls') . ' WHERE end > ' . time() . ' ORDER BY end LIMIT 1');
|
||||||
if($poll->rowCount() > 0)
|
if($poll->rowCount() > 0)
|
||||||
{
|
{
|
||||||
$poll = $poll->fetch();
|
$poll = $poll->fetch();
|
||||||
@ -914,7 +900,7 @@ echo "</div>";
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
<?php
|
<?php
|
||||||
if($config['template_allow_change'])
|
if($config['template_allow_change'])
|
||||||
echo '<font color="white">Template:</font><br/>' . template_language_form();
|
echo '<font color="white">Template:</font><br/>' . template_form();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,11 +3,14 @@ function news_parse($title, $content, $date, $icon = 0, $author = '', $comments
|
|||||||
{
|
{
|
||||||
global $template_path;
|
global $template_path;
|
||||||
|
|
||||||
|
if($content[0] != '<')
|
||||||
|
{
|
||||||
$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
|
$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
|
||||||
if(file_exists($tmp)) {
|
if(file_exists($tmp)) {
|
||||||
$firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
|
$firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
|
||||||
$content[0] = '';
|
$content[0] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return '
|
return '
|
||||||
<div class="NewsHeadline">
|
<div class="NewsHeadline">
|
||||||
@ -21,7 +24,7 @@ function news_parse($title, $content, $date, $icon = 0, $author = '', $comments
|
|||||||
</div>
|
</div>
|
||||||
<table style="clear:both" border=0 cellpadding=0 cellspacing=0 width="100%" >
|
<table style="clear:both" border=0 cellpadding=0 cellspacing=0 width="100%" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left:10px;padding-right:10px;" >' . $firstLetter.$content . '</td>
|
<td style="padding-left:10px;padding-right:10px;" >' . (isset($firstLetter) ? $firstLetter : '').$content . '</td>
|
||||||
</tr>'
|
</tr>'
|
||||||
. (isset($comments[0]) ? '
|
. (isset($comments[0]) ? '
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user