Changeset 379
- Timestamp:
- Mar 11, 2010, 5:23:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 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 } -
trunk/log.php
r376 r379 73 73 74 74 $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'), 78 78 array('Name' => 'IP', 'Title' => 'Adresa'), 79 79 ); … … 82 82 echo($Order['Output']); 83 83 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']; 85 85 //echo($sql); 86 86 $ID = $Database->SQLCommand($sql); 87 87 while($Line = mysql_fetch_assoc($ID)) 88 88 { 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>'); 90 90 } 91 91 echo('</table>');
Note:
See TracChangeset
for help on using the changeset viewer.