Changeset 49 for trunk/log.php
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
SqlTranslate.zip
-
Property svn:ignore
set to
-
trunk/log.php
r43 r49 1 1 <?php 2 2 3 3 include('includes/global.php'); 4 4 5 echo '<b>Filtr: </b>'; 6 Echo '<a href="log.php" Title="Bez filtrování"><span style="color:black">Všechny</span></a> '; 5 echo('<b>Filtr: </b>'); 6 echo('<a href="log.php" title="Bez filtrování"><span style="color:black">Všechny</span></a> '); 7 foreach($LogTypes as $Index => $LogItem) 8 { 9 echo('<a href="log.php?type='.$LogItem[0].'" title="'.$LogItem[3].'"><span style="color:'.$LogItem[2].'">'.$LogItem[1].'</span></a> '); 10 } 11 12 // echo ' Formát: datum: text zprávy (uživatel, IP)<br /><br />'; 13 echo('<br /><br />'); 14 15 if(array_key_exists('type', $_GET)) 16 { 17 $sql = "SELECT *,(SELECT user.user FROM user WHERE user.id = log.user) as user 18 FROM log WHERE type = '".$_GET['type']."' ORDER BY date DESC LIMIT 100"; 19 // if ($_GET['type'] == $LogItem[0]) { } 20 } else $sql = "SELECT *,(SELECT user.user FROM user WHERE user.id = log.user) as user FROM log ORDER BY date DESC LIMIT 100"; 21 22 $ID = $Database->SQLCommand($sql); 23 while($Line = mysql_fetch_array($ID)) 24 { 7 25 foreach($LogTypes as $Index => $LogItem) 8 26 { 9 Echo '<a href="log.php?type='.$LogItem[0].'" Title="'.$LogItem[3].'"><span style="color:'.$LogItem[2].'">'.$LogItem[1].'</span></a> ';27 if($Line['type'] == $LogItem[0]) $color = $LogItem[2]; 10 28 } 29 echo($Line['date'].': <span style="color:'.$color.'">'.$Line['text'].'</span> ('.$Line['user'].', '.$Line['IP'].')<br />'); 30 } 31 32 ShowFooter(); 11 33 12 13 // echo ' Formát: datum: text zprávy (uživatel, IP)<br /><br />';14 echo '<br /><br />';15 16 if (array_key_exists('type', $_GET)) {17 $sql = "SELECT *,(SELECT user.user FROM user WHERE user.id = log.user) as user18 FROM log WHERE type = '".$_GET['type']."' ORDER BY date DESC LIMIT 100";19 // if ($_GET['type'] == $LogItem[0]) { }20 } else $sql = "SELECT *,(SELECT user.user FROM user WHERE user.id = log.user) as user21 FROM log ORDER BY date DESC LIMIT 100";22 23 24 $ID = $Database->SQLCommand($sql);25 while ($Line = mysql_fetch_array($ID)) {26 foreach($LogTypes as $Index => $LogItem)27 {28 if ($Line['type'] == $LogItem[0]) { $color = $LogItem[2]; }29 }30 echo $Line['date'].': <span style="color:'.$color.'">'.$Line['text'].'</span> ('.$Line['user'].', '.$Line['IP'].')<br />';31 }32 33 ShowFooter();34 34 ?>
Note:
See TracChangeset
for help on using the changeset viewer.