Changeset 379 for trunk


Ignore:
Timestamp:
Mar 11, 2010, 5:23:58 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazování sloupce Jméno uživatele ve výpisu záznamů.
  • Opraveno: Hledání slovíček ze slovníku souvisejících s překladem.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dictionary.php

    r376 r379  
    2525  $TablesColumn = array
    2626  (
    27     'gameobject' => 'Name',
    28     'creature' => 'name',
    29     'item' => 'Name',
    30     'transports' => 'Name',
    31     'areatrigger_teleport' => 'Name',
    32     'areatrigger_tavern' => 'Name',
     27    'TextGameObject' => 'Name',
     28    'TextCreature' => 'name',
     29    'TextItem' => 'Name',
     30    'TextTransport' => 'Name',
     31    'TextAreaTriggerTeleport' => 'Name',
     32    'TextAreaTriggerTavern' => 'Name',
    3333  );
    3434 /* $TablesID = array('gameobject' => 5,
     
    4141  foreach($TablesColumn as $Table => $Column)
    4242  { 
    43     $sql = 'SELECT `ID`,'.$Column.',(SELECT `Name` FROM '.$Table.' AS `T` WHERE `O`.`Entry` = `T`.`Entry` AND `Language` <> 0 LIMIT 1) AS `Tran` FROM `'.$Table.'` AS `O` WHERE ';
     43    $sql = 'SELECT `ID`,`'.$Column.'`, (SELECT `Name` FROM `'.$Table.'` AS `T` WHERE `O`.`Entry` = `T`.`Entry` AND `Language` <> 0 LIMIT 1) AS `Tran` FROM `'.$Table.'` AS `O` WHERE ';
    4444    $groupby = ' GROUP BY `'.$Column.'`';
    4545 
     
    5959
    6060      if (strlen($ArrStr[$i]) > 4)
    61         $where .= 'O.'.$Column.' LIKE "%'.addslashes($ArrStr[$i]).'%" OR ';
     61        $where .= '(`O`.`'.$Column.'` LIKE "%'.addslashes($ArrStr[$i]).'%") OR ';
    6262    }
    6363    $where = substr($where,0,strlen($where)-4);
    6464    $where .= ')';
    65     echo ('</tr>');
     65    echo('</tr>');
    6666
    6767    $ID = $Database->SQLCommand($sql.$where.$groupby);
     
    7070      if ($mode == 0)
    7171      {
    72         if (strpos(strtolower($Text),strtolower($Line[$Column])) > 0)
     72        if (strpos(strtolower($Text), strtolower($Line[$Column])) > 0)
    7373        {
    7474          echo('<tr><td>'.$Line[$Column].'</td>');
    75           if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>');
     75          if ($Line['Tran'] <> '') echo('<td>'.$Line['Tran'].'</td></tr>');
    7676          else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&amp;ID='.$Line['ID'].'">Překládat</a></td></tr>');
    7777        }
     
    7979      {
    8080        echo('<tr><td>'.$Line[$Column].'</td>');
    81           if ($Line['tran'] <> '') echo('<td>'.$Line['tran'].'</td></tr>');
     81          if ($Line['Tran'] <> '') echo('<td>'.$Line['Tran'].'</td></tr>');
    8282          else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&amp;ID='.$Line['ID'].'">Překládat</a></td></tr>');
    8383      }
  • trunk/log.php

    r376 r379  
    7373 
    7474  $TableColumns = array(
    75     array('Name' => 'date', 'Title' => 'Čas'),
    76     array('Name' => 'text', 'Title' => 'Text'),
    77     array('Name' => 'User', 'Title' => 'Uživatel'),
     75    array('Name' => 'Date', 'Title' => 'Čas'),
     76    array('Name' => 'Text', 'Title' => 'Text'),
     77    array('Name' => 'UserName', 'Title' => 'Uživatel'),
    7878    array('Name' => 'IP', 'Title' => 'Adresa'),
    7979  );
     
    8282  echo($Order['Output']);
    8383 
    84   $sql = 'SELECT *, `LogType`.`Color` AS `LogColor`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `Log`.`User`) AS `User` FROM `Log` LEFT JOIN `LogType` ON `LogType`.`Id`=`Log`.`Type` '.$Where.$Order['SQL'].$PageList['SQLLimit'];
     84  $sql = 'SELECT *, `LogType`.`Color` AS `LogColor`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `Log`.`User`) AS `UserName` FROM `Log` LEFT JOIN `LogType` ON `LogType`.`Id`=`Log`.`Type` '.$Where.$Order['SQL'].$PageList['SQLLimit'];
    8585  //echo($sql);
    8686  $ID = $Database->SQLCommand($sql);
    8787  while($Line = mysql_fetch_assoc($ID))
    8888  {
    89     echo('<tr><td>'.$Line['Date'].'</td><td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td><td>'.$Line['Name'].'</td><td>'.$Line['IP'].'</td></tr>');
     89    echo('<tr><td>'.$Line['Date'].'</td><td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td><td>'.$Line['UserName'].'</td><td>'.$Line['IP'].'</td></tr>');
    9090  }
    9191  echo('</table>');
Note: See TracChangeset for help on using the changeset viewer.