Changeset 48 for trunk/Modules/Meet
- Timestamp:
- Dec 22, 2019, 11:43:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/MeetPage.php
r46 r48 59 59 60 60 $DbResult = $this->Database->query('SELECT COUNT(*) FROM (SELECT *, '. 61 '(SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName FROM `MeetItem`) AS T WHERE '.$Where);61 '(SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName FROM `MeetItem`) AS T WHERE (T.Hidden=0) AND '.$Where); 62 62 $DbRow = $DbResult->fetch_row(); 63 63 $PageList = GetPageList($DbRow[0]); … … 82 82 $Output .= $Order['Output']; 83 83 $DbResult = $this->Database->query('SELECT * FROM (SELECT *, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 84 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL FROM MeetItem) AS T WHERE '.84 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL FROM MeetItem) AS T WHERE (T.Hidden=0) AND '. 85 85 $Where.$Order['SQL'].$PageList['SQLLimit']); 86 86 while($MeetItem = $DbResult->fetch_assoc()) … … 149 149 $id = $this->System->PathItems[2] * 1; 150 150 } else return 'Položka nenalezena'; 151 if ($this->System->IsAdmin()) 152 { 153 if (array_key_exists('hide', $_GET)) $this->Database->update('MeetItem', 'Id='.$id, array('Hidden' => 1)); 154 if (array_key_exists('unhide', $_GET)) $this->Database->update('MeetItem', 'Id='.$id, array('Hidden' => 0)); 155 } 156 151 157 $Output .= '<div class="title">Inzerát</div>'; 152 158 $Gender = array('', 'Muž', 'Žena'); … … 172 178 '<tr><th>Zdroj importu</th><td><a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a></td></tr>'; 173 179 $Output .= '</table>'; 180 if ($this->System->IsAdmin()) { 181 if ($MeetItem['Hidden'] == '1') 182 $Output .= '<div>Skrytá položka <a href="?unhide">Zviditelnit</a></div>'; 183 else $Output .= '<div>Viditelná položka <a href="?hide">Skrýt</a></div>'; 184 } 174 185 } else $Output .= 'Položka nenalezena'; 175 186 return $Output; … … 197 208 198 209 $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 199 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', ' 1ORDER BY `Time` DESC LIMIT 30');210 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '`Hidden`=0 ORDER BY `Time` DESC LIMIT 30'); 200 211 while($MeetItem = $DbResult->fetch_assoc()) 201 212 {
Note:
See TracChangeset
for help on using the changeset viewer.