Ignore:
Timestamp:
Feb 16, 2009, 1:04:24 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Import aktualit z webu zdechov.cz
  • Upraveno: Přepracovány aktuality na nový systém.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • www/aktuality/subscription.php

    r4 r151  
    11<?php
    2 include_once('../style.php');
    3 ShowHeader('Sestavéní RSS kanálu', 'RSS kanál');
    42
    5 if(array_key_exists('build', $_GET))
     3include_once('../global.php');
     4
     5class NewsRSSChannelPage extends Page
    66{
    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);
    1135  }
    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>');
    2536}
    2637
    27 ShowFooter();
     38$System->AddModule(new NewsRSSChannelPage());
     39$System->Modules['NewsRSSChannelPage']->GetOutput();
     40
    2841?>
Note: See TracChangeset for help on using the changeset viewer.