$c->SetGridColour($verification_settings['grid_color']); if ($verification_settings['char_shadow'] == 'Y') { $c->DisplayShadow(true); } if ($verification_settings['colour'] == 'Y') { $c->UseColour(true); } if ($verification_settings['string_type'] == 'digits') { $c->SetCharSet(array(2, 3, 4, 5, 6, 8, 9)); } elseif ($verification_settings['string_type'] == 'letters') { $c->SetCharSet(range('A', 'F')); } else { $c->SetCharSet(fn_array_merge(range('A', 'F'), array(2, 3, 4, 5, 6, 8, 9), false)); } if (!empty($verification_settings['background_image'])) { $c->SetBackgroundImages(fn_get_files_dir_path() . $verification_settings['background_image']); } $c->Create(); exit; } elseif ($mode == 'custom_image') { if (empty($_REQUEST['image'])) { exit; } $type = empty($_REQUEST['type']) ? 'T' : $_REQUEST['type']; $image_path = 'sess_data/' . fn_basename($_REQUEST['image']); if (Storage::instance('custom_files')->isExist($image_path)) { $real_path = Storage::instance('custom_files')->getAbsolutePath($image_path); list(, , $image_type, $tmp_path) = fn_get_image_size($real_path); if ($type == 'T') { $thumb_path = $image_path . '_thumb'; if (!Storage::instance('custom_files')->isExist($thumb_path)) {
<?php //////////////////////////////////////////////////////////////////////////// // // (c) phpChess Limited, 2004-2006, in association with Goliath Systems. // All rights reserved. Please observe respective copyrights. // phpChess - Chess at its best // you can find us at http://www.phpchess.com. // //////////////////////////////////////////////////////////////////////////// require 'php-captcha.inc.php'; // define fonts $aFonts = array('fonts/VeraBd.ttf'); // create new image $oPhpCaptcha = new PhpCaptcha($aFonts, 150, 30); $oPhpCaptcha->SetBackgroundImages('val.jpg'); $oPhpCaptcha->SetWidth(150); $oPhpCaptcha->SetHeight(30); $oPhpCaptcha->SetNumChars(5); $oPhpCaptcha->SetMinFontSize(10); $oPhpCaptcha->SetMinFontSize(12); $oPhpCaptcha->UseColour(True); $oPhpCaptcha->DisplayShadow(False); $oPhpCaptcha->SetNumLines(250); $oPhpCaptcha->Create();
$c->SetGridColour($verification_settings['grid_color']); if ($verification_settings['char_shadow'] == 'Y') { $c->DisplayShadow(true); } if ($verification_settings['colour'] == 'Y') { $c->UseColour(true); } if ($verification_settings['string_type'] == 'digits') { $c->SetCharSet(array(2, 3, 4, 5, 6, 8, 9)); } elseif ($verification_settings['string_type'] == 'letters') { $c->SetCharSet(range('A', 'F')); } else { $c->SetCharSet(fn_array_merge(range('A', 'F'), array(2, 3, 4, 5, 6, 8, 9), false)); } if (!empty($verification_settings['background_image'])) { $c->SetBackgroundImages(Registry::get('config.dir.root') . '/' . $verification_settings['background_image']); } $c->Create(); exit; } elseif ($mode == 'custom_image') { if (empty($_REQUEST['image'])) { exit; } $type = empty($_REQUEST['type']) ? 'T' : $_REQUEST['type']; $image_path = 'sess_data/' . fn_basename($_REQUEST['image']); if (Storage::instance('custom_files')->isExist($image_path)) { $real_path = Storage::instance('custom_files')->getAbsolutePath($image_path); list(, , $image_type, $tmp_path) = fn_get_image_size($real_path); if ($type == 'T') { $thumb_path = $image_path . '_thumb'; if (!Storage::instance('custom_files')->isExist($thumb_path)) {
$c->SetGridColour($verification_settings['grid_color']); if ($verification_settings['char_shadow'] == 'Y') { $c->DisplayShadow(true); } if ($verification_settings['colour'] == 'Y') { $c->UseColour(true); } if ($verification_settings['string_type'] == 'digits') { $c->SetCharSet(array(2, 3, 4, 5, 6, 8, 9)); } elseif ($verification_settings['string_type'] == 'letters') { $c->SetCharSet(range('A', 'F')); } else { $c->SetCharSet(fn_array_merge(range('A', 'F'), array(2, 3, 4, 5, 6, 8, 9), false)); } if (!empty($verification_settings['background_image'])) { $c->SetBackgroundImages(DIR_ROOT . '/' . $verification_settings['background_image']); } $c->Create(); exit; } elseif ($mode == 'custom_image') { if (empty($_REQUEST['image'])) { exit; } $type = empty($_REQUEST['type']) ? 'T' : $_REQUEST['type']; $image_path = DIR_CUSTOM_FILES . 'sess_data/' . basename($_REQUEST['image']); if (file_exists($image_path)) { $image_info = getimagesize($image_path); if (!empty($image_info)) { if ($type == 'T') { // Output a thumbnail image if (fn_resize_image($image_path, $image_path . '_thumb', Registry::get('settings.Thumbnails.product_lists_thumbnail_width'), Registry::get('settings.Thumbnails.product_lists_thumbnail_height'))) {
<?php /** * CAPTCHA image creator * * @see : http://www.ejeliot.com/pages/2 */ // include captcha class require 'php-captcha.inc.php'; // define fonts $aFonts = array('fonts/VeraSeBd.ttf', 'fonts/VeraSe.ttf', 'fonts/VeraBd.ttf'); // create new image $aPhpCaptcha = new PhpCaptcha($aFonts, 200, 50); $aPhpCaptcha->SetBackgroundImages('images/beach.jpg'); $aPhpCaptcha->UseColour(true); $aPhpCaptcha->SetMinFontSize(12); //$aPhpCaptcha->SetFileType('png'); //$aPhpCaptcha->SetNumChars(6); //$aPhpCaptcha->SetOwnerText('CAPTCHA Code'); $aPhpCaptcha->Create();