Changeset 55 for trunk/Modules
- Timestamp:
- Apr 7, 2020, 12:55:39 AM (5 years ago)
- Location:
- trunk/Modules
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Dance/Dance.php
r40 r55 39 39 $this->Title = 'Tanec - Tance - '.$this->Title; 40 40 $Output = ''; 41 if (count($this->System->PathItems) > 1)41 if (count($this->System->PathItems) > 1) 42 42 { 43 43 $id = $this->System->PathItems[1] * 1; … … 60 60 $Output .= '<tr><th>Český název</th><th>Anglický název</th><th>Detail</th></tr>'; 61 61 $DbResult = $this->Database->select('DanceFigure', '*', '(`Dance`='.$id.')'); 62 while ($DanceFigure = $DbResult->fetch_assoc())62 while ($DanceFigure = $DbResult->fetch_assoc()) 63 63 { 64 64 $Output .= '<tr>'. … … 74 74 $Output .= '<tr><th>Název</th><th>Skupina</th><th>Odkaz</th></tr>'; 75 75 $DbResult = $this->Database->select('Resource', '*, (SELECT Name FROM ResourceGroup WHERE ResourceGroup.Id=Resource.Group) AS GroupName', '(`Dance`='.$id.')'); 76 while ($DbRow = $DbResult->fetch_assoc())76 while ($DbRow = $DbResult->fetch_assoc()) 77 77 { 78 78 $Output .= '<tr>'. … … 86 86 /* 87 87 $DbResult2 = $this->Database->select('ResourceGroup', '*'); 88 while ($ResourceGroup = $DbResult2->fetch_assoc())88 while ($ResourceGroup = $DbResult2->fetch_assoc()) 89 89 { 90 90 $Output .= '<th>'.$ResourceGroup['Name'].'</th>'; … … 92 92 93 93 $DbResult2 = $this->Database->select('ResourceGroup', '*'); 94 while ($ResourceGroup = $DbResult2->fetch_assoc())94 while ($ResourceGroup = $DbResult2->fetch_assoc()) 95 95 { 96 96 $Output .= '<td>'; 97 while ($Resource = $DbResult3->fetch_assoc())97 while ($Resource = $DbResult3->fetch_assoc()) 98 98 { 99 99 $Output .= '<a href="'.$Resource['URL'].'">'.$Resource['Name'].'</a> '; … … 122 122 $Output .= '<tr><th>Název</th><th>Skupina</th><th>Detail</th></tr>'; 123 123 $DbResult = $this->Database->select('Dance', '*, (SELECT Name FROM DanceGroup WHERE DanceGroup.Id=Dance.Group) AS GroupName', '1 ORDER BY `Name`'); 124 while ($Dance = $DbResult->fetch_assoc())124 while ($Dance = $DbResult->fetch_assoc()) 125 125 { 126 126 $Output .= '<tr>'. … … 132 132 $Output .= '</table>'; 133 133 134 return ($Output);134 return $Output; 135 135 } 136 136 } … … 149 149 $this->Title = 'Taneční figura - Tance - '.$this->Title; 150 150 $Output = ''; 151 if (count($this->System->PathItems) > 1)151 if (count($this->System->PathItems) > 1) 152 152 { 153 153 $id = $this->System->PathItems[1] * 1; … … 169 169 $Output .= '<tr><th>Skupina videí</th><th></th><th>Detail</th></tr>'; 170 170 $DbResult = $this->Database->select('DanceFigure', '*', '(`Dance`='.$id.')'); 171 while ($DanceFigure = $DbResult->fetch_assoc())171 while ($DanceFigure = $DbResult->fetch_assoc()) 172 172 { 173 173 $Output .= '<tr>'. … … 181 181 /* 182 182 $DbResult2 = $this->Database->select('ResourceGroup', '*'); 183 while ($ResourceGroup = $DbResult2->fetch_assoc())183 while ($ResourceGroup = $DbResult2->fetch_assoc()) 184 184 { 185 185 $Output .= '<th>'.$ResourceGroup['Name'].'</th>'; … … 187 187 188 188 $DbResult2 = $this->Database->select('ResourceGroup', '*'); 189 while ($ResourceGroup = $DbResult2->fetch_assoc())189 while ($ResourceGroup = $DbResult2->fetch_assoc()) 190 190 { 191 191 $Output .= '<td>'; 192 while ($Resource = $DbResult3->fetch_assoc())192 while ($Resource = $DbResult3->fetch_assoc()) 193 193 { 194 194 $Output .= '<a href="'.$Resource['URL'].'">'.$Resource['Name'].'</a> '; … … 217 217 $Output .= '<tr><th>Název</th><th>Skupina</th><th>Tanec</th><th>Detail</th></tr>'; 218 218 $DbResult = $this->Database->select('DanceFigure', '*, (SELECT Dance.Name FROM Dance WHERE Dance.Id=DanceFigure.Dance) AS DanceName', '1 ORDER BY `NameCz`'); 219 while ($DbRow = $DbResult->fetch_assoc())219 while ($DbRow = $DbResult->fetch_assoc()) 220 220 { 221 221 $Output .= '<tr>'. … … 228 228 $Output .= '</table>'; 229 229 230 return ($Output);231 } 232 } 230 return $Output; 231 } 232 } -
trunk/Modules/Event/Event.php
r52 r55 117 117 $Result = 1; 118 118 } else $Result = 0; 119 return ($Result);119 return $Result; 120 120 } 121 121 } -
trunk/Modules/Event/EventPage.php
r52 r55 79 79 '(SELECT EventSource.URL FROM EventSource WHERE EventSource.Id = Event.Source) AS SourceURL FROM Event) AS T WHERE (T.Hidden=0) AND '. 80 80 $Where.$Order['SQL'].$PageList['SQLLimit']); 81 while ($Event = $DbResult->fetch_assoc())81 while ($Event = $DbResult->fetch_assoc()) 82 82 { 83 83 $Output .= '<tr>'. … … 102 102 $Output .= '<div><a href="'.$this->System->Link('/udalosti/rss/').'"><img src="'.$this->System->Link('/images/rss20.png').'" alt="rss20"/></a></div>'; 103 103 } 104 return ($Output);104 return $Output; 105 105 } 106 106 } … … 138 138 $this->Title = 'Událost - Události - '.$this->Title; 139 139 $Output = ''; 140 if (count($this->System->PathItems) > 2)140 if (count($this->System->PathItems) > 2) 141 141 { 142 142 $id = $this->System->PathItems[2] * 1; … … 199 199 $DbResult = $this->Database->select('Event', '*, (SELECT EventSource.Name FROM EventSource WHERE EventSource.Id = Event.Source) AS SourceName, '. 200 200 '(SELECT EventSource.URL FROM EventSource WHERE EventSource.Id = Event.Source) AS SourceURL', '`Hidden`=0 ORDER BY `TimeFrom` DESC LIMIT 30'); 201 while ($Event = $DbResult->fetch_assoc())201 while ($Event = $DbResult->fetch_assoc()) 202 202 { 203 203 $Title = $Event['Title']; -
trunk/Modules/Event/Import/JoeClub.php
r52 r55 45 45 { 46 46 $Output = ''; 47 if ($Event->Link == '') return ($Output);47 if ($Event->Link == '') return $Output; 48 48 $Content = file_get_contents($Event->Link); 49 49 … … 72 72 $Time = substr($Time, 0, strpos($Time, '–')); 73 73 74 if ($Time == '') return(NULL);74 if ($Time == '') return NULL; 75 75 $Time = str_replace('@', '', $Time); 76 76 -
trunk/Modules/Meet/Meet.php
r47 r55 34 34 function HumanDateTimeToTime($DateTime) 35 35 { 36 if ($DateTime == '') return(NULL);36 if ($DateTime == '') return NULL; 37 37 $DateTime = str_replace('. ', '.', $DateTime); 38 38 $Parts = explode(' ', $DateTime); … … 44 44 } else $TimeParts = array(0, 0, 0); 45 45 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]); 46 return ($Result);46 return $Result; 47 47 } 48 48 49 49 function HumanDateToTime($Date) 50 50 { 51 if ($Date == '') return(NULL);52 return (HumanDateTimeToTime($Date.' 0:0:0'));51 if ($Date == '') return NULL; 52 return HumanDateTimeToTime($Date.' 0:0:0'); 53 53 } 54 54 … … 60 60 $ret = html_entity_decode($str, ENT_COMPAT, 'UTF-8'); 61 61 $p2 = 0; 62 for (;;)62 for (;;) 63 63 { 64 64 $p = strpos($ret, $prefix, $p2); … … 105 105 function is_alpha($Char) 106 106 { 107 return (( ($Char >= 'a') and ($Char <= 'z')) or (($Char >= 'A') and ($Char <= 'Z')));107 return (($Char >= 'a') and ($Char <= 'z')) or (($Char >= 'A') and ($Char <= 'Z')); 108 108 } 109 109 … … 116 116 { 117 117 $Result = ''; 118 for (;;)118 for (;;) 119 119 { 120 120 $Pos = strpos($Text, $Needle); … … 142 142 { 143 143 $Result = ''; 144 for (;;)144 for (;;) 145 145 { 146 146 $Pos = strpos($Text, $Needle); … … 432 432 $Result = 1; 433 433 } else $Result = 0; 434 return ($Result);435 } 436 } 434 return $Result; 435 } 436 } -
trunk/Modules/Meet/MeetPage.php
r49 r55 84 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 while ($MeetItem = $DbResult->fetch_assoc())86 while ($MeetItem = $DbResult->fetch_assoc()) 87 87 { 88 88 $Output .= '<tr>'. … … 109 109 $Output .= '<div><a href="'.$this->System->Link('/seznamka/rss/').'"><img src="'.$this->System->Link('/images/rss20.png').'" alt="rss20"/></a></div>'; 110 110 } 111 return ($Output);111 return $Output; 112 112 } 113 113 } … … 145 145 $this->Title = 'Inzerát - Seznamka - '.$this->Title; 146 146 $Output = ''; 147 if (count($this->System->PathItems) > 2)147 if (count($this->System->PathItems) > 2) 148 148 { 149 149 $id = $this->System->PathItems[2] * 1; … … 211 211 $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 212 212 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '`Hidden`=0 ORDER BY `Time` DESC LIMIT 30'); 213 while ($MeetItem = $DbResult->fetch_assoc())213 while ($MeetItem = $DbResult->fetch_assoc()) 214 214 { 215 215 $Title = $MeetItem['Name']; -
trunk/Modules/Movie/Movie.php
r46 r55 66 66 $Output .= '</tr>'; 67 67 $DbResult = $this->Database->select('Movie', '*', $Where.$Order['SQL'].$PageList['SQLLimit']); 68 while ($Movie = $DbResult->fetch_assoc())68 while ($Movie = $DbResult->fetch_assoc()) 69 69 { 70 70 $Output .= '<tr>'. … … 80 80 $Output .= $PageList['Output']; 81 81 82 return ($Output);82 return $Output; 83 83 } 84 84 } -
trunk/Modules/RSS/RSS.php
r37 r55 27 27 $this->RSSChannels[$Channel['Channel']] = $Channel; 28 28 29 if (is_null($Pos)) $this->RSSChannelsPos[] = $Channel['Channel'];29 if (is_null($Pos)) $this->RSSChannelsPos[] = $Channel['Channel']; 30 30 else { 31 31 array_splice($this->RSSChannelsPos, $Pos, 0, $Channel['Channel']); … … 42 42 { 43 43 $Output = ''; 44 foreach ($this->RSSChannels as $Channel)44 foreach ($this->RSSChannels as $Channel) 45 45 { 46 //if ($this->System->User->Licence($Channel['Permission']))46 //if ($this->System->User->Licence($Channel['Permission'])) 47 47 $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'. 48 48 $this->System->Link('/rss/?channel='.$Channel['Channel']).'" type="application/rss+xml" />'; 49 49 } 50 return ($Output);50 return $Output; 51 51 } 52 52 } … … 58 58 $this->ClearPage = true; 59 59 60 if (array_key_exists('channel', $_GET)) $ChannelName = $_GET['channel'];60 if (array_key_exists('channel', $_GET)) $ChannelName = $_GET['channel']; 61 61 else $ChannelName = ''; 62 if (array_key_exists('token', $_GET)) $Token = $_GET['token'];62 if (array_key_exists('token', $_GET)) $Token = $_GET['token']; 63 63 else $Token = ''; 64 if (array_key_exists($ChannelName, $this->System->ModuleManager->Modules['RSS']->RSSChannels))64 if (array_key_exists($ChannelName, $this->System->ModuleManager->Modules['RSS']->RSSChannels)) 65 65 { 66 66 $Channel = $this->System->ModuleManager->Modules['RSS']->RSSChannels[$ChannelName]; 67 if ($this->System->User->CheckPermission($Channel['Permission']['Module'], $Channel['Permission']['Operation']) or67 if ($this->System->User->CheckPermission($Channel['Permission']['Module'], $Channel['Permission']['Operation']) or 68 68 $this->System->User->CheckToken($Channel['Permission']['Module'], $Channel['Permission']['Operation'], $Token)) 69 69 { 70 if (is_string($Channel['Callback'][0]))70 if (is_string($Channel['Callback'][0])) 71 71 { 72 72 $Class = new $Channel['Callback'][0]($this->System); … … 76 76 } else $Output = 'Nemáte oprávnění'; 77 77 } else $Output = 'Kanál nenalezen'; 78 return ($Output);78 return $Output; 79 79 } 80 80 } -
trunk/Modules/School/School.php
r37 r55 39 39 $Output .= '</tr>'; 40 40 $DbResult = $this->Database->select('School', '*', '1 ORDER BY `Name`'); 41 while ($School = $DbResult->fetch_assoc())41 while ($School = $DbResult->fetch_assoc()) 42 42 { 43 43 $Output .= '<tr>'. … … 49 49 $Output .= '</table>'; 50 50 51 return ($Output);51 return $Output; 52 52 } 53 53 }
Note:
See TracChangeset
for help on using the changeset viewer.