Changeset 533 for trunk/Modules/News
- Timestamp:
- Apr 24, 2013, 10:10:33 PM (12 years ago)
- Location:
- trunk/Modules/News
- Files:
-
- 2 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportKinoVatra.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.dkvsetin.cz/rss/kino/8'; -
trunk/Modules/News/ImportObecHovezi.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.obec-hovezi.cz/web/rss.xml'; -
trunk/Modules/News/ImportTvBeskyd.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://dviproduction.cz/video/playlist.xml'; -
trunk/Modules/News/ImportZdechovCzNews.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.zdechov.cz/'; -
trunk/Modules/News/ImportZdechovCzRecords.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.zdechov.cz/?page=uredni_deska'; -
trunk/Modules/News/News.php
r532 r533 98 98 while($NewsCategory = $DbResult->fetch_array()) 99 99 { 100 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 100 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 101 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 101 102 $I++; 102 103 } -
trunk/Modules/News/NewsPage.php
r532 r533 36 36 else $Author = $Row['Name']; 37 37 $Output .= '<div class="Panel"><div class="Title">'.$Row['Title'].' ('.HumanDate($Row['Date']).', '.$Author.')'; 38 if( $this->System->User->User['Id'] == $Row['User'])38 if(($this->System->User->User['Id'] == $Row['User']) and ($this->System->User->CheckPermission('News', 'Insert', 'Group', $Category['Id']))) 39 39 { 40 40 $Output .= '<div class="Action">'; … … 63 63 function ShowAdd() 64 64 { 65 $Output = ''; 65 66 $Category = $this->GetCategory(); 66 67 if($this->System->User->CheckPermission('News', 'Insert', 'Group', $Category['Id'])) … … 148 149 'Nadpis:<br /><input type="text" size="54" name="title" value="'.$Row['Title'].'"><br />'. 149 150 'Obsah:<br /><textarea name="content" rows="20" cols="40">'.$Row['Content'].'</textarea><br />'. 150 'Odkaz:<br /><input type="text" size="54" name="link" ><br />'.151 'Odkaz:<br /><input type="text" size="54" name="link" value="'.$Row['Link'].'"><br />'. 151 152 '<input type="hidden" name="category" value="'.$Category['Id'].'"><br />'. 152 153 '<input type="submit" value="Uložit">'. … … 258 259 function GetCategory() 259 260 { 260 $Category = 1; // Default category261 if(array_key_exists('category', $_GET)) $Category = $_GET['category'] * 1;262 if(array_key_exists('category', $_POST)) $Category = $_POST['category'] * 1;263 if(is_null($Category)) throw new Exception('Kategorie neurčena');261 $Category = array('Id' => 1); // Default category 262 if(array_key_exists('category', $_GET)) $Category['Id'] = $_GET['category'] * 1; 263 if(array_key_exists('category', $_POST)) $Category['Id'] = $_POST['category'] * 1; 264 //if(is_null($Category)) throw new Exception('Kategorie neurčena'); 264 265 else 265 266 { 266 $DbResult = $this->Database->select('NewsCategory', '*', '`Id`='.$Category .' ORDER BY `Sequence`');267 $DbResult = $this->Database->select('NewsCategory', '*', '`Id`='.$Category['Id'].' ORDER BY `Sequence`'); 267 268 if($DbResult->num_rows > 0) $Category = $DbResult->fetch_array(); 268 else throw new Exception('Kategorie nenalezena');269 else $Category = array('Id' => 0); //throw new Exception('Kategorie nenalezena'); 269 270 } 270 271 return($Category);
Note:
See TracChangeset
for help on using the changeset viewer.