Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problemik z cms'em
raf2001
post
Post #1





Grupa: Zarejestrowani
Postów: 116
Pomógł: 0
Dołączył: 14.06.2002
Skąd: Żyrardów

Ostrzeżenie: (0%)
-----


Witam!
MAm malutki problem z moim cms'em. Otórz na poczekanie zrobiłem prosty sustem newsów (oto on w skrócie):
  1. <?php
  2.  
  3. class news {
  4. var $news_author, $news_date, $news_subject, $news_id, $news_text;
  5.  
  6. function pokaz_one ($il_znakow = ''){
  7. $sql = new db($MySQL_Host, $MySQL_User, $MySQL_Password, $MySQL_DataBase);
  8. $sql->query(&#092;"SELECT * FROM\" . cms_news);
  9. $row = $sql->fetch_array();
  10.  $this->news_id = $row['news_id'];
  11.  $this->news_author = $row['news_author'];
  12.  $this->news_text = $row['news_text'];
  13.  $this->news_date = $row['news_date'];
  14.  $this->news_subject = $row['news_subject'];
  15.  
  16. if ($il_znakow = '') {
  17. $this->news_text;
  18. } else {
  19. $this->news_text = substr($this->news_text, 0, $il_znakow);
  20. }
  21.  }
  22.  
  23. ?>
lecz niewiem czemu niechce on wyświetlać mi wyników, a klasa do mysql'a działa poprawnie. W pliku index.php mam taki kod:
  1. <?php
  2. $news= new news;
  3.  $news->pokaz_one();
  4.  
  5. $output = new output('templates/index.tpl');
  6. $output_values = array('tytul' => 'DIRECTORY.COM.PL',
  7.  'stopka' => $stoper->koniec(),
  8.  'news_id' => $news->news_id,
  9.  'news_subject' => $news->news_subject,
  10.  'news_author' => $news->news_author,
  11.  'news_date' => $news->news_date,
  12.  'news_text' => $news->news_text);
  13. $output->save($output_values);
  14. print $output->show();
  15.  
  16. ?>
i własnie czemu nic w to miejsce niewkleja, templet działa bo inne info mi wyświetla. pomóżcie z góry tnx


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 16:06