Changeset 817 for trunk/img_level.php


Ignore:
Timestamp:
Feb 23, 2015, 12:03:22 AM (10 years ago)
Author:
chronos
Message:
  • Fixed: Regeneration of team level images from admin page.
  • Added: Show link to client version from import table and translation list table.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/img_level.php

    r816 r817  
    77$index_level = 100;
    88$from_diakrit = 3; // higher xp for word with diacritics
    9 $FontFile = 'images/FRIZQT__.ttf';
     9$FontFile = dirname(__FILE__).'/images/FRIZQT__.ttf';
    1010
    1111function CheckDiakrit($Word)
     
    5050  ImageTTFText($Image, 8, 0, 80, 12, $Color3, $FontFile, $xp.'/'.$xp_max.' xp   '.$user);
    5151
    52   if(!file_exists('tmp/'.$prefix.'/')) mkdir('tmp/'.$prefix.'/');
    53   if(!file_exists('tmp/'.$prefix.'/'.$user.'/')) mkdir('tmp/'.$prefix.'/'.$user.'/');
    54   ImagePNG($Image, 'tmp/'.$prefix.'/'.$user.'/level.png');
     52  if(!file_exists(dirname(__FILE__).'/tmp/'.$prefix.'/')) mkdir(dirname(__FILE__).'/tmp/'.$prefix.'/');
     53  if(!file_exists(dirname(__FILE__).'/tmp/'.$prefix.'/'.$user.'/')) mkdir(dirname(__FILE__).'/tmp/'.$prefix.'/'.$user.'/');
     54  ImagePNG($Image, dirname(__FILE__).'/tmp/'.$prefix.'/'.$user.'/level.png');
    5555}
    5656
     
    153153  while($LineUser = $ID->fetch_array())
    154154  {
    155     $Output .= '<img src="tmp/user/'.$LineUser['Name'].'/level.png" /> '.$LineUser['Name'].'<br />';
     155    $Output .= '<img src="'.$System->Link('/tmp/user/'.$LineUser['Name'].'/level.png').'"/> '.$LineUser['Name'].'<br />';
    156156  }
    157157
     
    160160  while($LineTeam = $ID->fetch_array())
    161161  {
    162     $Output .= '<img src="tmp/team/'.$LineTeam['Name'].'/level.png" /> '.$LineTeam['Name'].'<br />';
     162    $Output .= '<img src="'.$System->Link('/tmp/team/'.$LineTeam['Name'].'/level.png').'"/> '.$LineTeam['Name'].'<br />';
    163163  }
    164164  WriteLog('Přegenerovány obrázky úrovní překladatelů a týmů', LOG_TYPE_ADMINISTRATION);
Note: See TracChangeset for help on using the changeset viewer.