Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[PROBLEM]Silnik ezRPG Rejestracja


Rekomendowane odpowiedzi

Opublikowano

Witam mam taki problem gdyz mam silnik ezRPG i w rejestracji niewidze kod z obrazka ss:

beztytuugow.jpg

 

register.php wyglada tak

 

{include file="header.tpl" TITLE="Register"}

 

<h1>Rejestracja</h1>

 

<p>

Zapraszamy do Rejestracji!

</p>

 

<form method="POST" action="index.php?mod=Register">

 

<label>Nick</label>

<input type="text" size="40" name="username"{if $GET_USERNAME != ""} value="{$GET_USERNAME}"{/if} />

 

<label>Haslo</label>

<input type="password" size="40" name="password" />

 

<label>Powtorz Haslo</label>

<input type="password" size="40" name="password2" />

 

<label>E-mail</label>

<input type="text" size="40" name="email"{if $GET_EMAIL != ""} value="{$GET_EMAIL}"{/if} />

 

<label>Powtorz E-mail</label>

<input type="text" size="40" name="email2"{if $GET_EMAIL2 != ""} value="{$GET_EMAIL2}"{/if} />

 

<label>Przepisz KOD z obrazka</label>

<img src="./captcha.php" /><br />

<input type="text" size="40" name="reg_verify" autocomplete="off" />

 

<br />

<input name="register" type="submit" value="Rejestruj !" class="button" />

</form>

 

{include file="footer.tpl"}

 

i jeszcze captcha.php

 

<?php

define('IN_EZRPG', true);

 

require_once('init.php');

 

//$code_length = rand(5,6);

$code_length = 4;

$rand_start = mt_rand(0, 250);

$font = 'static/fonts/Capture_it.ttf';

$fontSize = 30;

$padding = 10;

 

$l1 = strtoupper(createKey(1, 1));

$l2 = strtoupper(createKey(1, 1));

$l3 = strtoupper(createKey(1, 1));

$l4 = strtoupper(createKey(1, 1));

$verify_string = $l1 . ' ' . $l2 . ' ' . $l3 . ' ' . $l4;

$real_string = $l1 . $l2 . $l3 . $l4;

$verify_code = sha1(strtoupper($real_string) . SECRET_KEY);

 

$_SESSION['verify_code'] = $verify_code;

 

function makeRBGColor($color, $image)

{

$color = str_replace("#", "", $color);

$red = hexdec(substr($color, 0, 2));

$green = hexdec(substr($color, 2, 2));

$blue = hexdec(substr($color, 4, 2));

$out = ImageColorAllocate($image, $red, $green, $blue);

return $out;

}

 

$wordBox = imageftbbox($fontSize, 0, $font, $verify_string);

 

$wordBoxWidth = $wordBox[2];

$wordBoxHeight = $wordBox[1] + abs($wordBox[7]);

 

$containerWidth = $wordBoxWidth + ($padding * 2);

$containerHeight = $wordBoxHeight + ($padding * 2);

 

$textX = $padding;

$textY = $containerHeight - $padding;

 

$captchaImage = imagecreate($containerWidth, $containerHeight);

 

$red = randColor();

$green = randColor();

$blue = randColor();

$backgroundColor = ImageColorAllocate($captchaImage, $red, $green, $blue);

 

$rred = 255-$red;

$rgreen = 255-$green;

$rblue = 255-$blue;

$textColor = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);

 

imagefttext($captchaImage, $fontSize, 0, $textX, $textY, $textColor, $font, $verify_string);

 

$angle = mt_rand(-3, 3);

$captchaImage = imagerotate($captchaImage, $angle, $backgroundColor);

 

 

$line = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);

 

for($i = 0; $i < 10; $i++)

{

$xStart = mt_rand(0, $containerWidth);

$yStart = mt_rand(0, $containerHeight);

$xEnd = mt_rand(0, $containerWidth);

$yEnd = mt_rand(0, $containerHeight);

imageline($captchaImage, $xStart, $yStart, $xEnd, $yEnd, $line);

}

 

 

imagefilter($captchaImage, IMG_FILTER_CONTRAST, 1);

//imagefilter($captchaImage, IMG_FILTER_BRIGHTNESS, 10);

 

//imagefilter($captchaImage, IMG_FILTER_EDGEDETECT);

imagefilter($captchaImage, IMG_FILTER_GAUSSIAN_BLUR);

 

header('Content-Type:image/png');

ImagePNG($captchaImage);

?>

 

 

PROSZE O POMOC ;( JAK NAJSZYBCIEJ 5+ za odp.

beztytuurpe.jpg

Opublikowano

O ile dobrze pamiętam błąd powodował włączony DEBUG_MODE, wystarczy przestawić wartość na 0.

Dodatkowo sprawdź czy masz zainstalowaną bibliotekę GD.

Jeżeli dalej nie będzie niczego zwracać dodaj do captchy

 

error_reporting(E_ALL);

ini_set('display_errors',1);

  • 10 miesięcy temu...
Opublikowano · Ukryte przez Coming, 8 Stycznia 2013 - reklama
Ukryte przez Coming, 8 Stycznia 2013 - reklama

Although it shields a person from prosecution for State and on in Medical government but a didnt firstly prescribed by your doctor. portable vaporizers 420 College has always been informing marijuana patient medical users; associated with medical marijuana consultation references.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...