Ignore:
Timestamp:
01/09/14 13:36:32 (6 years ago)
Author:
mistic100
Message:

update Securimage to 3.5.1, new font, new preset, allow to use backgrounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/securimage/securimage_preview.php

    r26041 r26554  
    1515  'height'          => (int)$_GET['height'], 
    1616  'perturbation'    => (float)$_GET['perturbation'], 
    17   'image_bg_color'  => $_GET['image_bg_color'], 
     17  'background'      => $_GET['background'], 
     18  'bg_color'        => $_GET['bg_color'], 
     19  'bg_image'        => $_GET['bg_image'], 
    1820  'code_length'     => (int)$_GET['code_length'], 
    1921  'text_color'      => $_GET['text_color'], 
     
    3840} 
    3941 
    40 foreach (array('image_bg_color','text_color','line_color','noise_color') as $color) 
     42foreach (array('bg_color','text_color','line_color','noise_color') as $color) 
    4143{ 
    4244  if ($temp_conf[$color] == 'random') $temp_conf[$color] = randomColor(); 
     
    5355$img->image_height    = $temp_conf['height']; 
    5456$img->perturbation    = $temp_conf['perturbation']; 
    55 $img->image_bg_color  = new Securimage_Color('#'.$temp_conf['image_bg_color']); 
    5657$img->text_color      = new Securimage_Color('#'.$temp_conf['text_color']);  
    5758$img->num_lines       = $temp_conf['num_lines']; 
     
    6162$img->code_length     = $temp_conf['code_length']; 
    6263 
    63 $img->show(); 
    64  
    65 ?> 
     64if ($temp_conf['background'] == 'image') 
     65{ 
     66  if ($temp_conf['bg_image'] == 'random') 
     67  { 
     68    $img->background_directory = realpath(CRYPTO_PATH . 'securimage/backgrounds/'); 
     69    $img->show(); 
     70  } 
     71  else 
     72  { 
     73    $img->show(realpath(CRYPTO_PATH . 'securimage/backgrounds/' . $temp_conf['bg_image'])); 
     74  } 
     75} 
     76else 
     77{ 
     78  $img->image_bg_color  = new Securimage_Color('#'.$temp_conf['bg_color']); 
     79  $img->show(); 
     80} 
Note: See TracChangeset for help on using the changeset viewer.