Changeset 379 for trunk/dictionary.php
- Timestamp:
- Mar 11, 2010, 5:23:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r376 r379 25 25 $TablesColumn = array 26 26 ( 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', 33 33 ); 34 34 /* $TablesID = array('gameobject' => 5, … … 41 41 foreach($TablesColumn as $Table => $Column) 42 42 { 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 '; 44 44 $groupby = ' GROUP BY `'.$Column.'`'; 45 45 … … 59 59 60 60 if (strlen($ArrStr[$i]) > 4) 61 $where .= ' O.'.$Column.' LIKE "%'.addslashes($ArrStr[$i]).'%"OR ';61 $where .= '(`O`.`'.$Column.'` LIKE "%'.addslashes($ArrStr[$i]).'%") OR '; 62 62 } 63 63 $where = substr($where,0,strlen($where)-4); 64 64 $where .= ')'; 65 echo 65 echo('</tr>'); 66 66 67 67 $ID = $Database->SQLCommand($sql.$where.$groupby); … … 70 70 if ($mode == 0) 71 71 { 72 if (strpos(strtolower($Text), strtolower($Line[$Column])) > 0)72 if (strpos(strtolower($Text), strtolower($Line[$Column])) > 0) 73 73 { 74 74 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>'); 76 76 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>'); 77 77 } … … 79 79 { 80 80 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>'); 82 82 else echo('<td><a target="_NEW2" href="form.php?group='.GetIDbyName($Table).'&ID='.$Line['ID'].'">Překládat</a></td></tr>'); 83 83 }
Note:
See TracChangeset
for help on using the changeset viewer.