Changeset 528
- Timestamp:
- Apr 21, 2013, 11:51:38 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Version.php
r527 r528 1 1 <?php 2 2 3 $Revision = 52 7; // Subversion revision3 $Revision = 528; // Subversion revision 4 4 $DatabaseRevision = 527; // SQL structure revision 5 5 $ReleaseTime = '2013-04-21'; -
trunk/Modules/IS/IS.php
r527 r528 170 170 if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table]; 171 171 else return($this->SystemMessage('Chyba', 'Tabulka nenalezena')); 172 if($Filter != '') $Filter = ' WHERE '.$Filter;173 172 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `'.$FormClass['Table'].'`'.$Filter); 174 173 $DbRow = $DbResult->fetch_row(); … … 191 190 $Order = GetOrderTableHeader($TableColumns, $FormClass['DefaultSortColumn'], 0); 192 191 $Output .= $Order['Output']; 193 192 193 // Show search fields 194 $UserFilter = ''; 195 if(array_key_exists('filter', $_GET) and ($_GET['filter'] == 1)) 196 { 197 foreach($FormClass['Items'] as $ItemIndex => $FormItem) 198 if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or 199 (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and 200 ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne'))) 201 { 202 if(array_key_exists('Filter'.$ItemIndex, $_POST) and ($_POST['Filter'.$ItemIndex] != '')) 203 $UserFilter .= ' AND (`'.$ItemIndex.'` LIKE "%'.$_POST['Filter'.$ItemIndex].'%")'; 204 } 205 } 206 $Output .= '<tr><form action="?a=list&filter=1" method="post">'; 207 foreach($FormClass['Items'] as $ItemIndex => $FormItem) 208 if(!array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) or 209 (array_key_exists($FormItem['Type'], $this->System->FormManager->FormTypes) and 210 ($this->System->FormManager->FormTypes[$FormItem['Type']]['Type'] != 'ManyToOne'))) 211 { 212 if(array_key_exists('Filter'.$ItemIndex, $_POST) and ($_POST['Filter'.$ItemIndex] != '')) 213 $Value = $_POST['Filter'.$ItemIndex]; 214 else $Value = ''; 215 $Output .= '<td><input type="text" name="Filter'.$ItemIndex.'" value="'.$Value.'" style="width: 100%"/></td>'; 216 } 217 $Output .= '<td><input type="Submit" value="Hledat"/></td></form></tr>'; 218 219 if(($Filter == '') and ($UserFilter != '')) $Filter = '1 '.$UserFilter; 220 if($Filter != '') $Filter = ' WHERE '.$Filter; 194 221 $Query = 'SELECT * FROM `'.$FormClass['Table'].'`'.$Filter.' '.$Order['SQL'].$PageList['SQLLimit']; 195 222
Note:
See TracChangeset
for help on using the changeset viewer.