Changeset 289


Ignore:
Timestamp:
Dec 23, 2009, 9:03:16 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazení obrázku statistiky dokončení překladové skupiny pro neexistujícího uživatele.
  • Opraveno: Používat absolutní cestu pro obrázky šipek řezení tabulek.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/img_statistic.php

    r286 r289  
    1010if(array_key_exists('team', $_GET))
    1111{
    12   $team = ' AND `User` IN (SELECT `ID` FROM `user` WHERE `team` = '.$_GET['team'].')';
     12  $team = ' AND `User` IN (SELECT `ID` FROM `user` WHERE `team` = '.($_GET['team'] * 1).')';
    1313} else $team = '';
     14
    1415if(array_key_exists('language', $_GET))
    1516{
    1617  $language = ' AND `Language` = '.$_GET['language'].'';
    1718} else $language = '';
     19
    1820if(array_key_exists('user', $_GET))
    1921{
    20   $DbResult = $Database->SQLCommand('SELECT `user`,`ExportSetting` FROM `user` WHERE ID='.$_GET['user']);
    21   $User = mysql_fetch_assoc($DbResult);
    22   $ExportSetting = unserialize($User['ExportSetting']);
    23   $SelectedUsers = '';
    24   foreach($ExportSetting['users-selection'] as $Item)
    25     $SelectedUsers .= ','.$Item;
    26   $SelectedUsers = substr($SelectedUsers, 1);
    27   $user_sql = ' AND `User` IN ('.$SelectedUsers.')';
     22  $DbResult = $Database->SQLCommand('SELECT `user`,`ExportSetting` FROM `user` WHERE ID='.($_GET['user'] * 1));
     23  if(mysql_num_rows($DbResult) > 0)
     24  {
     25    $User = mysql_fetch_assoc($DbResult);
     26    $ExportSetting = unserialize($User['ExportSetting']);
     27    $SelectedUsers = '';
     28    foreach($ExportSetting['users-selection'] as $Item)
     29      $SelectedUsers .= ','.$Item;
     30    $SelectedUsers = substr($SelectedUsers, 1);
     31    $user_sql = ' AND `User` IN ('.$SelectedUsers.')';
     32  } else $user_sql = '';
    2833} else $user_sql = '';
     34
    2935
    3036$ID = mysql_fetch_row($Database->SQLCommand('SELECT MAX(`VersionEnd`) FROM '.$Group['TablePrefix']));
  • trunk/includes/error.php

    r288 r289  
    3636    foreach($Backtrace as $Item)
    3737    {
    38       print_r($Item);
    39       $Error .= ' '.$Item['file'].'('.$Item['line'].")\t".$Item['function'];
     38      //print_r($Item);
     39      if(array_key_exists('line', $Item))
     40        $Error .= ' '.$Item['file'].'('.$Item['line'].")\t".$Item['function'];
     41      else $Error .= ' '.$Item['file']."\t".$Item['function'];
    4042      $Arguments = '';
    4143      if(array_key_exists('args', $Item) and is_array($Item['args']))
  • trunk/includes/global.php

    r286 r289  
    246246
    247247  //záznam o aktivitě
    248   if(Licence(0)) $Database->SQLCommand('UPDATE user SET LastIP = "'.$_SERVER['REMOTE_ADDR'].'", LastLogin = NOW() WHERE ID = '.$_SESSION['UserID']);
     248  if(Licence(0) and array_key_exists('REMOTE_ADDR', $_SERVER))
     249    $Database->SQLCommand('UPDATE user SET LastIP = "'.$_SERVER['REMOTE_ADDR'].'", LastLogin = NOW() WHERE ID = '.$_SESSION['UserID']);
    249250
    250251  echo('<table class="page"><tr><td class="menu">');
  • trunk/includes/global_function.php

    r288 r289  
    9494function GetOrderTableHeader($Columns, $DefaultColumn)
    9595{
    96   global $OrderDirSQL, $OrderArrowImage;
     96  global $OrderDirSQL, $OrderArrowImage, $Config;
    9797 
    9898  if(array_key_exists('OrderCol', $_GET)) $_SESSION['OrderCol'] = $_GET['OrderCol'];
     
    121121    $QueryItems['OrderCol'] = $Column['Name'];
    122122    $QueryItems['OrderDir'] = 1 - $_SESSION['OrderDir'];
    123     if($Column['Name'] == $_SESSION['OrderCol']) $ArrowImage = '<img  style="vertical-align: middle; border: 0px;" src="images/'.$OrderArrowImage[$_SESSION['OrderDir']].'" alt="order arrow">';
     123    if($Column['Name'] == $_SESSION['OrderCol']) $ArrowImage = '<img  style="vertical-align: middle; border: 0px;" src="'.$Config['Web']['BaseURL'].'/images/'.$OrderArrowImage[$_SESSION['OrderDir']].'" alt="order arrow">';
    124124      else $ArrowImage = '';
    125125    if($Column['Name'] == '') $Result .= '<th>'.$Column['Title'].'</th>';
Note: See TracChangeset for help on using the changeset viewer.