Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: captcha.php 5380 2011-02-21 12:04:43Z Tomm $
| * $Id$
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 48 | Zeile 48 |
---|
{ // Get a list of the files in the 'catpcha_fonts' directory $ttfdir = @opendir(MYBB_ROOT."inc/captcha_fonts");
|
{ // Get a list of the files in the 'catpcha_fonts' directory $ttfdir = @opendir(MYBB_ROOT."inc/captcha_fonts");
|
if($ttfdir)
| if($ttfdir !== false)
|
{
|
{
|
while($file = readdir($ttfdir))
| while(($file = readdir($ttfdir)) !== false)
|
{ // If this file is a ttf file, add it to the list if(is_file(MYBB_ROOT."inc/captcha_fonts/".$file) && get_extension($file) == "ttf")
| { // If this file is a ttf file, add it to the list if(is_file(MYBB_ROOT."inc/captcha_fonts/".$file) && get_extension($file) == "ttf")
|
Zeile 58 | Zeile 58 |
---|
$ttf_fonts[] = MYBB_ROOT."inc/captcha_fonts/".$file; } }
|
$ttf_fonts[] = MYBB_ROOT."inc/captcha_fonts/".$file; } }
|
| closedir($ttfdir);
|
} }
| } }
|
Zeile 250 | Zeile 251 |
---|
//$pos_x = $pos_x + $string_width + ($string_width/4); $pos_x = $spacing / 4 + $i * $spacing; $pos_y = ceil(($img_height-$string_height/2));
|
//$pos_x = $pos_x + $string_width + ($string_width/4); $pos_x = $spacing / 4 + $i * $spacing; $pos_y = ceil(($img_height-$string_height/2));
|
if($pos_x + $string_width > $img_width) { $pos_x = $pos_x - ($pos_x - $string_width); }
| |
// Draw a shadow $shadow_x = my_rand(-3, 3) + $pos_x;
| // Draw a shadow $shadow_x = my_rand(-3, 3) + $pos_x;
|