<?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 Guild</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=guilds&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=\"guild\">Char:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"char\" id=\"char\" maxlength=\"10\" class=\"guild\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaChar();\">Busca</a></td>\r\n                \t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"guild\">Guild:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"guild\" id=\"guild\" maxlength=\"8\" class=\"guild\"></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/addguildo.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/addguild.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/addguild.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'];
        $guild = $_POST['guild'];
        $check->checacampobranco( $char, "Char" );
        $check->checacampobranco( $guild, "Guild" );
        $sql->verificachar( $char, 1 );
        $sql->verificaguild( $guild, 2 );
        $sql->verificanovaguild( $char );
        $sql->executaradicionarguild( $char, $guild );
    }
}
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 Guild</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=guilds&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=\"guild\">Guild:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"guild\" id=\"guild\" maxlength=\"10\" class=\"guild\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaGuild();\">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 )
    {
        $guild = $_REQUEST['guild'];
        $check->checacampobranco( $guild, "Guild" );
        $sql->verificaguild( $guild, 1 );
        $sql->query( "SELECT G_Master, G_Score, G_Notice, G_Mark FROM Guild WHERE G_Name='".$guild."'" );
        $info = $sql->row( );
        $guildmark = bin2hex( $info[3] );
        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 Guild</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=guilds&action=alterar&go=2\" method=\"post\">\r\n                        <input type=\"hidden\" name=\"guild\" id=\"guild\" value=\"";
        echo $guild;
        echo "\">\r\n                \t\t<table width=\"100%\" cellpadding=\"5\" cellspacing=\"2\">\r\n                        <tr>\r\n                        \t<td colspan=\"2\" class=\"guild\"><b><center>Dados da guild</center></b></td>\r\n                        </tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"guild\">Guild:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"gguild\" id=\"gguild\" class=\"guild\" style=\"width: 300px\" value=\"";
        echo $guild;
        echo "\" disabled=\"disabled\"></td>\r\n                            <td class=\"guild\" rowspan=\"4\" width=\"2%\">Logo:</td>\r\n                \t\t\t<td rowspan=\"4\" width=\"20%\"><div id=\"glogo\" name=\"glogo\"><img src=\"modules/view.logo.php?code=";
        echo $guildmark;
        echo "\"></div>\r\n                            <input type=\"hidden\" name=\"logo\" id=\"logo\" value=\"";
        echo $guildmark;
        echo "\"> <a href=\"javascript:;\" onclick=\"LogoGuild();\">Logo</a></td>\r\n                \t\t</tr>\r\n                \t\t<tr>\r\n                \t\t\t<td class=\"guild\">GameMaster:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"gmaster\" id=\"gmaster\" class=\"guild\" style=\"width: 300px\" value=\"";
        echo $info[0];
        echo "\" disabled=\"disabled\"></td>\r\n                \t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"guild\">Pontos:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"pontos\" id=\"pontos\" class=\"guild\" style=\"width: 300px\" value=\"";
        echo $info[1];
        echo "\"></td>\r\n                \t\t</tr>\r\n                        <tr>\r\n                \t\t\t<td class=\"guild\">Noticia:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"noticia\" id=\"noticia\" class=\"guild\" style=\"width: 300px\" value=\"";
        echo $info[2];
        echo "\" maxlength=\"60\"></td>\r\n                \t\t</tr>\r\n                        <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/altguildo.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/altguild.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/altguild.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 )
    {
        $guild = $_POST['guild'];
        $pontos = $_POST['pontos'];
        $noticia = $_POST['noticia'];
        $logo = $_POST['logo'];
        $check->checacampobranco( $guild, "Guild" );
        $check->checacampobranco( $logo, "Logo" );
        $check->checacampobranco( $noticia, "noticia" );
        $check->checanumeropositivo( $pontos, "Pontos" );
        $sql->verificaguild( $guild, 1 );
        $sql->executaalterarguild( $guild, $noticia, $pontos, $logo );
    }
}
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 Guild</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=guilds&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=\"guild\">Guild:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"guild\" id=\"guild\" maxlength=\"8\" class=\"guild\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaGuild();\">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 )
    {
        $guild = $_POST['guild'];
        $check->checacampobranco( $guild, "Guild" );
        $sql->verificaguild( $guild, 1 );
        $sql->query( "SELECT G_Master, G_Score, G_Notice, G_Mark FROM Guild WHERE G_Name='".$guild."'" );
        $info = $sql->row( );
        $sql->query( "SELECT Name FROM GuildMember WHERE G_Name='".$guild."'" );
        $member = $sql->row( );
        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 Guild</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 Guild</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild\" align=\"right\" width=\"35%\"><b>Nome da guild:</b></td>\r\n                                <td class=\"infoguild\">";
        echo $guild;
        echo "</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild2\" align=\"right\"><b>Nome do GM:</b></td>\r\n                                <td class=\"infoguild2\">";
        echo $info[0];
        echo "</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild\" align=\"right\"><b>Pontos:</b></td>\r\n                                <td class=\"infoguild\">";
        echo $info[1];
        echo "</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild2\" align=\"right\"><b>Noticia:</b></td>\r\n                                <td class=\"infoguild2\">";
        echo $info[2];
        echo "</td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild\" align=\"right\" width=\"35%\"><b>Logo:</b></td>\r\n                                <td class=\"infoguild\"><a href=\"javascript:;\" onmouseover=\"Tip('<img src=\\'modules/view.logo.php?code=";
        echo bin2hex( $info[3] );
        echo "\\'>');\" class=\"guild\"><img src=\"modules/view.logo.php?code=";
        echo bin2hex( $info[3] );
        echo "\" height=\"12\" width=\"12\" border=\"0\"></a></td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class=\"infoguild2\" align=\"right\"><b>Noticia:</b></td>\r\n                                <td class=\"infoguild2\">";
        echo $info[2];
        echo "</td>\r\n                            </tr>\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 Guild</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=guilds&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=\"guild\">Guild:</td>\r\n                \t\t\t<td><input type=\"text\" name=\"guild\" id=\"guild\" maxlength=\"8\" class=\"guild\"> <a href=\"javascript:;\" onclick=\"javascript:BuscaGuild();\">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/remguildo.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/remguild.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/remguild.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 )
    {
        $guild = $_REQUEST['guild'];
        $check->checacampobranco( $guild, "Guild" );
        $sql->verificaguild( $guild, 1 );
        $sql->executaremoverguild( $guild );
    }
}
?>
