Vergleich captcha.php - 1.2.2 - 1.2.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: captcha.php 2217 2006-09-12 00:42:49Z Tikitiki $

 * $Id: captcha.php 3595 2008-01-09 00:10:57Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 28Zeile 28
{
$imagestring = "MyBB";
}

{
$imagestring = "MyBB";
}

else
{
$query = $db->simple_select(TABLE_PREFIX."captcha", "*", "imagehash='".$db->escape_string($mybb->input['imagehash'])."'", array("limit" => 1));

elseif($mybb->input['imagehash'])
{
$query = $db->simple_select(TABLE_PREFIX."captcha", "*", "imagehash='".$db->escape_string(strval($mybb->input['imagehash']))."'", array("limit" => 1));

	$regimage = $db->fetch_array($query);
$imagestring = $regimage['imagestring'];

	$regimage = $db->fetch_array($query);
$imagestring = $regimage['imagestring'];

 
}
else
{
return false;

}

$ttf_fonts = array();

}

$ttf_fonts = array();

Zeile 73Zeile 77
else
{
$im = imagecreate($img_width, $img_height);

else
{
$im = imagecreate($img_width, $img_height);

}

}


// No GD support, die.
if(!$im)


// No GD support, die.
if(!$im)

Zeile 139Zeile 143

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


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

 *

 *

 * @param resource The image.
*/
function draw_circles(&$im)

 * @param resource The image.
*/
function draw_circles(&$im)

Zeile 160Zeile 164

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


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

 *
* @param resource The image.

 *
* @param resource The image.

 */
function draw_dots(&$im)

 */
function draw_dots(&$im)

{

{

	global $img_width, $img_height;

$dot_count = $img_width*$img_height/5;

	global $img_width, $img_height;

$dot_count = $img_width*$img_height/5;

Zeile 183Zeile 187
function draw_squares(&$im)
{
global $img_width, $img_height;

function draw_squares(&$im)
{
global $img_width, $img_height;

	

	

	$square_count = 30;
for($i = 0; $i <= $square_count; $i++)

	$square_count = 30;
for($i = 0; $i <= $square_count; $i++)

	{

	{

		$color = imagecolorallocate($im, rand(150, 255), rand(150, 255), rand(150, 255));
$pos_x = rand(1, $img_width);
$pos_y = rand(1, $img_height);

		$color = imagecolorallocate($im, rand(150, 255), rand(150, 255), rand(150, 255));
$pos_x = rand(1, $img_width);
$pos_y = rand(1, $img_height);

Zeile 194Zeile 198
		$pos_x2 = $pos_x + $sq_height;
$pos_y2 = $pos_y + $sq_width;
imagefilledrectangle($im, $pos_x, $pos_y, $pos_x2, $pos_y2, $color);

		$pos_x2 = $pos_x + $sq_height;
$pos_y2 = $pos_y + $sq_width;
imagefilledrectangle($im, $pos_x, $pos_y, $pos_x2, $pos_y2, $color);

	}

	}

}

/**

}

/**

Zeile 206Zeile 210
function draw_string(&$im, $string)
{
global $use_ttf, $min_size, $max_size, $min_angle, $max_angle, $ttf_fonts, $img_height, $img_width;

function draw_string(&$im, $string)
{
global $use_ttf, $min_size, $max_size, $min_angle, $max_angle, $ttf_fonts, $img_height, $img_width;

 
	
if(empty($string))
{
return false;
}

	
$spacing = $img_width / my_strlen($string);
$string_length = my_strlen($string);

	
$spacing = $img_width / my_strlen($string);
$string_length = my_strlen($string);