Ir para conteúdo
  • Cadastre-se

(Resolvido)Tirar o Select your city


Ir para solução Resolvido por Belmont,

Posts Recomendados

Bem estou querendo remover o Select your city do meu gesior, andei buscando algo pelo fórum mas não achei nada relacionado, ou resolvido apenas pessoas falando para trocar do gesior para o modern.

 

Queria remover o select your city que atualmente está assim

image.png.dec38311d9f794f877f601d386858622.png

quero deixar sem nada apenas para colocar o nick,sex e voc, tentei fazer isso removendo o 

$config['site']['newchar_towns'][0] = array(1); para () mas quando crio o char ele fica com townid 0, como posso deixar sem escolher uma "city" e criar normalmente na town 1

Link para o post
Compartilhar em outros sites
  • Moderador

@Ryaan Você pode está modificando isso no arquivo config.php, me manda todo o código em spoiler que eu te falo a linha para modificar

Meu Curso sobre Programação para OTServer

Programando OTServer

 

Peça o seu script! Entre agora mesmo no grupo

Developing

 

Conteúdos:

 

Discord: Belmont#7352

Não esqueça do REP+ :)     

Link para o post
Compartilhar em outros sites

@Belmont 

Spoiler

<?PHP
# Account Maker Config
$config['site']['serverPath'] = "/home/baiak/";
$config['site']['useServerConfigCache'] = false;
$config['site']['worlds'] = array(0 => 'Baiak');
$towns_list[0] = array(1 => 'Baiak City');

$config['site']['outfit_images_url'] = '/outfit.php';
$config['site']['item_images_url'] = '/images/items/';
$config['site']['item_images_extension'] = '.gif';
$config['site']['flag_images_url'] = 'http://flag-images.ots.me/';
$config['site']['flag_images_extension'] = '.png';
$config['site']['players_group_id_block'] = 3;
$config['site']['limitDeath'] = 6;
$config['site']['levelVideo'] = 150;

# Create Account Options
$config['site']['one_email'] = true;
$config['site']['create_account_verify_mail'] = false;
$config['site']['verify_code'] = true;
$config['site']['email_days_to_change'] = 5;
$config['site']['newaccount_premdays'] = 0;
$config['site']['send_register_email'] = false;

# Create Character Options
$config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample');
$config['site']['newchar_towns'][0] = array(1);
$config['site']['max_players_per_account'] = 5;

/** FACEBOOK SOCIAL PLUGIN */
$config['social']['facebook'] = "https://www.facebook.com/";

# Emails Config
$config['site']['send_emails'] = true;
$config['site']['mail_address'] = "";
$config['site']['smtp_enabled'] = true;
$config['site']['smtp_host'] = "ssl://smtp.gmail.com";
$config['site']['smtp_port'] = 465;
$config['site']['smtp_auth'] = true;
$config['site']['smtp_user'] = "";
$config['site']['smtp_pass'] = "";

# PAGE: whoisonline.php
$config['site']['private-servlist.com_server_id'] = 1;
/*
Server id on 'private-servlist.com' to show Players Online Chart (whoisonline.php page), set 0 to disable Chart feature.
To use this feature you must register on 'private-servlist.com' and add your server.
Format: number, 0 [disable] or higher
*/

# PAGE: characters.php
$config['site']['showQuests'] = true;
$config['site']['quests'] = array('Vorpal Epic Set' => 15141,'Demon Helmet' => 100136,'Pits of Inferno' => 5550);
$config['site']['show_skills_info'] = true;
$config['site']['show_vip_storage'] = 1;

# PAGE: accountmanagement.php
$config['site']['send_mail_when_change_password'] = true;
$config['site']['send_mail_when_generate_reckey'] = true;
$config['site']['generate_new_reckey'] = true;
$config['site']['generate_new_reckey_price'] = 20;

# PAGE: guilds.php
$config['site']['guild_need_level'] = 8;
$config['site']['guild_need_pacc'] = false;
$config['site']['guild_image_size_kb'] = 50;
$config['site']['guild_description_chars_limit'] = 2000;
$config['site']['guild_description_lines_limit'] = 6;
$config['site']['guild_motd_chars_limit'] = 250;

# PAGE: adminpanel.php
$config['site']['access_admin_panel'] = 3;
$config['site']['access_tickers'] = 3;
$config['site']['access_admin_painel'] = 3;
$config['site']['access_staff_painel'] = 3;

# PAGE: latestnews.php
$config['site']['news_limit'] = 6;

# PAGE: killstatistics.php
$config['site']['last_deaths_limit'] = 40;

# PAGE: team.php
$config['site']['groups_support'] = array(2, 3, 4, 5, 6, 7);

# PAGE: highscores.php
$config['site']['groups_hidden'] = array(4, 5, 6);
$config['site']['accounts_hidden'] = array(1);

# PAGE: guildshop.php
$config['site']['shop_system'] = true;
$config['site']['shopguild_system'] = true;
$config['site']['access_adminguild_panel'] = 3;

# Character Selling
$config['site']['charsell_price'] = 0; # Valor que o sistema cobrarᡰela venda
$config['site']['charsell_level'] = 50000; # Level que podera ser vendido
$config['site']['charsell_remove'] = 1; # Dias pra remover o char da lista de venda

# PAGE: shopevent.php
$config['site']['shopevent_system'] = true;
$config['site']['access_adminevent_panel'] = 3;

# PAGE: donate.php
$config['site']['usePagseguro'] = true; //true show / false hide
$config['site']['usePaypal'] = true;    //true show / false hide
$config['site']['useDeposit'] = true;    //true show / false hide
$config['site']['usePicPay'] = true;    //true show / false hide
$config['site']['useContenidopago'] = false;    //true show / false hide
$config['site']['useOnebip'] = false;    //true show / false hide

# Pagseguro config By IVENSPONTES
$config['pagSeguro']['email'] = ""; //Email Pagseguro
$config['pagSeguro']['token'] = ""; // TOKEN
$config['pagSeguro']['urlRedirect'] = ''; //turn off redirect and notifications in pagseguro.com.br
$config['pagSeguro']['urlNotification'] = ''; //your return location

$config['pagSeguro']['productName'] = 'Premium Points';
$config['pagSeguro']['productValue'] = 1.00;     // 1.50 = R$ 1,50 etc...
$config['pagSeguro']['doublePoints'] = true;     ## Double points - true is on / false is off

$config['pagSeguro']['host'] = 'localhost';        ## YOUR HOST
$config['pagSeguro']['database'] = 'baiak';    ## DATABASE
$config['pagSeguro']['databaseUser'] = 'root';    ## USER
$config['pagSeguro']['databasePass'] = '';        ## PASSWORD


# PAGE: shop.php
$config['site']['shop_categories'] = array(
    "Premium Time" => array("id" => 1, "description" => "Buy low-priced Premium Time to add it to your own account.", "new" => 0, "enabled" => true),
    "Items" => array("id" => 2, "description" => "Items that could help you","new" => 0, "enabled" => true),
    "Exclusive Items" => array("id" => 3, "description" => "In-game services", "new" => 2, "enabled" => true),

);

# PAGE: lostaccount.php
$config['site']['email_lai_sec_interval'] = 180;

# Layout Config
$config['site']['layout'] = 'tibiarl';
$config['site']['vdarkborder'] = '#505050';
$config['site']['darkborder'] = '#D4C0A1';
$config['site']['lightborder'] = '#F1E0C6';
$config['site']['download_page'] = false;
$config['site']['serverinfo_page'] = true;

?>

 

Link para o post
Compartilhar em outros sites
  • Moderador

@Ryaan Foi mal errei, manda o accountmanagement.php e o createaccount.php em spoiler

Meu Curso sobre Programação para OTServer

Programando OTServer

 

Peça o seu script! Entre agora mesmo no grupo

Developing

 

Conteúdos:

 

Discord: Belmont#7352

Não esqueça do REP+ :)     

Link para o post
Compartilhar em outros sites
Agora, Belmont disse:

@Ryaan Foi mal errei, manda o accountmanagement.php e o createaccount.php em spoiler

accountmanagement.php

Spoiler

<?php
if(!defined('INITIALIZED'))
    exit;

if(!$logged)
    if($action == "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="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 '.htmlspecialchars($config['server']['serverName']).' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>';
    else
    {
        $passB = '<span>Password:</span>';
        $logB = '<span>Account Name:</span>';
        if(isset($isTryingToLogin))
        {
            $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/>';
            switch(Visitor::getLoginState())
            {
                case Visitor::LOGINSTATE_NO_ACCOUNT:
                    $main_content .= 'Account with that name doesn\'t exist.<br/>';
                    $logB = '<span style="color:red;">Account Name:</span>';
                    break;
                case Visitor::LOGINSTATE_WRONG_PASSWORD:
                    $main_content .= 'Wrong password to account.<br/>';
                    $passB = '<span style="color:red;">Password:</span>';
                    break;
            }
                $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 .= '
            <form action="?subtopic=accountmanagement" method="post" style="margin: 0px; padding: 0px;">
                <div class="TableContainer" >
                    <table class="Table4" 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 Login</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%"  style="border:1px solid #faf0d7;" >
                                                            <tr>
                                                                <td>
                                                                    <table style="float: left; width: 370px;" cellpadding="0" cellspacing="0" >
                                                                        <tr>
                                                                            <td class="LabelV120" ><span>'.$logB.'</span></td>
                                                                            <td><input type="password" name="account_login" size="35" maxlength="30" ></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td class="LabelV120" ><span>'.$passB.'</span></td>
                                                                            <td><input type="password" name="password_login" size="35" maxlength="29" ></td>
                                                                        </tr>
                                                                    </table>
                                                                    <div style="float: right; font-size: 1px;" >
                                                                        <input type="hidden" name="page" value="overview" >
                                                                            <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="Login" alt="Login" src="'.$layout_name.'/images/buttons/_sbutton_login.gif" >
                                                                                </div>
                                                                            </div>
                                                                        </form>
                                                                        <div style="width: 2px; height: 2px;" ></div>
                                                                        <form action="/?subtopic=lostaccount" 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" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" >
                                                                                </div>
                                                                            </div>
                                                                        </form>
                                                                    </div>
                                                                </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/>
                <center>
                    <h1>New to '.$config['server']['serverName'].'?</h1>
                </center>
                <div class="TableContainer" >
                    <table class="Table4" 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 Player</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%"  style="border:1px solid #faf0d7;" >
                                                            <tr>
                                                                <td >
                                                                    <div style="float: right; margin-top: 20px;" >
                                                                        <form class="MediumButtonForm" action="/?subtopic=createaccount" method="post" >
                                                                            <div class="MediumButtonBackground" style="background-image:url('.$layout_name.'/images/buttons/mediumbutton.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ><div class="MediumButtonOver" style="background-image:url('.$layout_name.'/images/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ></div>
                                                                                <input class="MediumButtonText" type="image" name="Create Account" alt="Create Account" src="'.$layout_name.'/images/buttons/mediumbutton_createaccount.png" />
                                                                            </div>
                                                                        </form>
                                                                    </div>
                                                                    <div id="LoginCreateAccountBox" >
                                                                        <p><b>'.$config['server']['serverName'].'...</b></p>
                                                                        <div style="margin-left: 10px;" >
                                                                            <p>... where hardcore gaming meets fantasy.</p>
                                                                            <p>... where friendships last a lifetime.</p>
                                                                            <p>... unites adventurers since 1997!</p>
                                                                        </div>
                                                                    </div>
                                                        </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>';
    }
else
{


    //Here start our new accountmanagement ;D
    if($action == "")
    {
        if($account_logged->getCustomField('premdays') > 0)
            $account_statusOver = '
                <span class="green">
                    <span class="BigBoldText">Premium Account</span>
                </span>';
        else
            $account_statusOver = '
                <span class="darkred">
                    <span class="BigBoldText">Free Account</span>
                </span>';

        if($account_logged->getCustomField('premdays') > 0)
            $account_statusPic = '<img class="AccountStatusImage" src="'.$layout_name.'/images/account/account-status_green.gif" alt="free account">';
        else
            $account_statusPic = '<img class="AccountStatusImage" src="'.$layout_name.'/images/account/account-status_red.gif" alt="free account">';

        $main_content .= '
            <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;">Welcome to your account '.$account_logged->getRLName().'!<br></td>
                            <td><img src="'.$layout_name.'/images/content/headline-bracer-right.gif"></td>
                        </tr>
                    </tbody>
                </table>
            </center>
            <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" width="100%" style="border:1px solid #faf0d7;">
                                                                <tbody>
                                                                    <tr>
                                                                        <td>'.$account_statusPic.'</td>
                                                                        <td width="100%" valign="middle">
                                                                            '.$account_statusOver.'';

                                                                        if($account_logged->getCustomField('premdays') > 0)
                                                                        {
                                                                            $main_content .= '
                                                                                <small><br>Your Premium time expires at <font style="text-transform:capitalize;">'. date("Y-m-d", strtotime('+'. $account_logged->getCustomField('premdays') .' days')) .'</font></small>';
                                                                        }
                                                                        $main_content .= '
                                                                        </td>
                                                                        <td>
                                                                            <form action="?subtopic=accountmanagement&action=manage" method="post" style="padding:0px;margin:0px;">

                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </form>
                                                                            <div style="font-size:1px;height:4px;"></div>
                                                                                <form action="?subtopic=shopsystem" method="post" style="padding:0px;margin:0px;">
                                                                                    <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green.gif)">
                                                                                        <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_green_over.gif);"></div>
                                                                                            <input class="ButtonText" type="image" name="Get Premium" alt="Get Premium" src="'.$layout_name.'/images/buttons/_sbutton_getpremium.gif">
                                                                                        </div>
                                                                                    </div>
                                                                                </form>
                                                                                <div style="font-size:1px;height:4px;"></div>
                                                                                <form action="?subtopic=accountmanagement&action=logout" method="post" style="padding:0px;margin:0px;">
                                                                                    <div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton_red.gif)">
                                                                                        <div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_red_over.gif);"></div>
                                                                                            <input class="ButtonText" type="image" name="Logout" alt="Logout" src="'.$layout_name.'/images/buttons/_sbutton_logout.gif">
                                                                                        </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>
            <br>';
        //Download TOOL ;D
                {$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 class="HintBox">
                                    <tbody>
                                        <tr>
                                            <td><img src="./layouts/tibiarl/images/content/attentionsign.gif" alt="Attention"></td>
                                            <td align="center">Attention! Download now and have more convenience when playing on our server.</td>
                                            <td><img src="./layouts/tibiarl/images/content/download_windows.png" width="60" height="51" alt="Attention"><br><a href="http://baiak-depth.com/Baiak Depth.zip">Download</a></td>
                                        </tr>
                                        <tr></tr>
                                    </tbody>
                                </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>';
                }

            //REGISTRAR
            $account_reckey = $account_logged->getCustomField("key");
            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 class="HintBox" >
                                <tr>
                                    <td>
                                        <div class="BoxButtons" >
                                            <form action="?subtopic=accountmanagement&action=registeraccount" 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" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" >
                                                    </div>
                                                </div>
                                            </form>
                                            <div style="font-size:1px;height:4px;" ></div>
                                        </div>
                                        <p><b>Your account is not registered!</b></p>
                                        <p>You need to click here to register your account and receive your recovery key. Please take carefull your Recovery Key.</p>
                                        <p>In case you have lost your Recovery Key, you can request the new recovery key for your account again.</p>
                                    </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/>
            ';
            //CHARACTERS
            $main_content .= '
                <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%" style="border:1px solid #faf0d7;">
                                                                        <tbody>
                                                                            <tr class="LabelH">
                                                                                <td></td>
                                                                                <td style="width:40%;">Name</td>
                                                                                <td style="width:120px!important;">World</td>
                                                                                <td style="width:90px!important;">Status</td>
                                                                                <td style="width:90px!important;">&nbsp;</td>
                                                                            </tr>';

                                                                    $account_players = $account_logged->getPlayersList();
                                                                    //show list of players on account
                                                                    $var = 0;
                                                                    foreach($account_players as $account_player)
                                                                        {
                                                                            $player_number_counter++;
                                                                            if($var==0) {
                                                                                    $preview = ' previewstate="0"';
                                                                            } else {
                                                                                    $preview = '';
                                                                            }

                                                                            if($var==0) {
                                                                                $display = 'block';
                                                                            } else {
                                                                                $display = 'none';
                                                                            }

                                                                            if($var==0) {
                                                                                $displayNum = 'none';
                                                                            } else {
                                                                                $displayNum = 'inline';
                                                                            }

                                                                            if($var==0) {
                                                                                $displayBold = 'bold';
                                                                            } else {
                                                                                $displayBold = 'normal';
                                                                            }

                                                                            if($var==0) {
                                                                                $displayFont = '13';
                                                                            } else {
                                                                                $displayFont = '10';
                                                                            }

                                                                            $main_content .='
                                                                            <tr id="CharacterRow_'.$player_number_counter.'"
                                                                                onmouseover="InRowWithOverEffect(&#39;CharacterRow_'.$player_number_counter.'&#39;,';

                                                                                if(is_int($player_number_counter / 2))
                                                                                    $main_content .= '&#39;#e7d1af&#39;';
                                                                                else
                                                                                    $main_content .= '&#39;#ffedd1&#39;';


                                                                                $main_content .='
                                                                                );"
                                                                                onmouseout="OutRowWithOverEffect(&#39;CharacterRow_'.$player_number_counter.'&#39;,';

                                                                                if(is_int($player_number_counter / 2))
                                                                                    $main_content .= '&#39;#d5c0a1&#39;';
                                                                                else
                                                                                    $main_content .= '&#39;#f1e0c6&#39;';

                                                                                $main_content .='
                                                                                );"
                                                                                onclick="FocusCharacter('.$player_number_counter.', &#39;'.urlencode($account_player->getName()).'&#39;, '.$config['site']['max_players_per_account'].');"
                                                                                class="Odd" style="font-weight: '.$displayBold.';';

                                                                                if(is_int($player_number_counter / 2))
                                                                                    $main_content .= 'background-color: #d5c0a1;">';
                                                                                else
                                                                                    $main_content .= 'background-color: #f1e0c6;">';

                                                                                $main_content .='
                                                                                <td style="width:40px;text-align:center;padding:2px;">
                                                                                    <span id="CharacterNumberOf_'.$player_number_counter.'" style="display: '.$displayNum.';">'.$player_number_counter.'.</span>
                                                                                    <span id="PlayButtonOf_'.$player_number_counter.'" style="display: '.$display.';">
                                                                                        <span name="FlashClientPlayButton" id="FlashClientPlayButton" playlink="#" ' . $preview . '>';

                                                                                        if($account_player->isDeleted())
                                                                                            {
                                                                                                $main_content .= '<img style="border:0px;" src="'.$layout_name.'/images/account/play-not-button.gif">';
                                                                                            } else {
                                                                                                $main_content .= '
                                                                                                <a href="#" >
                                                                                                    <img style="border:0px;" onmouseover="InMiniButton(this, &#39;&#39;);" onmouseout="OutMiniButton(this, &#39;&#39;);" src="'.$layout_name.'/images/account/play-button.gif">
                                                                                                </a>';
                                                                                            }

                                                                                        $main_content .='
                                                                                        </span>
                                                                                    </span>
                                                                                </td>
                                                                                <td id="CharacterCell2_'.$player_number_counter.'">
                                                                                    <span style="white-space:nowrap;vertical-align:middle;">
                                                                                        <span id="CharacterNameOf_'.$player_number_counter.'" style="font-size: '.$displayFont.'pt;">'.htmlspecialchars($account_player->getName()).'</span><br>
                                                                                        <span id="CharacterNameOf_'.$player_number_counter.'"><small>'.htmlspecialchars($vocation_name[$account_player->getPromotion()][$account_player->getVocation()]).' - Level '.$account_player->getLevel().'</small></span>
                                                                                    </span>
                                                                                </td>
                                                                                <td id="CharacterCell2_'.$player_number_counter.'">
                                                                                    <span style="white-space:nowrap;">'.htmlspecialchars($config['server']['serverName']).'</span>
                                                                                </td>
                                                                                <td id="CharacterCell3_'.$player_number_counter.'">';
                                                                                    if(!$account_player->isOnline())
                                                                                        $main_content .= '';
                                                                                    else
                                                                                        $main_content .= '<font color="#00CD00"><b>online</b></font>';
                                                                                    if($account_player->isDeleted())
                                                                                        {
                                                                                            $main_content .= 'deleted';
                                                                                        }
                                                                                $main_content .='
                                                                                </td>
                                                                                <td id="CharacterCell4_'.$player_number_counter.'" style="text-align:center;">
                                                                                    <span id="CharacterOptionsOf_'.$player_number_counter.'" style="display: '.$display.';">
                                                                                        <span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'">Edit</a>]</span>';
                                                                                        if($account_player->isDeleted())
                                                                                        {
                                                                                            $main_content .= '<br><span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'">Undelete</a>]</span>';
                                                                                        } else {
                                                                                            $main_content .= '<br><span style="font-weight:normal;">[<a href="?subtopic=accountmanagement&action=deletecharacter&name='.urlencode($account_player->getName()).'">Delete</a>]</span>';
                                                                                        }

                                                                                    $main_content .= '
                                                                                    </span>
                                                                                </td>
                                                                            </tr>';
                                                                            $var++;
                                                                        }
                                                                        $main_content .='
                                                                        </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>
                                                    <tr>
                                                        <td>
                                                            <table class="InnerTableButtonRow" cellpadding="0" cellspacing="0">
                                                                <tbody>
                                                                    <tr>
                                                                        <td></td>
                                                                        <td align="right" style="padding-right:7px;width:100%;">
                                                                            <form action="?subtopic=accountmanagement&action=createcharacter" method="post" style="padding:0px;margin:0px;">
                                                                                <input type="hidden" name="selectedcharacter" value="Draz Mytos">
                                                                                <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="Create Character" alt="Create Character" src="'.$layout_name.'/images/buttons/_sbutton_createcharacter.gif">
                                                                                    </div>
                                                                                </div>
                                                                            </form>
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <br><br>';
                //MIGRATION TOOL ;D
                if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){
                $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 class="HintBox">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <p><b>Admin Panel</b></p>
                                                <p>Click <a href="?subtopic=cpanel">here</a> to go your new <strong>Admin Panel</strong></p>
                                            </td>
                                        </tr>
                                        <tr></tr>
                                    </tbody>
                                </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>';
                }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="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 class="HintBox">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <p><b>New Account Management</b></p>
                                                <p>This is the main page of managing your account, here you will have the key to your account information displayed and updated, enjoy! </p>
                                            </td>
                                        </tr>
                                        <tr></tr>
                                    </tbody>
                                </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>';
                }
    }
    //Here finish our new account management

    if($action == "")
    {
        $account_reckey = $account_logged->getCustomField("key");
        $dataAtual = time();
        $dataProxima = $account_logged->getCustomField('premdays');
        $data1 = $dataProxima - $dataAtual;
        $dataCerta = $data1 / 86400;
        if($account_logged->getCustomField('premdays') > 0)
            $account_status = '<b><font color="#00CD00">Premium Account, '.$account_logged->getPremDays().' days left</font></b>';
        else
            $account_status = '<b><font color="darkred">Free Account</font></b>';
        if(empty($account_reckey))
            $account_registred = '<b><font color="darkred">No</font></b>';
        else
                   $account_registred = '<b><font color="green">Yes</font></b>';
                $account_premium_points = $account_logged->getCustomField("premium_points");
                $account_event_points = $account_logged->getCustomField("event_points");
                $account_guild_points = $account_logged->getCustomField("guild_points");
                $account_backup_points = $account_logged->getCustomField("backup_points");
        $account_created = $account_logged->getCreateDate();
        $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_rlname = $account_logged->getRLName();
        $account_location = $account_logged->getLocation();
        $acc_id = $account_logged->getId();
        $acc_id = $account_logged->getId();
        if($acc_id == 1) die("Esta conta está BLOQUEADA.");

        $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:#D4C0A1;" >
                                                            <td class="LabelV" >Account Name:</td>
                                                            <td style="width:90%;" >
                                                                <div style="position:relative;width:100%;" >
                                                                    <span id="DisplayAccountID" >'.str_repeat('*', strlen(htmlspecialchars($account_logged->getName()))).'</span>
                                                                    <span id="MaskedAccountID" style="visibility:hidden;display:none" >'.str_repeat('*', strlen(htmlspecialchars($account_logged->getName()))).'</span>
                                                                    <span id="ReadableAccountID" style="visibility:hidden;display:none" >'.htmlspecialchars($account_logged->getName()).'</span>
                                                                    <img id="ButtonAccountID" onMouseDown="ToggleMaskedText(\'AccountID\');" style="position:absolute;right:0px;top:2px;cursor:pointer;" src="'.$layout_name.'/images/general/show.gif" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr style="background-color:#F1E0C6;" >
                                                            <td class="LabelV" >Email Address:</td>
                                                            <td style="width:90%;" >
                                                                <div style="position:relative;width:100%;" >
                                                                    <span id="DisplayEMail" >'.str_repeat('*', strlen(htmlspecialchars($account_email))).'</span>
                                                                    <span id="MaskedEMail" style="visibility:hidden;display:none" >'.str_repeat('*', strlen(htmlspecialchars($account_email))).'</span>
                                                                    <span id="ReadableEMail" style="visibility:hidden;display:none" >'.htmlspecialchars($account_email).'</span>
                                                                    <img id="ButtonEMail" onMouseDown="ToggleMaskedText(\'EMail\');" style="position:absolute;right:0px;top:2px;cursor:pointer;" src="'.$layout_name.'/images/general/show.gif" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr style="background-color:#D4C0A1;" >
                                                            <td class="LabelV" >Created:</td>
                                                                <td>'.date("M d Y, G:i:s", $account_created).'</td>
                                                        </tr>
                                                        <tr style="background-color:#F1E0C6;" >
                                                            <td class="LabelV" >Last Login:</td>
                                                            <td>'.date("M d Y, G:i:s", time()).'</td>
                                                        </tr>                                                        
                                                               <td class="LabelV" >Premium Points:</td><td><strong>'.$account_premium_points.'</strong></td></tr>
                                                        <tr style="background-color:#F1E0C6;" >
                                                               <td class="LabelV" >Event Points:</td><td><strong>'.$account_event_points.'</strong></td></tr>
                                                        <tr style="background-color:#D4C0A1;" >
                                                               <td class="LabelV" >Guild Points:</td><td><strong>'.$account_guild_points.'</strong></td></tr>
                                                        <tr style="background-color:#F1E0C6;" >
                                                        <td class="LabelV" >Registred:</td><td>'.$account_registred.'</td></tr><tr style="background-color:'.$config['site']['lightborder'].';" >
                                                            <td class="LabelV" >Account Status:</td>
                                                            <td>'.$account_status;
                                                            
                                                            if($account_logged->getCustomField('premdays') > 0)
                                                            {

                                                                $main_content .= '<br/><font style="font-size:8pt">(Premium time expires at ' . date("Y-m-d", strtotime('+'. $account_logged->getCustomField('premdays') .' days')) . ')</font>';
                                                            }

                                                        $main_content .= '
                                                            </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>
                                                    <td>
                                                        <table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" >
                                                            <form action="?subtopic=accountmanagement&action=changeemail" method="post" >
                                                                <tr>
                                                                    <td style="border:0px;" ><input type="hidden" name=step value=changename >
                                                                        <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="Rename Account" src="'.$layout_name.'/images/buttons/_sbutton_changeemail.gif" >
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                            </form>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </table>
                    </div>
                </td>
            </tr><br/><br/>';
        if($account_email_new_time > 1)
            if($account_email_new_time < time())
                $account_email_change = '<br>(You can accept <b>'.htmlspecialchars($account_email_new).'</b> as a new email.)';
            else
            {
                $account_email_change = ' <br>You can accept <b>new e-mail after '.date("j F Y", $account_email_new_time).".</b>";

                $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>'.htmlspecialchars($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/>';
            }

        //REGISTRATION
        $main_content .= '
            <a name="Registration" ></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" >Registration</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/>';

    }
//########### CHANGE PASSWORD ##########
if($group_id_of_acc_logged == 2)
$main_content .= '<h1>Account Manager Bloqueado.';
else
    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="?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" 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.";
                }
                if(!$account_logged->isValidPassword($old_password))
                {
                    $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="?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" 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;
                $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>'.htmlspecialchars($config['server']['serverName']).'</b></a>.</p>
                    <p>New password: <b>'.htmlspecialchars($org_pass).'</b></p>
                    </body>
                    </html>

createaccount.php

Spoiler

<?php
$main_content .= '
<style>
.infoacc{
    text-align: left;
    color: #5f2800;
    border: 2px dashed #5f4d41;
    background: #d4c0a1;
    width: 97,5%;
    font-size: 100%;
    border-radius: 2px;
    padding: 1%;
    margin: 0;
}
.infoacc img {
    float: left;
    padding-right: 10px;
}
.infoacc b {
    float: left;
    padding-right: 4px;
    color: brown;
}
</style>

<div class="infoacc"><img src="images/attentionsign.png"><b>Aviso:</b> Não use account / password igual a de outros servidores, coloque um password seguro e não esqueça de registrar sua recovery key para aumentar sua segurança, evite ser hackeado!</div><br>
';

$location = array(
    'GER' =>'Europe',
//    'USA' =>'North America'
);
$default = 'all';

$worlds = array();
$worlds[0] = array('GER', $config['server']['worldType']);
/*
$worlds[1] = array('GER', 'optional');
$worlds[2] = array('GER', 'hardcore');
$worlds[3] = array('USA', 'open');
$worlds[4] = array('USA', 'optional');
$worlds[5] = array('USA', 'hardcore');
*/

$town_array = $towns_list[0];
$town = $config['site']['newchar_towns'][0];
$voc = array(); // if empty, Rook Sample will be used
$voc[1] = 'Sorcerer';
$voc[2] = 'Druid';
$voc[3] = 'Paladin';
$voc[4] = 'Knight';

$suggestname = NULL; // not available
$version = '1010'; // for download link

foreach($worlds as $k =>$v) // remove invalid worlds
    if(!isset($location[$v[0]]) || !isset($config['site']['worlds'][$k]))
        unset($worlds[$k]);

$tmp = array();
foreach($location as $k =>$v) // remove invalid/unused locations
    foreach($worlds as $i =>$j)
        if($j[0] == $k) {
            $tmp[$k] = $v;
            break;
        }
$location = $tmp; unset($tmp);

if(isset($_POST['step']) && $_POST['step'] == 'docreate') {
    $e = array();
    $s = isset($_POST['accountname']) ? $_POST['accountname'] : '';
    if($s == '')
        $e['acc'] = 'Please enter an account name!';
    elseif(strlen($s) < 6)
        $e['acc'] = 'This account name is too short!';
    elseif(strlen($s) > 10)
        $e['acc'] = 'This account name is too long!';
    else {
        $s = strtoupper($s);

        if(!ctype_alnum($s))
            $e['acc'] = 'This account name has an invalid format. Your account name may only consist of numbers 0-9 and letters A-Z!';
        elseif(!preg_match('/[A-Z0-9]/', $s))
            $e['acc'] = 'Your account name must include at least one letter A-Z!';
        else {
            $acc = new Account($s, Account::LOADTYPE_NAME);
            if($acc->isLoaded())
                $e['acc'] = 'This account name is already used. Please select another one!';
        }
    }

    if(!isset($_POST['world']) || empty($_POST['world']))
        $e['world'] = 'Please select a game world for your character!';

    $s = isset($_POST['email']) ? $_POST['email'] : '';

    if($s == '')
        $e['email'] = 'Please enter your email address!';
    elseif(strlen($s) > 49)
        $e['email'] = 'Your email address is too long!';
    elseif(!filter_var($s, FILTER_VALIDATE_EMAIL))
        $e['email'] = 'This email address has an invalid format. Please enter a correct email address!';
    else {
        $accMailCheck = new Account($s, Account::LOADTYPE_MAIL);
        if($accMailCheck->isLoaded())
            $e['email'] = 'This email address is already used. Please enter another email address!';
    }

    $s1 = isset($_POST['password1']) ? $_POST['password1'] : '';
    $s2 = isset($_POST['password2']) ? $_POST['password2'] : '';

    if(empty($s2))
        $e['pass'] = 'Please enter the password again!';
    elseif($s1 != $s2)
        $e['pass'] = 'The two passwords do not match!';
    else {
        $err = array();
        if(strlen($s1) < 6 || strlen($s1) > 29)
            $err[] = 'The password must have at least 8 and less than 30 letters!';
        if(!ctype_alnum($s1))
            $err[] = 'The password contains invalid letters!';

        if(count($err) != 0) {
            $e['pass'] = '';
            for($i=0; $i < count($err); $i++)
                $e['pass'] .= ($i == 0 ? '' : '<br/>').$err[$i];
        }
    }

    if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
        $e['rules'] = 'You have to agree to the Tibia Rules in order to create an account!';

    if(count($e) == 0) {
        $worldid = NULL;
        foreach($config['site']['worlds'] as $id =>$name)
            if($worlds[$id] && $name == $_POST['world']) {
                $worldid = $id;
                break;
            }
        if($worldid === FALSE)
            $e['world'] = 'Please select a valid game world.';
    }

    if(count($e) != 0) {
        $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($e as $error) $main_content .= $error.'<br/>';
        $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/>';
    }
    else {

        $reg_account = new Account();
        $reg_account->setName($_POST['accountname']);
        $reg_account->setPassword($_POST['password1']);
        $reg_account->setEMail($_POST['email']);
        $reg_account->setGroupID(1);
        $reg_account->setCreateDate(time());
        $reg_account->setCreateIP(Visitor::getIP());
        $reg_account->setFlag(Website::getCountryCode(long2ip(Visitor::getIP())));
        if(isset($config['site']['newaccount_premdays']) && $config['site']['newaccount_premdays'] > 0)
        {
            $reg_account->set("premdays", $config['site']['newaccount_premdays']);
            $reg_account->set("lastday", time());
        }
        $reg_account->save();

        if($reg_account->getID() > 0) {
        }
        else die('Failed to create account.');
        $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%"><p>Your account and character have been created successfully.</p></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><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><br/><div class="TableContainer"><table class="Table4" 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">Download Client</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><table width="100%" cellpadding=0 cellspacing=0><tr><td style="vertical-align:top"><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%;text-align:center"><tr><td><a href="http://www.mediafire.com/download/fzrl3j7epb279i0/tibia860.exe" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_windows.png"/></a></td><td><a href="http://www.mediafire.com/download/ijwdguz53qn7h11/OtLandIPChanger.rar" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_ipchanger.png"/><br/></a></td></tr><tr><td valign="top"><a href="http://www.mediafire.com/file/adxybccuuzf7cxw/Wakebaiak.exe" type="application/octet-stream" target="_top">Client 8.60</a></td><td valign="top"><a href="http://www.mediafire.com/download/ijwdguz53qn7h11/OtLandIPChanger.rar" type="application/octet-stream" target="_top">IP Changer</a></td></tr><tr><td colspan="2">[<span class="HelpLink" onClick="window.open(\'http://www.tibia.com/support/content/help.php?subtopic=requirementes\', \'Help\', \'width=380px, height=310px, scrollbars=yes\')"><a>system requirements</a></span>]</td></tr></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><td style="vertical-align:top"><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 style="text-align:center"><img style="width:254px;height:218px;margin:7px" src="account/successful_download.jpg"/></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><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">Disclaimer</td></tr><tr><td>The software and any related documentation is provided "as is" without warranty of any kind. The entire risk arising out of use of the software remains with you. In no event shall CipSoft GmbH be liable for any damages to your computer or loss of data.</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>';
        return;
    }
} else $_POST['step'] = '';

$main_content .= '<script type="text/javascript" src="account/jquery.js"></script>
<script type="text/javascript" src="account/create_character.js"></script>
<script type="text/javascript">var PreselectServerLocation="'.$default.'";var g_FormName="CreateAccountAndCharacter";var g_FieldName="accountname";document.getElementById("ActiveSubmenuItemIcon_createaccount").style.visibility = "visible";';
foreach($worlds as $k =>$v) // create dynamic server list
    $main_content .= 'ServerList.push(new Array(\''.$config['site']['worlds'][$k].'\', \''.$v[0].'\', \''.$v[1].'\'));';
$main_content .= '</script><div style="position:relative;top:0px;left:0px"><form action="?subtopic=createaccount" method=post name="CreateAccountAndCharacter"><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">Create New Account</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="LabelV150" width="20%"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'><b>Account Name:</b></span></td><td><input id="accountname" name="accountname" autocomplete="off" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['accountname']) ? htmlspecialchars(substr($_POST['accountname'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_accountname.php\',PostData: \'a_AccountName=\'+this.value,Method: \'POST\'})"/><div id="accountname_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['acc']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="accountname_errormessage" class="FormFieldError">'.(isset($e['acc']) ? $e['acc'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="email_label"'.(isset($e['email']) ? ' class="red"' : '').'><b>Email Address:</b></span></td><td><input id="email" name="email" class="CipAjaxInput" style="width:206px;float:left" value="'.(isset($_POST['email']) ? htmlspecialchars(substr($_POST['email'], 0, 50)) : '').'" autocomplete="off" size="30" maxlength="50" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_email.php\',PostData: \'a_EMail=\'+this.value,Method: \'POST\'})"/><div id="email_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['email']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="email_errormessage" class="FormFieldError">'.(isset($e['email']) ? $e['email'] : '').'</span></td></tr><tr><td class="LabelV150"><span id="password1_label"'.(isset($e['pass']) ? ' class="red"' : '').'><b>Password:</b></span></td><td><input id="password1" type="password" autocomplete="off" name="password1" style="width:206px;float:left" value="'.(isset($_POST['password1']) ? htmlspecialchars(substr($_POST['password1'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password1_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td class="LabelV150"><span id="password2_label"'.(isset($e['pass']) ? ' class="red"' : '').'><b>Password Again:</b></span></td><td><input id="password2" type="password" name="password2" style="width:206px;float:left" value="'.(isset($_POST['password2']) ? htmlspecialchars(substr($_POST['password2'], 0, 30)) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_password.php\',PostData: \'a_Password1=\'+getElementById(\'password1\').value+\'&a_Password2=\'+getElementById(\'password2\').value,Method: \'POST\'})"/><div id="password2_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['pass']) ? 'n' : '').'ok.gif)"></div></td></tr><tr><td></td><td><span id="password_errormessage" class="FormFieldError">'.(isset($e['pass']) ? $e['pass'] : '').'</span></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="TableShadowContainerRightTop"><table class="TableContent" width="100%">';
$main_content .= '</table></div></div><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%">';
if(count($location)>1) { // show server location filter
    $main_content .= '<tr id="filterbox_location"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Location:</span></td><td><table width="100%"><tr><td width="33%" valign="top"><script>CreateFilterOption(\'server_location\', \'all\', \'all\')</script>&nbsp;&nbsp;</td>';
    $i=0;
    foreach($location as $k =>$v) {
        $i++;
        $main_content .= '<td '.($i == count($location) ? '' : 'width="33%" ').'valign="top"><script>CreateFilterOption(\'server_location\', \''.$k.'\', \''.$v.'\')</script>&nbsp;&nbsp;</td>';
    }
    $main_content .= '</tr></table></td></tr>';
}
$main_content .= '<tr id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'><b>World Type:</b></span></td><td><div>';

$optional=true; $open=true; $hardcore=true;

foreach($worlds as $k =>$v) { // remove selection if there's no valid worlds
    if($optional && $v[1] == 'optional')
        unset($optional);
    elseif($open && $v[1] == 'open')
        unset($open);
    elseif($hardcore && $v[1] == 'hardcore')
        unset($hardcore);
    elseif(!$optional && !$open && !$hardcore)
        break;
}

$n = 0;
foreach(array($optional, $open, $hardcore) as $k)
    if(!$k)
        $n++;
$main_content .= '<table width="'.round(33.33 *  $n).'%"><tr>';
if(!$optional)
    $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'optional\', \'Optional PvP\')</script></b>&nbsp;&nbsp;Only if both sides agree, characters can be fought<br/><br/></td>';
if(!$open)
    $main_content .= '<td width="'.(100 / $n).'%" align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'open\', \'Open PvP\')</script></b>&nbsp;&nbsp;Killing other characters is possible, but restricted<br/><br/></td>';
if(!$hardcore)
    $main_content .= '<td align="center" valign="top"><b><script>CreateFilterOption(\'server_pvp_type\', \'hardcore\', \'Hardcore PvP\')</script></b>&nbsp;&nbsp;Killing other characters is not restricted at all<br/><br/></td>';

$main_content .= '</tr></table></div></td></tr><tr><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'><b>World Name:</b></span></td><td><div id="js_world_box" style="display:none"><table width="100%"><tr id="world_list_tr" style="text-align:left"></tr></table><span onClick="ToggleVisibility(\'js_world_box\', \'suggested_world_box\'); UpdateServerList(); "><small>[<a style="cursor:pointer">suggest game world</a>]</small></span></div><div id="suggested_world_box">Suggested world: <span id="suggested_world_div"></span><br/><span onClick="ToggleVisibility(\'suggested_world_box\', \'js_world_box\'); "><small>[<a style="cursor:pointer">change game world</a></span>]</small></div></td></tr><tr><td><table id="js_world_box" width="100%"><tr id="world_list_tr"></tr></table><table id="plain_world_box" width="100%"><tr><td>';
foreach($worlds as $k =>$v)
    $main_content .= '<input id="server_static_'.$config['site']['worlds'][$k].'" type="radio" name="world" value="'.$config['site']['worlds'][$k].'"'.($config['site']['worlds'][$k] == $_POST['world'] ? ' checked="checked"' : '').'><label for="server_static_'.$config['site']['worlds'][$k].'">'.$config['site']['worlds'][$k].'</label><br/>';
$main_content .= '</td></tr></table></td></tr>'.(isset($e['world']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['world'].'</span></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><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><b>Please select all of the following check boxes:</b></td></tr><tr><td><input type="checkbox" name="agreerules" value="true"  onClick="if(this.checked == true) {  document.getElementById(\'agreerules_errormessage\').innerHTML = \'\';} else {  document.getElementById(\'agreerules_errormessage\').innerHTML = \'You have to agree to the Tibia Rules in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['rules']) ? ' checked="checked"' : '').'/>I agree to the <a href="?subtopic=tibiarules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreeprivacy_errormessage" class="FormFieldError">'.(isset($e['privacy']) ? $e['privacy'] : '').'</span></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><script type="text/javascript">PreselectWorld="';
if(isset($_POST['world']) && !empty($_POST['world']))
    foreach($config['site']['worlds'] as $id =>$name)
        if($worlds[$id] && $name == $_POST['world']) {
            $main_content .= $name;
            break;
        }
$main_content .= '";InitializeCharacterCreator(PreselectServerLocation, \''.(!$optional ? 'optional' : (!$open ? 'open' : 'hardcore')).'\')</script></table></div></table></div></td></tr><br/></div><center><table border="0" cellspacing="0" cellpadding="0"><tr><td style="border:0px"><input type="hidden" name=step value=docreate><input type="hidden" name=noframe value=""><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></center><script type="text/javascript" language="javascript">document.forms[\'CreateAccountAndCharacter\'].elements[\'accountname\'].focus();</script><script type="text/javascript" src="account/generic.js"></script><script type="text/javascript" src="account/ajaxcip.js"></script>';
 

 

Link para o post
Compartilhar em outros sites
  • Moderador

@Ryaan Estava aqui baixando um outro Gesior pra ver como que fazia, eu tinha esquecido kk. É no arquivo config.php mesmo, em $config['site']['newchar_towns'][0] = array você pode aumentar ou diminuir o número de cidade para selecionar na criação do char, se você quer remover, só é deixar assim $config['site']['newchar_towns'][0] = array(1); Mas como você já tinha dito que já fez isso, tenta trocar $towns_list[0] = array(1 => 'Baiak City'); por $towns_list[0] = array(0 => 'Baiak City');

Meu Curso sobre Programação para OTServer

Programando OTServer

 

Peça o seu script! Entre agora mesmo no grupo

Developing

 

Conteúdos:

 

Discord: Belmont#7352

Não esqueça do REP+ :)     

Link para o post
Compartilhar em outros sites

@Belmont ent fiz isso que voce disse mas ficou assim

image.png.d7e84c1921dc1df6a6ea48f95b935c55.png

quando eu tento tirar o $config['site']['newchar_towns'][0] = array(1); por $config['site']['newchar_towns'][0] = array(); ele remove o select your city mas todos os chares são criados em town 0

Link para o post
Compartilhar em outros sites
  • Moderador
  • Solução
48 minutos atrás, Ryaan disse:

@Belmont ent fiz isso que voce disse mas ficou assim

image.png.d7e84c1921dc1df6a6ea48f95b935c55.png

quando eu tento tirar o $config['site']['newchar_towns'][0] = array(1); por $config['site']['newchar_towns'][0] = array(); ele remove o select your city mas todos os chares são criados em town 0

Ok! Vamos fazer assim então, volta a alteração que pedi para você fazer, e deixa o $config['site]['newchar_towns'][0] = array () assim mesmo, ai você vai no accountmanagement.php e vai procurar por $char_to_copy -> serTown ($newchar_town), você vai trocar o ($newchar_town) por (1) e em setPosX, setPosY, setPosZ, você coloca a coordenada de onde ele vai nascer

Meu Curso sobre Programação para OTServer

Programando OTServer

 

Peça o seu script! Entre agora mesmo no grupo

Developing

 

Conteúdos:

 

Discord: Belmont#7352

Não esqueça do REP+ :)     

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo