Changeset 61 for trunk/Modules/Meet
- Timestamp:
- Apr 28, 2021, 6:11:27 PM (4 years ago)
- Location:
- trunk/Modules/Meet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Meet.php
r59 r61 111 111 { 112 112 return ($Char == ' ') or ($Char == "\t"); 113 } 114 115 function GetDefaultMeetFilter($Table = '') 116 { 117 global $Config; 118 119 if ($Table != '') $Table = $Table.'.'; 120 121 return '('.$Table.'Hidden=0) AND ('.$Table.'Time > "'.TimeToMysqlDateTime(time() - $Config['MeetInterval']).'")'; 113 122 } 114 123 -
trunk/Modules/Meet/MeetPage.php
r56 r61 36 36 function Show() 37 37 { 38 global $Config; 39 38 40 $Filter = new Filter(); 39 41 $Filter->Items = array( … … 59 61 60 62 $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 (T.Hidden=0) AND '.$Where); 63 '(SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName FROM `MeetItem`) AS T '. 64 'WHERE '.GetDefaultMeetFilter('T').' AND '.$Where); 62 65 $DbRow = $DbResult->fetch_row(); 63 66 $PageList = GetPageList($DbRow[0]); … … 82 85 $Output .= $Order['Output']; 83 86 $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 (T.Hidden=0)AND '.87 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL FROM MeetItem) AS T WHERE '.GetDefaultMeetFilter('T').' AND '. 85 88 $Where.$Order['SQL'].$PageList['SQLLimit']); 86 89 while ($MeetItem = $DbResult->fetch_assoc()) … … 209 212 $RSS->Link = $this->System->AbsoluteLink('/seznamka/'); 210 213 211 $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 212 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '`Hidden`=0 ORDER BY `Time` DESC LIMIT 30'); 214 $DbResult = $this->Database->query('SELECT *, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 215 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL FROM MeetItem WHERE '. 216 GetDefaultMeetFilter().' ORDER BY `Time` DESC LIMIT 30'); 213 217 while ($MeetItem = $DbResult->fetch_assoc()) 214 218 {
Note:
See TracChangeset
for help on using the changeset viewer.