Vergleich captcha.php - 1.8.0 - 1.8.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 26Zeile 26
$max_angle = 30;

$mybb->input['imagehash'] = $mybb->get_input('imagehash');

$max_angle = 30;

$mybb->input['imagehash'] = $mybb->get_input('imagehash');

if($mybb->input['imagehash'] == "test")
{
$imagestring = "MyBB";
}
elseif($mybb->input['imagehash'])

if($mybb->input['imagehash'])





{
$query = $db->simple_select("captcha", "*", "imagehash='".$db->escape_string($mybb->get_input('imagehash'))."' AND used=0", array("limit" => 1));
$regimage = $db->fetch_array($query);

{
$query = $db->simple_select("captcha", "*", "imagehash='".$db->escape_string($mybb->get_input('imagehash'))."' AND used=0", array("limit" => 1));
$regimage = $db->fetch_array($query);

Zeile 97Zeile 93
// Fill the background with white
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);

// Fill the background with white
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);





// Draw random circles, squares or lines?
$to_draw = my_rand(0, 2);
if($to_draw == 1)

// Draw random circles, squares or lines?
$to_draw = my_rand(0, 2);
if($to_draw == 1)

Zeile 131Zeile 127
/**
* Draws a random number of lines on the image.
*

/**
* Draws a random number of lines on the image.
*

 * @param resource The image.

 * @param resource $im The image.

 */
function draw_lines(&$im)
{

 */
function draw_lines(&$im)
{

Zeile 141Zeile 137
	{
$color = imagecolorallocate($im, my_rand(150, 255), my_rand(150, 255), my_rand(150, 255));
imageline($im, $i, 0, $i, $img_height, $color);

	{
$color = imagecolorallocate($im, my_rand(150, 255), my_rand(150, 255), my_rand(150, 255));
imageline($im, $i, 0, $i, $img_height, $color);

	}
for($i = 10; $i < $img_height; $i += 10)

	}
for($i = 10; $i < $img_height; $i += 10)

	{
$color = imagecolorallocate($im, my_rand(150, 255), my_rand(150, 255), my_rand(150, 255));
imageline($im, 0, $i, $img_width, $i, $color);

	{
$color = imagecolorallocate($im, my_rand(150, 255), my_rand(150, 255), my_rand(150, 255));
imageline($im, 0, $i, $img_width, $i, $color);

Zeile 152Zeile 148
/**
* Draws a random number of circles on the image.
*

/**
* Draws a random number of circles on the image.
*

 * @param resource The image.

 * @param resource $im The image.

 */
function draw_circles(&$im)
{

 */
function draw_circles(&$im)
{

Zeile 173Zeile 169
/**
* Draws a random number of dots on the image.
*

/**
* Draws a random number of dots on the image.
*

 * @param resource The image.

 * @param resource $im The image.

 */
function draw_dots(&$im)
{

 */
function draw_dots(&$im)
{

Zeile 190Zeile 186
/**
* Draws a random number of squares on the image.
*

/**
* Draws a random number of squares on the image.
*

 * @param resource The image.

 * @param resource $im The image.

 */
function draw_squares(&$im)
{

 */
function draw_squares(&$im)
{

Zeile 212Zeile 208
/**
* Writes text to the image.
*

/**
* Writes text to the image.
*

 * @param resource The image.
* @param string The string to be written



 * @param resource $im The image.
* @param string $string The string to be written
*
* @return bool False if string is empty, true otherwise

 */
function draw_string(&$im, $string)
{

 */
function draw_string(&$im, $string)
{

Zeile 308Zeile 306
			imagedestroy($temp_im);
}
}

			imagedestroy($temp_im);
}
}

 
	return true;

}

}