Ignore:
Timestamp:
Mar 31, 2010, 9:11:05 PM (14 years ago)
Author:
george
Message:
  • Přidáno: Záložka Statistika v exportu zobrazující stav dokončení exportu.
  • Upraveno: Zobrazení celkového stavu dokončení překladu přepracováno na standardní tabulku se zobrazením procent dokončení.
  • Upraveno: Zobrazení úrovně a zkušeností ve zobrazení překladatelů se nyní zobrazuje pomocí HTML procent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global_function.php

    r399 r410  
    502502      {
    503503        if (strpos($ArrStr[$i],"'s") > 0)
    504                    $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-2);
     504       $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-2);
    505505        if (strpos($ArrStr[$i],',') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1);
    506506        if (strpos($ArrStr[$i],'.') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1);
     
    511511          $where .= '(`O`.`'.$Column.'` LIKE "%'.addslashes($ArrStr[$i]).'%") OR ';
    512512          $SqlOK = true;
    513             }
     513      }
    514514      }
    515515      $where = substr($where,0,strlen($where)-4);
     
    519519    //  echo ($sql.'|'.$where.'|'.$groupby);
    520520        while($Line = mysql_fetch_assoc($ID)) {
    521               $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']);
     521        $buff[] = array($Line['ID'],GetIDbyName($Table),$Line[$Column],$Line['Tran']);
    522522        }
    523           }
     523    }
    524524    }
    525525  }
    526526    return $buff;
    527527}
     528
     529function ProgressBar($Width, $Percent, $Text = '')
     530{
     531  $Pixels = $Width * ($Percent / 100);
     532  if($Pixels > $Width) $Pixels = $Width;
     533  if($Text == '') $Text = $Percent;
     534 
     535  return('<div class="progressbar" style="width: '.$Width.'px">'.
     536    '<div class="bar" style="width: '.$Pixels.'px;"></div>'. 
     537    '<div class="text" style="width: '.$Width.'px">'.$Text.'</div>'. 
     538    '</div>');
     539}
     540
     541function GetLevelMinMax($XP)
     542{
     543  $IndexLevel = 100;
     544 
     545  if($XP > 0) $Level = floor(sqrt($XP / $IndexLevel));
     546    else $Level = 0;
     547  $MinXP = $Level * $Level * $IndexLevel;
     548  $MaxXP = ($Level + 1) * ($Level + 1) * $IndexLevel;
     549  $MaxXP = $MaxXP - $MinXP;
     550  $XP = $XP - $MinXP;
     551  return(array('Level' => $Level, 'XP' => $XP, 'MaxXP' => $MaxXP));
     552}
     553
    528554?>
Note: See TracChangeset for help on using the changeset viewer.