Changeset 151 for www/aktuality/rss.php


Ignore:
Timestamp:
Feb 16, 2009, 1:04:24 PM (16 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/rss.php

    r129 r151  
    11<?php
    22
    3 header("Content-Type: text/xml");
     3Header("Content-Type: text/xml");
    44
    55include_once('../global.php');
     
    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/*
     38$ForumCategory = 4;   
    3839$Database->select_db('forum');
    3940$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 
    4141$Index = 0;
    4242//echo(DB_NumRows().',');
    4343while($Row = $DbResult->fetch_array())
    4444{
    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 
    5151  $Title = $Row['topic_title'].'-'.$Row['post_subject'];
    5252  $Content = $Row['post_text'];
     
    6161  $Database->select_db('forum');
    6262}
     63*/
    6364$Database->select_db('is');
    6465
Note: See TracChangeset for help on using the changeset viewer.