Changeset 826 for trunk/admin


Ignore:
Timestamp:
Mar 1, 2015, 3:38:19 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Removed generation of user level to images as files. Level images ware replaced by HTML progress bar.
  • Modified: User XP level and translated count is now calculated during every translation save operation rather then calculated in user list and group view page show.
  • Fixed: Wrong indentation in some files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r817 r826  
    33$InitSystem = true;
    44include_once('../includes/global.php');
    5 include_once('../img_level.php');
    65
    76class PageAdmin extends Page
     
    267266}
    268267
     268  function ImgLevelShow()
     269  {
     270    global $System;
     271
     272    // Do update for all users
     273    $System->Database->query('UPDATE `User` SET `NeedUpdate` = 1');
     274    ImgLevelUpdate();
     275
     276    $Output = '<strong>Uživatelé</strong><br/>';
     277    $ID = $System->Database->query('SELECT `ID`, `Name` FROM `User`');
     278    while($LineUser = $ID->fetch_array())
     279    {
     280      $Output .= '<img src="'.$System->Link('/tmp/user/'.$LineUser['Name'].'/level.png').'"/> '.$LineUser['Name'].'<br />';
     281    }
     282
     283    $Output .= '<br/><strong>Týmy</strong><br/>';
     284    $ID = $System->Database->query('SELECT `ID`, `Name` FROM `Team`');
     285    while($LineTeam = $ID->fetch_array())
     286    {
     287      $Output .= '<img src="'.$System->Link('/tmp/team/'.$LineTeam['Name'].'/level.png').'"/> '.$LineTeam['Name'].'<br />';
     288    }
     289    WriteLog('Přegenerovány obrázky úrovní překladatelů a týmů', LOG_TYPE_ADMINISTRATION);
     290    return($Output);
     291  }
     292
     293
    269294  function ShowLocale()
    270295  {
     
    289314      if(array_key_exists('action', $_GET))
    290315      {
    291         if($_GET['action'] == 'img_level') $Output .= ImgLevelShow();
     316        if($_GET['action'] == 'img_level') $Output .= $this->ImgLevelShow();
    292317        else if($_GET['action'] == 'error') $Output .= $this->TestError(12, 'test');
    293318        else if($_GET['action'] == 'exception') $Output .= $this->TestException(12, 'test');
Note: See TracChangeset for help on using the changeset viewer.