<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

$action = $_GET['action'];
$go = $_GET['go'];
if ( $action == "adicionar" )
{
    if ( $go == false )
    {
        echo "    \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Adicionar Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=adicionar&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Conta:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"conta\" id=\"conta\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:Busca();\">Busca</a></td>\r\n                \t\t</tr>\r\n              \t\t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/prosseguiro.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/prosseguir.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/prosseguir.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n    ";
    }
    if ( $go == true )
    {
        $conta = $_POST['conta'];
        $check->checacampobranco( $conta, "Conta" );
        $sql->verificalogin( $conta, 1 );
        $sql->verificanovochar( $conta );
        echo "    \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Alterar Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=adicionar&go=2\" method=\"post\">\r\n                        <input type=\"hidden\" name=\"conta\" id=\"conta\" value=\"";
        echo $conta;
        echo "\"> \r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"></td>\r\n                \t\t</tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Classe:</td>\r\n                            <td>\r\n                            \t<select name=\"classe\" id=\"classe\">\r\n                            \t\t<option value=\"0\">Dark Wizard</option>\r\n                                    <option value=\"1\">Soul Master</option>\r\n                                    <option value=\"16\">Dark Knight</option>\r\n                                    <option value=\"17\">Blade Knight</option>\r\n                                    <option value=\"32\">Fairy Elf</option>\r\n                                    <option value=\"33\">Muse Elf</option>\r\n                                    <option value=\"48\">Magic Gladiator</option>\r\n                                </select>\r\n                            </td>\r\n                        </tr>\r\n              \t\t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/addcharo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/addchar.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/addchar.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n        ";
    }
    if ( $go == 2 )
    {
        $conta = $_POST['conta'];
        $char = $_POST['char'];
        $classe = $_POST['classe'];
        $check->checacampobranco( $char, "Char" );
        $check->checacampobranco( $conta, "Conta" );
        $check->checacampobranco( $classe, "Classe" );
        $sql->verificalogin( $conta, 1 );
        $sql->verificachar( $char, 2 );
        $sql->executaadicionarchar( $conta, $char, $classe );
    }
}
if ( $action == "alterar" )
{
    if ( $go == false )
    {
        echo "    \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Alterar Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=alterar&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n              \t\t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/prosseguiro.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/prosseguir.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/prosseguir.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n    ";
    }
    if ( $go == true )
    {
        $char = $_POST['char'];
        $check->checacampobranco( $char, "Char" );
        $sql->verificachar( $char, 1 );
        $sql->query( "SELECT AccountID, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Money, PkCount, CtlCode, Resets, Resetao FROM Character WHERE Name='".$char."'" );
        $info = $sql->row( );
        if ( $info[3] == 0 )
        {
            $classe[0] = " selected=\"selected\"";
        }
        if ( $info[3] == 1 )
        {
            $classe[1] = " selected=\"selected\"";
        }
        if ( $info[3] == 16 )
        {
            $classe[2] = " selected=\"selected\"";
        }
        if ( $info[3] == 17 )
        {
            $classe[3] = " selected=\"selected\"";
        }
        if ( $info[3] == 32 )
        {
            $classe[4] = " selected=\"selected\"";
        }
        if ( $info[3] == 33 )
        {
            $classe[5] = " selected=\"selected\"";
        }
        if ( $info[3] == 48 )
        {
            $classe[6] = " selected=\"selected\"";
        }
        if ( $info[10] == 0 )
        {
            $stat[0] = " selected=\"selected\"";
        }
        if ( $info[10] == 1 )
        {
            $stat[1] = " selected=\"selected\"";
        }
        if ( $info[10] == 8 )
        {
            $stat[2] = " selected=\"selected\"";
        }
        if ( $info[10] == 24 )
        {
            $stat[3] = " selected=\"selected\"";
        }
        echo "        \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Alterar Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=alterar&go=2\" method=\"post\">\r\n                        <input type=\"hidden\" name=\"char\" id=\"char\" value=\"";
        echo $char;
        echo "\">\r\n                \t\t<table width=\"100%\" cellpadding=\"5\" cellspacing=\"2\">\r\n                        <tr>\r\n                        \t<td colspan=\"4\" class=\"char\"><b><center>Dados do char</center></b></td>\r\n                        </tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Conta:</td>\r\n                \t\t\t<td colspan=\"3\"><input type=\"text\" name=\"conta\" id=\"conta\" class=\"char\" style=\"width: 300px\" value=\"";
        echo $info[0];
        echo "\" disabled=\"disabled\"></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td colspan=\"3\"><input type=\"text\" name=\"chard\" id=\"chard\" class=\"char\" style=\"width: 300px\" value=\"";
        echo $char;
        echo "\" disabled=\"disabled\"></td>\r\n                \t\t</tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Level:</td>\r\n                            <td><input type=\"text\" name=\"level\" id=\"level\" maxlength=\"4\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[1];
        echo "\"></td>\r\n                            <td class=\"char\">Pontos</td>\r\n                            <td><input type=\"text\" name=\"ponto\" id=\"ponto\" maxlength=\"7\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[2];
        echo "\"></td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">For&ccedil;a:</td>\r\n                            <td><input type=\"text\" name=\"forca\" id=\"forca\" maxlength=\"5\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[4];
        echo "\"></td>\r\n                            <td class=\"char\">Resets:</td>\r\n                            <td><input type=\"text\" name=\"reset\" id=\"reset\" maxlength=\"5\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[10];
        echo "\"></td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Agilidade:</td>\r\n                            <td><input type=\"text\" name=\"agilidade\" id=\"agilidade\" maxlength=\"5\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[5];
        echo "\"></td>\r\n                            <td class=\"char\">Reset&atilde;o:</td>\r\n                            <td><input type=\"text\" name=\"resetao\" id=\"resetao\" maxlength=\"4\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[11];
        echo "\"></td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Vida:</td>\r\n                            <td><input type=\"text\" name=\"vida\" id=\"vida\" maxlength=\"5\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[6];
        echo "\"></td>\r\n                            <td class=\"char\">Status:</td>\r\n                            <td><select name=\"status\" id=\"status\" class=\"char\">\r\n                            \t\t<option value=\"0\"";
        echo $stat[0];
        echo ">Normal</option>\r\n                                    <option value=\"1\"";
        echo $stat[1];
        echo ">Bloqueado</option>\r\n                                    <option value=\"8\"";
        echo $stat[2];
        echo ">Game Master</option>\r\n                                    <option value=\"24\"";
        echo $stat[3];
        echo ">Administrador</option>\r\n                                </select></td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Energia:</td>\r\n                            <td><input type=\"text\" name=\"energia\" id=\"energia\" maxlength=\"5\" class=\"char\" style=\"width: 120px\" value=\"";
        echo $info[7];
        echo "\"></td>\r\n                            <td class=\"char\">Zen:</td>\r\n                            <td><input type=\"text\" name=\"zen\" id=\"zen\" maxlength=\"10\" class=\"char\" style=\"width: 150px\" value=\"";
        echo $info[8];
        echo "\"></td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"char\">Classe:</td>\r\n                            <td><select name=\"classe\" id=\"classe\" class=\"char\">\r\n                            \t\t<option value=\"0\"";
        echo $classe[0];
        echo ">Dark Wizard</option>\r\n                                    <option value=\"1\"";
        echo $classe[1];
        echo ">Soul Master</option>\r\n                                    <option value=\"16\"";
        echo $classe[2];
        echo ">Dark Knight</option>\r\n                                    <option value=\"17\"";
        echo $classe[3];
        echo ">Blade Knight</option>\r\n                                    <option value=\"32\"";
        echo $classe[4];
        echo ">Fairy Elf</option>\r\n                                    <option value=\"33\"";
        echo $classe[5];
        echo ">Muse Elf</option>\r\n                                    <option value=\"48\"";
        echo $classe[6];
        echo ">Magic Gladiator</option>\r\n                                </select>\r\n                            </td>\r\n                            <td class=\"char\">Mortes:</td>\r\n                            <td><input type=\"text\" name=\"morte\" id=\"morte\" maxlength=\"4\" class=\"char\" style=\"width: 120px\" value=\"";
        echo $info[9];
        echo "\"></td>\r\n                        </tr>\r\n                        <tr>\r\n                \t\t\t<td colspan=\"4\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/altcharo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/altchar.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/altchar.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\t";
    }
    if ( $go == 2 )
    {
        $char = $_POST['char'];
        $level = $_POST['level'];
        $ponto = $_POST['ponto'];
        $reset = $_POST['reset'];
        $resetao = $_POST['resetao'];
        $forca = $_POST['forca'];
        $agilidade = $_POST['agilidade'];
        $vida = $_POST['vida'];
        $energia = $_POST['energia'];
        $status = $_POST['status'];
        $zen = $_POST['zen'];
        $classe = $_POST['classe'];
        $morte = $_POST['morte'];
        $check->checacampobranco( $char, "Char" );
        $check->checanumeropositivo( $level, "Level" );
        $check->checanumeropositivo( $ponto, "Pontos" );
        $check->checanumeropositivo( $reset, "Reset" );
        $check->checanumeropositivo( $resetao, "Resetao" );
        $check->checanumeropositivo( $forca, "Forca" );
        $check->checanumeropositivo( $agilidade, "Agilidade" );
        $check->checanumeropositivo( $vida, "Vida" );
        $check->checanumeropositivo( $energia, "Energia" );
        $check->checanumeropositivo( $zen, "Zen" );
        $check->checanumeropositivo( $classe, "Classe" );
        $check->checanumeropositivo( $morte, "Morte" );
        $check->checanumeropositivo( $status, "Status" );
        $sql->executaalterarchar( $char, $level, $ponto, $reset, $resetao, $forca, $agilidade, $vida, $energia, $zen, $classe, $morte, $status );
    }
}
if ( $action == "banir" )
{
    if ( $go == false )
    {
        echo "        \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Banir Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=banir&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Motivo ban:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"motivo\" id=\"motivo\" maxlength=\"200\" class=\"char\"></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Tempo ban:</td>\r\n                \t\t\t<td><select name=\"tempo\" id=\"tempo\" class=\"char\">\r\n                            \t\t<option value=\"1\">1 dia</option>\r\n                                    <option value=\"2\">2 dias</option>\r\n                                    <option value=\"3\">3 dias</option>\r\n                                    <option value=\"4\">4 dias</option>\r\n                                    <option value=\"5\">5 dias</option>\r\n                                    <option value=\"6\">6 dias</option>\r\n                                    <option value=\"7\">7 dias</option>\r\n                                    <option value=\"8\">8 dias</option>\r\n                                    <option value=\"9\">9 dias</option>\r\n                                    <option value=\"10\">10 dias</option>\r\n                                    <option value=\"11\">11 dias</option>\r\n                                    <option value=\"12\">12 dias</option>\r\n                                    <option value=\"13\">13 dias</option>\r\n                                    <option value=\"14\">14 dias</option>\r\n                                    <option value=\"15\">15 dias</option>\r\n                                    <option value=\"30\">30 dias</option>\r\n                                    <option value=\"9999\">Permanentemente</option>   \r\n                            \t</select>\r\n                            </td>\r\n                \t\t</tr>\r\n               \t\t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/bancharo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/banchar.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/banchar.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\t";
    }
    if ( $go == true )
    {
        $char = $_POST['char'];
        $motivo = $_POST['motivo'];
        $tempo = $_POST['tempo'];
        $check->checacampobranco( $char, "Char" );
        $check->checacampobranco( $motivo, "Motivo" );
        $check->checacampobranco( $tempo, "Tempo" );
        $check->checanumeropositivo( $tempo, "Tempo" );
        $sql->verificachar( $char, 1 );
        $sql->verificacharbanido( $char, 1 );
        $sql->executabanirchar( $char, $motivo, $tempo, "Autor" );
    }
}
if ( $action == "desbanir" )
{
    if ( $go == false )
    {
        echo "        \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Desbanir Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=desbanir&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/desbancharo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/desbanchar.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/desbanchar.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\t";
    }
    if ( $go == true )
    {
        $char = $_POST['char'];
        $check->checacampobranco( $char, "Char" );
        $sql->verificachar( $char, 1 );
        $sql->verificacharbanido( $char, 2 );
        $sql->executadesbanirchar( $char );
    }
}
if ( $action == "informacoes" )
{
    if ( $go == false )
    {
        echo "            \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Informa&ccedil;&otilde;es Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=informacoes&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/verinfoo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/verinfo.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/verinfo.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\t";
    }
    if ( $go == true )
    {
        $char = $_POST['char'];
        $check->checacampobranco( $char, "Char" );
        $sql->verificachar( $char, 1 );
        $sql->query( "SELECT AccountID, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Money, PkCount, CtlCode, Resets, Resetao, ban_motivo, ban_autor, ban_tempo, ban_vez FROM Character WHERE Name='".$char."'" );
        $info = $sql->row( );
        $sql->query( "SELECT vip, tirarvip, golds FROM MEMB_INFO WHERE memb___id='".$info[0]."'" );
        $infos = $sql->row( );
        if ( $infos[0] == 0 )
        {
            $infos[0] = "Free";
        }
        if ( $infos[0] == 1 )
        {
            $infos[0] = "Vip Normal";
        }
        if ( $infos[0] == 2 )
        {
            $infos[0] = "Vip Premium";
        }
        if ( $infos[1] == 0 )
        {
            $infos[1] = "Nenhum dia";
        }
        if ( $infos[1] == 1 )
        {
            $infos[1] .= " dia";
        }
        if ( 1 < $infos[1] )
        {
            $infos[1] .= " dias";
        }
        if ( $info[10] == 0 )
        {
            $info[10] = "Normal";
        }
        if ( $info[10] == 1 )
        {
            $info[10] = "Bloqueado";
        }
        if ( $info[10] == 8 )
        {
            $info[10] = "GameMaster";
        }
        if ( $info[10] == 24 )
        {
            $info[10] = "Administrador";
        }
        if ( $info[11] == 0 )
        {
            $info[11] = "Nenhum reset";
        }
        if ( $info[11] == 1 )
        {
            $info[11] .= " reset";
        }
        if ( 1 < $info[11] )
        {
            $info[11] .= " resets";
        }
        if ( $info[12] == 0 )
        {
            $info[12] = "Nenhum reset&atilde;o";
        }
        if ( $info[12] == 1 )
        {
            $info[12] .= " reset&atilde;o";
        }
        if ( 1 < $info[12] )
        {
            $info[12] .= " reset&otilde;es";
        }
        echo "<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Informa&ccedil;&otilde;es Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                \t\t<table width=\"100%\" cellpadding=\"5\">\r\n                        <tr>\r\n                          <td colspan=\"2\" class=\"infotitulo\">Informa&ccedil;&atilde;o da Conta</td>\r\n                        </tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"infovip\" align=\"right\" width=\"35%\"><b>Nome:</b></td>\r\n                            <td class=\"infovip\">";
        echo $char;
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"infovip2\" align=\"right\"><b>Conta:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[0];
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"infovip\" align=\"right\" width=\"35%\"><b>Level:</b></td>\r\n                            <td class=\"infovip\">";
        echo $info[1];
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"infovip2\" align=\"right\" width=\"35%\"><b>Pontos:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[2];
        echo " pontos</td>\r\n\t\t\t\t\t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"infovip\" align=\"right\"><b>Classe:</b></td>\r\n                            <td class=\"infovip\">";
        echo $sql->mostrarclasse( $char );
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"infovip2\" align=\"right\" width=\"35%\"><b>For&ccedil;a:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[4];
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"infovip\" align=\"right\"><b>Agilidade:</b></td>\r\n                            <td class=\"infovip\">";
        echo $info[5];
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"infovip2\" align=\"right\"><b>Vida:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[6];
        echo "</td>\r\n\t\t\t\t\t\t</tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip\" align=\"right\"><b>Energia:</b></td>\r\n                            <td class=\"infovip\">";
        echo $info[7];
        echo "</td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip2\" align=\"right\"><b>Money:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[8];
        echo " zen</td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip\" align=\"right\"><b>Mortes:</b></td>\r\n                            <td class=\"infovip\">";
        echo $info[9];
        echo " mortes</td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip2\" align=\"right\"><b>Status:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[10];
        echo "                            ";
        if ( $info[10] == "Bloqueado" )
        {
            echo "&nbsp;Motivo: ".$info[13].", bloqueado por ".$info[14].", ".$info[15].", banido pela ".$info[16]." vez";
        }
        echo "</td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip\" align=\"right\"><b>Resets:</b></td>\r\n                            <td class=\"infovip\">";
        echo $info[11];
        echo "</td>\r\n                        </tr>\r\n                        <tr>\r\n                        \t<td class=\"infovip2\" align=\"right\"><b>Reset&atilde;o:</b></td>\r\n                            <td class=\"infovip2\">";
        echo $info[12];
        echo "</td>\r\n                        </tr>\r\n                        \r\n\t\t\t\t\t\t</table>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n        ";
    }
}
if ( $action == "remover" )
{
    if ( $go == false )
    {
        echo "        \t<table width=\"100%\"><tr><td>\r\n        \t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" width=\"100%\">\r\n            \t<tr>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                \t<td width=\"22\" background=\"images/bdy06.gif\" align=\"center\"><nobr>&nbsp;<img src=\"images/bullet090.gif\">&nbsp;</nobr></td>\r\n                \t<td width=\"95%\" background=\"images/bdy06.gif\" class=\"nrm02\" align=\"left\">&nbsp;<b><font color=\"#2283BF\">Remover Char</font></b></td>\r\n                \t<td background=\"images/bdy06.gif\" align=\"right\"><img src=\"images/bullet031.gif\" width=\"6\" height=\"10\">&nbsp;&nbsp;</td>\r\n                \t<td width=\"1\"><img src=\"images/bdy05.gif\" width=\"1\" height=\"23\"></td>\r\n                </tr>\r\n                <tr>\r\n                \t<td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                \t<td colspan=\"3\"><!--<img src=\"images/spacer.gif\" width=\"100\" height=\"5\">-->\r\n                    \t<form name=\"form1\" id=\"form1\" action=\"?page=char&action=remover&go=1\" method=\"post\">\r\n                \t\t<table width=\"100%\">\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"char\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"char\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td colspan=\"2\" align=\"center\">\r\n\t\t\t\t\t\t\t\t<script language=\"JavaScript\">\r\n\t\t\t\t\t\t\t\t\t<!--\r\n\t\t\t\t\t\t\t\t\t//hide me\r\n\t\t\t\t\t\t\t\t\tif (document.images) {\r\n\t\t\t\t\t\t\t\t\tspecbut1On = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1On.src = \"images/en/buttons/remcharo.gif\";\r\n\t\t\t\t\t\t\t\t\tspecbut1Off = new Image();\r\n\t\t\t\t\t\t\t\t\tspecbut1Off.src = \"images/en/buttons/remchar.gif\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t//-->\r\n\t\t\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t\t\t\t<a href=\"#\" onClick=\"document.form1.submit(); return false;\" onMouseOver='ShowHide(\"specbut1\",\"specbut1On\");' onMouseOut='ShowHide(\"specbut1\",\"specbut1Off\")'><img src=\"images/en/buttons/remchar.gif\" Array border=\"0\" name=\"specbut1\"></a>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n                        </form>\r\n                    </td>\r\n                    <td width=\"1\" bgcolor=\"#666666\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n                <tr>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td bgcolor=\"#666666\" colspan=\"3\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                    <td width=\"1\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>\r\n                </tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\r\n    ";
    }
    if ( $go == true )
    {
        $char = $_POST['char'];
        $check->checacampobranco( $char, "Char" );
        $sql->verificachar( $char, 1 );
        $sql->executaremoverchar( $char );
    }
}
?>
