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_show.php

    r19428 r26554  
    6060} 
    6161 
    62 foreach (array('image_bg_color','text_color','line_color','noise_color') as $color) 
     62foreach (array('bg_color','text_color','line_color','noise_color') as $color) 
    6363{ 
    6464  if ($conf['cryptographp'][$color] == 'random') $conf['cryptographp'][$color] = randomColor(); 
     
    7575$img->image_height    = $conf['cryptographp']['height']; 
    7676$img->perturbation    = $conf['cryptographp']['perturbation']; 
    77 $img->image_bg_color  = new Securimage_Color('#'.$conf['cryptographp']['image_bg_color']); 
    7877$img->text_color      = new Securimage_Color('#'.$conf['cryptographp']['text_color']);  
    7978$img->num_lines       = $conf['cryptographp']['num_lines']; 
     
    8382$img->code_length     = $conf['cryptographp']['code_length']; 
    8483 
    85 $img->show(); 
    86  
    87 ?> 
     84if ($conf['cryptographp']['background'] == 'image') 
     85{ 
     86  if ($conf['cryptographp']['bg_image'] == 'random') 
     87  { 
     88    $img->background_directory = realpath(CRYPTO_PATH . 'securimage/backgrounds/'); 
     89    $img->show(); 
     90  } 
     91  else 
     92  { 
     93    $img->show(realpath(CRYPTO_PATH . 'securimage/backgrounds/' . $conf['cryptographp']['bg_image'])); 
     94  } 
     95} 
     96else 
     97{ 
     98  $img->image_bg_color  = new Securimage_Color('#'.$conf['cryptographp']['bg_color']); 
     99  $img->show(); 
     100} 
Note: See TracChangeset for help on using the changeset viewer.