Changeset 96 for devel/www/aktuality/index.php
- Timestamp:
- Jul 31, 2008, 12:09:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/www/aktuality/index.php
r87 r96 26 26 switch($_GET['action']) 27 27 { 28 case 'view': 29 if(!$this->System->Modules['User']->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění'; 30 else 31 { 32 if(array_key_exists('id', $_GET)) $Id = $_GET['id'] * 1; 33 $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `news`.`id`='.$Id); 34 if($DbResult->num_rows > 0) 35 { 36 $Row = $DbResult->fetch_array(); 37 $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']).', '.$Row['Name'].$Row['author'].')</strong>'; 38 if($this->System->Modules['User']->User['Id'] == $Row['User']) 39 { 40 $Output .= ' <a href="index.php?action=del&category='.$Category.'&id='.$Row['id'].'">Smazat</a>'; 41 $Output .= ' <a href="index.php?action=edit&category='.$Category.'&id='.$Row['id'].'">Editovat</a>'; 42 } 43 $Output .= '</div>'.$Row['content'].'<br />'; 44 if($Row['enclosure'] != '') 45 { 46 $Output .= '<br />Přílohy: '; 47 $Enclosures = explode(';', $Row['enclosure']); 48 foreach($Enclosures as $Enclosure) 49 { 50 if(file_exists($this->UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$this->UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 51 } 52 } 53 $Output .= '</div>'; 54 } else $Output .= 'Položka nenalezena.'; 55 } 56 break; 28 57 case 'add': 29 58 $Output .= '<strong>Vložení nové aktuality:</strong><br />';
Note:
See TracChangeset
for help on using the changeset viewer.