Changeset 873 for trunk/Modules/Search/Search.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Search/Search.php
r738 r873 14 14 { 15 15 $Output = ''; 16 if (array_key_exists('t', $_GET)) $Text = $_GET['t'];16 if (array_key_exists('t', $_GET)) $Text = $_GET['t']; 17 17 else $Text = ''; 18 18 $Output .= '<form action="?" method="get">'. … … 20 20 '<input type="submit" value="Hledat"/>'. 21 21 '</form>'; 22 if ($Text != '')23 foreach ($this->System->ModuleManager->Modules['Search']->Items as $Item)22 if ($Text != '') 23 foreach ($this->System->ModuleManager->Modules['Search']->Items as $Item) 24 24 { 25 25 $Columns = ''; 26 26 $Condition = ''; 27 foreach ($Item['Columns'] as $Column)27 foreach ($Item['Columns'] as $Column) 28 28 { 29 29 $Columns .= ', `'.$Column.'`'; … … 34 34 $DbResult = $this->Database->Select($Item['Table'], $Columns, $Condition.' LIMIT '. 35 35 $this->System->ModuleManager->Modules['Search']->MaxItemCount); 36 if ($DbResult->num_rows > 0) $Output .= '<strong>'.$Item['Name'].'</strong><br/>';37 while ($Row = $DbResult->fetch_assoc())36 if ($DbResult->num_rows > 0) $Output .= '<strong>'.$Item['Name'].'</strong><br/>'; 37 while ($Row = $DbResult->fetch_assoc()) 38 38 { 39 39 $Output .= '<p>'; 40 foreach ($Item['Columns'] as $Column)40 foreach ($Item['Columns'] as $Column) 41 41 $Output .= $Row[$Column].'<br/>'; 42 42 $Output .= '</p>'; 43 43 } 44 44 } 45 return ($Output);45 return ($Output); 46 46 } 47 47 }
Note:
See TracChangeset
for help on using the changeset viewer.