Changeset 3444


Ignore:
Timestamp:
10/29/10 17:08:55 (13 years ago)
Author:
amuller
Message:

Ticket #990 - Correção na geração da imagem do Captcha

Location:
branches/2.2
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/templates/default/login_default.php

    r3437 r3444  
    422422            { 
    423423                $aux_captcha = '<div class="login_label" > 
    424                    <img src="./security/captcha.php" title="'.lang('Security code').'" alt="'.lang('Security code').'" style="width:60;"><br/> 
     424                   <img src="./security/captcha.php" title="'.lang('Security code').'" alt="'.lang('Security code').'" style="position:static;"><br/> 
    425425                   <input class="input" type="text" maxlength="50" size="20" name="codigo" id="codigo" value="" > 
    426426                   </div>'; 
  • branches/2.2/security/captcha.php

    r3437 r3444  
    8383      $image       = imagecreate($imagelength, $imageheight); 
    8484      $bgcolor     = imagecolorallocate($image, 146, 176, 212); 
    85       $stringcolor = imagecolorallocate($image, 0, 0, 155); 
     85      $stringcolor = imagecolorallocate($image, 0, rand(0,100), rand(0,155)); 
    8686      $linecolor   = imagecolorallocate($image, 0, 0, 0); 
    87       imagettftext($image, 25, -4, 8, 25, 
     87      imagettftext($image, 20, rand(-4,4),8,30, 
    8888                   $stringcolor, 
    8989                   $this->Font, 
    9090                   $this->CaptchaString); 
    9191      imagecolortransparent($image,$bgcolor); 
     92 
     93 
     94      $src = imagecreatefrompng('captcha_images/img00'.rand(1,4).'.png'); 
     95      imagecopymerge($image, $src, 0, 0, 0, 0, 151, 37, 25); 
     96 
    9297      switch ($this->ImageType) 
    9398      { 
Note: See TracChangeset for help on using the changeset viewer.