Changeset 236 for trunk/aktuality/index.php
- Timestamp:
- Jul 29, 2009, 7:22:20 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/index.php
r220 r236 30 30 else 31 31 { 32 $News = new News($this->Database); 32 33 if(array_key_exists('id', $_GET)) $Id = $_GET['id'] * 1; 33 34 $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` LEFT JOIN `User` ON `User`.`Id`=`News`.`User` WHERE `News`.`Id`='.$Id); … … 37 38 if($Row['Name'] == '') $Author = $Row['Author']; 38 39 else $Author = $Row['Name']; 39 $Output .= '<div style="border: thin dotted #97ADFF; 40 $Output .= '<div style="border: thin dotted #97ADFF; background: #F6F7FF; margin-top: 5px; padding: 0px 5px 5px 5px;"><div style="padding-bottom: 1px; border-bottom-width: 1; border-bottom-style: solid; border-bottom-color: silver;"><strong>'.$Row['Title'].' ('.HumanDate($Row['Date']).', '.$Author.')</strong>'; 40 41 if($this->System->Modules['User']->User['Id'] == $Row['User']) 41 42 { … … 43 44 $Output .= ' <a href="index.php?action=edit&category='.$Category.'&id='.$Row['Id'].'">Editovat</a>'; 44 45 } 45 $Output .= '</div>'.$ Row['Content'].'<br />';46 $Output .= '</div>'.$News->ModifyContent($Row['Content']).'<br />'; 46 47 if($Row['Enclosure'] != '') 47 48 { 48 49 $Output .= '<br />Přílohy: '; 49 50 $Enclosures = explode(';', $Row['Enclosure']); 50 51 52 51 foreach($Enclosures as $Enclosure) 52 { 53 if(file_exists($this->UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$this->UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 53 54 } 54 55 } … … 96 97 { 97 98 $Output .= 'Soubor '.basename($_FILES[$EnclosureName]['name']).' byl uložen na serveru.<br />'; 98 99 $Enclosures = $Enclosures.';'.basename($_FILES[$EnclosureName]['name']); 99 100 } else 100 101 { … … 139 140 $this->Database->update('News', 'Id='.$_POST['id'], array('Title' => $_POST['title'], 'Content' => $_POST['content'])); 140 141 $Output .= 'Aktualita uložena!<br />'; 141 142 $Output .= '<a href="index.php?category='.$Category.'">Zpět na seznam aktualit</a>'; 142 143 } else $Output .= 'Nelze měnit cizí aktualitu!<br />'; 143 144 } else $Output .= 'ID nenalezeno!'; … … 152 153 $Output .= '<br />Přílohy: '; 153 154 $Enclosures = explode(';', $Row['Enclosure']); 154 155 156 157 155 foreach($Enclosures as $Enclosure) 156 { 157 if(file_exists($this->UploadedFilesFolder.$Enclosure)) unlink($this->UploadedFilesFolder.$Enclosure); 158 } 158 159 } 159 160 $this->Database->query('DELETE FROM News WHERE Id='.$_GET['id']); … … 164 165 if($this->System->Modules['User']->CheckPermission('News', 'Display', 'Group', $Category)) 165 166 { 167 $News = new News($this->Database); 166 168 $PerPage = 20; 167 169 $DbResult = $this->Database->select('News', 'COUNT(*)', ' Category='.$Category); … … 185 187 $Output .= ' <a href="index.php?action=edit&category='.$Category.'&id='.$Row['Id'].'">Editovat</a>'; 186 188 } 187 $Output .= '</div>'.$ Row['Content'].'<br />';189 $Output .= '</div>'.$News->ModifyContent($Row['Content']).'<br />'; 188 190 if($Row['Enclosure'] != '') 189 191 { 190 192 $Output .= '<br />Přílohy: '; 191 193 $Enclosures = explode(';', $Row['Enclosure']); 192 193 194 foreach($Enclosures as $Enclosure) 195 { 194 196 if(file_exists($this->UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$this->UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 195 197 } 196 198 } 197 199 $Output .= '</div>';
Note:
See TracChangeset
for help on using the changeset viewer.