Changeset 63 for trunk/Modules/Event/EventPage.php
- Timestamp:
- Aug 3, 2021, 11:20:41 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 nbproject2 Config.php3 1 .settings 4 2 .project 5 3 .buildpath 4 .htaccess
-
- Property svn:ignore
-
trunk/Modules/Event/EventPage.php
r62 r63 1 1 <?php 2 2 3 class ModuleEvent extends AppModule3 class ModuleEvent extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 18 { 19 $this->System->RegisterPage( 'udalosti', 'PageEventList');20 $this->System->RegisterPage( array('udalosti', 'udalost'), 'PageEventItem');21 $this->System->RegisterPage( array('udalosti', 'aktualizace'), 'PageEventUpdate');22 $this->System->RegisterPage( array('udalosti', 'rss'), 'PageEventRss');23 $this->System->RegisterMenuItem('/udalosti', 'Události');17 function Start(): void 18 { 19 $this->System->RegisterPage(['udalosti'], 'PageEventList'); 20 $this->System->RegisterPage(['udalosti', 'udalost'], 'PageEventItem'); 21 $this->System->RegisterPage(['udalosti', 'aktualizace'], 'PageEventUpdate'); 22 $this->System->RegisterPage(['udalosti', 'rss'], 'PageEventRss'); 23 Core::Cast($this->System)->RegisterMenuItem('/udalosti', 'Události'); 24 24 } 25 25 } … … 30 30 { 31 31 parent::__construct($System); 32 $this-> FullTitle = 'Taneční události';33 $this-> ShortTitle = 'Události';34 } 35 36 function Show() 32 $this->Title = 'Události'; 33 $this->Description = 'Taneční události'; 34 } 35 36 function Show(): string 37 37 { 38 38 $Filter = new Filter(); … … 47 47 48 48 $Output = ''; 49 $this->Title = 'Události - '.$this->Title;50 49 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 51 50 $this->RawPage = true; … … 111 110 { 112 111 parent::__construct($System); 113 $this-> FullTitle = 'Aktualizace tanečníchudálostí';114 $this-> ShortTitle = 'Aktualizaceudálostí';115 } 116 117 function Show() 112 $this->Title = 'Aktualizace událostí'; 113 $this->Description = 'Aktualizace tanečních událostí'; 114 } 115 116 function Show(): string 118 117 { 119 118 $EventSources = new EventSources(); … … 130 129 { 131 130 parent::__construct($System); 132 $this->FullTitle = 'Taneční událost'; 133 $this->ShortTitle = 'Událost'; 134 } 135 136 function Show() 137 { 138 $this->Title = 'Událost - Události - '.$this->Title; 131 $this->Title = 'Událost'; 132 $this->Description = 'Taneční událost'; 133 } 134 135 function Show(): string 136 { 139 137 $Output = ''; 140 138 if (count($this->System->PathItems) > 2) … … 142 140 $id = $this->System->PathItems[2] * 1; 143 141 } else return 'Položka nenalezena'; 144 if ( $this->System->IsAdmin())142 if (Core::Cast($this->System)->IsAdmin()) 145 143 { 146 144 if (array_key_exists('hide', $_GET)) $this->Database->update('Event', 'Id='.$id, array('Hidden' => 1)); … … 154 152 { 155 153 $Event = $DbResult->fetch_assoc(); 156 if (($Event['Filter'] == '0') and ! $this->System->IsAdmin())154 if (($Event['Filter'] == '0') and !Core::Cast($this->System)->IsAdmin()) 157 155 return 'Položka nenalezena'; 158 156 if ($Event['Link'] != '') $Link = '<a href="'.$Event['Link'].'">Odkaz</a>'; … … 168 166 '<tr><th>Zdroj importu</th><td><a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a></td></tr>'; 169 167 $Output .= '</table>'; 170 if ( $this->System->IsAdmin()) {168 if (Core::Cast($this->System)->IsAdmin()) { 171 169 if ($Event['Hidden'] == '1') 172 170 $Output .= '<div>Skrytá položka <a href="?unhide">Zviditelnit</a></div>'; … … 183 181 { 184 182 parent::__construct($System); 185 $this-> FullTitle = 'RSS kanáltanečních událostí';186 $this-> ShortTitle = 'RSS tanečníudálostí';187 } 188 189 function Show() 183 $this->Title = 'RSS tanečních událostí'; 184 $this->Description = 'RSS kanál tanečních událostí'; 185 } 186 187 function Show(): string 190 188 { 191 189 global $Config;
Note:
See TracChangeset
for help on using the changeset viewer.