Ir para conteúdo
  • Cadastre-se

(Resolvido)ajuda gesior onde os players que criam conta vão nascer


Ir para solução Resolvido por Smart Maxx,

Posts Recomendados

o kinight esta nascendo em yalahr quero que todos os players nasçam em Thais

o config do meu gesior a baixo

 

<?PHP
 
$link_down = "http://localhost/index.php?subtopic=download";## Link de download do cliente proprio ##
$config['site']['SocialFacebook'] = "nome da sua pagina";
 
###############################
###### Bônus Points ###########
###############################
 
################################
## Ex: 1x = Points normais #####
# Ex: 2x = Compra 1 e recebe 2 #
################################
################################
# 5x double points os pontos ###
# são extreme points ###########
################################
 
$config['site']['bonusPoints'] = 1; #! Quantidade de vezes a ser multiplicados os points !#
 
 
###################################
###### CONFIGURAÇÕES DO SITE ######
###################################
 
$config['site']['check_titles']= false; #! Não mecha !#
$config['site']['allowed_titles'] = array(); #! Não mecha !#
 
$config['site']['worlds'] = array(0 => 'Thais'); #! NOME DO SERVIDOR !#
$config['site']['one_email'] = 1; #! 1 email por account 1 = sim, 0 = não !#
$config['site']['verify_code'] = 1;
$config['site']['email_days_to_change'] = 7;
$config['site']['newaccount_premdays'] = 10; ## DIAS DE PREMIUM QUE JOGADOR RECEBE QUANDO CRIA CHARACTER ##
$config['site']['create_account_verify_mail'] = 0; #! Verificar conta com link enviado no email !#
$config['site']['generate_new_reckey'] = "1"; #! POSSIBILIDADE DE GERAÇÃO NOVA DE RECOVERY KEY 1 = sim || 0 = não !# 
$config['site']['generate_new_reckey_price'] = 5; #! Preço em 'points' de nova recovery key !#
$config['site']['send_mail_when_change_password'] = 0; #! Enviar novo password sempre que for alterado para o email !#
$config['site']['send_mail_when_generate_reckey'] = 1; #! Enviar nova recovery key para o email !#
$config['site']['send_register_email'] = 0; #! Enviar email de boas vindas quando account é criada !#
 
$config['archez']['secret'] = array(2, 6, 7, 13, 16, 17, 18, 23, 24, 26, 29, 30, 31, 32, 34, 35, 37, 43, 44, 46, 51, 53, 54, 62, 63, 65, 66, 68, 73, 80, 81, 82, 83);
$config['archez']['achievements'] = array(
    1 => 'Allow Cookies?',
    2 => 'Backpack Tourist',
    3 => 'Bearhugger',
    4 => 'Bone Brother',
    5 => 'Chorister',
    6 => 'Fountain of Life',
    7 => 'Here, Fishy Fishy!',
    8 => 'Honorary Barbarian',
    9 => 'Huntsman',
    10 => 'Just in Time',
    11 => 'Matchmaker',
    12 => 'Nightmare Knight',
    13 => 'Party Animal',
    14 => 'Secret Agent',
    15 => 'Talented Dancer',
    16 => 'Territorial',
    17 => 'Worm Whacker',
    18 => 'Allowance Collector',
    19 => 'Amateur Actor',
    20 => 'Animal Activist',
    21 => 'Beach Tamer',
    22 => 'Blessed!',
    23 => 'Exquisite Taste',
    24 => 'Fireworks in the Sky',
    25 => 'Greenhorn',
    26 => 'Jinx',
    27 => 'Lucid Dreamer',
    28 => 'Mathemagician',
    29 => 'Masquerader',
    30 => 'Ministrel',
    31 => 'Poet Laureate',
    32 => 'Quick as a Turtle',
    33 => 'Sea Scout',
    34 => 'Steampunked',
    35 => 'Superstitios',
    36 => 'The Milkman',
    37 => 'Turncoat',
    38 => 'Vive la Resistance',
    39 => 'Archpostman',
    40 => 'Clay Fighter',
    41 => 'Efreet Ally',
    42 => 'Ghostwisperer',
    43 => 'His True Face',
    44 => 'Ice Sculptor',
    45 => 'King Tibanus Fan',
    46 => 'Marblelous',
    47 => 'Marid Ally',
    48 => 'Passionate Kisser',
    49 => 'Perfect Fool',
    50 => 'Recognised Trader',
    51 => 'Rockstar',
    52 => 'Scrapper',
    53 => 'Vanity',
    54 => 'Wayfarer',
    55 => 'Champion of Chazorai',
    56 => 'Culinary Master',
    57 => 'Explorer',
    58 => 'Follower of Azerus',
    59 => 'Follower of Palimuth',
    60 => 'Friend of the Apes',
    61 => 'Golem in the Gears',
    62 => 'High-Flyer',
    63 => 'Interior Decorator',
    64 => 'Master Thief',
    65 => 'Polisher',
    66 => 'Potion Addict',
    67 => 'Ruthless',
    68 => 'Ship\'s Kobold',
    69 => 'Top AVIN Agent',
    70 => 'Top CGB Agent',
    71 => 'Top TBI Agent',
    72 => 'Annihilator',
    73 => 'Castlemania',
    74 => 'Elite Hunter',
    75 => 'High Inquisitor',
    76 => 'Jamjam',
    77 => 'Lord of the Elements',
    78 => 'Warlord of Svargrond',
    79 => 'Master of the Nexus',
    80 => 'Razing!',
    81 => 'Dread Lord',
    82 => 'Lord Protector',
    83 => 'Herbicide'
);  
 
 
##############################################
####### CONFIGURAÇÃO DAS VOCAÇÕES ############
##############################################
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
 
$config['site']['newchar_towns'][0] = array(3);
$config['site']['newchar_towns'][1] = array(3);
 
$vocation_name[0][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
$vocation_name[0][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
$vocation_name[1][0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); 
$vocation_name[1][1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); 
 
#######################################
######### Cidades do Servidor #########
#######################################
$towns_list[0] = array(2 => 'Carlin', 3 => 'Thais', 4 => 'Venore', 5 => 'Ab Dendriel', 6 => 'Kazorddon', 7 => 'Darashia', 8 => 'Ankrahmun', 9 => 'Edron', 10 => 'Liberty Bay', 11 => 'Port Hope', 12 => 'Svargrond', 13 => 'Yalahar', 14 => 'Farmine', 17 => 'Gray Island');
 
$config['site']['monsters'] = array("amazon","valkyrie","carrion worm","rotworm","rotworm queen","cockroach","kongra","merlkin","sibang","crystal spider","giant spider","poison spider","scorpion","spider","tarantula","achad","axeitus headbanger","bloodpaw","bovinus","colerian the barbarian","cursed gladiator","frostfur","orcus the cruel","rocky","the hairy one","avalanche","drasilla","grimgor guteater","kreebosh the exile","slim","spirit of earth","spirit of fire","spirit of water","the dark dancer","the hag","darakan the executioner","deathbringer","fallen mooh'tah master ghar","gnorre chyllson","norgle glacierbeard","svoren the mad","the masked marauder","the obliverator","the pit lord","webster","barbarian bloodwalker","barbarian brutetamer","barbarian headsplitter","barbarian skullhunter","bear","panda","polar bear","braindeath","beholder","elder beholder","gazer","chicken","dire penguin","flamingo","parrot","penguin","seagull","terror bird","bazir","infernatil","thul","munster","son of verminor","xenia","zoralurk","big boss trolliver","foreman kneebiter","mad technomancer","man in the cave","lord of the elements","the count","the plasmother","dracola","the abomination","the handmaiden","mr. punish","the countess sorrow","the imperor","massacre","apocalypse","brutus bloodbeard","deadeye devious","demodras","dharalion","fernfang","ferumbras","general murius","ghazbaran","grorlam","lethal lissy","morgaroth","necropharus","orshabaal","ron the ripper","the evil eye","the horned fox","the old widow","tiquandas revenge","apprentice sheng","dog","hellhound","war wolf","winter wolf","wolf","chakoya toolshaper","chakoya tribewarden","chakoya windcaller","blood crab","crab","frost giant","frost giantess","ice golem","yeti","acolyte of the cult","adept of the cult","enlightened of the cult","novice of the cult","ungreez","dark torturer","demon","destroyer","diabolic imp","fire devil","fury","hand of cursed fate","juggernaut","nightmare","plaguesmith","blue djinn","efreet","green djinn","marid","frost dragon","wyrm","sea serpent","dragon lord","dragon","hydra","dragon hatchling","dragon lord hatchling","frost dragon hatchling","dwarf geomancer","dwarf guard","dwarf soldier","dwarf","dworc fleshhunter","dworc venomsniper","dworc voodoomaster","elephant","mammoth","elf arcanist","elf scout","elf","charged energy elemental","energy elemental","massive energy elemental","overcharged energy elemental","energy overlord","cat","lion","tiger","azure frog","coral frog","crimson frog","green frog","orchid frog","toad","jagged earth elemental","muddy earth elemental","earth elemental","massive earth elemental","earth overlord","gargoyle","stone golem","ghost","phantasm","phantasm","pirate ghost","spectre","cyclops smith","cyclops drone","behemoth","cyclops","slick water elemental","roaring water elemental","ice overlord","water elemental","massive water elemental","ancient scarab","butterfly","bug","centipede","exp bug","larva","scarab","wasp","lizard sentinel","lizard snakecharmer","lizard templar","minotaur archer","minotaur guard","minotaur mage","minotaur","squirrel","goblin demon","badger","bat","deer","the halloween hare","hyaena","pig","rabbit","silver rabbit","skunk","wisp","dark monk","monk","tha exp carrier","necromancer","priestess","orc berserker","orc leader","orc rider","orc shaman","orc spearman","orc warlord","orc warrior","orc","goblin leader","goblin scavenger","goblin","goblin assassin","assasin","bandit","black knight","hero","hunter","nomad","smuggler","stalker","poacher","wild warrior","ashmunrah","dipthrah","mahrdis","morguthis","omruc","rahemos","thalas","vashresamun","pirate buccaneer","pirate corsair","pirate cutthroat","pirate marauder","carniphila","spit nettle","fire overlord","massive fire elemental","blistering fire elemental","blazing fire elemental","fire elemental","hellfire fighter","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout","quara predator scout","quara constrictor","quara hydromancer","quara mantassin","quara pincher","quara predator","cave rat","rat","cobra","crocodile","serpent spawn","snake","wyvern","black sheep","sheep","mimic","betrayed wraith","bonebeast","demon skeleton","lost soul","pirate skeleton","skeleton","skeleton warrior","undead dragon","defiler","slime2","slime","bog raider","ice witch","warlock","witch","bones","fluffy","grynch clan goblin","hacker","minishabaal","primitive","tibia bug","undead minion","annihilon","hellgorak","latrivan","madareth","zugurosh","ushuriel","golgordan","thornback tortoise","tortoise","eye of the seven","deathslicer","flamethrower","magicthrower","plaguethrower","poisonthrower","shredderthrower","troll champion","frost troll","island troll","swamp troll","troll","banshee","blightwalker","crypt shambler","ghoul","lich","mummy","vampire","grim reaper","trainer","forest dragon","knight","paladin","druid","sorcerer","guard","mercenary","thief","toxiros","pyramo","lazarus","zathroth","goshnar","durin","demora","orc champion","lumenia","dracula","alezzo","prince almirith","elf warlord","random noob","magebomb");
$config['site']['npc'] = array('alice', 'oarkhal', 'equer', 'parkhal', 'leoric', 'sarkhal', 'pallo', 'riona', 'her miona', 'varkhal', 'eura', 'blitz', 'markhal', 'wengo', 'larkhal');
 
 
$config['site']['max_players_per_account'] = 5; #! Personagens por account !#
$config['site']['guild_need_level'] = 100; #! Level minimo para criar uma nova guild !#
$config['site']['guild_need_pacc'] = 0; #! Para criar guild necessario premium? 1 = sim || 0 = não !#
$config['site']['guild_image_size_kb'] = 200; #! Tamanho da imagem para logo da guild !#
$config['site']['guild_description_chars_limit'] = 1000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 150;
 
###########################################
########## CONFIGURAÇÃO DE SMTP ###########
## Insira todas as informações de email ###
## para que possa funcionar o smtp ########
###########################################
$config['site']['send_emails'] = 1;
$config['site']['mail_address'] = "@gmail.com";
$config['site']['smtp_enabled'] = "yes";
$config['site']['smtp_host'] = "smtp.gmail.com";
$config['site']['smtp_port'] = 110;
$config['site']['smtp_auth'] = "yes";
$config['site']['smtp_user'] = "@gmail.com";
$config['site']['smtp_pass'] = "";
 
#! Opções, paginas e etc a serem exibidos !#
$config['site']['access_news'] = 6;
$config['site']['access_admin_panel'] = 6;
$config['site']['news_big_limit'] = 3;
$config['site']['news_ticks_limit'] = 8;
$config['site']['show_creationdate'] = 1;
$config['site']['last_deaths_limit'] = 15;
$config['site']['players_group_id_block'] = 4;
$config['site']['support_group_id'] = 2;
$config['site']['shop_system'] = 1;
$config['site']['serverinfo_page'] = 1;
$config['site']['email_lai_sec_interval'] = 180;
$config['site']['screenoftheday'] = 1;
 
#############
## Layouts ##
#############
$config['site']['layout'] = 'tibiacom';
 
############################
## PagSeguro/Paypal Email ##
############################
$config['paypal']['email'] = '[email protected]'; ## EMAIL PAYPAL ##
 
## Formas de pagamento [1 = ativo | 0 = inativo] ##
$config['site']['caixa'] = 0;
$config['site']['pagseguro'] = 0;
$config['site']['paypal'] = 0;
 
#####################
## Nome do Produto ##
#####################
$config['pagseguro']['produtoNome'] = 'Premium Points';
 
#############################
######### C A I X A ########
#############################
#! Informações do pagamento com caixa economica federal !#
$config['site']['CaixaCont'] = "
C/C:
Ag:
etc..
"; 
 
?>

 

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites

Em accountmanagement.php... procure por :

$char_to_copy->setPosX(0);
$char_to_copy->setPosY(0);
$char_to_copy->setPosZ(0);

Só colocar as coordenadas do templo de thais;

btn_donate_LG.gif

 
 
 

 

Link para o post
Compartilhar em outros sites

não achei isso ai vou postar a baixo o scripter mais mano não uso account manager so cria conta no website

<?php
if(!$logged)
if($action == "logout"){
//LOGOUT
$main_content .= '
<div class="TableContainer">
<table class="Table1" cellpadding="0" cellspacing="0" > 
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span> 
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>   
<div class="Text" >Logout Successful</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>       
</div></div><tr><td>
<div class="InnerTableContainer">
<table style="width:100%;" ><tr><td>
You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement">login</a> again.
</td>
</tr></table></div></table></div></td></tr>';
}else{
$link = "?subtopic=accountmanagement";
$link_lost = "?subtopic=lostaccount";
include("login.php");
}else
  {
  if($account_logged->getCustomField("group_id") == 4)
  $main_content .='<meta http-equiv="refresh" content="0;url=index.php?subtopic=accountmanagement&action=logout">';
else
if(!$account_logged->getCustomField("vip_time"))
$account_status = '<b>Free Account</b><br /><small>You do not have VIP <i>!</i></small>';
else
$account_status = '<b>VIP Account</b><br /><small>(Your premium time expired at '.date("M j Y, H:i:s", $account_logged->getCustomField("vip_time")).' CEST)</small>';
 
$account_vip = $account_logged->getPlayerVip_Time() ? 'VIP' : 'Free Account'; 
if ($account_vip == "VIP")
$account_vip_status = "green";
else
$account_vip_status = "red";
 
if($action == ""){
$main_content .= '
<div>
<center>
<table><tbody><tr><td>
<img src="'.$layout_name.'/images/content/headline-bracer-left.gif">
</td>
<td style="text-align:center;vertical-align:middle;horizontal-align:center;font-size:17px;font-weight:bold;">';
$account_reckey = $account_logged->getRecoveryKey();
if(empty($account_reckey)){
$main_content .= 'Welcome to your account!';}
else {
$main_content .='Welcome to your account, ' . $account_logged->getCustomField("rlname") . '!';}
$main_content .='
<br />
</td><td>
<img src="'.$layout_name.'/images/content/headline-bracer-right.gif">
</td></tr></tbody></table>
</center>
<br />';
if($account_logged->getCustomField("page_access") > $config['site']['access_admin_panel']){
$main_content .='
<div class="InnerTableContainer">
<table>
<tbody>
<tr>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image: url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" style="border: 1px solid #faf0d7;">
<tbody>
<tr style="background-color: #505050;">
</tr>
<tr class="Table" style="background-color: #d4c0a1;">
<td style="width: 800; border: 1px; border-style: solid; border-color: #FAF0D7; padding: 4px;">
<font style="font-size:16px; font-weight:bold;">
Primeira vez utilizando nosso website?</font><br />Visite o <a href="index.php?subtopic=cpanel">painel de administração</a> para adicionar tabelas não existentes.<small><br />Assim tais como o <b>sistema automatico pagseguro</b> não possui as tabelas instaladas.</small>
</font>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="TableShadowContainer">
<div class="TableBottomShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bm.gif);">
<div class="TableBottomLeftShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>
<div class="TableBottomRightShadow" style="background-image: url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div><br />';
}
$main_content .='
<div class="TableContainer">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
<div class="Text">Account Status</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<table class="Table5" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;">
<tbody>
<tr>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" style="border:1px solid #faf0d7;" width="100%">
<tbody>
<tr>
<td><img class="AccountStatusImage" src="images/account/account-status_'.$account_vip_status.'.gif" /></td>
<td valign="middle" width="100%">
<span class="BigBoldText">'.$account_vip.'</span>
<br />';
 
if ($account_vip == "VIP")
$main_content .='<small>Your premium time expired at '.date("M j Y, H:i:s", $account_logged->getCustomField("vip_time")).' CEST.</small>';
 
$main_content .='</td>
<td><form action="?subtopic=accountmanagement&amp;action=logout" method="post" style="padding:0px;margin:0px;"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div><input class="ButtonText" name="Logout" alt="Logout" src="'.$layout_name.'/images/buttons/_sbutton_logout.gif" type="image"></div></div></form><div style="font-size:1px;height:4px;"></div><form action="?subtopic=accountmanagement&action=manage" method="post" style="padding:0px;margin:0px;"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div><input class="ButtonText" name="Manage Account" alt="Manage Account" src="'.$layout_name.'/images/buttons/_sbutton_manageaccount.gif" type="image"></div></div></form></td></tr>    </tbody></table>  </div></div><div class="TableShadowContainer">  <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">    <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>    <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>  </div></div></td></tr>  </tbody></table>
</div>
</td>
</tr>
</tbody>
</table>
</div>';
$main_content .='
<div class="SmallBox"></div>
<br />
<div class="RowsWithOverEffect">
<div class="TableContainer">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
<div class="Text">Characters</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<table class="Table3" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;">
<tbody>
<tr>
<td>
<div class="TableShadowContainerRightTop">
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);"></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" width="100%">
<tr class="LabelH" >
<td style="width:5%" >&#160;</td>
<td style="width:65%" >Name</td>
<td style="width:15%" >World</td>
<td style="width:7%">Status&#160;</td>
<td style="width:5%">&#160;</td>
</tr>';
$account_players = $account_logged->getPlayersList();
$account_players->orderBy('name');
//show list of players on account
foreach($account_players as $account_player)
{
$player_number_counter++;
$main_content .= '
<tr style="background-color:';
if(is_int($player_number_counter / 2))
$main_content .= $config['site']['darkborder'];
else
$main_content .= $config['site']['lightborder'];
$main_content .= ';" >
<td style="width:5%" >'.$player_number_counter.'.</td>
<td><NOBR>'.$account_player->getName();
if($account_player->isNameLocked())
if($account_player->getOldName()){
$main_content .= '<font color="red"><b> [ NAMELOCK:</b> Wait for GM, new name: <b>'.$account_player->getOldName().' ]</b></font>';
}
$main_content .= '<br />
<small>'.$vocation_name[$account_player->getWorld()][$account_player->getPromotion()][$account_player->getVocation()].' - level '.$account_player->getLevel().'</small></td>
<td><NOBR>'.$config['site']['worlds'][$account_player->getWorld()].'</td>
<td>'; 
if($account_player->isDeleted()){
$main_content .= 'deleted';
}elseif($account_player->getHideChar() == 1){
$main_content .= 'hidden';
}else{
$main_content .= '';
}$main_content .= '</td>
<td style="text-align:center;vertical-align:middle;horizontal-align:center;" align="center"><p>[<a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'" >Edit</a>]</p>
<p>';
if($account_player->isDeleted()){
$main_content .= '[<a href="?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'">Undelete</a><a href="index.php?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'" ></a>]</p></td>';
}else{
$main_content .= '[<a href="?subtopic=accountmanagement&action=deletecharacter&name='.urlencode($account_player->getName()).'">Delete</a><a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'" ></a>]</p></td>';
}
$main_content .= '</tr>';
}
$players_from_logged_acc = $account_logged->getPlayersList();
if(count($players_from_logged_acc) == 0) {
$main_content .='<tr bgcolor="'.$config['site']['lightborder'].'"><td colspan="5" align="center">You don\'t have any character on your account.</td></tr>';
}
$main_content .= '
</table>
</div></div><div class="TableShadowContainer">  <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);">    <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);"></div>    <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);"></div>  </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0"><tbody><tr><td></td><td style="padding-right:7px;width:100%;" align="right"><form action="?subtopic=accountmanagement&amp;action=createcharacter" method="post" style="padding:0px;margin:0px;"><input name="selectedcharacter" value="" type="hidden"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)"><div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div><input class="ButtonText" name="Create Character" alt="Create Character" src="'.$layout_name.'/images/buttons/_sbutton_createcharacter.gif" type="image"></div></div></form></td></tr></tbody></table></td></tr>  </tbody></table></div>  </td></tr></tbody></table></div></div><br /><br />
</div>';
}
elseif($action== "manage"){
$account_reckey = $account_logged->getRecoveryKey();
if(empty($account_reckey))
$account_registred = '<b><font color="red">No</font></b>';
else
if($config['site']['generate_new_reckey'] && $config['site']['send_emails'])
$account_registred = 'Yes <b>(<a href="index.php?subtopic=accountmanagement&action=newreckey">Buy new Rec key</a>)</b>';
else
$account_registred = 'Yes';
$account_created = $account_logged->getCreated();
$account_email = $account_logged->getEMail();
$account_email_new_time = $account_logged->getCustomField("email_new_time");
if($account_email_new_time > 1)
$account_email_new = $account_logged->getCustomField("email_new");
$account_vip = $account_logged->getPlayerVip_Time() ? '<b>VIP</b> - '.date("d/m/Y, H:i", $account_logged->getPlayerVip_Time()).'' : '<b>Free Account</b>';  
$account_rlname = $account_logged->getRLName();
$account_location = $account_logged->getLocation();
if($account_logged->isBanned())
if($account_logged->getBanTime() > 0)
$welcome_msg = '<font color="red">Your account is banished until '.date("j F Y, G:i:s", $account_logged->getBanTime()).'!</font>';
else
$welcome_msg = '<font color="red">Your account is banished FOREVER!</font>';
$main_content .= '
<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" />
</div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
</div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
</div><div class="Message" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<table>
<td width="90%">&nbsp;</td>
<td width="10%">
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Overview" alt="Overview" src="'.$layout_name.'/images/buttons/_sbutton_overview.gif" id="Overview" >
</div>
</div>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</div>
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
</div>
</div>
<br />
<br />';
//if account dont have recovery key show hint
if(empty($account_reckey))
$main_content .= '<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
</div>
<div class="Message" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<table>
<tr>
<td class="LabelV" >Hint:</td>
<td style="width:100%;" >You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!</td>
</tr>
</table>
<div align="center" >
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=registeraccount" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></div></div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br />';
if($account_email_new_time > 1)
if($account_email_new_time < time())
$account_email_change = '<br />(You can accept <b>'.$account_email_new.'</b> as a new email.)';
else
{
$account_email_change = ' <br /><small>You can accept <b>new e-mail after '.date("j F Y", $account_email_new_time).".</b></small>";
$main_content .= '<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="Message" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</div>
<table>
<tr>
<td class="LabelV" >Note:</td>
<td style="width:100%;" >A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>. After <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td>
</tr>
</table>
<div align="center" >
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changeemail" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></div>    </div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br /><br />';
}
$main_content .= '<a name="General+Information" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" >  <image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" ><table class="Table3" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >General Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div><tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" >  <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" >    <table class="TableContent" width="100%" >
<tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV">Account Name:</td><td>'.$account_logged->getCustomField("name").'</td></tr>
<tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV">Email Address:</td><td style="width:90%;" >'.$account_email.''.$account_email_change.'</td></tr>
<tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV">Created:</td><td>'.date("j F Y, G:i:s", $account_created).'</td></tr>
<tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV">Last Login:</td><td>'.date("j F Y, G:i:s", time()).'</td></tr>
<tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV">Account Status:</td><td>'.$account_status.'</td></tr>
<tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV">Registered:</td><td>'.$account_registred.'</td></tr>
</table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>  </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" ><tr><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="'.$layout_name.'/images/buttons/_sbutton_changepassword.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name=newemail value="" ><input type="hidden" name=newemaildate value=0 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Email" alt="Change Email" src="'.$layout_name.'/images/buttons/_sbutton_changeemail.gif" ></div></div></td></tr></form>      </table></td><td width="100%"></td>';
 
//show button "register account"
if(empty($account_reckey))
$main_content .= '<td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement&action=registeraccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></td>';
$main_content .= '</tr></table></td></tr></table></div></table></div></td></tr><br />
<a name="Public+Information" ></a>
<div class="TopButtonContainer" >
<div class="TopButton" >
<a href="#top" ><image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a>
</div>
</div>
<div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Public Information</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>
<div class="TableShadowContainerRightTop" >
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
</div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer" >
<table class="TableContent" width="100%" >
<tr>
<td>
<table style="width:100%;">
<tr>
<td class="LabelV" >Real Name:</td>
<td style="width:90%;" >'.$account_rlname.'</td>
</tr>
<tr>
<td class="LabelV" >Location:</td>
<td style="width:90%;" >'.$account_location.'</td>
</tr>
</table>
</td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&action=changeinfo" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></td></tr>    </table>  </div></div>
<div class="TableShadowContainer" >
<div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
<div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
</div>
</div>
</td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br /><br />';
$pagseguro_query = $SQL->query("SELECT COUNT(*) FROM `pagsegurotransacoes` WHERE ".$SQL->fieldName('referencia')." = ".$SQL->quote($account_logged->getCustomField("name"))."")->fetch();
$pagseguro_history_received = $SQL->query('SELECT * FROM `pagsegurotransacoes` WHERE '.$SQL->fieldName('referencia').' = '.$SQL->quote($account_logged->getCustomField("name")).' ORDER BY `Data` DESC LIMIT 5;');
if(is_object($pagseguro_history_received)) {
foreach($pagseguro_history_received as $pagseguro_received) {
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$pagseguro_received_text .= '<tr  bgcolor="'.$bgcolor.'"><td style="padding: 5px;">'.$pagseguro_received['TransacaoID'].'</td><td>';
$pagseguro_received_text .= $pagseguro_received['TipoPagamento'];
$pagseguro_received_text .= '</td><td><b>R$</b>'.$pagseguro_received['NumItens'].',00</td><td><b style=color:red;">'.$pagseguro_received['StatusTransacao].'</b></td></tr>';
}
}
if ($pagseguro_query[0] > 0){
$main_content .='
<div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Payments History</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>
<div class="TableShadowContainerRightTop" >
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
</div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer" >
<table class="TableContent" width="100%" >
<tr bgcolor="#D4C0A1">
<td><b>Trans. ID:</b></td>
<td><b>Type:</b></td>
<td><b>Cost:</b></td>
<td><b>Status</b></td>
</tr>
'.$pagseguro_received_text.'
</table>
</div>
</div>
<div class="TableShadowContainer" >
<div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
<div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
</div>
</div>
</tr>
<tr>
<td>
<form action="index.php?subtopic=history" method="post">
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="View History" alt="View History" src="'.$layout_name.'/images/buttons/_sbutton_viewhistory.gif" >
</div>
</div>
</form>
</td>
</td>
</tr>
</table>
</div>
</table>
</div>
</td>
 
</tr>
';
 
}
}
//########### CHANGE PASSWORD ##########
if($action == "changepassword") {
$new_password = trim($_POST['newpassword']);
$new_password2 = trim($_POST['newpassword2']);
$old_password = trim($_POST['oldpassword']);
if(empty($new_password) && empty($new_password2) && empty($old_password)) {
$main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br /><br /><form action="index.php?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table></div>  </table></div></td></tr><br /><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
else
{
if(empty($new_password) || empty($new_password2) || empty($old_password)){
$show_msgs[] = "Please fill in form.";
}
if($new_password != $new_password2) {
$show_msgs[] = "The new passwords do not match!";
}
if(empty($show_msgs)) {
if(!check_password($new_password)) {
$show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght.";
}
$old_password = password_ency($old_password);
if($old_password != $account_logged->getPassword()) {
$show_msgs[] = "Current password is incorrect!";
}
}
if(!empty($show_msgs)){
//show errors
$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br />';
foreach($show_msgs as $show_msg) {
$main_content .= '<li>'.$show_msg;
}
$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br />';
//show form
$main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br /><br /><form action="index.php?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table></div>  </table></div></td></tr><br /><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
else
{
$org_pass = $new_password;
$new_password = password_ency($new_password);
$account_logged->setPassword($new_password);
$account_logged->save();
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Password Changed</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>Your password has been changed.';
if($config['site']['send_emails'] && $config['site']['send_mail_when_change_password'])
{
$mailBody = '<html>
<body>
<h3>Password to account changed!</h3>
<p>You or someone else changed password to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p>
<p>New password: <b>'.$org_pass.'</b></p>
</body>
</html>';
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
if ($config['site']['smtp_enabled'] == "yes")
{
$mail->IsSMTP();
$mail->Host = $config['site']['smtp_host'];
$mail->Port = (int)$config['site']['smtp_port'];
$mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
$mail->Username = $config['site']['smtp_user'];
$mail->Password = $config['site']['smtp_pass'];
}
else
$mail->IsMail();
$mail->IsHTML(true);
$mail->From = $config['site']['mail_address'];
$mail->AddAddress($account_logged->getEMail());
$mail->Subject = $config['server']['serverName']." - Changed password";
$mail->Body = $mailBody;
if($mail->Send())
$main_content .= '<br /><small>Your new password were send on email address <b>'.$account_logged->getEMail().'</b>.</small>';
else
$main_content .= '<br /><small>An error occorred while sending email with password!</small>';
}
$main_content .= '</td></tr>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
$_SESSION['password'] = $new_password;
}
}
}
 
//############# CHANGE E-MAIL ###################
if($action == "changeemail") {
$account_email_new_time = $account_logged->getCustomField("email_new_time");
if($account_email_new_time > 10) {$account_email_new = $account_logged->getCustomField("email_new"); }
if($account_email_new_time < 10){
if($_POST['changeemailsave'] == 1) {
$account_email_new = trim($_POST['new_email']);
$post_password = trim($_POST['password']);
if(empty($account_email_new)) {
$change_email_errors[] = "Please enter your new email address.";
}
else
{
if(!check_mail($account_email_new)) {
$change_email_errors[] = "E-mail address is not correct.";
}
}
if(empty($post_password)) {
$change_email_errors[] = "Please enter password to your account.";
}
else
{
$post_password = password_ency($post_password);
if($post_password != $account_logged->getPassword()) {
$change_email_errors[] = "Wrong password to account.";
}
}
if(empty($change_email_errors)) {
$account_email_new_time = time() + $config['site']['email_days_to_change'] * 24 * 3600;
$account_logged->setCustomField("email_new", $account_email_new);
$account_logged->setCustomField("email_new_time", $account_email_new_time);
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >New Email Address Requested</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>You have requested to change your email address to <b>'.$account_email_new.'</b>. The actual change will take place after <b>'.date("j F Y, H:i:s", $account_email_new_time).'</b>, during which you can cancel the request at any time.</td></tr>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
//show errors
$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br />';
foreach($change_email_errors as $change_email_error) {
$main_content .= '<li>'.$change_email_error;
}
$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br />';
//show form
$main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br /><br /><form action=index.php?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Email Address</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td>  <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td>  <td><input type="password" name="password" size="30" maxlength="29" ></td></tr>  </table></div>  </table></div></td></tr><br /><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
else
{
$main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br /><br /><form action=index.php?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Email Address</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td>  <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td>  <td><input type="password" name="password" size="30" maxlength="29" ></td></tr>  </table></div>  </table></div></td></tr><br /><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
else
{
if($account_email_new_time < time()) {
if($_POST['changeemailsave'] == 1) {
$account_logged->setCustomField("email_new", "");
$account_logged->setCustomField("email_new_time", 0);
$account_logged->setEmail($account_email_new);
$account_logged->save();
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Email Address Change Accepted</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>You have accepted <b>'.$account_logged->getEmail().'</b> as your new email adress.</td></tr>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Email Address Change Accepted</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>Do you accept <b>'.$account_email_new.'</b> as your new email adress?</td></tr>  </table></div>  </table></div></td></tr><br /><table width="100%"><tr><td width="30">&nbsp;</td><td align=left><form action="index.php?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="changeemailsave" value=1 ><INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=17></FORM></td><td align=left><form action="index.php?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="emailchangecancel" value=1 ><input type=image name="Cancel" src="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=17></form></td><td align=right><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></td><td width="30">&nbsp;</td></tr></table>';
}
}
else
{
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change of Email Address</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>.<br />The actual change will take place on <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>.<br />If you do not want to change your email address, please click on "Cancel".</td></tr>  </table></div>  </table></div></td></tr><br /><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name="emailchangecancel" value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Cancel" alt="Cancel" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
if($_POST['emailchangecancel'] == 1) {
$account_logged->setCustomField("email_new", "");
$account_logged->setCustomField("email_new_time", 0);
$main_content = '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Email Address Change Cancelled</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>Your request to change the email address of your account has been cancelled. The email address will not be changed.</td></tr>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
}
       
//########### CHANGE PUBLIC INFORMATION (about account owner) ######################
if($action == "changeinfo") {
$new_rlname = htmlspecialchars(stripslashes(trim($_POST['info_rlname'])));
$new_location = htmlspecialchars(stripslashes(trim($_POST['info_location'])));
if($_POST['changeinfosave'] == 1) {
//save data from form
$account_logged->setRLName($new_rlname);
$account_logged->setLocation($new_location);
$account_logged->save();
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Public Information Changed</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>Your public information has been changed.</td></tr>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
//show form
$account_rlname = $account_logged->getRLName();
$account_location = $account_logged->getLocation();
$main_content .= 'Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br /><br /><form action="index.php?subtopic=accountmanagement&action=changeinfo" method=post><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Public Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" ><input name="info_rlname" value="'.$account_rlname.'" size="30" maxlength="50" ></td></tr><tr><td class="LabelV" >Location:</td><td><input name="info_location" value="'.$account_location.'" size="30" maxlength="50" ></td></tr></table></div>  </table></div></td></tr><br /><table width="100%"><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="changeinfosave" value="1" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
 
//############## GENERATE RECOVERY KEY ###########
if($action == "registeraccount")
{
$reg_password = password_ency(trim($_POST['reg_password']));
$old_key = $account_logged->getRecoveryKey("key");
if($_POST['registeraccountsave'] == "1")
{
if($reg_password == $account_logged->getPassword())
{
if(empty($old_key))
{
$dontshowtableagain = 1;
$acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ1234567890';
$max = strlen($acceptedChars)-1;
$new_rec_key = NULL;
// 10 = number of chars in generated key
for($i=0; $i < 22; $i++) {
$cnum[$i] = $acceptedChars{mt_rand(0, $max)};
$new_rec_key .= $cnum[$i];
}
$account_logged->setRecoveryKey($new_rec_key);
$account_logged->save();
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Account Registered</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" >Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br /><br /><font size="5">&nbsp;&nbsp;&nbsp;<b>Recovery Key: '.$new_rec_key.'</b></font><br /><br /><br /><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>';
if($config['site']['send_emails'] && $config['site']['send_mail_when_generate_reckey'])
{
$mailBody = '<html>
<body>
<h3>New recovery key!</h3>
<p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p>
<p>Recovery key: <b>'.$new_rec_key.'</b></p>
</body>
</html>';
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
if ($config['site']['smtp_enabled'] == "yes")
{
$mail->IsSMTP();
$mail->Host = $config['site']['smtp_host'];
$mail->Port = (int)$config['site']['smtp_port'];
$mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
$mail->Username = $config['site']['smtp_user'];
$mail->Password = $config['site']['smtp_pass'];
}
else
$mail->IsMail();
$mail->IsHTML(true);
$mail->From = $config['site']['mail_address'];
$mail->AddAddress($account_logged->getEMail());
$mail->Subject = $config['server']['serverName']." - recovery key";
$mail->Body = $mailBody;
if($mail->Send())
$main_content .= '<br /><small>Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b>.</small>';
else
$main_content .= '<br /><small>An error occorred while sending email with recovery key! You will not receive e-mail with this key.</small>';
}
$main_content .= '</ul>  </table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
$reg_errors[] = 'Your account is already registred.';
}
else
$reg_errors[] = 'Wrong password to account.';
}
if($dontshowtableagain != 1)
{
//show errors if not empty
if(!empty($reg_errors))
{
$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br />';
foreach($reg_errors as $reg_error)
$main_content .= '<li>'.$reg_error;
$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br />';
}
//show form
$main_content .= 'To generate recovery key for your account please enter your password.<br /><br />
<form action="index.php?subtopic=accountmanagement&action=registeraccount" method="post" >
<input type="hidden" name="registeraccountsave" value="1">
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Generate recovery key</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td class="LabelV" ><span >Password:</td>
<td><input type="password" name="reg_password" size="30" maxlength="29" ></td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<table style="width:100%" >
<tr align="center" >
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" >
</div>
</div>
</td>
<tr>
</form>
</table>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="?subtopic=accountmanagement&amp;action=manage" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" >
</div>
</div>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>';
}
}
//############## GENERATE NEW RECOVERY KEY ###########
if($action == "newreckey"){
$reg_password = password_ency(trim($_POST['reg_password']));
$reckey = $account_logged->getRecoveryKey();
if((!$config['site']['generate_new_reckey'] || !$config['site']['send_emails']) || empty($reckey))
$main_content .= '
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="'.$config['site']['vdarkborder'].'">
<td class="white"><b>Error</b></td>
</tr>
<tr bgcolor='.$config['site']['darkborder'].'>
<td>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td>You are not allowed to generate a new recovery key.</td>
</tr>
</table>
</td>
</tr>
</table> ';
else
{
$points = $account_logged->getPremiumPoints();
if($_POST['registeraccountsave'] == "1")
{
if($reg_password == $account_logged->getPassword())
{
if($points >= $config['site']['generate_new_reckey_price'])
{
$dontshowtableagain = 1;
$acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ1234567890';
$max = strlen($acceptedChars)-1;
$new_rec_key = NULL;
// 10 = number of chars in generated key
for($i=0; $i < 22; $i++) {
$cnum[$i] = $acceptedChars{mt_rand(0, $max)};
$new_rec_key .= $cnum[$i];
}
$main_content .= '
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Account Registered</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" ><ul>';
$mailBody = '
<html>
<body>
<h3>New recovery key!</h3>
<p>You or someone else generated recovery key to your account on server <b>'.$config['server']['serverName'].'</b>.</p>
<p>Recovery key: <b>'.$new_rec_key.'</b></p>
</body>
</html>';
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
if ($config['site']['smtp_enabled'] == "yes")
{
$mail->IsSMTP();
$mail->Host = $config['site']['smtp_host'];
$mail->Port = (int)$config['site']['smtp_port'];
$mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
$mail->Username = $config['site']['smtp_user'];
$mail->Password = $config['site']['smtp_pass'];
}
else
$mail->IsMail();
$mail->IsHTML(true);
$mail->From = $config['site']['mail_address'];
$mail->AddAddress($account_logged->getEMail());
$mail->Subject = $config['server']['serverName']." - new recovery key";
$mail->Body = $mailBody;
if($mail->Send())
{
$account_logged->setRecoveryKey(new_rec_key);
$account_logged->setPremiumPoints($account_logged->getPremiumPoints()-$config['site']['generate_new_reckey_price']);
$account_logged->save();
$main_content .= '<br />Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b> for '.$config['site']['generate_new_reckey_price'].' premium points.';
}
else
$main_content .= 'An error occorred while sending email (<b>'.$account_logged->getEMail().'</b>) with recovery key! Recovery key not changed. Try again later.';
$main_content .= '</ul></table></div>  </table></div></td></tr><br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
$reg_errors[] = 'You need '.$config['site']['generate_new_reckey_price'].' premium points to generate new recovery key. You have <b>'.$points.'<b> premium points.';
}
else
$reg_errors[] = 'Wrong password to account.';
}
if($dontshowtableagain != 1)
{
//show errors if not empty
if(!empty($reg_errors))
{
$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br />';
foreach($reg_errors as $reg_error)
$main_content .= '<li>'.$reg_error;
$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br />';
}
//show form
$main_content .= 'To generate NEW recovery key for your account please enter your password.<br /><font color="red"><b>New recovery key cost '.$config['site']['generate_new_reckey_price'].' Premium Points.</font><br />You have '.$points.' premium points. You will receive e-mail with this recovery key.</b><br /><br /><form action="index.php?subtopic=accountmanagement&action=newreckey" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Generate recovery key</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td>';
if ($account_logged->getCustomField("premium_points") < $config['site']['generate_new_reckey_price']){
$main_content .='<input type="text" name="" size="35" value="You no have premium points to buy" disabled="disabled" >';
}
else
{
$main_content .='<input type="password" name="reg_password" size="30" maxlength="29" >';
}
$main_content .='</td></tr>  </table></div>  </table></div></td></tr><br /><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&amp;action=manage" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
}
//###### CHANGE CHARACTER COMMENT ######
if($action == "changecomment") {
$player_name = stripslashes($_REQUEST['name']);
$new_comment = htmlspecialchars(stripslashes(substr(trim($_POST['comment']),0,2000)));
$new_hideacc = (int) $_POST['accountvisible'];
$new_showskills = (int) $_POST['showskills'];
$show_outfit = (int) $_POST['show_outfit'];
$show_eq = (int) $_POST['show_eq'];
 
if(check_name($player_name)) {
$player = $ots->createObject('Player');
$player->find($player_name);
if($player->isLoaded()) {
$player_account = $player->getAccount();
if($account_logged->getId() == $player_account->getId()) {
if($_POST['changecommentsave'] == 1) {
$player->setCustomField("hide_char", $new_hideacc);
$player->setCustomField("show_eq", $show_eq);
$player->setCustomField("comment", $new_comment);
$player->setCustomField("show_outfit", $show_outfit);
$main_content .= '
<form action="index.php?subtopic=accountmanagement" method="post">
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Character Information Changed</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>The character information has been changed.</td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<center>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
$main_content .= 'Here you can see and edit the information about your character.<br />If you do not want to specify a certain field, just leave it blank.<br /><br />
<div class="TopButtonContainer" >
<div class="TopButton" >
<a href="#top" >
<image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" />
</a>
</div>
</div>
<div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Character Data</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" />
</span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>
<div class="TableShadowContainerRightTop" >
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer" >
<table class="TableContent" width="100%" >
<tr>
<td class="LabelV" style="vertical-align:middle;">Name:</td>
<td style="width:80%;" >'.$player_name.'</td>
</tr>
<tr>
<td class="LabelV" style="vertical-align:middle;" >World:</td>
<td style="width:80%;" >'.$config['server']['serverName'].'</td>
</tr>';
if ($player->getCustomField("sex") > 0){
$main_content .='
<tr>
<td class="LabelV" style="vertical-align:middle;">Sex:</td>
';
$sex_types = array (1 => 'male', 0 => 'female');
$main_content .='
<td>'.$sex_types[$player->getCustomField("sex")].'</td>
</tr>';
}
$main_content .='
</table>
</div>
</div>
<div class="TableShadowContainer">
<div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
<div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
</div>
</div>
</td>
</tr>
</td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<form action="index.php?subtopic=accountmanagement&action=changecomment" method="post" >
<div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Edit Character Information</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>
<div class="TableShadowContainerRightTop" >
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);">
<div class="TableContentContainer">
<table class="TableContent" width="100%" >
<tr>
<td class="LabelV" >Equipment Shower:</td><td>
';
if ($player->getCustomField("show_eq") == 1){
$main_content .='<input type="checkbox" name="show_eq"  value="1" checked="checked">&nbsp;<small>Visível</small>';
}else{
$main_content .='<input type="checkbox" name="show_eq"  value="1" >&nbsp;<small>Invisível</small>';
}
$main_content .= '</td>
</tr>
<tr>
<td class="LabelV" >Outfit Shower:</td><td>
';
if ($player->getCustomField("show_outfit") == 1){
$main_content .='<input type="checkbox" name="show_outfit"  value="1" checked="checked">&nbsp;<small>Visível</small>';
}else{
$main_content .='<input type="checkbox" name="show_outfit"  value="1" >&nbsp;<small>Invisível</small>';
}
$main_content .= '</td>
</tr>
<tr>
<td class="LabelV" >Hide Account:</td><td>';
if($player->getCustomField("hide_char") == 1)
{
$main_content .= '<input type="checkbox" name="accountvisible"  value="1" checked="checked">';
}
else
{
$main_content .= '<input type="checkbox" name="accountvisible"  value="1" >';
}
 
$main_content .= ' check to hide your account information</td>
</tr>
<tr><td><b>Comment:</b></td>
<td style="width:80%;" ><textarea name="comment" rows="10" cols="50" wrap="virtual">'.$player->getCustomField("comment").'</textarea><br />[max. length: 2000 chars, 50 lines (ENTERs)]<br />
<Small><b>BBCode:</b> OFF</small></td>
</tr>';
 
 
$main_content .= '</table>
</div>
</div>
<div class="TableShadowContainer" >
<div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" >
<div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div>
<div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div>
</div>
</div>
</td>
</tr>
<tr>
<td>
</table>
</div>
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</td>
</tr>
</table>
</table>
</div>
</td>
</tr>
<br />
<table style="width:100%" >
<tr align="center" >
<td><table border="0" cellspacing="0" cellpadding="0" >
<tr><td style="border:0px;" ><input type="hidden" name="name" value="'.$player->getName().'"><input type="hidden" name="changecommentsave" value="1"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';  
} }
else
{
$main_content .= '<div class="notice">Player <b>'.$player_name.'</b> is not on your account !</div><br />
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border: 0px none;">
<a href="javascript:void();" onclick=location.href="index.php?subtopic=accountmanagement">
<div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
<div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif); visibility: hidden;"></div>
<input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/vips/_sbutton_back.gif" type="image">
</table>';
}
}
else
{
$main_content .= '<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="5" WIDTH="100%">
<tr BGCOLOR="'.$config['site']['vdarkborder'].'">
<td CLASS="white"><b>Error</b></td>
</tr>
<tr BGCOLOR='.$config['site']['darkborder'].'>
<td>Error. Character with this name doesn\'t exist.</td>
</tr>
</TABLE>
<br />
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border: 0px none;">
<div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">
<div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>
<form action="?subtopic=accountmanagement" method="post">
<input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/vips/_sbutton_back.gif" type="image">
</form>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</center>';
}
}
else
{
$main_content .= "Error. Name contain illegal characters.";
}
}
 
//### NEW NICK - set new nick proposition ###
if($action == "newnick")
$name = $_GET['name'];
$name_new = stripslashes(ucwords(strtolower(trim($_GET['name_new']))));
if(!empty($name) && !empty($name_new))
{
if(check_name_new_char($name_new))
{
$player = $ots->createObject('Player');
$player->find($name);
if($player->isLoaded() && $player->isNameLocked())
{
$player_account = $player->getAccount();
if($account_logged->getId() == $player_account->getId())
{
if(!$player->getOldName())
if(!$player->isOnline())
{
$player->setCustomField('old_name', $name_new);
$main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >New nick proposition</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td>The character <b>'.$name.'</b> new nick proposition <b>'.$name_new.'</b> has been set. Now you must wait for acceptation from GM.</td></tr>  </table></div>  </table></div></td></tr>';
}
else
$main_content .= 'This character is online.';
else
$main_content .= 'You already set new name for this character ( <b>'.$player->getOldName().'</b> ). You must wait until GM accept/reject your proposition.';
}
else
$main_content .= 'Character <b>'.$player_name.'</b> is not on your account.';
}
else
$main_content .= 'Character with this name doesn\'t exist or isn\'t name locked.';
}
else
$main_content .= 'Name contain illegal characters. Invalid format or lenght.';
}
else
$main_content .= 'Please enter new char name.';
$main_content .= '<br /><center><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
 
//### DELETE character from account ###
if($action == "deletecharacter") {
$player_name = stripslashes(trim($_GET['name']));
$password_verify = trim($_POST['delete_password']);
$password_verify = password_ency($password_verify);
if($_POST['deletecharactersave'] == 1) {
if(!empty($player_name) && !empty($password_verify)) {
if(check_name($player_name)) {
$player = $ots->createObject('Player');
$player->find($player_name);
if($player->isLoaded()) {
$player_account = $player->getAccount();
if($account_logged->getId() == $player_account->getId()) {
if($password_verify == $account_logged->getPassword()) {
if(!$player->isOnline())
{
// show table "delete character" again
$dontshowtableagain = 1;
//delete player
$player->setCustomField('deleted', 1);
$main_content .= '
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Character Deleted</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table style="width:100%;" >
<tr>
<td>The character <b>'.$player_name.'</b> has been deleted.</td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<center>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="index.php?subtopic=accountmanagement" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" >
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div>
<input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" >
</div>
</div>
</td>
</tr>
</form>
</table>
</center>';
}
else
$delete_errors[] = 'This character is online.';
}
else
{
$delete_errors[] = 'Wrong password to account.';
}
}
else
{
$delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.';
}
}
else
{
$delete_errors[] = 'Character with this name doesn\'t exist.';
}
}
else
{
$delete_errors[] = 'Name contain illegal characters.';
}
}
else
{
$delete_errors[] = 'Character name or/and password is empty. Please fill in form.';
}
}
if($dontshowtableagain != 1) {
if(!empty($delete_errors)) {
$main_content .= '<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="ErrorMessage" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br />';
foreach($delete_errors as $delete_error) {
$main_content .= '<li>'.$delete_error;
}
$main_content .= '</div>
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
</div>
</div>
<br />';
}
$main_content .= 'To delete this character enter your password and click on "Submit".
You can undelete the character within the first 2 months (60 days) after the deletion.
After this time the character is deleted for good and cannot be restored anymore!<br /><br />
<form action="index.php?subtopic=accountmanagement&action=deletecharacter&name='.$player_name.'" method="post" >
<input type="hidden" name="deletecharactersave" value="1">
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Delete Character</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td class="LabelV" ><span >Character Name:</td>
<td style="width:90%;" >'.$player_name.'</td>
</tr>
<tr>
<td class="LabelV" ><span >Password:</td>
<td><input type="password" name="delete_password" size="30" maxlength="29" ></td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<table style="width:100%" >
<tr align="center" >
<td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
 
       
//### UNDELETE character from account ###
if($action == "undelete")
{
$player_name = stripslashes(trim($_GET['name']));
if(!empty($player_name))
{
if(check_name($player_name))
{
$player = $ots->createObject('Player');
$player->find($player_name);
if($player->isLoaded())
{
$player_account = $player->getAccount();
if($account_logged->getId() == $player_account->getId())
{
if(!$player->isOnline())
{
$player->setCustomField('deleted', 0);
$main_content .= '<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Character Undeleted</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td><div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>The character <b>'.$player_name.'</b> has been undeleted.</td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<center>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
$delete_errors[] = 'This character is online.';
}
else
$delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.';
}
else
$delete_errors[] = 'Character with this name doesn\'t exist.';
}
else
$delete_errors[] = 'Name contain illegal characters.';
}
}
//## CREATE CHARACTER on account ###
if($action == "createcharacter"){
if(count($config['site']['worlds']) > 1){
if(isset($_REQUEST['world']))
$world_id = (int) $_REQUEST['world'];
}
else
$world_id = 0;
if(!isset($world_id)){
$main_content .= 'Before you can create character you must select world: ';
foreach($config['site']['worlds'] as $id => $world_n)
$main_content .= '<br /><a href="index.php?subtopic=accountmanagement&action=createcharacter&world='.$id.'">- '.$world_n.'</a>';
$main_content .= '<br /><h3><a href="index.php?subtopic=accountmanagement">BACK</a></h3>';
}else{
$main_content .= '
<script type="text/javascript">
var nameHttp;
 
function checkName()
{
if(document.getElementById("newcharname").value=="")
{
document.getElementById("name_check").innerHTML = \'<font color="red">Please enter new character name.</font>\';
return;
}
nameHttp=GetXmlHttpObject();
if (nameHttp==null)
{
return;
}
var newcharname = document.getElementById("newcharname").value;
var url="ajax/check_name.php?name=" + newcharname + "&uid="+Math.random();
nameHttp.onreadystatechange=NameStateChanged;
nameHttp.open("GET",url,true);
nameHttp.send(null);
}
 
function NameStateChanged()
{
if (nameHttp.readyState==4)
{
document.getElementById("name_check").innerHTML=nameHttp.responseText;
}
}
</script>';
$newchar_name = stripslashes(ucwords(strtolower(trim($_POST['newcharname']))));
$newchar_sex = $_POST['newcharsex'];
$newchar_vocation = $_POST['newcharvocation'];
$newchar_town = $_POST['newchartown'];
if($_POST['savecharacter'] != 1)
{
$main_content .= 'Please choose a name';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= ', vocation';
$main_content .= ' and sex for your character. <br />In any case the name must not violate the naming conventions stated in the <a href="index.php?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br />';
if($account_logged->getPlayersList()->count() >= $config['site']['max_players_per_account'])
$main_content .= '<br /><TABLE BORDER="0" CELLSPACING="1" CELLPADDING="4" WIDTH="100%">
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=white><b>Erro</b></td>
</TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD><b><font color="red">You have maximum number of characters per account on your account. Delete one before you make new.</font></b></TD>
</TR></TABLE>';
$main_content .= '<br /><form action="index.php?subtopic=accountmanagement&action=createcharacter" method="post" >
<input type="hidden" name="world" value="'.$world_id.'" >
<input type="hidden" name=savecharacter value="1" >
<div class="TableContainer" >  <table class="Table3" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Create Character</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>
<div class="TableShadowContainerRightTop" >
<div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div>
</div>
<div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >
<div class="TableContentContainer" >
<table class="TableContent" width="100%" >
<tr class="LabelH" >
<td style="width:50%;" ><span >Name</td>
<td><span >Sex</td>
</tr>
<tr class="Odd" >
<td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><br />
<font size="1" face="verdana,arial,helvetica">
<div id="name_check">Please enter your character name.</div>
</font>
</td>
<td>';
$main_content .= '<input type="radio" name="newcharsex" value="1" ';
if($newchar_sex == 1)
$main_content .= 'checked="checked" ';
$main_content .= '>male<br />';
$main_content .= '<input type="radio" name="newcharsex" value="0" ';
if($newchar_sex == "0")
$main_content .= 'checked="checked" ';
$main_content .= '>female<br /></td></tr></table></div></div></table></div>';
if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= '<div class="InnerTableContainer" >  <table style="width:100%;" ><tr>';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
{
$main_content .= '<td>
<table class="TableContent" width="100%" >
<tr class="Odd" valign="top">
<td width="160">
<br /><b>Select your vocation:</b></td>
<td><table class="TableContent" width="100%" >';
foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
{
$main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
if($newchar_vocation == $char_vocation_key)
$main_content .= 'checked="checked" ';
$main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>';
}
$main_content .= '</table></table></td>';
}
if(count($config['site']['newchar_towns'][$world_id]) > 1)
{
$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
foreach($config['site']['newchar_towns'][$world_id] as $town_id)
{
$main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" ';
if($newchar_town == $town_id)
$main_content .= 'checked="checked" ';
$main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>';
}
$main_content .= '</table></table></td>';
}
if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= '</tr></table></div>';
$main_content .= '</table></div></td></tr><br /><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
else
{      
if(empty($newchar_name))
$newchar_errors[] = 'Please enter a name for your character!';
if(empty($newchar_sex) && $newchar_sex != "0")
$newchar_errors[] = 'Please select the sex for your character!';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
{
if(empty($newchar_vocation))
$newchar_errors[] = 'Please select a vocation for your character.';
}
else
$newchar_vocation = $config['site']['newchar_vocations'][$world_id][0];
if(count($config['site']['newchar_towns'][$world_id]) > 1)
{
if(empty($newchar_town))
$newchar_errors[] = 'Please select a town for your character.';
}
else
$newchar_town = $config['site']['newchar_towns'][$world_id][0];
if(empty($newchar_errors))
{
if(!check_name_new_char($newchar_name))
$newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.';
if($newchar_sex != 1 && $newchar_sex != "0")
$newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.';
if(!in_array($newchar_town, $config['site']['newchar_towns'][$world_id]))
$newchar_errors[] = 'Please select valid town.';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
{
$newchar_vocation_check = FALSE;
foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
if($newchar_vocation == $char_vocation_key)
$newchar_vocation_check = TRUE;
if(!$newchar_vocation_check)
$newchar_errors[] = 'Unknown vocation. Please fill in form again.';
}
else
$newchar_vocation = 0;
}
if(empty($newchar_errors))
{
$check_name_in_database = $ots->createObject('Player');
$check_name_in_database->find($newchar_name);
if($check_name_in_database->isLoaded())
$newchar_errors[] .= 'This name is already used. Please choose another name!';
$number_of_players_on_account = $account_logged->getPlayersList()->count();
if($number_of_players_on_account >= $config['site']['max_players_per_account'])
$newchar_errors[] .= 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.$config['site']['max_players_per_account'].')</b>!';
}
if(empty($newchar_errors))
{
$char_to_copy_name = $config['site']['newchar_vocations'][$world_id][$newchar_vocation];
$char_to_copy = new OTS_Player();
$char_to_copy->find($char_to_copy_name);
if(!$char_to_copy->isLoaded())
$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.';
}
if(empty($newchar_errors))
{
if($newchar_sex == "0")
$char_to_copy->setLookType(136);
$player = $ots->createObject('Player');
$player->setName($newchar_name);
$player->setAccount($account_logged);
$player->setGroup($char_to_copy->getGroup());
$player->setSex($newchar_sex);
$player->setVocation($char_to_copy->getVocation());
$player->setConditions($char_to_copy->getConditions());
$player->setRank($char_to_copy->getRank());
$player->setLookAddons($char_to_copy->getLookAddons());
$player->setTownId($newchar_town);
$player->setExperience($char_to_copy->getExperience());
$player->setLevel($char_to_copy->getLevel());
$player->setMagLevel($char_to_copy->getMagLevel());
$player->setHealth($char_to_copy->getHealth());
$player->setHealthMax($char_to_copy->getHealthMax());
$player->setMana($char_to_copy->getMana());
$player->setManaMax($char_to_copy->getManaMax());
$player->setManaSpent($char_to_copy->getManaSpent());
$player->setSoul($char_to_copy->getSoul());
$player->setDirection($char_to_copy->getDirection());
$player->setLookBody($char_to_copy->getLookBody());
$player->setLookFeet($char_to_copy->getLookFeet());
$player->setLookHead($char_to_copy->getLookHead());
$player->setLookLegs($char_to_copy->getLookLegs());
$player->setLookType($char_to_copy->getLookType());
$player->setCap($char_to_copy->getCap());
$player->setPosX(32369);
$player->setPosY(32241);
$player->setPosZ(7);
$player->setLossExperience($char_to_copy->getLossExperience());
$player->setLossMana($char_to_copy->getLossMana());
$player->setLossSkills($char_to_copy->getLossSkills());
$player->setLossItems($char_to_copy->getLossItems());
$player->save();
unset($player);
$player = $ots->createObject('Player');
$player->find($newchar_name);
if($player->isLoaded())
{
$player->setCustomField('world_id', (int) $world_id);
$player->setSkill(0,$char_to_copy->getSkill(0));
$player->setSkill(1,$char_to_copy->getSkill(1));
$player->setSkill(2,$char_to_copy->getSkill(2));
$player->setSkill(3,$char_to_copy->getSkill(3));
$player->setSkill(4,$char_to_copy->getSkill(4));
$player->setSkill(5,$char_to_copy->getSkill(5));
$player->setSkill(6,$char_to_copy->getSkill(6));
$player->save();
$loaded_items_to_copy = $SQL->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId()."");
foreach($loaded_items_to_copy as $save_item)
$SQL->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');");
$main_content .= '
<div class="TableContainer" >
<table class="Table1" cellpadding="0" cellspacing="0" >
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
</span>
<span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" />
</span>
<span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Character Created</div>
<span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" >
<tr>
<td>The character <b>'.$newchar_name.'</b> has been created.<br />Please select the outfit when you log in for the first time.<br /><br /><b>See you on '.$config['server']['serverName'].'!</b></td>
</tr>
</table>
</div>
</table>
</div>
</td>
</tr>
<br />
<center>
<table border="0" cellspacing="0" cellpadding="0" >
<form action="index.php?subtopic=accountmanagement" method="post" >
<tr>
<td style="border:0px;" >
<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>';
}
else
{
echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin.";
exit;
}
}
else
{
$main_content .= '
<div class="SmallBox" >
<div class="MessageContainer" >
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="ErrorMessage" >
<div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>
<div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div>
<b>The Following Errors Have Occurred:</b><br />';
foreach($newchar_errors as $newchar_error)
$main_content .= '<li>'.$newchar_error;
$main_content .= '</div>
<div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>
<div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
<div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>
</div>
</div>
<br />';
$main_content .= 'Please choose a name';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= ', vocation';
$main_content .= ' and sex for your character. <br />In any case the name must not violate the naming conventions stated in the <a href="index.php?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br /><br /><form action="index.php?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" >  <table class="Table3" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div>    </div><tr>      <td><div class="InnerTableContainer" >  <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" >  <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" >  <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><br /><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>';
$main_content .= '<input type="radio" name="newcharsex" value="1" ';
if($newchar_sex == 1)
$main_content .= 'checked="checked" ';
$main_content .= '>male<br />';
$main_content .= '<input type="radio" name="newcharsex" value="0" ';
if($newchar_sex == "0")
$main_content .= 'checked="checked" ';
$main_content .= '>female<br /></td></tr></table></div></div></table></div>';
if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= '<div class="InnerTableContainer" >  <table style="width:100%;" ><tr>';
if(count($config['site']['newchar_vocations'][$world_id]) > 1)
{
$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >';
foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char)
{
$main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" ';
if($newchar_vocation == $char_vocation_key)
$main_content .= 'checked="checked" ';
$main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>';
}
$main_content .= '</table></table></td>';
}
if(count($config['site']['newchar_towns'][$world_id]) > 1)
{
$main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >';
foreach($config['site']['newchar_towns'][$world_id] as $town_id)
{
$main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" ';
if($newchar_town == $town_id)
$main_content .= 'checked="checked" ';
$main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>';
}
$main_content .= '</table></table></td>';
}
if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1)
$main_content .= '</tr></table></div>';
$main_content .= '</table></div></td></tr><br /><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="index.php?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
}
}
}
}
?>

 


i eu ja tinha colocado a posição do templo ai


quando ja tem a conta e cria o char ele nasce em thais mais quando cria conta e cria o char junto ele nasce em yalahar

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites

ta bem ali da ctrl+F e procura por " posx "

o teu ta assim

$player->setPosX(32369);
$player->setPosY(32241);
$player->setPosZ(7);
e sim essa e a config pra quem usa pelo site
pra quem nao usa pelo site é no config.lua
na duvida troca os 2 ;D
 
OBS.: da ctrl+F e procura sempre por posx
Link para o post
Compartilhar em outros sites

essa posição que esta ai no meu foi eu que coloquei quando o player ja tem a conta e cria o char aparece normalmente em thais agora se ele criar a conta e o character aparece em yalahar


me ajuda ai como eu deixo para so criar a conta e depois o player tem que logar e criar o char ?

 

no site ai ta a sim quando o player cria a conta ja tem que criar o char tambem 

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites

Usa esses 3 arquivos que eu anexei, tentei postar mas falou que o post era grande d+  ;D 

 

 

 

 

"me ajuda ai como eu deixo para so criar a conta e depois o player tem que logar e criar char?"

 

Usa esse gesior que é bem melhor e já é assim >http://www.tibiaking.com/forum/topic/44980-gesioracc-2012-modificado-o-melhor/<

 

 

accountmanagement.php

config.php

createaccount.php

btn_donate_LG.gif

 
 
 

 

Link para o post
Compartilhar em outros sites

mano eu baixei o outro gesior que vc me indicou  quando instalo esta dudo perfeito mais quando vou entrar no site mostra o seguinte erro

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in C:\xampp\htdocs\classes\databaselist.php on line 105 "

 

como ageita isso ?


eu coloquei seus anexos também so que quando vou logar a conta aparece a mensagem "templo position is wrong contact with the administration"

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites
  • Solução

eu coloquei seus anexos também so que quando vou logar a conta aparece a mensagem "templo position is wrong contact with the administration"

 

no accountmanagement.php, verifique se o 

$player->setPosX(32369);
$player->setPosY(32241);
$player->setPosZ(7);

está com as coordenadas corretas, se sim :

 

 

Siga esse breve tutorial pra adicionar as posx, posy, posz na database do phpmyadmin;

 

Para versões de servidores com banco de dados MySQL:
Abra a pagina do phpMyadmim, localhost/phpmyadmin ou seusite.com/phpmyadmin e faça login.

9ogt.png

Agora selecione seu banco de dados a esquerda do painel

1bRxt.png

Clique na coluna players:

abRWH.png

Agora olhe o nome do personagem e clique em editar no começo da mesma linha.

kBS44.png

E por ultimo, desce a pagina até achar os campos town_id, posX, posY e posZ.

DwZkM.png

Ao terminar de digitar dê enter ou clique em executar no final da pagina.

 

créditos : gpedro;

 

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in C:\xampp\htdocs\classes\databaselist.php on line 105 "

 

Você usa a versão 1.7.3 do xampp ? se não baixe;

Editado por Smart Maxx (veja o histórico de edições)

btn_donate_LG.gif

 
 
 

 

Link para o post
Compartilhar em outros sites

sim uso vou testar 


nossa funcionou muito bom obrigado agora eu queria so uma coisa eu instalei o sistema de pagseguro altomatico  

esta tudo certinho e configurado so que não entrega os pontos pode me ajudar ?

eu fiz um poste ajuda la

                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites

Se sua dúvida foi sanada escolha como melhor a reposta, que tirou sua dúvida, para ficar de mais fácil acesso quando outra pessoa tiver a msm dúvida;

 

Em breve dou uma olhada no seu outro tópico e vejo o que dá pra fazer pra te ajudar;

btn_donate_LG.gif

 
 
 

 

Link para o post
Compartilhar em outros sites
                              ELITE GLOBAL

 

serve em construção galera curta nossa pagina no facebook e fique por dentro de tudo e do dia da Extreia

 

facebook = https://www.facebook.com/pages/Elite-global/361726520654949

 

 

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo