<?php
//========================================================================================================================
/**
 * CAPTCHA処理
 *
 * @package     LabbitBox
 * @subpackage  LB_Auth
 * @author      minotaur <minotaur@labbitbox.org>
 * @since       2011/08/24
 */
//========================================================================================================================
require_once(BASE_LIB.'/Model.php');
class LB_Auth_CAPTCHA_M extends Model {

    /**
     * get CAPTCHA
     *
     * 
     */
    public function getCaptchaImage(){
        $siDir = realpath(dirname(__FILE__).'/../../plugin/securimage');
        require_once("$siDir/securimage.php");
        $si = new securimage();
        $si->image_bg_color = new Securimage_Color("#ffffcc");
        $si->ttf_file       = "$siDir/arial.ttf";
        $si->image_width    = 120;
        $si->image_height   = 60;
        $si->perturbation   = 0.7;
        $si->code_length    = 5;
        $si->font_size      = 10;
        $si->charset        = '0123456789';
        $si->use_transparent_text = false;
        $si->use_multi_text = false;
        $si->draw_lines_over_text = false;
        $si->text_transparency_percentage = 75; // 100 = completely transparent
        $si->num_lines      = 15;
        $si->image_signature= '';
        $si->text_color     = new Securimage_Color("#006633");
        $si->line_color     = new Securimage_Color("#cc9966");
        $si->show();
    }



}
?>
