Changeset 343 for trunk/aktuality/index.php
- Timestamp:
- Jan 17, 2012, 1:00:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/index.php
r311 r343 27 27 { 28 28 case 'view': 29 if(!$this->System->Mod ules['User']->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění';29 if(!$this->System->Models['User']->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění'; 30 30 else 31 31 { … … 39 39 else $Author = $Row['Name']; 40 40 $Output .= '<div class="Panel"><div class="Title">'.$Row['Title'].' ('.HumanDate($Row['Date']).', '.$Author.')'; 41 if($this->System->Mod ules['User']->User['Id'] == $Row['User'])41 if($this->System->Models['User']->User['Id'] == $Row['User']) 42 42 { 43 43 $Output .= '<div class="Action">'; … … 69 69 while($DbRow = $DbResult->fetch_array()) 70 70 { 71 if($this->System->Mod ules['User']->CheckPermission('News', 'Insert', 'Group', $DbRow['Id']))71 if($this->System->Models['User']->CheckPermission('News', 'Insert', 'Group', $DbRow['Id'])) 72 72 { 73 73 if($DbRow['Id'] == $Category) $Selected = ' selected="1"'; else $Selected = ''; … … 88 88 case 'add2': 89 89 $RemoteAddr = GetRemoteAddress(); 90 if($this->System->Mod ules['User']->CheckPermission('News', 'Insert', 'Group', $Category))90 if($this->System->Models['User']->CheckPermission('News', 'Insert', 'Group', $Category)) 91 91 { 92 92 //print_r($_FILES); … … 110 110 111 111 $_POST['content'] = str_replace("\n",'<br />',$_POST['content']); 112 $this->Database->insert('News', array('Category' => $Category, 'Title' => $_POST['title'], 'Content' => $_POST['content'], 'Date' => 'NOW()', 'IP' => $RemoteAddr, 'Enclosure' => $Enclosures, 'Author' => $this->System->Mod ules['User']->User['Name'], 'User' => $this->System->Modules['User']->User['Id'], 'Link' => $_POST['link']));112 $this->Database->insert('News', array('Category' => $Category, 'Title' => $_POST['title'], 'Content' => $_POST['content'], 'Date' => 'NOW()', 'IP' => $RemoteAddr, 'Enclosure' => $Enclosures, 'Author' => $this->System->Models['User']->User['Name'], 'User' => $this->System->Models['User']->User['Id'], 'Link' => $_POST['link'])); 113 113 $Output .= 'Aktualita přidána!<br />Pokud budete chtít vaši aktualitu smazat, klikněte na odkaz Smazat v seznamu všech aktualit v kategorii.<br /><br />'; 114 114 $Output .= '<a href="index.php?category='.$_POST['category'].'">Zpět na seznam aktualit</a>'; … … 119 119 $DbResult = $this->Database->query('SELECT * FROM News WHERE Id='.$_GET['id']); 120 120 $Row = $DbResult->fetch_array(); 121 if($this->System->Mod ules['User']->User['Id'] == $Row['User'])121 if($this->System->Models['User']->User['Id'] == $Row['User']) 122 122 { 123 123 $Row['Content'] = str_replace('<br />', '', $Row['Content']); … … 140 140 { 141 141 $Row = $DbResult->fetch_array(); 142 if($this->System->Mod ules['User']->User['Id'] == $Row['User'])142 if($this->System->Models['User']->User['Id'] == $Row['User']) 143 143 { 144 144 $_POST['content'] = str_replace("\n", '<br />', $_POST['content']); … … 152 152 $DbResult = $this->Database->query('SELECT * FROM News WHERE Id='.$_GET['id']); 153 153 $Row = $DbResult->fetch_array(); 154 if($this->System->Mod ules['User']->User['Id'] == $Row['User'])154 if($this->System->Models['User']->User['Id'] == $Row['User']) 155 155 { 156 156 if($Row['Enclosure'] != '') … … 168 168 break; 169 169 default: 170 if($this->System->Mod ules['User']->CheckPermission('News', 'Display', 'Group', $Category))170 if($this->System->Models['User']->CheckPermission('News', 'Display', 'Group', $Category)) 171 171 { 172 172 $News = new News($this->Database); … … 187 187 else $Author = $Row['Name']; 188 188 $Output .= '<div class="Panel"><div class="Title"><a href="?action=view&id='.$Row['Id'].'">'.$Row['Title'].'</a> ('.HumanDate($Row['Date']).', '.$Author.')'; 189 if($this->System->Mod ules['User']->User['Id'] == $Row['User'])189 if($this->System->Models['User']->User['Id'] == $Row['User']) 190 190 { 191 191 $Output .= '<div class="Action">';
Note:
See TracChangeset
for help on using the changeset viewer.