Changeset 129 for www/aktuality


Ignore:
Timestamp:
Jan 5, 2009, 7:31:45 AM (16 years ago)
Author:
george
Message:
  • Odstraněno: Openwebmail. * Odstraněno: phpMyAdmin. * Upraveno: Mnoho malých úprav a oprav.
Location:
www/aktuality
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www/aktuality/rss.php

    r4 r129  
    2121  foreach($Parts as $Part)
    2222  {
    23     $Where .= 'OR (category='.($Part * 1).')'; 
     23    $Where .= 'OR (category='.($Part * 1).')';
    2424  }
    2525  $Where = substr($Where, 2);
     
    3535
    3636// Update news from discussion forum
    37 $ForumCategory = 4;   
     37$ForumCategory = 4;
    3838$Database->select_db('forum');
    3939$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
    4041$Index = 0;
    4142//echo(DB_NumRows().',');
    4243while($Row = $DbResult->fetch_array())
    4344{
    44   $Row['post_text'] = StrTr($Row['post_text'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 
    45   $Row['post_text'] = str_replace("\n","<br>", $Row['post_text']); 
    46   $Row['post_subject'] = StrTr($Row['post_subject'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 
    47   $Row['topic_title'] = StrTr($Row['topic_title'], "\x8A\x8D\x8E\x9A\x9D\x9E", "\xA9\xAB\xAE\xB9\xBB\xBE"); 
    48   $Index = $Index + 1;   
    49  
     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
    5051  $Title = $Row['topic_title'].'-'.$Row['post_subject'];
    5152  $Content = $Row['post_text'];
  • www/aktuality/rss_generator.php

    r4 r129  
    66{
    77  global $Config;
    8  
     8
    99  $Result = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'" ?>'."\n". //<?
    1010  '<rss version="2.0">'."\n".
     
    1515  "    <language>cs</language>\n".
    1616  "    <webMaster>".$Data['WebmasterEmail']."</webMaster>\n".
    17   "    <pubDate>".date('r')."</pubDate>\n". 
     17  "    <pubDate>".date('r')."</pubDate>\n".
    1818  "    <ttl>20</ttl>\n";
    1919  foreach($Data['Items'] as $Item)
     
    2222    '      <title>'.htmlspecialchars($Item['Title'])."</title>\n".
    2323    '      <description>'.htmlspecialchars($Item['Description'])."</description>\n".
    24           '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
    25           '      <link>'.$Item['Link']."</link>\n".
     24    '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
     25    '      <link>'.$Item['Link']."</link>\n".
    2626    "    </item>\n";
    2727  }
Note: See TracChangeset for help on using the changeset viewer.