antiblock
Rodnia | Alpha & Omega

szucs2014

Membro
  • Content Count

    17
  • Joined

  • Last visited

Posts posted by szucs2014


  1. Olá coloquei meu site no cpanel dedicado só que o captcha não funciona ele nao aparece.

     

    Codigo do arquivo redefinir senha.

    <div id="con-top">Password</div><div id="con-mid"><?PHP  if(isset($_POST['sfform']) && $_POST['sfform']=="reset") {      if(!empty($_POST['account']) && !empty($_POST['sicherheitsf']) && !empty($_POST['sicherheitsa'])) {        $acc = mysql_real_escape_string($_POST['account']);      $frage = mysql_real_escape_string($_POST['sicherheitsf']);      $antwort = mysql_real_escape_string(md5($_POST['sicherheitsa']));            $sqlCmd = "SELECT id FROM account.account WHERE login='".$acc."' AND question1='".$frage."' AND answer1='".$antwort."' LIMIT 1";      $sqlQry = mysql_query($sqlCmd,$sqlServ);            if(mysql_num_rows($sqlQry)>0) {                $newPass = substr(md5(rand(999,99999)),0,8);        $setPass = "UPDATE account.account SET password=PASSWORD('".$newPass."') WHERE login='".$acc."' LIMIT 1";        $qryPass = mysql_query($setPass);                if($qryPass) {          echo'<p class="meldung">Sua senha foi definida com sucesso. <br/> A nova senha para a conta <b>'.$acc.'</b> é: <b>'.$newPass.'</b>.<br/><br/>Bom Jogo.</p>';        }        else {          echo'<p class="meldung">A nova senha não pôde ser definida.</p>';        }              }          }    else {      echo'<p class="meldung">Falta de dados...</p>';    }      }    if(isset($_POST['emailreset']) && $_POST['emailreset']=="reset") {        if(!empty($_POST['account']) && checkMail($_POST['email']) && $_SESSION["captcha_id"] == $_POST['captcha']) {            $acc = mysql_real_escape_string($_POST['account']);      $email = mysql_real_escape_string($_POST['email']);      $newPass = substr(md5(rand(999,99999)),0,8);            $getUser = "SELECT id FROM account.account WHERE login='".$acc."' AND email='".$email."' LIMIT 1";      $qryUser = mysql_query($getUser);            if(mysql_num_rows($qryUser)>0) {              $setPass = "UPDATE account.account SET password=PASSWORD('".$newPass."') WHERE login='".$acc."' LIMIT 1";        $qryPass = mysql_query($setPass);                if($qryPass) {          echo'<p class="meldung">Sua senha foi definida com sucesso. Você receberá um e-mail com a nova senha.</p>';                    $absender = $serverSettings['titel']." Passwortservice";          $email = $serverSettings['pass_mail'];          $empfaenger = $_POST['email'];          $mail_body = "Hallo,          Dein Passwort wurde erfolgreich zurückgesetzt.                    Conta: ".$acc."          Nova Password: ".$newPass."                    Aproveite o jogo,                    ".$serverSettings['titel']."-Equipa                              Este e-mail é gerado automaticamente. Por favor, enviar respostas para este endereço.";          $titel = "Passwort auf ".$serverSettings['titel'];                    $header .= "X-Priority: 3n";          $header .= "X-Mailer: mtVision Homepage Mailern";          $header .= "MIME-Version: 1.0n";          $header .= "From: ".$absender." <".$serverSettings['pass_mail'].">n";          $header .= "Reply-To: ".$serverSettings['pass_mail']."n";          //$header .= "Content-Transfer-Encoding: 8bitn";           $header .= "Content-Type: text/plain; charset=iso-8859-1n";                    if(!mail($empfaenger, $titel, $mail_body, $header)) {            echo'<p class="meldung">Erro com o servidor de correio: Por favor entre em contato o mais breve possível um administrador!</p>';          }                  }        else {          echo'<p class="meldung">A nova senha não pôde ser definida.</p>';        }              }      else {        echo'<p class="meldung">Tenta outra vez.</p>';      }          }    else {      echo'<p class="meldung">Tenta outra vez.</p>';    }      }?><div>  <h3>Repor por questão de segurança:</h3>  <p>.</p>  <form action="index.php?s=lostpw" method="POST">    <table>      <tr>        <th class="topLine">Account:</th>        <td class="tdunkel"><input type="text" name="account" size="16" maxlength="16"/></td>      </tr>      <tr>        <th class="topLine">Pergunta de segurança:</th>        <td class="thell">          <select name="sicherheitsf">            <?PHP              foreach($sFrage AS $fragew => $frage) {                echo'<option value="'.$fragew.'">'.$frage.'</option>';              }            ?>          </select>        </td>      </tr>      <tr>        <th class="topLine">Resposta:</th>        <td class="tdunkel"><input type="text" name="sicherheitsa" size="16" maxlength="16"/></td>      </tr>      <tr>        <th class="topLine" colspan="2" style="text-align:center;"><input type="submit" name="sfform" value="reset"/></th>      </tr>    </table>  </form></div><br/><br/><div>  <h3>Redefinir e-mail</h3>  <p>Esta função irá enviar para o seu e-mail uma nova senha. O pré-requisito é que o e-mail cadastrado esteja correto.</p>  <form action="index.php?s=lostpw" method="POST">    <table>      <tr>        <th class="topLine">Account:</th>        <td class="tdunkel"><input type="text" name="account" size="16" maxlength="16"/></td>      </tr>      <tr>        <th class="topLine">E-Mail:</th>        <td class="tdunkel"><input type="text" name="email" size="25" maxlength="25"/></td>      </tr>      <tr>        <th class="topLine">Captcha:</th>        <td class="tdunkel"><input type="text" name="captcha" size="10" maxlength="5"/><br/><img src="./captcha/captcha.php" alt="captcha" title="captcha"/></td>      </tr>      <tr>        <th colspan="2" class="topLine" style="text-align:center;"><input type="submit" name="emailreset" value="reset"/></th>      </tr>    </table>  </form></div></div><div id="con-bot"></div>

    Codigo do arquivo captcha.php

    <?PHP  session_name("m2hp");  session_start();    header("Content-Type: image/png");                                // Sets the Content of this file to an PNG-Image    $ttf = "./franconi.ttf";                                          //Schriftart     $_SESSION["captcha_id"] = "";                                     // Clears the old value    $zufallszahl = mt_rand(50000,60000);                              // Generates a random number between 50000 and 60000    $_SESSION["captcha_id"] = $zufallszahl;                           // Sets the value of the session    $bild = imagecreatefromgif("bg.gif");                             // Creates a new image from background file    $weisser = imagecolorallocate($bild, 255, 255, 255);              // Sets white text color    imagettftext($bild, 11, 10, 5, 20, $weisser, $ttf, $_SESSION["captcha_id"]);   //imagestring($bild, 3, 8, 6,  $_SESSION["captcha_id"], $weisser);  // Prints the random number von the image    ImagePNG($bild);                                                  // Output for the generated image?> 

    Obrigado +1


  2. Olá coloquei o site metin2 no cpanel mas tem um problema na pagina de registro o captcha não aparece me ajudem +1

    Imagem colocada

     

    Código: 

     

    <h2>Registro</h2>

    </div>

    <div id="left_content">

    <?PHP

    $regCoins = 0; // Startcoins

    $laufZeit = 365; //Tage autoloot,safebox

    $calcLZ = (60*60*24)*365;

    $expireStamp = time()+$calcLZ;

    $expireDate = date("Y-m-d H:i:s",$expireStamp);

    if($serverSettings['register_on'] && (!isset($_SESSION['user_admin']) && !checkInt($_SESSION['user_admin']) && !$_SESSION['user_admin']>=0)) {

    if(isset($_POST['submit']) && $_POST['submit']=="registrieren") {

    if((checkAnum($_POST['account']) && strlen($_POST['account'])>=8 && strlen($_POST['account'])<=16) && checkAnum($_POST['pass']) && strlen($_POST['pass'])>=8 && strlen($_POST['pass2'])<=16 && !empty($_POST['pass2']) && (checkName($_POST['uname']) && strlen($_POST['uname'])>=3 && strlen($_POST['uname'])<=20) && $_POST['pass']==$_POST['pass2'] && checkMail($_POST['email']) && strlen($_POST['email'])<=40 && $_POST['captcha']==$_SESSION['captcha_id'] && $_POST['email']==$_POST['email2'] && (checkAnum($_POST['sicherheitsa']) && strlen($_POST['sicherheitsa'])>=3 && strlen($_POST['sicherheitsa'])<=16) && checkInt($_POST['sicherheitsf']) && (checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7)) {

    if(isset($_POST['agb'])) {

    $hashSF = md5($_POST['sicherheitsa']);

    $sfNum = mysql_real_escape_string($_POST['sicherheitsf']);

    $lcode = mysql_real_escape_string($_POST['loeschcode']);

    $zuFall = rand(99999,999999999);

    $userpass=mysql_real_escape_string($_POST['pass']);

    $aktivHash = ($serverSettings['mail_activation']) ? md5($zuFall):'';

    $accountStatus = ($serverSettings['mail_activation']) ? 'BLOCK':'OK';

    $sqlCmd = "INSERT INTO account.account

    (login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert)

    VALUES

    ('".$_POST['account']."',PASSWORD('".$userpass."'),'".mysql_real_escape_string($_POST['uname'])."','".mysql_real_escape_string($_POST['email'])."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','".$accountStatus."','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')";

    $sqlQry = mysql_query($sqlCmd,$sqlServ);

    if($sqlQry) {

    $absender = $serverSettings['titel']." Registration";

    $email = $serverSettings['reg_mail'];

    $empfaenger = $_POST['email'];

    $mail_body = "Hallo ".$_POST['uname'].",

    A sua inscricao na ".$serverSettings['titel']." foi um sucesso! Para jogar no servidor, voce tem que ativar a sua conta.

    Voce pode fazer isso atraves do seguinte link:

    ".$serverSettings['url']."/index.php?s=login&do=aktivieren&hash=".$aktivHash."

    Seus dados sao:

    Sua Conta: ".$_POST['account']."

    Senha: ".$userpass."

    Senha Apagar Char: ".$lcode."

    Pergunta Secreta: ".$sFrage[$sfNum]."

    Resposta: ".$_POST['sicherheitsa']."

    Divirta-se a jogar,

    Seu ".$serverSettings['titel']."-Team

    Este endereco de e-mail foi gerado automaticamente. Por favor nao envie respostas para este endereco";

    $titel = "Registro ".$serverSettings['titel'];

    $header = "X-Priority: 3n";

    $header .= "X-Mailer: ".$serverSettings['titel']." Homepage Mailern";

    $header .= "MIME-Version: 1.0n";

    $header .= "From: ".$absender." <".$serverSettings['reg_mail'].">n";

    $header .= "Reply-To: ".$serverSettings['reg_mail']."n";

    $header .= "Content-Type: text/plain; charset=iso-8859-1n";

    if($serverSettings['mail_activation']) {

    mail($empfaenger, $titel, $mail_body, $header);

    echo'<p class="meldung">Conta criar com sucesso por favor verifique o E-Mail.</p>';

    }

    else {

    echo'<p class="meldung">Conta criada com sucesso., voce pode logar agora.</p>';

    }

    }

    else {

    echo'<p class="meldung">Registo falhou: A conta ja existe.</p>';

    }

    }

    else {

    echo 'Eu li e aceito os <a href="?s=agb">Termos de Uso</a>';

    }

    }

    else {

    echo'<p class="meldung">Registro falhou: especifique todos os campos corretamente</p>';

    }

    }

    ?>

    <p>Todos os campos sao de preenchimento obrigatorio e deve ser concluido.<?PHP if($serverSettings['mail_activation']) { echo'<br/><b>A conta sera ativada por e-mail, assim que entrar em um e-mail correto!</b>'; } ?></p>

    <form action="index.php?s=register" method="POST">

    <table>

    <tr>

    <th class="topLine">Login:</th>

    <td class="tdunkel"><input class="bar" type="text" name="account" maxlength="16" size="16"/> 8-16 Caracteres (Num a-Z,0-9)</td>

    </tr>

    <tr>

    <th class="topLine">Nome:</th>

    <td class="thell"><input class="bar" type="text" name="uname" maxlength="16" size="16"/> 3-20 Caracteres (Num a-Z,0-9)</td>

    </tr>

    <tr>

    <th class="topLine">Senha:</th>

    <td class="tdunkel"><input class="bar" type="password" name="pass" maxlength="16" size="16"/> 8-16 Caracteres (Num a-Z,0-9)</td>

    </tr>

    <tr>

    <th class="topLine">Repita Senha:</th>

    <td class="thell"><input class="bar" type="password" name="pass2" maxlength="16" size="16"/> Repita Senha</td>

    </tr>

    <tr>

    <th class="topLine">E-Mail:</th>

    <td class="tdunkel"><input class="bar" type="text" name="email" maxlength="50" size="25"/> Max. 40 Caracteres </td>

    </tr>

    <tr>

    <th class="topLine">Repita E-Mail:</th>

    <td class="thell"><input class="bar" type="text" name="email2" maxlength="50" size="25"/> Repita E-Mail </td>

    </tr>

    <tr>

    <th class="topLine">Senha Apagar Char:</th>

    <td class="tdunkel"><input class="bar" type="text" name="loeschcode" maxlength="7" size="7"/> 7 Caracteres (Num a-Z,0-9)</td>

    </tr>

    <tr>

    <th class="topLine">Pergunta Secreta:</th>

    <td class="thell">

    <select name="sicherheitsf">

    <?PHP

    foreach($sFrage AS $fragew => $frage) {

    echo'<option value="'.$fragew.'">'.$frage.'</option>';

    }

    ?>

    </select>

    </td>

    </tr>

    <tr>

    <th>Resposta Secreta:</th>

    <td><input type="text" class="bar" name="sicherheitsa" maxlength="16" size="16"/> 3-16 Caracteres (Num a-Z,0-9)</td>

    </tr>

    <tr>

    <th class="topLine">Captcha:</th>

    <td class="tdunkel"><img src="./captcha/captcha.php" title="Captcha"/> <input class="bar" type="text" name="captcha" maxlength="5" size="5"/></td>

    </tr>

    <tr>

    <th></th>

    <td><input type="checkbox" name="agb" /> Eu li e aceito os <a href="?s=agb">Termos de Uso</a> </td>

    </tr>

    <tr>

    <th class="topLine" style="text-align:center;" colspan="2"><input type="submit" class="btn" name="submit" value="Registrar"/> <input type="reset" class="btn" value="Resetar"/></th>

    </tr>

    </table>

    </form>

    <?PHP

    }

    else {

    echo'<p class="meldung">O registro esta desativado ou você ja esta registrado. Nao pode haver outra conta ser criada.</p>';

    }

    ?> 

     

    Obrigado  +1