Changeset 808 for trunk/Modules/Log/Log.php
- Timestamp:
- May 25, 2014, 12:18:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r805 r808 130 130 if(array_key_exists('group', $_GET)) $_SESSION['group'] = $_GET['group']; 131 131 132 if($_SESSION['type'] != '') $WhereType = ' `Type`='.$_SESSION['type'];132 if($_SESSION['type'] != '') $WhereType = ' (`Type`='.$_SESSION['type'].')'; 133 133 else $WhereType = '1=1'; 134 134 … … 137 137 ); 138 138 139 // Show category filter 139 140 if($this->System->User->Licence(LICENCE_MODERATOR)) 140 141 { 141 $Output = '<strong>Filtr: </strong>'. 142 '<span style="color:black"><a href="log.php?type=" title="Bez filtrování">Všechny</a></span> '; 142 $Output = '<strong>Filtr:</strong>'; 143 $Item = '<a href="log.php?type=" title="Bez filtrování">Všechny</a>'; 144 if($_SESSION['type'] == '') $Item = '<strong>'.$Item.'</strong>'; 145 $Output .= ' '.$Item; 143 146 $DbResult = $this->System->Database->query('SELECT * FROM `LogType`'); 144 147 while($LogType = $DbResult->fetch_assoc()) 145 148 { 146 $Output .= '<a href="log.php?type='.$LogType['Id'].'" style="color:'.$LogType['Color'].'" title="'.$LogType['Name'].'">'.$LogType['Name'].'</a> '; 149 $Item = '<a href="log.php?type='.$LogType['Id'].'" style="color:'.$LogType['Color'].'" title="'.$LogType['Name'].'">'.$LogType['Name'].'</a>'; 150 if($_SESSION['type'] == $LogType['Id']) $Item = '<strong>'.$Item.'</strong>'; 151 $Output .= ' '.$Item; 147 152 } 148 153 // echo ' Formát: datum: text zprávy (uživatel, IP)<br /><br />'; … … 164 169 165 170 $TableColumns = array( 166 array('Name' => 'Date', 'Title' => 'Čas'), 167 array('Name' => 'LogName', 'Title' => 'Typ'), 171 array('Name' => 'Date', 'Title' => 'Čas'), 172 ); 173 if($_SESSION['type'] == '') $TableColumns[] = 174 array('Name' => 'LogName', 'Title' => 'Typ'); 175 $TableColumns = array_merge($TableColumns, array( 168 176 array('Name' => 'Text', 'Title' => 'Text'), 169 177 array('Name' => 'UserName', 'Title' => 'Uživatel'), 170 178 array('Name' => 'IP', 'Title' => 'Adresa'), 171 179 array('Name' => 'URL', 'Title' => 'URL'), 172 ) ;180 )); 173 181 $Order = GetOrderTableHeader($TableColumns, 'date', 1); 174 182 $Output .= '<table width="98%" class="BaseTable">'. … … 182 190 if($Line['Type'] == LOG_TYPE_ERROR) $Line['Text'] = htmlspecialchars($Line['Text']); 183 191 $Line['Text'] = str_replace("\n", '<br>', $Line['Text']); 184 $Output .= '<tr><td>'.$Line['Date'].'</td>' .185 '<td>'.$Line['LogName'].'</td>'.186 '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'.192 $Output .= '<tr><td>'.$Line['Date'].'</td>'; 193 if($_SESSION['type'] == '') $Output .= '<td>'.$Line['LogName'].'</td>'; 194 $Output .= '<td><span style="color: '.$Line['LogColor'].'">'.$Line['Text'].'</span></td>'. 187 195 '<td><a href="'.$this->System->Link('/user.php?user='.$Line['User']).'">'.$Line['UserName'].'</a></td>'. 188 196 '<td>'.$Line['IP'].'</td>'.
Note:
See TracChangeset
for help on using the changeset viewer.