Changeset 893 for trunk/Modules/Referrer
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Referrer/Referrer.php
r891 r893 20 20 function DoStart(): void 21 21 { 22 $this->Excludes[] = $this->System->Config['Web']['Host'];22 $this->Excludes[] = Core::Cast($this->System)->Config['Web']['Host']; 23 23 $this->Log(); 24 24 $this->System->RegisterPage(['referrer'], 'PageReferrer'); … … 77 77 function ShowList() 78 78 { 79 $Banner = '<a href="https://'.$this->System->Config['Web']['Host'].$this->System->Link('/').'">'. 80 '<img src="https://'.$this->System->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_big.jpg').'" '. 79 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 80 $Banner = '<a href="https://'.Core::Cast($this->System)->Config['Web']['Host'].$this->System->Link('/').'">'. 81 '<img src="https://'.Core::Cast($this->System)->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_big.jpg').'" '. 81 82 'alt="wowpreklad" title="Otevřený projekt překládání celé hry World of Warcraft" '. 82 83 'class="banner" height="60" width="468" /></a>'; 83 84 84 $BannerSmall = '<a href="https://'. $this->System->Config['Web']['Host'].$this->System->Link('/').'">'.85 '<img src="https://'. $this->System->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_small.jpg').'" '.85 $BannerSmall = '<a href="https://'.Core::Cast($this->System)->Config['Web']['Host'].$this->System->Link('/').'">'. 86 '<img src="https://'.Core::Cast($this->System)->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_small.jpg').'" '. 86 87 'alt="wowpreklad" title="Otevřený projekt překládání celé hry World of Warcraft" '. 87 88 'class="banner" height="31" width="88" /></a>'; … … 92 93 $Output .= $BannerSmall.' <textarea rows="2" cols="30">'.htmlspecialchars($BannerSmall).'</textarea><br />'; 93 94 94 if ($ this->System->User->Licence(LICENCE_ADMIN)) {95 if ($User->Licence(LICENCE_ADMIN)) { 95 96 96 97 $MonthAge = 3; … … 99 100 <div style="font-size: 10px;">Seznam je automaticky aktualizován a zobrazeny jsou servery, ze kterých přišli uživatelé během posledních třech měsíců řazený sestupně dle nejnovějších.</div><br />'; 100 101 101 if (!$ this->System->User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Visible`=1) AND (`Parent` IS NULL)';102 if (!$User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Visible`=1) AND (`Parent` IS NULL)'; 102 103 else $Where = ''; 103 104 $Query = 'SELECT *, (SELECT Web FROM `Referrer` AS T4 WHERE T4.Id = T3.Parent) AS ParentName '. … … 123 124 array('Name' => 'TotalHits', 'Title' => T('Hits')), 124 125 ); 125 if ($ this->System->User->Licence(LICENCE_ADMIN))126 if ($User->Licence(LICENCE_ADMIN)) 126 127 { 127 128 $TableColumns[] = array('Name' => 'Visible', 'Title' => T('Visible')); … … 142 143 '<td>'.HumanDate($Line['MaxDateLast']).'</td>'. 143 144 '<td>'.$Line['TotalHits'].'</td>'; 144 if ($ this->System->User->Licence(LICENCE_ADMIN))145 if ($User->Licence(LICENCE_ADMIN)) 145 146 { 146 147 $Output .= … … 183 184 function Spam() 184 185 { 185 if ($this->System->User->Licence(LICENCE_ADMIN)) 186 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 187 if ($User->Licence(LICENCE_ADMIN)) 186 188 { 187 189 if (array_key_exists('id', $_GET)) … … 207 209 function Edit() 208 210 { 209 if ($this->System->User->Licence(LICENCE_ADMIN)) 211 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 212 if ($User->Licence(LICENCE_ADMIN)) 210 213 { 211 214 if (array_key_exists('id', $_GET)) … … 232 235 function EditSave() 233 236 { 234 if ($this->System->User->Licence(LICENCE_ADMIN)) 237 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 238 if ($User->Licence(LICENCE_ADMIN)) 235 239 { 236 240 if ($_POST['Parent'] == '') $_POST['Parent'] = null;
Note:
See TracChangeset
for help on using the changeset viewer.