Changeset 151
- Timestamp:
- Feb 16, 2009, 1:04:24 PM (16 years ago)
- Location:
- www
- Files:
-
- 3 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
www/aktuality/index.php
r27 r151 1 1 <?php 2 include_once('../style.php'); 3 ShowHeader('Aktualní informace', 'Aktuality'); 4 5 //ShowArray($GLOBALS); 6 // Zobrazení aktualit 7 8 $UploadedFilesFolder = 'uploads/'; 9 10 $Category = 1; 11 $CategoryName = ''; 12 if(array_key_exists('category', $_GET)) $_POST['category'] = $_GET['category']; 13 if(array_key_exists('category', $_POST)) 2 3 include_once('../global.php'); 4 5 class NewsPage extends Page 14 6 { 15 $Category = $_POST['category']; 16 $DbResult = $Database->select('news_category', '*', 'id='.$_POST['category']); 17 if($DbResult->num_rows > 0) 7 var $FullTitle = 'Aktualní informace'; 8 var $ShortTitle = 'Aktuality'; 9 var $UploadedFilesFolder = 'uploads/'; 10 11 function Show() 18 12 { 19 $Row = $DbResult->fetch_array(); 20 $CategoryName = $Row['caption']; 21 $Permission = $Row['permission']; 22 } 23 } 24 25 if(!array_key_exists('action',$_GET)) $_GET['action'] = ''; 26 switch(addslashes($_GET['action'])) 27 { 28 case 'add': 29 echo('<strong>Vložení aktuality do kategorie '.$CategoryName.':</strong><br>'); 30 if($Category == 2) echo('U inzerátů uvádějte co nejvíce informací ať případný zájemce víc co kupuje. Uvádějte kontaktní pdaje jako Jméno, email, tel. číslo, ICQ. Dále navrženou cenu, detajlní popis předmětu nejlépe s odkazem na stránky výrobce. Pokud váš inzerát není platný, připište do něj např. Prodáno pomocí editace.'); 31 echo('<form enctype="multipart/form-data" action="index.php?action=add2" method="post">'. 32 '<input type="hidden" value="'.$Category.'" name="category">'. 33 'Nadpis:<br><input type="text" size="54" name="title"><br> 34 Autor:<br><input type="text" size="54" name="author"><br> 35 Obsah:<br><textarea name="content" rows="20" cols="40"></textarea><br> 36 Přílohy(Max. velikost souboru 1 MB):<br><input type="hidden" name="MAX_FILE_SIZE" value="1000000"> 37 <input name="enclosure1" size="38" type="file"><br> 38 <input name="enclosure2" size="38" type="file"><br> 39 <input name="enclosure3" size="38" type="file"><br> 40 <input type="submit" value="Vložit"> 41 </form>'); 42 break; 43 case 'add2': 44 $RemoteAddr = GetRemoteAddress(); 45 $_POST['category'] = $_POST['category'] * 1; 46 if($Permission == 1) 47 { 48 49 //print_r($_FILES); 50 // Process uploaded file 51 $EnclosureFileNames = array('enclosure1', 'enclosure2', 'enclosure3'); 52 $Enclosures = ''; 53 foreach($EnclosureFileNames as $EnclosureName) 54 if(array_key_exists($EnclosureName, $_FILES) and ($_FILES[$EnclosureName]['name'] != '')) 55 { 56 57 $UploadedFilePath = $UploadedFilesFolder.basename($_FILES[$EnclosureName]['name']); 58 if(move_uploaded_file($_FILES[$EnclosureName]['tmp_name'], $UploadedFilePath)) 59 { 60 echo("Soubor ".basename($_FILES[$EnclosureName]['name'])." byl uložen na serveru.<br>"); 61 $Enclosures = $Enclosures.';'.basename($_FILES[$EnclosureName]['name']); 62 } else 63 { 64 echo("Soubor ".basename($_FILES[$EnclosureName]['name'])." se nepodařilo nahrát na server.<br>"); 65 } 66 } 67 $Enclosures = substr($Enclosures, 1); 68 69 $_POST['content'] = str_replace("\n",'<br>',$_POST['content']); 70 $Database->insert('news',array('category' => $_POST['category'], 'author' => $_POST['author'], 'title' => $_POST['title'], 'content' => $_POST['content'], 71 'date' => 'NOW()', 'ip' => $RemoteAddr, 'enclosure' => $Enclosures)); 72 echo('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>'); 73 echo('<a href="index.php?category='.$_POST['category'].'">Zpět na seznam aktualit</a>'); 74 75 76 } else echo('Do této kategorie nelze vložit aktualitu!'); 77 break; 78 case 'edit': 79 $DbResult = $Database->query('SELECT * FROM news WHERE id='.$_GET['id']); 80 $Row = $DbResult->fetch_array(); 81 if($Row['ip'] == GetRemoteAddress()) 82 { 83 $Row['content'] = str_replace('<br>', "", $Row['content']); 84 echo('<strong>Editace aktuality v kategorii '.$CategoryName.':</strong><br>'); 85 echo('<form action="index.php?action=update" method="post">'. 86 '<input type="hidden" value="'.$_GET['id'].'" name="id">'. 87 'Nadpis:<br><input type="text" size="54" name="title" value="'.$Row['title'].'"><br>'. 88 'Autor:<br><input type="text" size="54" name="author" value="'.$Row['author'].'"><br>'. 89 'Obsah:<br><textarea name="content" rows="20" cols="40">'.$Row['content'].'</textarea><br>'. 90 '<input type="hidden" name="category" value="'.$_GET['category'].'"><br>'. 91 '<input type="submit" value="Uložit">'. 92 '</form>'); 93 } else echo('Nepovolená operace!'); 94 break; 95 case 'update': 96 $RemoteAddr = GetRemoteAddress(); 97 $_POST['id'] = $_POST['id'] * 1; 98 $DbResult = $Database->select('news','ip','id='.$_POST['id']); 99 if($DbResult->num_rows > 0) 13 $Output = ''; 14 $Category = 1; 15 $CategoryName = ''; 16 if(array_key_exists('category', $_GET)) $Category = $_GET['category'] * 1; 17 if(array_key_exists('category', $_POST)) $Category = $_POST['category'] * 1; 18 $DbResult = $this->Database->select('news_category', '*', 'id='.$Category); 19 if($DbResult->num_rows > 0) 100 20 { 101 21 $Row = $DbResult->fetch_array(); 102 if($Row['ip'] == GetRemoteAddress()) 22 $CategoryName = $Row['caption']; 23 } 24 25 if(!array_key_exists('action',$_GET)) $_GET['action'] = ''; 26 switch($_GET['action']) 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; 57 case 'add': 58 $Output .= '<strong>Vložení nové aktuality:</strong><br />'; 59 if($Category == 2) $Output .= 'U inzerátů uvádějte co nejvíce informací ať případný zájemce ví co kupuje. Uvádějte kontaktní údaje jako Jméno, email, tel. číslo, ICQ. Dále navrženou cenu, detajlní popis předmětu nejlépe s odkazem na stránky výrobce. Pokud váš inzerát již není platný, připište do něj např. "Prodáno" pomocí editace.'; 60 $Output .= '<form enctype="multipart/form-data" action="?action=add2" method="post">'. 61 'Kategorie: <select name="category">'; 62 $DbResult = $this->Database->select('news_category', '*'); 63 while($DbRow = $DbResult->fetch_array()) 64 { 65 if($this->System->Modules['User']->CheckPermission('News', 'Insert', 'Group', $DbRow['id'])) 103 66 { 104 $_POST['content'] = str_replace("\n",'<br>',$_POST['content']); 105 $Database->update('news','id='.$_POST['id'], array('author' => $_POST['author'], 'title' => $_POST['title'], 'content' => $_POST['content'])); 106 echo('Aktualita uložena!<br>'); 107 echo('<a href="index.php?category='.$_POST['category'].'">Zpět na seznam aktualit</a>'); 108 } else echo('Nelze měnit cizí aktualitu!<br>'); 109 } else echo('ID nenalezeno!'); 110 break; 111 case 'del': 112 $DbResult = $Database->query('SELECT * FROM news WHERE id='.$_GET['id']); 113 $Row = $DbResult->fetch_array(); 114 if($Row['ip'] == GetRemoteAddress()) 115 { 116 if($Row['enclosure'] != '') 117 { 118 echo('<br>Přílohy: '); 119 $Enclosures = explode(';', $Row['enclosure']); 67 if($DbRow['id'] == $Category) $Selected = ' selected="1"'; else $Selected = ''; 68 $Output .= '<option value="'.$DbRow['id'].'"'.$Selected.'>'.$DbRow['caption'].'</option>'; 69 } 70 } 71 $Output .= '</select><br />'. 72 'Nadpis:<br /><input type="text" size="54" name="title"><br /> 73 Obsah:<br /><textarea name="content" rows="20" cols="40"></textarea><br /> 74 Přílohy (Max. velikost souboru 1 MB):<br /><input type="hidden" name="MAX_FILE_SIZE" value="1000000"> 75 <input name="enclosure1" size="38" type="file"><br /> 76 <input name="enclosure2" size="38" type="file"><br /> 77 <input name="enclosure3" size="38" type="file"><br /> 78 <input type="submit" value="Vložit"> 79 </form>'; 80 break; 81 case 'add2': 82 $RemoteAddr = GetRemoteAddress(); 83 if($this->System->Modules['User']->CheckPermission('News', 'Insert', 'Group', $Category)) 84 { 85 //print_r($_FILES); 86 // Process uploaded file 87 $EnclosureFileNames = array('enclosure1', 'enclosure2', 'enclosure3'); 88 $Enclosures = ''; 89 foreach($EnclosureFileNames as $EnclosureName) 90 if(array_key_exists($EnclosureName, $_FILES) and ($_FILES[$EnclosureName]['name'] != '')) 91 { 92 $UploadedFilePath = $this->UploadedFilesFolder.basename($_FILES[$EnclosureName]['name']); 93 if(move_uploaded_file($_FILES[$EnclosureName]['tmp_name'], $UploadedFilePath)) 94 { 95 $Output .= "Soubor ".basename($_FILES[$EnclosureName]['name'])." byl uložen na serveru.<br />"; 96 $Enclosures = $Enclosures.';'.basename($_FILES[$EnclosureName]['name']); 97 } else 98 { 99 $Output .= "Soubor ".basename($_FILES[$EnclosureName]['name'])." se nepodařilo nahrát na server.<br />"; 100 } 101 } 102 $Enclosures = substr($Enclosures, 1); 103 104 $_POST['content'] = str_replace("\n",'<br />',$_POST['content']); 105 $this->Database->insert('news',array('category' => $Category, 'title' => $_POST['title'], 'content' => $_POST['content'], 'date' => 'NOW()', 'ip' => $RemoteAddr, 'enclosure' => $Enclosures, 'User' => $this->System->Modules['User']->User['Id'])); 106 $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 />'; 107 $Output .= '<a href="index.php?category='.$_POST['category'].'">Zpět na seznam aktualit</a>'; 108 $this->System->Modules['Log']->NewRecord('News', 'Aktualita přidána', $this->Database->insert_id); 109 } else $Output .= 'Do této kategorie nemůžete vkládat aktuality!'; 110 break; 111 case 'edit': 112 $DbResult = $this->Database->query('SELECT * FROM news WHERE id='.$_GET['id']); 113 $Row = $DbResult->fetch_array(); 114 if($this->System->Modules['User']->User['Id'] == $Row['User']) 115 { 116 $Row['content'] = str_replace('<br />', "", $Row['content']); 117 $Output .= '<strong>Editace aktuality v kategorii '.$CategoryName.':</strong><br />'; 118 $Output .= '<form action="index.php?action=update" method="post">'. 119 '<input type="hidden" value="'.$_GET['id'].'" name="id">'. 120 'Nadpis:<br /><input type="text" size="54" name="title" value="'.$Row['title'].'"><br />'. 121 'Obsah:<br /><textarea name="content" rows="20" cols="40">'.$Row['content'].'</textarea><br />'. 122 '<input type="hidden" name="category" value="'.$Category.'"><br />'. 123 '<input type="submit" value="Uložit">'. 124 '</form>'; 125 } else $Output .= 'Nepovolená operace!'; 126 break; 127 case 'update': 128 $RemoteAddr = GetRemoteAddress(); 129 $_POST['id'] = $_POST['id'] * 1; 130 $DbResult = $this->Database->select('news', '*', 'id='.$_POST['id']); 131 if($DbResult->num_rows > 0) 132 { 133 $Row = $DbResult->fetch_array(); 134 if($this->System->Modules['User']->User['Id'] == $Row['User']) 135 { 136 $_POST['content'] = str_replace("\n",'<br />',$_POST['content']); 137 $this->Database->update('news', 'id='.$_POST['id'], array('title' => $_POST['title'], 'content' => $_POST['content'])); 138 $Output .= 'Aktualita uložena!<br />'; 139 $Output .= '<a href="index.php?category='.$Category.'">Zpět na seznam aktualit</a>'; 140 } else $Output .= 'Nelze měnit cizí aktualitu!<br />'; 141 } else $Output .= 'ID nenalezeno!'; 142 break; 143 case 'del': 144 $DbResult = $this->Database->query('SELECT * FROM news WHERE id='.$_GET['id']); 145 $Row = $DbResult->fetch_array(); 146 if($this->System->Modules['User']->User['Id'] == $Row['User']) 147 { 148 if($Row['enclosure'] != '') 149 { 150 $Output .= '<br />Přílohy: '; 151 $Enclosures = explode(';', $Row['enclosure']); 152 foreach($Enclosures as $Enclosure) 153 { 154 if(file_exists($this->UploadedFilesFolder.$Enclosure)) unlink($this->UploadedFilesFolder.$Enclosure); 155 } 156 } 157 $this->Database->query('DELETE FROM news WHERE id='.$_GET['id']); 158 $Output .= 'Aktualita smazána!<br /><a href="index.php?category='.$Category.'">Zpět na seznam aktualit</a>'; 159 } else $Output .= 'Nemáte oprávnění.'; 160 break; 161 default: 162 if($this->System->Modules['User']->CheckPermission('News', 'Display', 'Group', $Category)) 163 { 164 $PerPage = 20; 165 $DbResult = $this->Database->select('news', 'COUNT(*)', ' category='.$Category); 166 $RowTotal = $DbResult->fetch_array(); 167 $PageMax = $RowTotal[0]; 168 if(array_key_exists('page', $_GET)) $Page = $_GET['page']; else $Page = 0; //round($PageMax/$PerPage); 169 $Output .= '<strong>Seznam aktualit kategorie '.$CategoryName.':</strong><div style="font-size: small;">'; 170 $Output .= PagesList('?category='.$Category.'&page=',$Page,$PageMax,$PerPage); 171 172 //echo(GetRemoteAddress().','.$_SERVER['HTTP_X_FORWARDED_FOR'].'<br />'); 173 $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `category`='.$Category.' ORDER BY `news`.`id` DESC LIMIT '.($Page * $PerPage).','.$PerPage); 174 while($Row = $DbResult->fetch_array()) 175 { 176 $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><a href="?action=view&id='.$Row['id'].'">'.$Row['title'].'</a> ('.HumanDate($Row['date']).', '.$Row['Name'].$Row['author'].')</strong>'; 177 if($this->System->Modules['User']->User['Id'] == $Row['User']) 178 { 179 $Output .= ' <a href="index.php?action=del&category='.$Category.'&id='.$Row['id'].'">Smazat</a>'; 180 $Output .= ' <a href="index.php?action=edit&category='.$Category.'&id='.$Row['id'].'">Editovat</a>'; 181 } 182 $Output .= '</div>'.$Row['content'].'<br />'; 183 if($Row['enclosure'] != '') 184 { 185 $Output .= '<br />Přílohy: '; 186 $Enclosures = explode(';', $Row['enclosure']); 120 187 foreach($Enclosures as $Enclosure) 121 {122 if(file_exists($ UploadedFilesFolder.$Enclosure)) unlink($UploadedFilesFolder.$Enclosure);188 { 189 if(file_exists($this->UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$this->UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 123 190 } 124 } 125 126 $Database->query('DELETE FROM news WHERE id='.$_GET['id']); 127 echo('Aktualita smazána!<br><a href="index.php?category='.$_GET['category'].'">Zpět na seznam aktualit</a>'); 191 } 192 $Output .= '</div>'; 193 } 194 $Output .= PagesList('?category='.$Category.'&page=', $Page, $PageMax, $PerPage); 195 $Output .= '</div>'; 196 } else $Output .= 'Nemáte oprávnění.'; 128 197 } 129 break; 130 default: 131 $PerPage = 20; 132 $DbResult = $Database->select('news','COUNT(*)',' category='.$Category); 133 $RowTotal = $DbResult->fetch_array(); 134 $PageMax = $RowTotal[0]; 135 if(array_key_exists('page', $_GET)) $Page = $_GET['page']; else $Page = 0; //round($PageMax/$PerPage); 136 echo('<strong>Seznam aktualit kategorie '.$CategoryName.':</strong><div style="font-size: small;">'); 137 echo(PagesList('?category='.$Category.'&page=',$Page,$PageMax,$PerPage)); 138 139 //echo(GetRemoteAddress().','.$_SERVER['HTTP_X_FORWARDED_FOR'].'<br>'); 140 $DbResult = $Database->query('SELECT * FROM news WHERE category='.$Category.' ORDER BY id DESC LIMIT '.$Page*$PerPage.','.$PerPage); 141 while($Row = $DbResult->fetch_array()) 142 { 143 echo('<div style="border: thin dotted #97ADFF; background: #F6F7FF; margin-top: 5px; padding: 0px 5px 5px 5px;">'. 144 '<div style="padding-bottom: 1px; border-bottom-width: 1; border-bottom-style: solid; border-bottom-color: silver;"><strong>'.$Row['title'].' ('.HumanDate($Row['date']).', '.$Row['author'].')</strong>'); 145 if($Row['ip'] == GetRemoteAddress()) 146 { 147 echo(' <a href="index.php?action=del&category='.$Category.'&id='.$Row['id'].'">Smazat</a>'); 148 echo(' <a href="index.php?action=edit&category='.$Category.'&id='.$Row['id'].'">Editovat</a>'); 149 } 150 echo('</div>'.$Row['content'].'<br>'); 151 if($Row['enclosure'] != '') 152 { 153 echo('<br>Přílohy: '); 154 $Enclosures = explode(';', $Row['enclosure']); 155 foreach($Enclosures as $Enclosure) 156 { 157 if(file_exists($UploadedFilesFolder.$Enclosure)) echo(' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'); 158 } 159 } 160 echo('</div>'); 161 } 162 echo(PagesList('?category='.$Category.'&page=',$Page,$PageMax,$PerPage)); 163 echo('</div>'); 198 return($Output); 199 } 164 200 } 165 ShowFooter(); 201 202 $System->AddModule(new NewsPage()); 203 $System->Modules['NewsPage']->GetOutput(); 204 166 205 ?> -
www/aktuality/rss.php
r129 r151 1 1 <?php 2 2 3 header("Content-Type: text/xml");3 Header("Content-Type: text/xml"); 4 4 5 5 include_once('../global.php'); … … 21 21 foreach($Parts as $Part) 22 22 { 23 $Where .= 'OR (category='.($Part * 1).')'; 23 $Where .= 'OR (category='.($Part * 1).')'; 24 24 } 25 25 $Where = substr($Where, 2); … … 35 35 36 36 // Update news from discussion forum 37 $ForumCategory = 4; 37 /* 38 $ForumCategory = 4; 38 39 $Database->select_db('forum'); 39 40 $DbResult = $Database->query('SELECT posts.post_time, posts_text.post_subject, posts_text.post_text, users.username, topics.topic_title FROM posts JOIN posts_text ON posts.post_id = posts_text.post_id JOIN users ON users.user_id = posts.poster_id JOIN topics ON topics.topic_id= posts.topic_id ORDER BY post_time DESC LIMIT '.$NewsCount); 40 41 41 $Index = 0; 42 42 //echo(DB_NumRows().','); 43 43 while($Row = $DbResult->fetch_array()) 44 44 { 45 $Row['post_text'] = StrTr($Row['post_text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 46 $Row['post_text'] = str_replace("\n","<br>", $Row['post_text']); 47 $Row['post_subject'] = StrTr($Row['post_subject'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 48 $Row['topic_title'] = StrTr($Row['topic_title'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 49 $Index = $Index + 1; 50 45 $Row['post_text'] = StrTr($Row['post_text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 46 $Row['post_text'] = str_replace("\n","<br>", $Row['post_text']); 47 $Row['post_subject'] = StrTr($Row['post_subject'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 48 $Row['topic_title'] = StrTr($Row['topic_title'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 49 $Index = $Index + 1; 50 51 51 $Title = $Row['topic_title'].'-'.$Row['post_subject']; 52 52 $Content = $Row['post_text']; … … 61 61 $Database->select_db('forum'); 62 62 } 63 */ 63 64 $Database->select_db('is'); 64 65 -
www/aktuality/rss_generator.php
r129 r151 6 6 { 7 7 global $Config; 8 8 9 9 $Result = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'" ?>'."\n". //<? 10 10 '<rss version="2.0">'."\n". … … 15 15 " <language>cs</language>\n". 16 16 " <webMaster>".$Data['WebmasterEmail']."</webMaster>\n". 17 " <pubDate>".date('r')."</pubDate>\n". 17 " <pubDate>".date('r')."</pubDate>\n". 18 18 " <ttl>20</ttl>\n"; 19 19 foreach($Data['Items'] as $Item) … … 22 22 ' <title>'.htmlspecialchars($Item['Title'])."</title>\n". 23 23 ' <description>'.htmlspecialchars($Item['Description'])."</description>\n". 24 25 24 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n". 25 ' <link>'.$Item['Link']."</link>\n". 26 26 " </item>\n"; 27 27 } -
www/aktuality/subscription.php
r4 r151 1 1 <?php 2 include_once('../style.php');3 ShowHeader('Sestavéní RSS kanálu', 'RSS kanál');4 2 5 if(array_key_exists('build', $_GET)) 3 include_once('../global.php'); 4 5 class NewsRSSChannelPage extends Page 6 6 { 7 $Select = ''; 8 foreach($_POST as $Index => $Item) 9 { 10 if(substr($Index, 0, 8) == 'category') $Select .= '-'.substr($Index, 8); 7 var $FullTitle = 'Sestavéní RSS kanálu'; 8 var $ShortTitle = 'RSS kanál'; 9 10 function Show() 11 { 12 if(array_key_exists('build', $_GET)) 13 { 14 $Select = ''; 15 foreach($_POST as $Index => $Item) 16 { 17 if(substr($Index, 0, 8) == 'category') $Select .= '-'.substr($Index, 8); 18 } 19 $Select = $this->System->Config['Web']['RootFolder'].'/aktuality/rss.php?select='.substr($Select, 1); 20 $Output = 'Výsledný RSS kanál: <a href="'.$Select.'">'.$Select.'</a>'; 21 } else 22 { 23 $Output = 'Vytvořte si vlastní RSS kanál, díky kterému budete moci automaticky sledovat novinky pomocí vaší RSS čtečky. Informace o technologii RSS a programech pro čtení kanálů najdete např. <a href="http://www.lupa.cz/clanky/prehled-rss-ctecek/">zde</a><br />'. 24 '<br />Kategorie:<br />'; 25 $Output .= '<form action="subscription.php?build=1" method="post">'; 26 $DbResult = $this->Database->select('news_category', '*', '1 ORDER BY caption'); 27 while($Category = $DbResult->fetch_array()) 28 { 29 $Output .= '<input type="checkbox" name="category'.$Category['id'].'" />'.$Category['caption'].'<br />'; 30 } 31 $Output.= '<input type="submit" value="Sestavit " />'. 32 '</form>'; 33 } 34 return($Output); 11 35 } 12 $Select = 'http://centrala.zdechov.net/aktuality/rss.php?select='.substr($Select, 1);13 echo('Výsledný RSS kanál: <a href="'.$Select.'">'.$Select.'</a>');14 } else {15 echo('Vytvořte si vlastní RSS kanál, díky kterému budete moci automaticky sledovat novinky pomocí vaší RSS čtečky. Informace o technologii RSS a programech pro čtení kanálů najdete např. <a href="http://www.lupa.cz/clanky/prehled-rss-ctecek/">zde</a><br>'.16 '<br>Kategorie:<br>');17 echo('<form action="subscription.php?build=1" method="post">');18 $DbResult = $Database->select('news_category', '*', '1 ORDER BY caption');19 while($Category = $DbResult->fetch_array())20 {21 echo('<input type="checkbox" name="category'.$Category['id'].'">'.$Category['caption'].'<br>');22 }23 echo('<input type="submit" value="Sestavit ">');24 echo('</form>');25 36 } 26 37 27 ShowFooter(); 38 $System->AddModule(new NewsRSSChannelPage()); 39 $System->Modules['NewsRSSChannelPage']->GetOutput(); 40 28 41 ?> -
www/finance/bills.php
r144 r151 1 1 <?php 2 include('code.php');3 2 4 3 class InvoiceGenerator -
www/temp/transform.php
r148 r151 58 58 ), 59 59 ), 60 ' Kavárna Centrum' => array(61 'Notice' => '', 62 'LastUpdateTime' => '200 6-09-13',63 'Intervals' => array( 64 array('DayOfWeek' => 0, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '2 1:00:00'),65 array('DayOfWeek' => 1, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '2 1:00:00'),66 array('DayOfWeek' => 2, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '2 1:00:00'),67 array('DayOfWeek' => 3, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '2 1:00:00'),68 array('DayOfWeek' => 4, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '2 1:00:00'),69 array('DayOfWeek' => 5, 'Index' => 0, 'OpenTime' => '1 5:00:00', 'CloseTime' => '22:00:00'),60 'Svijanská pivnice' => array( 61 'Notice' => '', 62 'LastUpdateTime' => '2009-02-16', 63 'Intervals' => array( 64 array('DayOfWeek' => 0, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '22:00:00'), 65 array('DayOfWeek' => 1, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '22:00:00'), 66 array('DayOfWeek' => 2, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '22:00:00'), 67 array('DayOfWeek' => 3, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '23:00:00'), 68 array('DayOfWeek' => 4, 'Index' => 0, 'OpenTime' => '15:00:00', 'CloseTime' => '23:00:00'), 69 array('DayOfWeek' => 5, 'Index' => 0, 'OpenTime' => '10:30:00', 'CloseTime' => '22:00:00'), 70 70 ), 71 71 ), … … 143 143 $PermissionGroupMembers = $this->Database->insert_id; 144 144 $this->Database->insert('PermissionGroupAssignment', array('Group' => $PermissionGroupMembers, 'GroupOrOperation' => $PermissionGroupOthers, 'Type' => 'Group')); 145 echo($this->Database->LastQuery);145 //echo($this->Database->LastQuery); 146 146 $this->Database->insert('PermissionGroup', array('Description' => 'Zástupci za domácnost')); 147 147 $PermissionGroupSubjects = $this->Database->insert_id;
Note:
See TracChangeset
for help on using the changeset viewer.