function check_code($login_code)
 {
     global $_lang;
     if ($login_code) {
         $img = new Secode_class();
         $login_code = $img->check($login_code, 1);
         if (!$login_code) {
             $this->add_login_time();
             $this->show_msg($_lang['verification_code_input_error'], 7);
         } else {
             return true;
         }
     } else {
         return true;
     }
 }
 static function check_secode($secode)
 {
     global $_lang;
     $img = new Secode_class();
     $res_code = $img->check($secode, 1);
     if (!$res_code) {
         return $_lang['verification_code_input_error'];
     } else {
         return true;
     }
 }
 function check_code($reg_code)
 {
     global $_lang;
     $img = new Secode_class();
     $res_code = $img->check($reg_code, 1);
     if (!$res_code) {
         $this->show_msg($_lang['reg_code_is_error'], 6);
     } else {
         return true;
     }
 }
Exemple #4
0
<?php

$objCaptcha = new Secode_class();
$objCaptcha->use_gd_font = false;
$objCaptcha->text_color = "#3399ff";
$objCaptcha->image_type = 2;
$objCaptcha->text_x_start = 8;
if ($objCaptcha->use_gd_font) {
    $objCaptcha->image_height = 45;
    $objCaptcha->image_width = 175;
    $objCaptcha->gd_font_size = 20;
    $objCaptcha->gd_font_file = realpath(S_ROOT . DIRECTORY_SEPARATOR . "static/img/gdfonts/bubblebath.gdf");
}
$objCaptcha->multi_text_color = "#3399ff,#3300cc,#3333cc,#6666ff";
$objCaptcha->ttf_file = realpath(S_ROOT . DIRECTORY_SEPARATOR . "static/img/gdfonts/elephant.ttf");
$objCaptcha->use_transparent_text = true;
$objCaptcha->show();
die;