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

include "config/configuracoes.php";
session_start( );
echo "<html>\r\n<head>\r\n<title>$site_titulo</title>\r\n<link href=\"estilo.css\" \t\trel=\"stylesheet\" type=\"text/css\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n<script language=\"JavaScript\" type=\"text/JavaScript\">\r\n// Checa cadastro\r\nvar msg = '';\r\nvar erro = 1;\r\nfunction Checa(){\r\n\tif (FormLogarPainel.login_site.value == \"\") {\r\n\t\tmsg += ('Você deve digitar o seu login.\\n');\r\n\t\tFormLogarPainel.login_site.focus();\r\n\t\terro = 1;\r\n\t}\r\n\tif (FormLogarPainel.senha_site.value == \"\") {\r\n\t\tmsg += ('Você deve digitar a sua senha.');\r\n\t\tFormLogarPainel.senha_site.focus();\r\n\t\terro = 1;\r\n\t}\r\n\tif(erro == 1){\r\n\t\talert(msg);\r\n\t\tmsg = ('');\r\n\t\terro = 0;\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\tdocument.FormLogarPainel.submit();\r\n\t}\r\n\t\r\n}\r\n\r\nfunction clickIE() {\r\n\tif (document.all) return false;\r\n}\r\nfunction clickNS(e) {\r\n\tif (document.layers || (document.getElementById && !document.all)) {\r\n\t\tif (e.which == 2 || e.which == 3) return false;\r\n\t}\r\n\tif (document.layers) {\r\n\t\tdocument.captureEvents(Event.MOUSEDOWN);\r\n\t\tdocument.onmousedown = clickNS;\r\n\t}\r\n\telse {\r\n\t\tdocument.onmouseup = clickNS;\r\n\t\tdocument.oncontextmenu = clickIE;\r\n\t}\r\n}\r\ndocument.oncontextmenu = new Function(\"return false\")\r\n</script>\r\n</head>\r\n";
include( "class_td.php" );
$classe = new td_class( );
include( "estastisticas.php" );
echo "<body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n<!-- ImageReady Slices (WebSite1.psd) -->\r\n<table id=\"Table_01\" width=\"996\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n\t<tr>\r\n\t\t<td background=\"images/botala.jpg\" width=\"190\" height=\"126\" align=\"center\">\r\n\t\t\t\r\n\t\t</td>\r\n\t\t<td rowspan=\"2\"><img src=\"images/index_03.jpg\" width=\"641\" height=\"178\"></td>\r\n\t\t<td rowspan=\"2\"><img src=\"images/index_04.jpg\" width=\"164\" height=\"178\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"126\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t";
if ( !isset( $_SESSION['login_site'] ) )
{
    echo "\t\t\t\t  <form name=\"FormLogarPainel\" method=\"post\" action=\"\" target=\"\" onSubmit=\"return Checa();\">\r\n\t\t<td rowspan=\"2\" background=\"images/index_05.jpg\" width=\"190\" height=\"121\" valign=\"top\">\r\n\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t<div style=\"padding-top:30px; padding-left:6px;\"><input type=\"text\" name=\"login_site\" id=\"login_site\" maxlength=\"10\" style=\"background:url(images/campo_login.jpg); width:100px; height:22px;\"></div>\r\n\t\t\t<div style=\"padding-top:6px; padding-left:6px;\"><input type=\"password\" name=\"senha_site\" id=\"senha_site\" maxlength=\"10\" style=\"background:url(images/campo_senha.jpg); width:100px; height:22px;\"></div>\t\t\t\t\t</td>\r\n\t\t\t\t\t<td valign=\"top\">\r\n\t\t\t\t\t<div style=\"padding-top:34px; padding-left:1px;\"><input type=\"image\" src=\"images/botao_logar.jpg\" name=\"logarok\" id=\"logarok\" style=\"width:62px; height:26px;\" value=\"Submit\"></div>\r\n\t\t\t\t\t<div style=\"padding-top:1px; padding-left:1px;\"><a href='ver.php?pagina=cadastro' target=\"mainsite\"><img src=\"images/botao_registrar.jpg\" width=\"61\" height\"26\" border=\"0\"></a></div>\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr><td colspan=\"2\"><div style=\"padding-top:4px; padding-left:28px; width:140px; height:14px;\" onClick=\"javascript:mainsite.location.href='ver.php?pagina=recuperarsenha';\">&nbsp;</div></td></tr>\r\n\t\t\t</table></td>\r\n\t\t</form>";
}
if ( isset( $_SESSION['login_site'] ) )
{
    $login_site = $_SESSION['login_site'];
    $qChecaGm = mssql_query( "Select * From Memb_Info WHERE memb___id='".$login_site."' AND level='2'" );
    $ChecaGm = mssql_num_rows( $qChecaGm );
    if ( $ChecaGm == 1 )
    {
        echo "\t\t<td rowspan=\"2\" background=\"images/index2_05.jpg\" width=\"190\" height=\"121\" valign=\"top\">\r\n\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"121\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"logintxt\" width=\"55%\" valign=\"top\">\r\n\t\t\t<div style=\"padding-top:35px; padding-left:10px;\">Logado como: <font class=\"logintitulo\">";
        echo $login_site;
        echo "</font><br>\r\n\t\t\t\t<a href=\"ver.php?pagina=painel\" class=\"login\" target=\"mainsite\">Ver Painel</a><br><br>\r\n\t\t\t\t<a href=\"ver.php?pagina=paineladm\" class=\"login\" target=\"mainsite\">Ver PainelADM</a></div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td valign=\"middle\"><div style=\"padding-top:15px; padding-left:10px;\"><a href=\"ver.php?pagina=painel&acao=sair\" target=\"mainsite\"><img src=\"images/botao_sair.jpg\" width=\"52\" height=\"24\" border=\"0\"></a></font></div></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n";
    }
    else
    {
        echo "\t\t<td rowspan=\"2\" background=\"images/index2_05.jpg\" width=\"190\" height=\"121\" valign=\"top\">\r\n\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"121\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"logintxt\" width=\"55%\" valign=\"top\">\r\n\t\t\t<div style=\"padding-top:35px; padding-left:10px;\">Logado como: <font class=\"logintitulo\">";
        echo $login_site;
        echo "</font><br><br>\r\n\t\t\t\t<a href=\"ver.php?pagina=painel\" class=\"login\" target=\"mainsite\">Ver Painel</a></div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td valign=\"middle\"><div style=\"padding-top:15px; padding-left:10px;\"><a href=\"ver.php?pagina=painel&acao=sair\" target=\"mainsite\"><img src=\"images/botao_sair.jpg\" width=\"52\" height=\"24\" border=\"0\"></a></font></div></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t</td>\r\n";
    }
}
if ( isset( $_POST['login_site'] ) )
{
    $login = $_POST['login_site'];
    $senha = $_POST['senha_site'];
    $classe->verificalogin( $login );
    $classe->verificasenha( $login, $senha );
    $GLOBALS['_SESSION']['login_site'] = $login;
    echo "<script>window.location='".$paginaprincipal."';</script>";
}
echo "\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"52\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td rowspan=\"14\" valign=\"top\"><iframe name=\"mainsite\" src=\"home.php\" width=641 height=582 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=auto></iframe></iframe></td>\r\n\r\n\t\t</td>\r\n\t\t<td rowspan=\"5\" background=\"images/index_07.jpg\" width=\"164\" height=\"285\" valign=\"top\" class=\"serverinfo\">\r\n\t\t\t<div style=\"padding-top:4px; padding-left:83px;\">";
echo $server_create;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:72px;\">";
echo $status1;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:72px;\">";
echo $status2;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:72px;\">";
echo $status3;
echo "</div>\r\n<div style=\"padding-top:4px; padding-left:66px;\">";
echo $server_version;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:46px;\">";
echo $server_exp;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:79px;\">";
echo $server_bb;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:54px;\">";
echo $server_reset;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:113px;\"><a href=\"ver.php?pagina=online\" target=\"mainsite\" class=\"serverinfolink\">";
echo mssql_result( $query_conta[1], 0, 0 );
echo "</a></div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:111px;\"><a href=\"ver.php?pagina=online\" target=\"mainsite\" class=\"serverinfolink\">";
echo $recorde_on;
echo "</a></div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:92px;\">";
echo mssql_result( $query_char[5], 0, 0 );
echo " / ";
echo mssql_result( $query_char[3], 0, 0 );
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:86px;\">";
echo mssql_result( $query_char[4], 0, 0 );
echo " / ";
echo mssql_result( $query_char[2], 0, 0 );
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:114px;\">";
echo mssql_result( $query_conta[0], 0, 0 );
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:108px;\">";
echo mssql_result( $query_char[0], 0, 0 );
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:109px;\">";
echo $numero_guild;
echo "</div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:126px;\"><a href=\"ver.php?pagina=bloqueados\" target=\"mainsite\" class=\"serverinfolink\">";
echo mssql_result( $query_char[1], 0, 0 );
echo "</a></div>\r\n\t\t\t<div style=\"padding-top:4px; padding-left:133px;\">";
echo mssql_result( $query_char[2], 0, 0 );
echo "</div>\r\n\t\t</td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"69\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_08.jpg\" width=\"190\" height=\"119\" border=\"0\" usemap=\"#Map10\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"119\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_09.jpg\" width=\"190\" height=\"38\" border=\"0\" usemap=\"#Map9\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"38\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_10.jpg\" width=\"190\" height=\"27\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"27\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td rowspan=\"2\"><img src=\"images/index_11.jpg\" width=\"190\" height=\"48\" border=\"0\" usemap=\"#Map8\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"32\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td rowspan=\"9\" background=\"images/index_13.jpg\" width=\"164\" height=\"297\" class=\"ranking\" valign=\"top\">\r\n\t\t<div style=\"padding-top:56px; padding-left:18px;\">\r\n\t\t\t<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\">\r\n\t\t\t";
$qGuildTop5 = @mssql_query( "SELECT TOP 5 G_Name, G_Mark, G_Score FROM Guild ORDER BY G_Score desc" );
while ( $GuildTop5 = mssql_fetch_row( $qGuildTop5 ) )
{
    $GuildMark = bin2hex( $GuildTop5[1] );
    if ( $GuildTop5[1] == NULL )
    {
        $GuildMark = "0000000000000000000000000000000000000000000000000000000000000000";
    }
    echo "\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"ranking\" width=\"77\">";
    echo $GuildTop5[0];
    echo "</td>\r\n\t\t\t\t\t<td class=\"ranking\" width=\"21\" align=\"center\"><img src=\"logo.php?code=";
    echo $GuildMark;
    echo "\" width=\"12\" height=\"12\"></td>\r\n\t\t\t\t\t<td class=\"ranking\" width=\"38\" align=\"center\">";
    echo $GuildTop5[2];
    echo "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t";
}
echo "\t\t\t</table></div>\r\n\t\t\t\t<div style=\"padding-top:43px; padding-left:18px;\">\r\n\t\t\t<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\">\r\n\t\t\t";
$qCharsTop5 = @mssql_query( "SELECT TOP 5 Name, Resets FROM Character WHERE CtlCode=0 ORDER BY Resets desc" );
while ( $CharsTop5 = mssql_fetch_row( $qCharsTop5 ) )
{
    $qVerificaG = @mssql_query( "SELECT G_Name FROM GuildMember WHERE Name='".$CharsTop5[0]."'" );
    $numVerificaG = @mssql_num_rows( $qVerificaG );
    $GuildMark = "0000000000000000000000000000000000000000000000000000000000000000";
    if ( $numVerificaG != 0 )
    {
        $VerificaG = @mssql_fetch_row( $qVerificaG );
        $qMark = @mssql_query( "SELECT G_Mark FROM Guild WHERE G_Name='".$VerificaG[0]."'" );
        $Mark = @mssql_result( $qMark, 0, 0 );
        $GuildMark = bin2hex( $Mark );
    }
    echo "\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"rankchar\" width=\"77\">";
    echo $CharsTop5[0];
    echo "</td>\r\n\t\t\t\t\t<td class=\"rankchar\" width=\"21\" align=\"center\"><img src=\"logo.php?code=";
    echo $GuildMark;
    echo "\" width=\"12\" height=\"12\"></td>\r\n\t\t\t\t\t<td class=\"rankchar\" width=\"38\" align=\"center\">";
    echo $CharsTop5[1];
    echo "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t";
}
echo "\t\t\t</table></div>\r\n\t\t\t<div style=\"padding-top:0px; padding-left:2px;\"><a href=\"http://www.muonlinebr.com/\" target=\"_blank\"><img src=\"images/MUonlineBR.jpg\" border=\"0\"></a></div>\r\n\t\t\t\t\t</td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"16\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_14.jpg\" width=\"190\" height=\"37\" border=\"0\" usemap=\"#Map7\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"37\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_15.jpg\" width=\"190\" height=\"36\" border=\"0\" usemap=\"#Map6\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"36\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_16.jpg\" width=\"190\" height=\"37\" border=\"0\" usemap=\"#Map5\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"37\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_17.jpg\" width=\"190\" height=\"39\" border=\"0\" usemap=\"#Map4\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"39\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_18.jpg\" width=\"190\" height=\"37\" border=\"0\" usemap=\"#Map3\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"37\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_19.jpg\" width=\"190\" height=\"38\" border=\"0\" usemap=\"#Map2\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"38\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td><img src=\"images/index_20.jpg\" width=\"190\" height=\"44\" border=\"0\" usemap=\"#Map\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"44\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td height=\"13\"><img src=\"images/index_21.jpg\" width=\"190\" height=\"13\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"13\"></td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td colspan=\"3\"><img src=\"images/index_22.jpg\" width=\"995\" height=\"12\"></td>\r\n\t\t<td><img src=\"images/spacer.gif\" width=\"1\" height=\"12\"></td>\r\n\t</tr>\r\n</table>\r\n\r\n";
if ( isset( $_SESSION['login_site'] ) )
{
    echo "<map name=\"Map\"><area shape=\"rect\" coords=\"2,7,167,38\" href=\"ver.php?pagina=painel\" target=\"mainsite\"></map>\r\n";
}
else
{
    echo "<map name=\"Map\"><area shape=\"rect\" coords=\"2,7,167,38\" href=\"#\" onClick=\"javascript:alert('É necessário que você estaja logado para usar essa opção.');\"></map>\r\n";
}
echo "<map name=\"Map2\"><area shape=\"rect\" coords=\"16,7,155,30\" href=\"shop/\" target=\"_blank\"></map>\r\n<map name=\"Map3\"><area shape=\"rect\" coords=\"11,8,162,29\" href=\"ver.php?pagina=suporte\" target=\"mainsite\"></map>\r\n<map name=\"Map4\"><area shape=\"rect\" coords=\"32,8,129,31\" href=\"ver.php?pagina=ranking\" target=\"mainsite\"></map>\r\n<map name=\"Map5\"><area shape=\"rect\" coords=\"25,9,137,30\" href=\"ver.php?pagina=noticia\" target=\"mainsite\"></map>\r\n<map name=\"Map6\"><area shape=\"rect\" coords=\"17,6,145,30\" href=\"ver.php?pagina=download\" target=\"mainsite\"></map>\r\n<map name=\"Map7\"><area shape=\"rect\" coords=\"17,5,146,30\" href=\"";
echo $config['comunidade'];
echo "\" target=\"_blank\"></map>\r\n<map name=\"Map8\"><area shape=\"rect\" coords=\"14,4,137,43\" href=\"home.php\" target=\"mainsite\">\r\n\t\t\t\t <area shape=\"circle\" coords=\"153,19,18\" href=\"home.php\" target=\"mainsite\"></map>\r\n<map name=\"Map9\"><area shape=\"rect\" coords=\"11,4,168,34\" href=\"ver.php?pagina=download\" target=\"mainsite\"></map>\r\n<map name=\"Map10\"><area shape=\"rect\" coords=\"79,98,171,115\" href=\"ver.php?pagina=cadastro\" target=\"mainsite\"></map>\r\n<map name=\"Map13\"><area shape=\"rect\" coords=\"165,45,415,84\" href=\"#\"></map>\r\n</body>\r\n</html>";
?>
