|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Functions | |
| get_random_color ($val1=0, $val2=255) | |
Variables | |
| $id = required_param('id', PARAM_INT) | |
| if($id) if(!isset($SESSION-> feedback->item->captcha)) | $height = 40 |
| $charcount = $SESSION->feedback->item->captcha->charcount | |
| $fontfile = $CFG->libdir.'/default.ttf' | |
| $ttfbox = imagettfbbox ( 30, 0, $fontfile, 'H' ) | |
| $charwidth = $ttfbox[2] | |
| $width = $charcount * $charwidth | |
| $scale = 0.3 | |
| $elipsesize = intval((($width + $height)/2) / 5) | |
| $factor_x = intval($width * $scale) | |
| $factor_y = intval($height * $scale) | |
| $colors = array(array(0, 40), array(50, 200), array(210, 255)) | |
| $textcolnum = rand(1, 3) | |
| $nums = array() | |
| for($i=0;$i< $charcount;$i++) | $properties = array() |
| $image = imagecreatetruecolor($width, $height) | |
| $bg = imagecolorallocate($image, 0, 0, 0) | |
| for($i=0;$i< ($factor_x *$factor_y);$i++ | $checkchar ) = '' |
| for($i=0;$i< $charcount;$i++) $SESSION feedback item captcha | checkchar = $checkchar |
| get_random_color | ( | $ | val1 = 0, |
| $ | val2 = 255 |
||
| ) |
Definition at line 119 of file print_captcha.php.
| $bg = imagecolorallocate($image, 0, 0, 0) |
Definition at line 89 of file print_captcha.php.
| $charcount = $SESSION->feedback->item->captcha->charcount |
Definition at line 42 of file print_captcha.php.
| $charwidth = $ttfbox[2] |
Definition at line 46 of file print_captcha.php.
| for ($i=0;$i< ($factor_x *$factor_y);$i++ $checkchar) = '' |
Definition at line 98 of file print_captcha.php.
Definition at line 57 of file print_captcha.php.
| $elipsesize = intval((($width + $height)/2) / 5) |
Definition at line 51 of file print_captcha.php.
| $factor_x = intval($width * $scale) |
Definition at line 52 of file print_captcha.php.
| $factor_y = intval($height * $scale) |
Definition at line 53 of file print_captcha.php.
| $fontfile = $CFG->libdir.'/default.ttf' |
Definition at line 43 of file print_captcha.php.
Definition at line 41 of file print_captcha.php.
| $id = required_param('id', PARAM_INT) |
Definition at line 19 of file print_captcha.php.
| $image = imagecreatetruecolor($width, $height) |
Definition at line 88 of file print_captcha.php.
| $nums = array() |
Definition at line 66 of file print_captcha.php.
| for ($i=0;$i< $charcount;$i++) $properties = array() |
Definition at line 73 of file print_captcha.php.
| $scale = 0.3 |
Definition at line 50 of file print_captcha.php.
| $textcolnum = rand(1, 3) |
Definition at line 63 of file print_captcha.php.
| $ttfbox = imagettfbbox ( 30, 0, $fontfile, 'H' ) |
Definition at line 45 of file print_captcha.php.
| $width = $charcount * $charwidth |
Definition at line 48 of file print_captcha.php.
Definition at line 113 of file print_captcha.php.