Changeset 455 for trunk/log.php
- Timestamp:
- Apr 13, 2010, 10:03:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/log.php
r444 r455 9 9 else $Where = ''; 10 10 $sql = 'SELECT *, UNIX_TIMESTAMP(`Date`) AS `TimeCreate`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `Log`.`User`) AS `User` FROM `Log`'.$Where.' ORDER BY `Date` DESC LIMIT 100'; 11 $ ID = $Database->SQLCommand($sql);12 while($Line = mysql_fetch_assoc($ID))11 $DbResult = $System->Database->query($sql); 12 while($Line = $DbResult->fetch_assoc()) 13 13 { 14 $DbResult = $Database->SQLCommand('SELECT * FROM `LogType` WHERE `Id`='.$Line['Type']);15 $LogType = mysql_fetch_assoc($DbResult);14 $DbResult2 = $System->Database->query('SELECT * FROM `LogType` WHERE `Id`='.$Line['Type']); 15 $LogType = $DbResult2->fetch_assoc(); 16 16 17 17 $Items[] = array … … 49 49 echo('<strong>Filtr: </strong>'); 50 50 echo('<span style="color:black"><a href="log.php?type=" title="Bez filtrování">Všechny</a></span> '); 51 $DbResult = $ Database->SQLCommand('SELECT * FROM `LogType`');52 while($LogType = mysql_fetch_assoc($DbResult))51 $DbResult = $System->Database->query('SELECT * FROM `LogType`'); 52 while($LogType = $DbResult->fetch_assoc()) 53 53 { 54 54 echo('<a href="log.php?type='.$LogType['Id'].'" style="color:'.$LogType['Color'].'" title="'.$LogType['Name'].'">'.$LogType['Name'].'</a> '); … … 66 66 //if(($Where != '') and (array_key_exists('group', $_SESSION))) $Where .= ' AND text LIKE "%'.$TranslationTree[$_SESSION['group']]['Name'].'%"'; 67 67 68 $DbResult = $ Database->SQLCommand('SELECT COUNT(*) FROM `Log` '.$Where);69 $DbRow = mysql_fetch_row($DbResult);68 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `Log` '.$Where); 69 $DbRow = $DbResult->fetch_row(); 70 70 $PageList = GetPageList($DbRow[0]); 71 71 … … 84 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 $ ID = $Database->SQLCommand($sql);87 while($Line = mysql_fetch_assoc($ID))86 $DbResult = $System->Database->query($sql); 87 while($Line = $DbResult->fetch_assoc()) 88 88 { 89 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>');
Note:
See TracChangeset
for help on using the changeset viewer.