Site em Manutenção!


    [Gesior ACC] Arena Huting.php

    Compartilhe
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Ter Maio 08, 2012 6:27 pm

    Olá gente,
    eu estou fazendo esse tópico, porque o membro: Lucas502, pediu a página: Arena Hunting do site Invict World.

    Ai, resolvi ajuda-lo.
    Chega de papo, vamos ao que interessa.

    1º vá em xampp/htdocs/index e abra-o.

    em baixo do highscores.php, coloque isso:

    Código:
    case "hunting";
                    $topic = "Hunting";
                    $subtopic = "Hunting";
                    include("hunting.php");
            break;

    2º copie qualquer página do seu site, renomeie para Hunting.php, lembre-se: só renomeie para Hunting.php caso você esteja no Dedicado, caso não esteja coloque: Hunting

    Dentro do hunting coloque isso \/


    Código:
    <?PHP
    $main_content .= '<br />
    <center><h2><font color="red"></font></center></h2><br/>
    <marquee><h1>  Hunting    Arena  ! </h1></marquee><br><br>
        <tr>
            <td colspan="2" class="titleForm"></td>
        </tr>


    <ul>
    <li>
    <h3><font color="red"><center>Hunting Arenas é um lugar onde um jogador pode facilmente caçar por um determinado período de tempo. Para chegar as HuntingArena, basta usa um 1 Golden Nugget Que dura Cerca de 15 Minutos.</center></font></h3>
    </ul>
    <br>

    <center><img src="http://i51.tinypic.com/33xizko.jpg"><br>
    <b><font size=3>Legenda:</font></b><br>
    <font size=2>1.<img src="http://i54.tinypic.com/96f882.gif"><br>
    2. <img src="http://i55.tinypic.com/c1cnq.gif"><br>
    3. <img src="http://i51.tinypic.com/o9mvlu.gif"><br>             
    4. <img src="http://i55.tinypic.com/281hulj.gif"><br>
    </font>


    <br>
    <center>Existem 4 salas em cada ilha. <b>Apenas uma pessoa pode estar dentro de uma sala.</b><br>
    Na frente de cada quarto há um teleportPara ser capaz de acessá-lo você precisa ter um<b> 1 golden nugget</b>.<br><br>Lembre-se que entrar num teleport, você precisa ter o Golden Nugget em sua <b>backpack!</center></b><br>
    <br>
    <center><img src="http://i52.tinypic.com/2mdia0m.jpg"></center><br>
    <br>
    <center>Um golden nugget dura 15 minutos de caça em cada Arena. Depois de 15 minutos você será automaticamente expulso da Arena. Para ir para dentro de novo, você precisa de outra golden nugget.</center><br>
    <br>
    <center>Depois de entrar na sala, um monstro irá aparecer automaticamente. Com o nome de Exemplo : <br>[Arena] Hydra, vai de acordo com a <b>Arena que o Player estiver.</center></b><br>
    <br>
    <center><img src="http://i56.tinypic.com/2qjap37.gif"></center><br>
    <font color="red"><center><b>OBSERVAÇAO: Depois que usar uma vez um golden nugget so poderá usar outra depois de 135 minutos ! . </center></font></b><br>
    <br>


    <center><h3><b><a href ="index.php?subtopic=donate">Compre seu Golden Nugget</a> e <a href ="index.php?subtopic=donate">Adquira sua VIP Account!</a></b></center></h3>



    <br>

    </table>
    </td>
    </table>
    ';
    ?>


    3º vá em xampp/htdocs/layouts/tibia.com/layout.php

    em baixo do highscores adiciona:

    Código:
    <a href='?subtopic=hunting'>
      <div id='submenu_hunting' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
        <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
        <div id='ActiveSubmenuItemIcon_hunting' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
        <div class='SubmenuitemLabel'><div style=\"color: red;\">Arena Hunting</div></div>
        <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
      </div>
    </a>

    CRÉDITOS:
    ThiagoWillian= EU

    OBS: Proibido essa postagem em qualquer outro fórum!

    Se ajudei, dá rep +, não custará nada.


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Ter Maio 08, 2012 11:17 pm

    Perfeito, muito obrigado Wink
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Ter Maio 08, 2012 11:24 pm

    ah, estou com um pequena problema agora '-'

    Print
    [Você precisa estar registrado e conectado para ver esta imagem.]

    Gostaria de remover a criação do char pelo createaccount.php deixando assim só pra criar o char depois que logar na conta no site. Sendo assim queria remover os quadrados (campos) "character name", "sex", "vocation" e "world type" dali, deixando apenas disponivel pra criar a CONTA por esse menu.

    Meu createaccount.php:

    Código:

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

    $worlds = array();
    $worlds[0] = array('GER', 'open');
    /*
    $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');
    */

    $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 = '860'; // 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) > 30)
          $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-Z]/', $s))
             $e['acc'] = 'Your account name must include at least one letter A-Z!';
          else {
             $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.');
             mysql_select_db($config['server']['sqlDatabase']);

             if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0)
                $e['acc'] = 'This account name is already used. Please select another one!';
          }
       }
       
       $s = isset($_POST['name']) ? trim($_POST['name']) : '';

       if(empty($s))
          $e['name'] = 'Please enter a name for your character!';
       elseif(strlen($s) < 2 || strlen($s) > 29)
          $e['name'] = 'A name must have at least 2 but no more than 29 letters!';
       elseif(preg_match('/[^a-zA-Z ]/', $s))
          $e['name'] = 'This name contains invalid letters. Please use only A-Z, a-z and space!';
       elseif(!ctype_upper($s[0]))
          $e['name'] = 'The first letter of a name has to be a capital letter!';
       elseif(strpos($s, '  ') !== false)
          $e['name'] = 'This name contains more than one space between words. Please use only one space between words!';
       else {
          foreach(explode(' ', $s) as $k =>$v) {
             $words[$k] = str_split($v);
             $len = strlen($v);
             if($len == 1) {
                $e['name'] = 'This name contains a word with only one letter. Please use more than one letter for each word!';
                break;
             }
             elseif($len > 14) {
                $e['name'] = 'This name contains a word that is too long. Please use no more than 14 letters for each word!';
                break;
             }
          }
          if(!isset($e['name'])) {
             $total=0;
             foreach($words as $k =>$p) {
                if(isset($e['name']))
                   break;
                $total++;
                if($total > 3) {
                   $e['name'] = 'This name contains more than 3 words. Please choose another name!';
                   break;
                }
                $len=0;
                foreach($p as $i =>$j) {
                   $len++;
                   if($i != 0 && ctype_upper($j)) {
                      $e['name'] = 'In names capital letters are only allowed at the beginning of a word!';
                      break;
                   }
                   elseif($i == $len-1) {
                      $ff=null;
                      for($h=0;$h<strlen($v); $h++) {
                         if(in_array(strtolower($v[$h]), array('a','e','i','o','u')) !== false) {
                            $ff=true;
                            break;
                         }
                      }
                      if(!$ff) {
                         $e['name'] = 'This name contains a word without vowels. Please choose another name!';
                         break;
                      }
                   }
                }
             }
             if(!isset($e['name'])) {
                $s = strtolower($s);
                for($i = 0; $i < strlen($s); $i++)
                   if($s[$i] == $s[($i+1)] && $s[$i] == $s[($i+2)]) {
                      $e['name'] = 'This character name is already used. Please select another one!';
                      break;
                   }
                if(!isset($e['name'])) {
                   foreach(array('aa ', 'ee', 'ii', 'oo', 'uu', 'gm','cm', 'aff ', 'god ', 'abc', 'tutor', 'game', 'admin', 'the ') as $v)
                      if($v == substr($s, 0, strlen($v))) {
                         $e['name'] = 'This character name is already used. Please select another one!';
                         break;
                      }
                   if(!isset($e['name'])) {
                      foreach(array('game', 'customer', 'support', 'fuck', 'haha', 'sux', ' abc', 'suck', 'noob', 'tutor', 'admin', 'account', 'gay', 'password', 'manager') as $v)
                         if(strpos($s, $v) !== false) {
                            $e['name'] = 'This character name is already used. Please select another one!';
                            break;
                         }
                      if(!isset($e['name'])) {
                         if(!isset($con)) {
                            $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.');
                            mysql_select_db($config['server']['sqlDatabase']);
                         }
                         if(mysql_num_rows(mysql_query('SELECT id FROM players WHERE name=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0)
                            $e['name'] = 'This character 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!';

       if(!isset($_POST['sex']) || ($_POST['sex'] != 'male' && $_POST['sex'] != 'female'))
          $e['sex'] = 'Please select the sex for your character!';

       if(count($voc) != 0 && (!isset($_POST['vocation']) || !is_numeric($_POST['vocation']) || !isset($voc[$_POST['vocation']])))
          $e['vocation'] = 'Please select the vocation 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 {
          if(!isset($con)) {
             $con = mysql_pconnect($config['server']['sqlHost'], $config['server']['sqlUser'], $config['server']['sqlPass']) or die('MySQL connection error.');
             mysql_select_db($config['server']['sqlDatabase']);
          }
          if(mysql_num_rows(mysql_query('SELECT id FROM accounts WHERE email=\''.mysql_escape_string($s).'\' LIMIT 1')) != 0)
             $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) < 8 || 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(!preg_match('/[a-zA-Z]/', $s1))
             $err[] = 'The password must contain at least one letter A-Z or a-z!';
          elseif(!preg_match('/[0-9]/', $s1))
             $err[] = 'The password must contain at least one letter other than A-Z or a-z!';

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

       if(!isset($_POST['agreeagreement']) || empty($_POST['agreeagreement']))
          $e['agreement'] = 'You have to agree to the Tibia Service Agreement in order to create an account!';
       if(!isset($_POST['agreerules']) || empty($_POST['agreerules']))
          $e['rules'] = 'You have to agree to the Tibia Rules in order to create an account!';
       if(!isset($_POST['agreeprivacy']) || empty($_POST['agreeprivacy']))
          $e['privacy'] = 'You have to agree to the Tibia Privacy Policy 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 {
          $random = rand(1, 9999999);
          $n = $random;
          $cur = array();

          $q = mysql_query('SELECT id FROM accounts');
          while ($r = mysql_fetch_array($q, MYSQL_NUM))
             $cur[] = $r[0];

          while(true)
          {
             if(!in_array($n, $cur))
                break;

             $n++;

             if($n > 9999999)
                $n = 1;

             if($n == $random)
                die('Failed to create account.');
          }

          if(mysql_query("INSERT INTO accounts (id,name,password,email,created) VALUES($n,'".$_POST['accountname']."','".($config['server']['encryptionType'] == 'plain' ? $_POST['password1'] : hash($config['server']['encryptionType'], $_POST['password1']))."','".$_POST['email']."',".time().")") === true) {
             $sample = (count($voc) == 0 ? 'Rook' : $voc[$_POST['vocation']]).' Sample';
             $q = mysql_query("SELECT id,vocation,town_id,experience,level,maglevel,health,healthmax,mana,manamax,soul,lookbody,lookfeet,lookhead,looklegs,lookaddons,cap,save,posx,posy,posz FROM players WHERE name='$sample' LIMIT 1");
             if(mysql_num_rows($q) != 1)
                die('Missing sample character ('.$sample.')');

             $q = mysql_fetch_array($q);
             mysql_query('INSERT INTO players (name,world_id,account_id,level,vocation,health,healthmax,experience,lookbody,lookfeet,lookhead,looklegs,looktype,lookaddons,maglevel,mana,manamax,soul,town_id,posx,posy,posz,cap,sex,created) VALUES(\''.$_POST['name'].'\','.$worldid.','.$n.','.$q['level'].','.$q['vocation'].','.$q['health'].','.$q['healthmax'].','.$q['experience'].','.$q['lookbody'].','.$q['lookfeet'].','.$q['lookhead'].','.$q['looklegs'].','.($_POST['sex'] == 'female' ? 136 : 128).','.$q['lookaddons'].','.$q['maglevel'].','.$q['mana'].','.$q['manamax'].','.$q['soul'].','.$q['town_id'].','.$q['posx'].','.$q['posy'].','.$q['posz'].','.$q['cap'].','.($_POST['sex'] == 'female' ? 0 : 1).','.time().')');
          }
          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://tibiaclient.com/files/tibia'.$version.'.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://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top"><img style="width:180px;height:180px;border:0px" src="account/download_linux.png"/><br/></a></td></tr><tr><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.exe" type="application/octet-stream" target="_top">Windows Tibia Client '.(sprintf('%01.2f', $version / 100)).'</a></td><td valign="top"><a href="http://tibiaclient.com/files/tibia'.$version.'.tar" type="application/octet-stream" target="_top">Linux Tibia Client '.(sprintf('%01.2f', $version / 100)).'</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="/index.php?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"><span id="accountname_label"'.(isset($e['acc']) ? ' class="red"' : '').'>Account Name:</span></td><td><input id="accountname" name="accountname" 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"' : '').'>Email Address:</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"' : '').'>Password:</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"' : '').'>Password Again:</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="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 class="LabelV150"><span id="charactername_label"'.(isset($e['name']) ? ' class="red"' : '').'>Character Name:</span></td><td><input id="charactername" name="name" class="CipAjaxInput" style="width:206px;float:left;position:relative" style="float:left" value="'.(isset($_POST['name']) ? htmlspecialchars(str_replace('+', ' ', substr(trim($_POST['name']), 0, 30))) : '').'" size="30" maxlength="30" onBlur="SendAjaxCip({DataType: \'Container\'}, {Href: \'account/ajax_charactername.php\',PostData: \'a_CharacterName=\'+this.value,Method: \'POST\'})"/><div id="charactername_indicator" class="InputIndicator" style="background-image:url(account/'.($_POST['step'] != 'docreate' || isset($e['name']) ? 'n' : '').'ok.gif)"></div>';
    if($suggestname)
       $main_content .= '<br/><small>[<a class="CipAjaxLink" href="https://secure.tibia.com/account/content/ajax_suggestname.php" ajaxcip="true" ajaxcip_datatype="Container">suggest name</a>]</small>';
    $main_content .= '</td></tr><tr><td></td><td><span id="charactername_errormessage" class="FormFieldError">'.(isset($e['name']) ? $e['name'] : '').'</span></td></tr><tr><td class="LabelV150"><span'.(isset($e['sex']) ? ' class="red"' : '').'>Sex:</span></td><td><table width="100%"><tr><td><span style="margin-right:75px" class="OptionContainer"><label for="sex_male"><span class="OptionContainer"><input id="sex_male" type="radio" name="sex" value="male"'.(($_POST['sex'] == 'male' || $_POST['step'] != 'docreate') ? ' checked="checked"' : '').'/><label for="sex_male">male</label></span></label></span><span class="OptionContainer"><label for="sex_female"><span class="OptionContainer"><input id="sex_female" type="radio" name="sex" value="female"'.($_POST['sex'] == 'female' ? ' checked="checked"' : '').'/><label for="sex_female">female</label></span></label></span></td><td></td></tr></table></td></tr>'.(isset($e['sex']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['sex'].'</span></td></tr>' : '');
    if(count($voc) != 0) {
       $main_content .= '<tr><td class="LabelV150"><span'.(isset($e['vocation']) ? ' class="red"' : '').'>Vocation:</span></td><td><table width="100%"><tr><td>';
       foreach($voc as $k => $v)
          $main_content .= '<span style="margin-right:15px" class="OptionContainer"><label for="vocation_'.$k.'">
       <span class="OptionContainer"><input id="vocation_'.$k.'" type="radio" name="vocation" value="'.$k.'"'.($_POST['vocation'] == $k ? ' checked="checked"' : '').'/><label for="vocation_'.$k.'">'.$v.'</label></span></label></span>';
       $main_content .= '</td><td></td></tr></table></td></tr>'.(isset($e['vocation']) ? '<tr><td></td><td><span class="FormFieldError">'.$e['vocation'].'</span></td></tr>' : '');
    }
    $main_content .= '</table></div></div><div class="TableShadowContainer"><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif)"><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif)"></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif)"></div></div></div></td></tr><tr><td><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>  </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>  </td>';
       }
       $main_content .= '</tr></table></td></tr>';
    }
    $main_content .= '<tr id="filterbox_pvp"><td class="LabelV150"><span'.(isset($e['world']) ? ' class="red"' : '').'>World Type:</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>  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>  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;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"' : '').'>World Name:</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="agreeagreement" value="true"  onClick="if(this.checked == true) {  document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'\';} else {  document.getElementById(\'agreeagreement_errormessage\').innerHTML = \'You have to agree to the Tibia Service Agreement in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['agreement']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=agreement" target="_blank">Tibia Service Agreement</a>.</td></tr><tr><td><span id="agreeagreement_errormessage" class="FormFieldError">'.(isset($e['agreement']) ? $e['agreement'] : '').'</span></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="/index.php?subtopic=legaldocuments&page=rules" target="_blank">Tibia Rules</a>.</td></tr><tr><td><span id="agreerules_errormessage" class="FormFieldError">'.(isset($e['rules']) ? $e['rules'] : '').'</span></td></tr><tr><td><input type="checkbox" name="agreeprivacy" value="true"  onClick="if(this.checked == true) {  document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'\';} else {  document.getElementById(\'agreeprivacy_errormessage\').innerHTML = \'You have to agree to the Tibia Privacy Policy in order to create an account!\';}"'.($_POST['step'] == 'docreate' && !isset($e['privacy']) ? ' checked="checked"' : '').'/>I agree to the <a href="/index.php?subtopic=legaldocuments&page=privacy" target="_blank">Tibia Privacy Policy</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>';

    Vlw no aguardo Wink
    avatar
    Jamerson Andre
    Admin
    Admin

    Mensagens : 442
    ZXG Coins : 3077
    Data de inscrição : 13/12/2011
    Idade : 20
    Localização : Maceio -Al


    Alerta:
    99/100  (99/100)

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Jamerson Andre em Qua Maio 09, 2012 10:31 pm

    Vamos esperar o administrador thiago.
    ele que configura sabe disso Smile


    __________________


    [Você precisa estar registrado e conectado para ver este link.]
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Qui Maio 10, 2012 12:47 am

    é ja vi q ele manja mesmo, vamos esperar ;D


    vlw
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Qui Maio 10, 2012 11:53 am

    Tá quase feito, só falta apagar as barras.
    em breve postarei aqui.
    OBS: lucas, você não quer um createaccount que só cria conta não? é melhor para você e para mim, porque esse createaccount na hora que coloca a conta, ele é meio complicado, não aceita alguns tipos de contas...


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Qui Maio 10, 2012 7:01 pm

    Beleza, pode ser um que crie só conta sim, eu até peguei de outro gesior, só que na hora de clicar em "Accept" pra criar a conta, redireciona para uma pagina em branco sem nada escrito, mas mesmo assim cria a conta, o que eu queria mesmo é que não fosse para essa pagina branca e avisasse "sua conta foi criada com sucesso blabla"

    vlw
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Qui Maio 10, 2012 7:57 pm

    Ai o createaccount para seu site...
    Código:
    <?PHP
    //CREATE ACCOUNT FORM PAGE
    if($action == "")
    {
       $main_content .= '<script type="text/javascript">

    var accountHttp;

    //sprawdza czy dane konto istnieje czy nie
    function checkAccount()
    {
       if(document.getElementById("account_name").value=="")
       {
          document.getElementById("acc_name_check").innerHTML = \'<b><font color="red">Please enter account name.</font></b>\';
          return;
       }
       accountHttp=GetXmlHttpObject();
       if (accountHttp==null)
       {
          return;
       }
       var account = document.getElementById("account_name").value;
       var url="ajax/check_account.php?account=" + account + "&uid="+Math.random();
       accountHttp.onreadystatechange=AccountStateChanged;
       accountHttp.open("GET",url,true);
       accountHttp.send(null);
    }

    function AccountStateChanged()
    {
       if (accountHttp.readyState==4)
       {
          document.getElementById("acc_name_check").innerHTML=accountHttp.responseText;
       }
    }

    var emailHttp;

    //sprawdza czy dane konto istnieje czy nie
    function checkEmail()
    {
       if(document.getElementById("email").value=="")
       {
          document.getElementById("email_check").innerHTML = \'<b><font color="red">Please enter e-mail.</font></b>\';
          return;
       }
       emailHttp=GetXmlHttpObject();
       if (emailHttp==null)
       {
          return;
       }
       var email = document.getElementById("email").value;
       var url="ajax/check_email.php?email=" + email + "&uid="+Math.random();
       emailHttp.onreadystatechange=EmailStateChanged;
       emailHttp.open("GET",url,true);
       emailHttp.send(null);
    }

    function EmailStateChanged()
    {
       if (emailHttp.readyState==4)
       {
          document.getElementById("email_check").innerHTML=emailHttp.responseText;
       }
    }

       function validate_required(field,alerttxt)
       {
       with (field)
       {
       if (value==null||value==""||value==" ")
         {alert(alerttxt);return false;}
       else {return true}
       }
       }

       function validate_email(field,alerttxt)
       {
       with (field)
       {
       apos=value.indexOf("@");
       dotpos=value.lastIndexOf(".");
       if (apos<1||dotpos-apos<2)
         {alert(alerttxt);return false;}
       else {return true;}
       }
       }

       function validate_form(thisform)
       {
       with (thisform)
       {
       if (validate_required(account_name,"Please enter name of new account!")==false)
         {account_name.focus();return false;}
       if (validate_required(email,"Please enter your e-mail!")==false)
         {email.focus();return false;}
       if (validate_email(email,"Invalid e-mail format!")==false)
         {email.focus();return false;}
       if (verifpass==1) {
       if (validate_required(passor,"Please enter password!")==false)
         {passor.focus();return false;}
       if (validate_required(passor2,"Please repeat password!")==false)
         {passor2.focus();return false;}
       if (passor2.value!=passor.value)
         {alert(\'Repeated password is not equal to password!\');return false;}
       }
       if (verifya==1) {
       if (validate_required(verify,"Please enter verification code!")==false)
         {verify.focus();return false;}
       }
       if(rules.checked==false)
         {alert(\'To create account you must accept server rules!\');return false;}
       }
       }
       </script>';
       $main_content .= 'To play on '.$config['server']['serverName'].' you need an account.
                      All you have to do to create your new account is to enter your email address, password to new account, verification code from picture and to agree to the terms presented below.
                      If you have done so, your account name, password and e-mail address will be shown on the following page and your account and password will be sent
                      to your email address along with further instructions.<BR><BR>
                      <FORM ACTION="?subtopic=createaccount&action=saveaccount" onsubmit="return validate_form(this)" METHOD=post>
                      <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
                      <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Create a '.$config['server']['serverName'].' Account</B></TD></TR>
                      <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLSPACING=8 CELLPADDING=0>
                        <TR><TD>
                          <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0>';
       $main_content .= '<TR><TD width="150" valign="top"><B>Account name: </B></TD><TD colspan="2"><INPUT id="account_name" NAME="reg_name" onkeyup="checkAccount();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Please enter your new account name)</font></TD></TR>
                     <TR><TD width="150"><b>Name status:</b></TD><TD colspan="2"><b><div id="acc_name_check">Please enter your account name.</div></b></TD></TR>
                   <TR><TD width="150" valign="top"><B>Email address: </B></TD><TD colspan="2"><INPUT id="email" NAME="reg_email" onkeyup="checkEmail();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Your email address is required to recovery a '.$config['server']['serverName'].' account)</font></TD></TR>
                     <TR><TD width="150"><b>Email status:</b></TD><TD colspan="2"><b><div id="email_check">Please enter your e-mail.</div></b></TD></TR>';
                                  $main_content .= '<TR><TD width="150"><b>Select Country:</b></TD><TD colspan="2"><b><select name="country">
                        <option value="">Please choose</option><option value="af"> Afghanistan </option><option value="al"> Albania </option><option value="dz"> Algeria </option><option value="as"> American Samoa </option><option value="ad"> Andorra </option><option value="ao"> Angola </option><option value="ai"> Anguilla </option><option value="aq"> Antarctica </option><option value="ag"> Antigua and Barbuda </option><option value="ar"> Argentina </option>

                        <option value="am"> Armenia </option><option value="aw"> Aruba </option><option value="au"> Australia </option><option value="at"> Austria </option><option value="az"> Azerbaijan </option><option value="bs"> Bahamas </option><option value="bh"> Bahrain </option><option value="bd"> Bangladesh </option><option value="bb"> Barbados </option><option value="by"> Belarus </option><option value="be"> Belgium </option><option value="bz"> Belize </option><option value="bj"> Benin </option><option value="bm"> Bermuda </option><option value="bt"> Bhutan </option><option value="bo"> Bolivia </option><option value="ba"> Bosnia and Herzegowina </option><option value="bw"> Botswana </option><option value="bv"> Bouvet Island </option><option value="br"> Brazil </option><option value="io"> British Indian Ocean Territory </option><option value="bn"> Brunei Darussalam </option><option value="bg"> Bulgaria </option><option value="bf"> Burkina Faso </option><option value="bi"> Burundi </option>                                    <option value="kh"> Cambodia </option><option value="cm"> Cameroon </option><option value="ca"> Canada </option><option value="cv"> Cape Verde </option><option value="ky"> Cayman Islands </option><option value="cf"> Central African Republic </option><option value="td"> Chad </option><option value="cl"> Chile </option><option value="cn"> China </option><option value="cx"> Christmas Island </option><option value="cc"> Cocos Islands </option><option value="co"> Colombia </option><option value="km"> Comoros </option><option value="cd"> Congo </option><option value="cg"> Congo </option><option value="ck"> Cook Islands </option><option value="cr"> Costa Rica </option><option value="ci"> Cote DIvoire </option><option value="hr"> Croatia </option><option value="cu"> Cuba </option><option value="cy"> Cyprus </option><option value="cz"> Czech Republic </option><option value="dk"> Denmark </option><option value="dj"> Djibouti </option><option value="dm"> Dominica </option>

                        <option value="do"> Dominican Republic </option><option value="tp"> East Timor </option><option value="ec"> Ecuador </option><option value="eg"> Egypt </option><option value="sv"> El Salvador </option><option value="gq"> Equatorial Guinea </option><option value="er"> Eritrea </option><option value="ee"> Estonia </option><option value="et"> Ethiopia </option><option value="fk"> Falkland Islands </option><option value="fo"> Faroe Islands </option><option value="fj"> Fiji </option><option value="fi"> Finland </option><option value="fr"> France </option><option value="gf"> French Guiana </option><option value="pf"> French Polynesia </option><option value="tf"> French Southern Territories </option><option value="ga"> Gabon </option><option value="gm"> Gambia </option><option value="ge"> Georgia </option><option value="de"> Germany </option><option value="gh"> Ghana </option><option value="gi"> Gibraltar </option><option value="gr"> Greece </option>

                        <option value="gl"> Greenland </option><option value="gd"> Grenada </option><option value="gp"> Guadeloupe </option><option value="gu"> Guam </option><option value="gt"> Guatemala </option><option value="gn"> Guinea </option><option value="gw"> Guinea-Bissau </option><option value="gy"> Guyana </option><option value="ht"> Haiti </option><option value="hm"> Heard and Mc Donald Islands </option><option value="hn"> Honduras </option><option value="hk"> Hong Kong </option><option value="hu"> Hungary </option><option value="is"> Iceland </option><option value="in"> India </option><option value="id"> Indonesia </option><option value="ir"> Iran </option><option value="iq"> Iraq </option><option value="ie"> Ireland </option><option value="il"> Israel </option><option value="it"> Italy </option><option value="jm"> Jamaica </option><option value="jp"> Japan </option><option value="jo"> Jordan </option><option value="kz"> Kazakhstan </option><option value="ke"> Kenya </option>

                        <option value="ki"> Kiribati </option><option value="kr"> Korea </option><option value="kp"> Korea </option><option value="kw"> Kuwait </option><option value="kg"> Kyrgyzstan </option><option value="la"> Lao Peoples Democratic Republic </option><option value="lv"> Latvia </option><option value="lb"> Lebanon </option><option value="ls"> Lesotho </option><option value="lr"> Liberia </option><option value="ly"> Libyan Arab Jamahiriya </option><option value="li"> Liechtenstein </option><option value="lt"> Lithuania </option><option value="lu"> Luxembourg </option><option value="mo"> Macau </option><option value="mk"> Macedonia </option><option value="mg"> Madagascar </option><option value="mw"> Malawi </option><option value="my"> Malaysia </option><option value="mv"> Maldives </option><option value="ml"> Mali </option><option value="mt"> Malta </option><option value="mh"> Marshall Islands </option><option value="mq"> Martinique </option>

                        <option value="mr"> Mauritania </option><option value="mu"> Mauritius </option><option value="yt"> Mayotte </option><option value="mx"> Mexico </option><option value="fm"> Micronesia </option><option value="md"> Moldova </option><option value="mc"> Monaco </option><option value="mn"> Mongolia </option><option value="ms"> Montserrat </option><option value="ma"> Morocco </option><option value="mz"> Mozambique </option><option value="mm"> Myanmar </option><option value="na"> Namibia </option><option value="nr"> Nauru </option><option value="np"> Nepal </option><option value="nl"> Netherlands </option><option value="an"> Netherlands Antilles </option><option value="nc"> New Caledonia </option><option value="nz"> New Zealand </option><option value="ni"> Nicaragua </option><option value="ne"> Niger </option><option value="ng"> Nigeria </option><option value="nu"> Niue </option><option value="nf"> Norfolk Island </option><option value="mp"> Northern Mariana Islands </option>

                        <option value="no"> Norway </option><option value="om"> Oman </option><option value="pk"> Pakistan </option><option value="pw"> Palau </option><option value="pa"> Panama </option><option value="pg"> Papua New Guinea </option><option value="py"> Paraguay </option><option value="pe"> Peru </option><option value="ph"> Philippines </option><option value="pn"> Pitcairn </option><option value="pl"> Poland </option><option value="pt"> Portugal </option><option value="pr"> Puerto Rico </option><option value="qa"> Qatar </option><option value="re"> Reunion </option><option value="ro"> Romania </option><option value="ru"> Russian Federation </option><option value="rw"> Rwanda </option><option value="kn"> Saint Kitts and Nevis </option><option value="lc"> Saint Lucia </option><option value="ws"> Samoa </option><option value="sm"> San Marino </option><option value="st"> Sao Tome and Principe </option><option value="sa"> Saudi Arabia </option><option value="sn"> Senegal </option>

                        <option value="sc"> Seychelles </option><option value="sl"> Sierra Leone </option><option value="sg"> Singapore </option><option value="sk"> Slovakia </option><option value="si"> Slovenia </option><option value="sb"> Solomon Islands </option><option value="so"> Somalia </option><option value="za"> South Africa </option><option value="es"> Spain </option><option value="lk"> Sri Lanka </option><option value="sh"> St. Helena </option><option value="pm"> St. Pierre and Miquelon </option><option value="sd"> Sudan </option><option value="sr"> Suriname </option><option value="sj"> Svalbard and Jan Mayen Islands </option><option value="sz"> Swaziland </option><option value="se"> Sweden </option><option value="ch"> Switzerland </option><option value="sy"> Syrian Arab Republic </option><option value="tw"> Taiwan </option><option value="tj"> Tajikistan </option><option value="tz"> Tanzania </option>

                        <option value="th"> Thailand </option><option value="tg"> Togo </option><option value="tk"> Tokelau </option><option value="to"> Tonga </option>
                        <option value="tt"> Trinidad and Tobago </option><option value="tn"> Tunisia </option><option value="tr"> Turkey </option><option value="tm"> Turkmenistan </option><option value="tc"> Turks and Caicos Islands </option><option value="tv"> Tuvalu </option><option value="ug"> Uganda </option><option value="ua"> Ukraine </option><option value="ae"> United Arab Emirates </option><option value="gb"> United Kingdom </option><option value="us"> United States </option><option value="uy"> Uruguay </option><option value="uz"> Uzbekistan </option><option value="vu"> Vanuatu </option><option value="va"> Vatican </option><option value="ve"> Venezuela </option><option value="vn"> Viet Nam </option><option value="vg"> Virgin Islands (British) </option><option value="vi"> Virgin Islands (US) </option>

                        <option value="wf"> Wallis and Futuna Islands </option><option value="eh"> Western Sahara </option><option value="ye"> Yemen </option><option value="yu"> Yugoslavia </option><option value="zm"> Zambia </option><option value="zw"> Zimbabwe </option>
                      </select>';

       if(!$config['site']['create_account_verify_mail'])
       $main_content .= '<script type="text/javascript">var verifpass=1;</script>
                      <TR><TD width="150" valign="top"><B>Password: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor" NAME="reg_password" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Here write your password to new account on '.$config['server']['serverName'].')</font></TD></TR>
                     <TR><TD width="150" valign="top"><B>Repeat password: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor2" NAME="reg_password2" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Repeat your password)</font></TD></TR>';
       else
    {
    }
       $main_content .= '</TABLE>
                     </TD></TR>
                     <TR><TD>
                       <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0><TR><TD>
                         Please review the following terms and state your agreement below.
                       </TD></TR>
                       <TR><TD>
                         <B>'.$config['server']['serverName'].' Rules</B><BR>
                         <TEXTAREA ROWS="16" WRAP="physical" COLS="75" READONLY="true">';
       //load server rules from file
       include("tibiarules.php");
       $main_content .= '</TEXTAREA>
                       </TD></TR></TABLE>
                     </TD></TR>
                     <TR><TD>
                       <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0>
                       <TR><TD>
                         <INPUT TYPE="checkbox" NAME="rules" id="rules" value="true" /><label for="rules"><u> I agree to the '.$config['server']['serverName'].' Rules.</u></lable><BR>
                       </TD></TR>
                       <TR><TD>
                         If you fully agree to these terms, click on the "I Agree" button in order to create a '.$config['server']['serverName'].' account.<BR>
                         If you do not agree to these terms or do not want to create a '.$config['server']['serverName'].' account, please click on the "Cancel" button.
                       </TD></TR></TABLE>
                     </TD></TR>
                   </TABLE></TD></TR>
                   </TABLE>
                   <BR>
                   <TABLE BORDER=0 WIDTH=100%>
                     <TR><TD ALIGN=center>
                       <IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR>
                     </TD><TD ALIGN=center VALIGN=top>
                       <INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=18>
                       </FORM>
                     </TD><TD ALIGN=center>
                       <FORM  ACTION="?subtopic=latestnews" METHOD=post>
                       <INPUT TYPE=image NAME="Cancel" SRC="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=18>
                       </FORM>
                     </TD><TD ALIGN=center>
                       <IMG SRC="/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR>
                     </TD></TR>
                   </TABLE>
                   </TD>
                   <TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD>
                   </TR>
                   </TABLE>';
    }
    //CREATE ACCOUNT PAGE (save account in database)
    if($action == "saveaccount") {
          $reg_country = trim($_POST['country']);
       $reg_name = strtoupper(trim($_POST['reg_name']));
       $reg_email = trim($_POST['reg_email']);
       $reg_password = trim($_POST['reg_password']);
       $reg_code = trim($_POST['reg_code']);
       //FIRST check
       //check e-mail
       if(empty($reg_name))
          $reg_form_errors[] = "Please enter account name.";
       elseif(!check_account_name($reg_name))
          $reg_form_errors[] = "Invalid account name format. Use only A-Z and numbers 0-9.";
       if(empty($reg_email))
          $reg_form_errors[] = "Please enter your email address.";
       else
       {
          if(!check_mail($reg_email))
             $reg_form_errors[] = "E-mail address is not correct.";
       }
       if($config['site']['verify_code'])
       {

        }
       //check password
       if(empty($reg_password) && !$config['site']['create_account_verify_mail'])
          $reg_form_errors[] = "Please enter password to your new account.";
       elseif(!$config['site']['create_account_verify_mail'])
       {
          if(!check_password($reg_password))
             $reg_form_errors[] = "Password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght.";
       }
       //SECOND check
       //check e-mail address in database
       if(empty($reg_form_errors))
       {
          if($config['site']['one_email'])
          {
             $test_email_account = $ots->createObject('Account');
             //load account with this e-mail
             $test_email_account->findByEmail($reg_email);
             if($test_email_account->isLoaded())
                $reg_form_errors[] = "Account with this e-mail address already exist in database.";
          }
          $account_db = new OTS_Account();
          $account_db->find($reg_name);
          if($account_db->isLoaded())
             $reg_form_errors[] = 'Account with this name already exist.';
       }
       // ----------creates account-------------(save in database)
       if(empty($reg_form_errors))
       {
          //create object 'account' and generate new acc. number
          if($config['site']['create_account_verify_mail'])
          {
             $reg_password = '';
             for ($i = 1; $i <= 6; $i++)
                $reg_password .= mt_rand(0,9);
          }
          $reg_account = $ots->createObject('Account');
          $number = $reg_account->create(0, 9999999, $reg_name);
          // saves account information in database
          $reg_account->setPassword(password_ency($reg_password));
          $reg_account->setEMail($reg_email);
          $reg_account->setCustomField("flag", $reg_country);
          $reg_account->unblock();
          $reg_account->save();
          if($config['site']['newaccount_premdays'])
          {
             $reg_account->setCustomField("premdays", $config['site']['newaccount_premdays']);
             $reg_account->setCustomField("lastday", time());
          }
          //show information about registration
          if($config['site']['send_emails'] && $config['site']['create_account_verify_mail'])
          {
             $mailBody = '<html>
             <body>
             <h3>Your account name and password!</h3>
             <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p>
             <p>Account name: <b>'.$reg_name.'</b></p>
             <p>Password: <b>'.trim($reg_password).'</b></p>
             <br />
             <p>After login you can:</p>
             <li>Create new characters
             <li>Change your current password
             <li>Change your current e-mail
             </body>
             </html>';
             require("phpmailer/class.phpmailer.php");
             $mail = new PHPMailer();
             if ($config['site']['smtp_enabled'] == "yes")
             {
                $mail->IsSMTP();
                $mail->Host = $config['site']['smtp_host'];
                $mail->Port = (int)$config['site']['smtp_port'];
                $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
                $mail->Username = $config['site']['smtp_user'];
                $mail->Password = $config['site']['smtp_pass'];
             }
             else
                $mail->IsMail();
             $mail->IsHTML(true);
             $mail->From = $config['site']['mail_address'];
             $mail->AddAddress($reg_email);
             $mail->Subject = $config['server']['serverName']." - Registration";
             $mail->Body = $mailBody;
             if($mail->Send())
             {
                $main_content .= 'Your account has been created. Check your e-mail. See you in Tibia!<BR><BR>';
                $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
                <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Account Created</B></TD></TR>
                <TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
                  <TABLE BORDER=0 CELLPADDING=1><TR><TD>
                    <BR>Your account name is <b>'.$reg_name.'</b>.
                   <BR><b><i>You will receive e-mail (<b>'.$reg_email.'</b>) with your password.</b></i><br>';
                $main_content .= 'You will need the account name and your password to play on '.$config['server']['serverName'].'.
                    Please keep your account name and password in a safe place and
                    never give your account name or password to anybody.<BR><BR>';
                $main_content .= '<br /><small>These informations were send on email address <b>'.$reg_email.'</b>. Please check your inbox/spam folder.';
             }
             else
             {
                $main_content .= '<br /><small>An error occorred while sending email! Account not created. Try again.</small>';
                $reg_account->delete();
             }
          }
          else
          {
             $main_content .= 'Your account has been created. Now you can login and create your first character. See you in Tibia!<BR><BR>';
             $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
             <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Account Created</B></TD></TR>
             <TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
               <TABLE BORDER=0 CELLPADDING=1><TR><TD>
                 <BR>Your account name is <b>'.$reg_name.'</b><br>You will need the account name and your password to play on '.$config['server']['serverName'].'.
                 Please keep your account name and password in a safe place and
                 never give your account name or password to anybody.<BR><BR>';
             if($config['site']['send_emails'] && $config['site']['send_register_email'])
             {
                $mailBody = '<html>
                <body>
                <h3>Your account name and password!</h3>
                <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p>
                <p>Account name: <b>'.$reg_name.'</b></p>
                <p>Password: <b>'.trim($reg_password).'</b></p>
                <br />
                <p>After login you can:</p>
                <li>Create new characters
                <li>Change your current password
                <li>Change your current e-mail
                </body>
                </html>';
                require("phpmailer/class.phpmailer.php");
                $mail = new PHPMailer();
                if ($config['site']['smtp_enabled'] == "yes")
                {
                   $mail->IsSMTP();
                   $mail->Host = $config['site']['smtp_host'];
                   $mail->Port = (int)$config['site']['smtp_port'];
                   $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
                   $mail->Username = $config['site']['smtp_user'];
                   $mail->Password = $config['site']['smtp_pass'];
                }
                else
                   $mail->IsMail();
                $mail->IsHTML(true);
                $mail->From = $config['site']['mail_address'];
                $mail->AddAddress($reg_email);
                $mail->Subject = $config['server']['serverName']." - Registration";
                $mail->Body = $mailBody;
                if($mail->Send())
                   $main_content .= '<br /><small>These informations were send on email address <b>'.$reg_email.'</b>.';
                else
                   $main_content .= '<br /><small>An error occorred while sending email (<b>'.$reg_email.'</b>)!</small>';
             }
          }
          $main_content .= '</TD></TR></TABLE></TD></TR></TABLE><BR><BR>';
       }
       else
       {
          //SHOW ERRORs if data from form is wrong
          $main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
          foreach($reg_form_errors 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/>
          <BR>
          <CENTER>
          <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=?subtopic=createaccount METHOD=post><TR><TD>
          <INPUT TYPE=hidden NAME=email VALUE="">

          <INPUT TYPE=image NAME="Back" ALT="Back" SRC="'.$layout_name.'/images/buttons/sbutton_back.gif" BORDER=0 WIDTH=120 HEIGHT=18>
          </TD></TR></FORM></TABLE>
          </CENTER>';
       }
    }
    ?>


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Qui Maio 10, 2012 7:58 pm

    Ai lucas, se eu ajudei clicka no + ali >>, fazendo favor? Wink


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Sex Maio 11, 2012 2:46 am

    cara, não ajudou ainda ;D

    então, foi como eu te disse, usei esse teu createaccount.php, mas quando ele cria a conta, redireciona para uma pagina (localhost/?subtopic=createaccount&action=saveaccount) que fica em branco, a pagina fica toda branca e não avisa "sua conta foi criada com sucesso, logue-se para criar seu char blabla"

    foi exatamente por isso que eu queria o meu createaccount editado (sem os campos character e world selection), por que o meu depois que cria acc, ele avisava que foi criada com sucesso e tudo mais.

    aguardo, vlw a força até agora ;D
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 2:48 pm

    Vou ver um aqui, e já lhe passo.


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 2:51 pm

    Pronto criei, já até testei aqui em casa e foi.

    Código:
    <?PHP
    //CREATE ACCOUNT FORM PAGE
    if($action == "")
    {
       $main_content .= '<script type="text/javascript">

    var accountHttp;

    //sprawdza czy dane konto istnieje czy nie
    function checkAccount()
    {
       if(document.getElementById("account_name").value=="")
       {
          document.getElementById("acc_name_check").innerHTML = \'<b><font color="red">Por favor escolha sua conta.</font></b>\';
          return;
       }
       accountHttp=GetXmlHttpObject();
       if (accountHttp==null)
       {
          return;
       }
       var account = document.getElementById("account_name").value;
       var url="ajax/check_account.php?account=" + account + "&uid="+Math.random();
       accountHttp.onreadystatechange=AccountStateChanged;
       accountHttp.open("GET",url,true);
       accountHttp.send(null);
    }

    function AccountStateChanged()
    {
       if (accountHttp.readyState==4)
       {
          document.getElementById("acc_name_check").innerHTML=accountHttp.responseText;
       }
    }

    var emailHttp;

    //sprawdza czy dane konto istnieje czy nie
    function checkEmail()
    {
       if(document.getElementById("email").value=="")
       {
          document.getElementById("email_check").innerHTML = \'<b><font color="red">Por favor escolha seu e-mail.</font></b>\';
          return;
       }
       emailHttp=GetXmlHttpObject();
       if (emailHttp==null)
       {
          return;
       }
       var email = document.getElementById("email").value;
       var url="ajax/check_email.php?email=" + email + "&uid="+Math.random();
       emailHttp.onreadystatechange=EmailStateChanged;
       emailHttp.open("GET",url,true);
       emailHttp.send(null);
    }

    function EmailStateChanged()
    {
       if (emailHttp.readyState==4)
       {
          document.getElementById("email_check").innerHTML=emailHttp.responseText;
       }
    }

       function validate_required(field,alerttxt)
       {
       with (field)
       {
       if (value==null||value==""||value==" ")
         {alert(alerttxt);return false;}
       else {return true}
       }
       }

       function validate_email(field,alerttxt)
       {
       with (field)
       {
       apos=value.indexOf("@");
       dotpos=value.lastIndexOf(".");
       if (apos<1||dotpos-apos<2)
         {alert(alerttxt);return false;}
       else {return true;}
       }
       }

       function validate_form(thisform)
       {
       with (thisform)
       {
       if (validate_required(account_name,"Escolha sua conta!")==false)
         {account_name.focus();return false;}
       if (validate_required(email,"Escolha seu e-mail!")==false)
         {email.focus();return false;}
       if (validate_email(email,"E-mail invalido!")==false)
         {email.focus();return false;}
       if (verifpass==1) {
       if (validate_required(passor,"Escolha sua senha!")==false)
         {passor.focus();return false;}
       if (validate_required(passor2,"Repita sua Senha!")==false)
         {passor2.focus();return false;}
       if (passor2.value!=passor.value)
         {alert(\'Senha Repetida não bate com a primeira!\');return false;}
       }
       if (verifya==1) {
       if (validate_required(verify,"Digite o código de verificação!")==false)
         {verify.focus();return false;}
       }
       if(rules.checked==false)
         {alert(\'Para criar conta você tem que aceitar as regras do server!\');return false;}
       }
       }
       </script>';
       $main_content .= 'Para você jogar no '.$config['server']['serverName'].' é nessecario uma conta, para cria-la preencha todos os dados abaixo, após preenche-lo clique em I Agree.
                      <BR><BR>
                      <FORM ACTION="?subtopic=createaccount&action=saveaccount" onsubmit="return validate_form(this)" METHOD=post>
                      <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
                      <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Criar uma '.$config['server']['serverName'].' Conta</B></TD></TR>
                      <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLSPACING=8 CELLPADDING=0>
                        <TR><TD>
                          <TABLE BORDER=0 CELLSPACING=5 CELLPADDING=0>';
       $main_content .= '<TR><TD width="150" valign="top"><B>Conta: </B></TD><TD colspan="2"><INPUT id="account_name" NAME="reg_name" onkeyup="checkAccount();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Escolha sua conta)</font></TD></TR>
                     <TR><TD width="150"></TD><TD colspan="2"><b><div id="acc_name_check">Por Favor Selecione sua conta.</div></b></TD></TR>
                   <TR><TD width="150" valign="top"><B>Seu E-mail: </B></TD><TD colspan="2"><INPUT id="email" NAME="reg_email" onkeyup="checkEmail();" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Seu E-mail é necessário para recuperar sua conta no '.$config['server']['serverName'].')</font></TD></TR>
                     <TR><TD width="150"></TD><TD colspan="2"><b><div id="email_check">Por Favor selecione seu e-mail.</div></b></TD></TR>';
                                  $main_content .= '<TR><TD width="150"><b>Selecione seu País:</b></TD><TD colspan="2"><b><select name="country">
                        <option value="">Escolha...</option><option value="af"> Afghanistan </option><option value="al"> Albania </option><option value="dz"> Algeria </option><option value="as"> American Samoa </option><option value="ad"> Andorra </option><option value="ao"> Angola </option><option value="ai"> Anguilla </option><option value="aq"> Antarctica </option><option value="ag"> Antigua and Barbuda </option><option value="ar"> Argentina </option>

                        <option value="am"> Armenia </option><option value="aw"> Aruba </option><option value="au"> Australia </option><option value="at"> Austria </option><option value="az"> Azerbaijan </option><option value="bs"> Bahamas </option><option value="bh"> Bahrain </option><option value="bd"> Bangladesh </option><option value="bb"> Barbados </option><option value="by"> Belarus </option><option value="be"> Belgium </option><option value="bz"> Belize </option><option value="bj"> Benin </option><option value="bm"> Bermuda </option><option value="bt"> Bhutan </option><option value="bo"> Bolivia </option><option value="ba"> Bosnia and Herzegowina </option><option value="bw"> Botswana </option><option value="bv"> Bouvet Island </option><option value="br"> Brazil </option><option value="io"> British Indian Ocean Territory </option><option value="bn"> Brunei Darussalam </option><option value="bg"> Bulgaria </option><option value="bf"> Burkina Faso </option><option value="bi"> Burundi </option>                                    <option value="kh"> Cambodia </option><option value="cm"> Cameroon </option><option value="ca"> Canada </option><option value="cv"> Cape Verde </option><option value="ky"> Cayman Islands </option><option value="cf"> Central African Republic </option><option value="td"> Chad </option><option value="cl"> Chile </option><option value="cn"> China </option><option value="cx"> Christmas Island </option><option value="cc"> Cocos Islands </option><option value="co"> Colombia </option><option value="km"> Comoros </option><option value="cd"> Congo </option><option value="cg"> Congo </option><option value="ck"> Cook Islands </option><option value="cr"> Costa Rica </option><option value="ci"> Cote DIvoire </option><option value="hr"> Croatia </option><option value="cu"> Cuba </option><option value="cy"> Cyprus </option><option value="cz"> Czech Republic </option><option value="dk"> Denmark </option><option value="dj"> Djibouti </option><option value="dm"> Dominica </option>

                        <option value="do"> Dominican Republic </option><option value="tp"> East Timor </option><option value="ec"> Ecuador </option><option value="eg"> Egypt </option><option value="sv"> El Salvador </option><option value="gq"> Equatorial Guinea </option><option value="er"> Eritrea </option><option value="ee"> Estonia </option><option value="et"> Ethiopia </option><option value="fk"> Falkland Islands </option><option value="fo"> Faroe Islands </option><option value="fj"> Fiji </option><option value="fi"> Finland </option><option value="fr"> France </option><option value="gf"> French Guiana </option><option value="pf"> French Polynesia </option><option value="tf"> French Southern Territories </option><option value="ga"> Gabon </option><option value="gm"> Gambia </option><option value="ge"> Georgia </option><option value="de"> Germany </option><option value="gh"> Ghana </option><option value="gi"> Gibraltar </option><option value="gr"> Greece </option>

                        <option value="gl"> Greenland </option><option value="gd"> Grenada </option><option value="gp"> Guadeloupe </option><option value="gu"> Guam </option><option value="gt"> Guatemala </option><option value="gn"> Guinea </option><option value="gw"> Guinea-Bissau </option><option value="gy"> Guyana </option><option value="ht"> Haiti </option><option value="hm"> Heard and Mc Donald Islands </option><option value="hn"> Honduras </option><option value="hk"> Hong Kong </option><option value="hu"> Hungary </option><option value="is"> Iceland </option><option value="in"> India </option><option value="id"> Indonesia </option><option value="ir"> Iran </option><option value="iq"> Iraq </option><option value="ie"> Ireland </option><option value="il"> Israel </option><option value="it"> Italy </option><option value="jm"> Jamaica </option><option value="jp"> Japan </option><option value="jo"> Jordan </option><option value="kz"> Kazakhstan </option><option value="ke"> Kenya </option>

                        <option value="ki"> Kiribati </option><option value="kr"> Korea </option><option value="kp"> Korea </option><option value="kw"> Kuwait </option><option value="kg"> Kyrgyzstan </option><option value="la"> Lao Peoples Democratic Republic </option><option value="lv"> Latvia </option><option value="lb"> Lebanon </option><option value="ls"> Lesotho </option><option value="lr"> Liberia </option><option value="ly"> Libyan Arab Jamahiriya </option><option value="li"> Liechtenstein </option><option value="lt"> Lithuania </option><option value="lu"> Luxembourg </option><option value="mo"> Macau </option><option value="mk"> Macedonia </option><option value="mg"> Madagascar </option><option value="mw"> Malawi </option><option value="my"> Malaysia </option><option value="mv"> Maldives </option><option value="ml"> Mali </option><option value="mt"> Malta </option><option value="mh"> Marshall Islands </option><option value="mq"> Martinique </option>

                        <option value="mr"> Mauritania </option><option value="mu"> Mauritius </option><option value="yt"> Mayotte </option><option value="mx"> Mexico </option><option value="fm"> Micronesia </option><option value="md"> Moldova </option><option value="mc"> Monaco </option><option value="mn"> Mongolia </option><option value="ms"> Montserrat </option><option value="ma"> Morocco </option><option value="mz"> Mozambique </option><option value="mm"> Myanmar </option><option value="na"> Namibia </option><option value="nr"> Nauru </option><option value="np"> Nepal </option><option value="nl"> Netherlands </option><option value="an"> Netherlands Antilles </option><option value="nc"> New Caledonia </option><option value="nz"> New Zealand </option><option value="ni"> Nicaragua </option><option value="ne"> Niger </option><option value="ng"> Nigeria </option><option value="nu"> Niue </option><option value="nf"> Norfolk Island </option><option value="mp"> Northern Mariana Islands </option>

                        <option value="no"> Norway </option><option value="om"> Oman </option><option value="pk"> Pakistan </option><option value="pw"> Palau </option><option value="pa"> Panama </option><option value="pg"> Papua New Guinea </option><option value="py"> Paraguay </option><option value="pe"> Peru </option><option value="ph"> Philippines </option><option value="pn"> Pitcairn </option><option value="pl"> Poland </option><option value="pt"> Portugal </option><option value="pr"> Puerto Rico </option><option value="qa"> Qatar </option><option value="re"> Reunion </option><option value="ro"> Romania </option><option value="ru"> Russian Federation </option><option value="rw"> Rwanda </option><option value="kn"> Saint Kitts and Nevis </option><option value="lc"> Saint Lucia </option><option value="ws"> Samoa </option><option value="sm"> San Marino </option><option value="st"> Sao Tome and Principe </option><option value="sa"> Saudi Arabia </option><option value="sn"> Senegal </option>

                        <option value="sc"> Seychelles </option><option value="sl"> Sierra Leone </option><option value="sg"> Singapore </option><option value="sk"> Slovakia </option><option value="si"> Slovenia </option><option value="sb"> Solomon Islands </option><option value="so"> Somalia </option><option value="za"> South Africa </option><option value="es"> Spain </option><option value="lk"> Sri Lanka </option><option value="sh"> St. Helena </option><option value="pm"> St. Pierre and Miquelon </option><option value="sd"> Sudan </option><option value="sr"> Suriname </option><option value="sj"> Svalbard and Jan Mayen Islands </option><option value="sz"> Swaziland </option><option value="se"> Sweden </option><option value="ch"> Switzerland </option><option value="sy"> Syrian Arab Republic </option><option value="tw"> Taiwan </option><option value="tj"> Tajikistan </option><option value="tz"> Tanzania </option>

                        <option value="th"> Thailand </option><option value="tg"> Togo </option><option value="tk"> Tokelau </option><option value="to"> Tonga </option>
                        <option value="tt"> Trinidad and Tobago </option><option value="tn"> Tunisia </option><option value="tr"> Turkey </option><option value="tm"> Turkmenistan </option><option value="tc"> Turks and Caicos Islands </option><option value="tv"> Tuvalu </option><option value="ug"> Uganda </option><option value="ua"> Ukraine </option><option value="ae"> United Arab Emirates </option><option value="gb"> United Kingdom </option><option value="us"> United States </option><option value="uy"> Uruguay </option><option value="uz"> Uzbekistan </option><option value="vu"> Vanuatu </option><option value="va"> Vatican </option><option value="ve"> Venezuela </option><option value="vn"> Viet Nam </option><option value="vg"> Virgin Islands (British) </option><option value="vi"> Virgin Islands (US) </option>

                        <option value="wf"> Wallis and Futuna Islands </option><option value="eh"> Western Sahara </option><option value="ye"> Yemen </option><option value="yu"> Yugoslavia </option><option value="zm"> Zambia </option><option value="zw"> Zimbabwe </option>
                      </select>';

       if(!$config['site']['create_account_verify_mail'])
       $main_content .= '<script type="text/javascript">var verifpass=1;</script>
                      <TR><TD width="150" valign="top"><B>Senha: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor" NAME="reg_password" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(coloque aqui a senha que você quer para sua conta no '.$config['server']['serverName'].')</font></TD></TR>
                     <TR><TD width="150" valign="top"><B>Repita a senha: </B></TD><TD colspan="2"><INPUT TYPE="password" id="passor2" NAME="reg_password2" VALUE="" SIZE=30 MAXLENGTH=50><BR><font size="1" face="verdana,arial,helvetica">(Repita sua senha)</font></TD></TR>';
       else
    {
    }
       $main_content .= '</TABLE>
                     </TD></TR>
                     <TR><TD>
                      
                     </TD></TR>
                     <TR><TD>
                    
                     </TD></TR>
                   </TABLE></TD></TR>
                   </TABLE>
                   <BR>
                   <TABLE BORDER=0 WIDTH=100%>
                     <TR><TD ALIGN=center>
                       <IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR>
                     </TD><TD ALIGN=center VALIGN=top>
                       <INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=18>
                       </FORM>
                     </TD><TD ALIGN=center>
                       <FORM  ACTION="?subtopic=latestnews" METHOD=post>
                       <INPUT TYPE=image NAME="Cancel" SRC="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=18>
                       </FORM>
                     </TD><TD ALIGN=center>
                       <IMG SRC="/images/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR>
                     </TD></TR>
                   </TABLE>
                   </TD>
                   <TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD>
                   </TR>
                   </TABLE>';
    }
    //CREATE ACCOUNT PAGE (save account in database)
    if($action == "saveaccount") {
          $reg_country = trim($_POST['country']);
       $reg_name = strtoupper(trim($_POST['reg_name']));
       $reg_email = trim($_POST['reg_email']);
       $reg_password = trim($_POST['reg_password']);
       $reg_code = trim($_POST['reg_code']);
       //FIRST check
       //check e-mail
       if(empty($reg_name))
          $reg_form_errors[] = "Por Favor Escolha sua conta.";
       elseif(!check_account_name($reg_name))
          $reg_form_errors[] = "Invalid account name format. Use only A-Z and numbers 0-9.";
       if(empty($reg_email))
          $reg_form_errors[] = "Por Favor Escolha seu E-mail.";
       else
       {
          if(!check_mail($reg_email))
             $reg_form_errors[] = "O E-mail está incorreto.";
       }
       if($config['site']['verify_code'])
       {

        }
       //check password
       if(empty($reg_password) && !$config['site']['create_account_verify_mail'])
          $reg_form_errors[] = "Por Favor escolha sua senha para criar a conta.";
       elseif(!$config['site']['create_account_verify_mail'])
       {
          if(!check_password($reg_password))
             $reg_form_errors[] = "Password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght.";
       }
       //SECOND check
       //check e-mail address in database
       if(empty($reg_form_errors))
       {
          if($config['site']['one_email'])
          {
             $test_email_account = $ots->createObject('Account');
             //load account with this e-mail
             $test_email_account->findByEmail($reg_email);
             if($test_email_account->isLoaded())
                $reg_form_errors[] = "Account with this e-mail address already exist in database.";
          }
          $account_db = new OTS_Account();
          $account_db->find($reg_name);
          if($account_db->isLoaded())
             $reg_form_errors[] = 'Ja existe !';
       }
       // ----------creates account-------------(save in database)
       if(empty($reg_form_errors))
       {
          //create object 'account' and generate new acc. number
          if($config['site']['create_account_verify_mail'])
          {
             $reg_password = '';
             for ($i = 1; $i <= 6; $i++)
                $reg_password .= mt_rand(0,9);
          }
          $reg_account = $ots->createObject('Account');
          $number = $reg_account->create(0, 9999999, $reg_name);
          // saves account information in database
          $reg_account->setPassword(password_ency($reg_password));
          $reg_account->setEMail($reg_email);
          $reg_account->setCustomField("flag", $reg_country);
          $reg_account->unblock();
          $reg_account->save();
          if($config['site']['newaccount_premdays'])
          {
             $reg_account->setCustomField("premdays", $config['site']['newaccount_premdays']);
             $reg_account->setCustomField("lastday", time());
          }
          //show information about registration
          if($config['site']['send_emails'] && $config['site']['create_account_verify_mail'])
          {
             $mailBody = '<html>
             <body>
             <h3>Your account name and password!</h3>
             <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p>
             <p>Account name: <b>'.$reg_name.'</b></p>
             <p>Password: <b>'.trim($reg_password).'</b></p>
             <br />
             <p>After login you can:</p>
             <li>Create new characters
             <li>Change your current password
             <li>Change your current e-mail
             </body>
             </html>';
             require("phpmailer/class.phpmailer.php");
             $mail = new PHPMailer();
             if ($config['site']['smtp_enabled'] == "yes")
             {
                $mail->IsSMTP();
                $mail->Host = $config['site']['smtp_host'];
                $mail->Port = (int)$config['site']['smtp_port'];
                $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
                $mail->Username = $config['site']['smtp_user'];
                $mail->Password = $config['site']['smtp_pass'];
             }
             else
                $mail->IsMail();
             $mail->IsHTML(true);
             $mail->From = $config['site']['mail_address'];
             $mail->AddAddress($reg_email);
             $mail->Subject = $config['server']['serverName']." - Registration";
             $mail->Body = $mailBody;
             if($mail->Send())
             {
                $main_content .= 'Conta Criada ! Vejo Voce no Tibia !<BR><BR>';
                $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
                <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Conta Criada !</B></TD></TR>
                <TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
                  <TABLE BORDER=0 CELLPADDING=1><TR><TD>
                    <BR>Sua Conta é <b>'.$reg_name.'</b>. Sua Senha é <b>'.$reg_password.'</b>.
                   <BR><b><i>Você vai receber um email (<b>'.$reg_email.'</b>) com sua senha.</b></i><br>';
                $main_content .= '<a href="http://baiak-loko.no-ip.org/?subtopic=accountmanagement" width="120"><b><font size=3">Logue Aqui</font></b></a>.<BR><BR>';
                $main_content .= '<br /><small>Todas informações foram enviadas para o seguinte E-mail: <b>'.$reg_email.'</b>. Verifique sua caixa de entra e de spam.';
             }
             else
             {
                $main_content .= '<br /><small>Um Erro ocorreu ao enviar o E-mail! a conta não foi criada. Tente Denovo.</small>';
                $reg_account->delete();
             }
          }
          else
          {
             $main_content .= 'Sua Conta foi criada com sucesso. Logue agora para criar seu character e ir se divertir no server!<BR><BR>';
             $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
             <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Account Created</B></TD></TR>
             <TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
               <TABLE BORDER=0 CELLPADDING=1><TR><TD>
                 <BR>Your account name is <b>'.$reg_name.'</b><br>você precisa da sua conta e da sua senha para jogar no server '.$config['server']['serverName'].'.
                 Por Favor mantenha sua conta e senha em um lugar seguro
                e nunca compartilhe sua conta com ninguém.<BR><BR>';
             if($config['site']['send_emails'] && $config['site']['send_register_email'])
             {
                $mailBody = '<html>
                <body>
                <h3>Your account name and password!</h3>
                <p>You or someone else registred on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a> with this e-mail.</p>
                <p>Account name: <b>'.$reg_name.'</b></p>
                <p>Password: <b>'.trim($reg_password).'</b></p>
                <br />
                <p>After login you can:</p>
                <li>Create new characters
                <li>Change your current password
                <li>Change your current e-mail
                </body>
                </html>';
                require("phpmailer/class.phpmailer.php");
                $mail = new PHPMailer();
                if ($config['site']['smtp_enabled'] == "yes")
                {
                   $mail->IsSMTP();
                   $mail->Host = $config['site']['smtp_host'];
                   $mail->Port = (int)$config['site']['smtp_port'];
                   $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false);
                   $mail->Username = $config['site']['smtp_user'];
                   $mail->Password = $config['site']['smtp_pass'];
                }
                else
                   $mail->IsMail();
                $mail->IsHTML(true);
                $mail->From = $config['site']['mail_address'];
                $mail->AddAddress($reg_email);
                $mail->Subject = $config['server']['serverName']." - Registration";
                $mail->Body = $mailBody;
                if($mail->Send())
                   $main_content .= '<br /><small>These informations were send on email address <b>'.$reg_email.'</b>.';
                else
                   $main_content .= '<br /><small>An error occorred while sending email (<b>'.$reg_email.'</b>)!</small>';
             }
          }
          $main_content .= '</TD></TR></TABLE></TD></TR></TABLE><BR><BR>';
       }
       else
       {
          //SHOW ERRORs if data from form is wrong
          $main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
          foreach($reg_form_errors 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/>
          <BR>
          <CENTER>
          <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION=?subtopic=createaccount METHOD=post><TR><TD>
          <INPUT TYPE=hidden NAME=email VALUE="">

          <INPUT TYPE=image NAME="Back" ALT="Back" SRC="'.$layout_name.'/images/buttons/sbutton_back.gif" BORDER=0 WIDTH=120 HEIGHT=18>
          </TD></TR></FORM></TABLE>
          </CENTER>';
       }
    }
    ?>

    Se ajudei, agradeça e se puder, dá rep + Wink


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Sex Maio 11, 2012 3:23 pm

    ainda com o mesmo problema admin..

    Se quiser ver, teste você mesmo no meu site: [Você precisa estar registrado e conectado para ver este link.]

    (estou usando seu ultimo .php postado)

    e tente criar uma conta, após clicar em "i agree" ele redireciona pra uma pagina branca sem nada..(http://www.bassedoni.tk/?subtopic=createaccount&action=saveaccount)


    não tem como editar o que eu te falei no inicio dos posts? pois é soh retirar os campos de "character" e "world selection", pois aquele q eu postei na primeira vez, ele redireciona certinho para uma pagina avisando "sua conta foi criada..."

    aguardo, vlw!
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 4:04 pm

    Olha, se não me engano, esse erro deve ser no accountmanagement - eu acho, só não me lembro aonde..


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 4:07 pm

    Se puder, passa seu accountmanagement para eu ver o erro.


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Sex Maio 11, 2012 5:21 pm

    não vejo porque o erro seria no accountmanagement, pois o outro createaccount q eu usava e que postei no inicio pra vc tirar os campos, dava certo. Mas de qualquer forma:

    accountmanagement.php está anexado, tentei colocar entre "[codes]" mas deu erro avisando: "A largura da sua mensagem ultrapassa o limite autorizado."

    então, anexei-o

    [Você precisa estar registrado e conectado para ver este link.]
    avatar
    Jamerson Andre
    Admin
    Admin

    Mensagens : 442
    ZXG Coins : 3077
    Data de inscrição : 13/12/2011
    Idade : 20
    Localização : Maceio -Al


    Alerta:
    99/100  (99/100)

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Jamerson Andre em Sex Maio 11, 2012 8:17 pm

    tem como disponibilizar esse website que você usa?


    __________________


    [Você precisa estar registrado e conectado para ver este link.]
    avatar
    lucas502
    Cidadão
    Cidadão

    Mensagens : 17
    ZXG Coins : 2352
    Data de inscrição : 01/05/2012
    Idade : 23
    Localização : Alvorada / Rio Grande do Sul

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por lucas502 em Sex Maio 11, 2012 9:29 pm

    Posso sim, após eu resolver meu problema eu posto pra galera.
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 9:38 pm

    Está bem,
    quando você baixar, vou extrai-lo aqui no meu desktop e irei ver o problema.


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    hackerOwner
    Cidadão
    Cidadão

    Mensagens : 4
    ZXG Coins : 2328
    Data de inscrição : 11/05/2012
    Idade : 25
    Localização : hackerslandia

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por hackerOwner em Sex Maio 11, 2012 10:04 pm

    Eae,sou novo no fórum,e gostaria de
    saber logo agora se a turma daqui é legal
    e respeita uns aos outros.
    Caso contrário,de users chatos vou fazer algo q não vá gostar.
    Como meu próprio nome diz.

    Obrigado

    Att-HackerOwner
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 10:10 pm

    Olá Hackerowner,
    Como você pode ver, todos aqui no fórum há educação, quem não tem educação, não é bem-vindo ao fórum.
    Sua resposta foi dada? obrigado!


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 10:12 pm

    Este fórum foi criado com a intenção de ajudar os outros.
    Não para ganhar dinheiro, e sim para ajudar os outros em que precisa.


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    hackerOwner
    Cidadão
    Cidadão

    Mensagens : 4
    ZXG Coins : 2328
    Data de inscrição : 11/05/2012
    Idade : 25
    Localização : hackerslandia

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por hackerOwner em Sex Maio 11, 2012 10:20 pm

    Muito obrigado pela sua resposta.
    Vejo que aqui não será necessário
    fazer o que tinha feito em outros forumeiros.
    Grato
    Att-HackerOwner
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2831
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Administrador em Sex Maio 11, 2012 10:32 pm

    Olá amigo, esqueci de lhe dizer;
    Bem-Vindo ao ZonaXGames, qualquer dúvida/pedido - estamos aqui para isso' ^^


    __________________


    Atenciosamente,

    Equipe ZonaXGames.
    avatar
    hackerOwner
    Cidadão
    Cidadão

    Mensagens : 4
    ZXG Coins : 2328
    Data de inscrição : 11/05/2012
    Idade : 25
    Localização : hackerslandia

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por hackerOwner em Sex Maio 11, 2012 11:01 pm

    Muito obrigado "Admin"
    Belo fórum.Nosso trabalho não é
    feito para fórum como esse.
    Parabéns

    Grato

    Att-HackerOwner

    Conteúdo patrocinado

    Re: [Gesior ACC] Arena Huting.php

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Sab Set 22, 2018 10:44 am