Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][PHP]Mam problem w skrypcie, pomocy!
donny
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 7.11.2010

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


Witam serdecznie, to mój pierwszy post na forum, ale obiecuję, że nie ostatni. Jestem kompletnie zielony jeśli chodzi o tworzenie stron, ale ostatnio kupiłem stronę internetową o tematyce akordeonowej. Przy wstawianiu artykułów pojawia mi się błąd - zobaczcie sami:

http://akordeon-portal.pl/zasadymuzyki.php

klikając NASTĘPNA STRONA otwiera mi się pusta strona i nie wyświetla się żaden inny artykuł choć powinno ich być 23.

Proszę, jeśli wiecie co to za błąd, pomóżcie, będę wdzięczny.

pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
donny
post
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 7.11.2010

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


  1. <?PHP
  2.  
  3. error_reporting (E_ALL ^ E_NOTICE);
  4.  
  5. $cutepath = __FILE__;
  6. $cutepath = preg_replace( "'\\\show_news\.php'", "", $cutepath);
  7. $cutepath = preg_replace( "'/show_news\.php'", "", $cutepath);
  8.  
  9. require_once("$cutepath/inc/functions.inc.php");
  10. require_once("$cutepath/data/config.php");
  11.  
  12.  
  13. // If we are showing RSS, include some need variables.
  14. if($template == 'rss'){
  15. include("$cutepath/data/rss_config.php");
  16. }
  17.  
  18.  
  19. if(!isset($subaction) or $subaction == ""){ $subaction = $POST["subaction"]; }
  20.  
  21. if(!isset($template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/tpl/Default.tpl"); }
  22. else{
  23. if(file_exists("$cutepath/data/tpl/${template}.tpl")){ require("$cutepath/data/tpl/${template}.tpl"); }
  24. else{ die("B_ąd!<br>Schemat <b>".htmlspecialchars($template)."</b> nie istnieje. Pami_taj, _e schematy rozró_niają ma_e i wielkie znaki - musisz napisa_ nazw_ dok_adnie tak samo."); }
  25. }
  26.  
  27. // Prepare requested categories
  28. if(eregi("[a-z]", $category)){
  29. die("<b>B_ąd</b>!<br>CuteNews wykry_o, _e u_ywasz \$category = \"".htmlspecialchars($category)."\"; ale mo_esz odnosi_ si_ do kategorii tylko za pomocą ich numerów <b>ID</b>, a nie za pomocą ich nazw<br>
  30. przyk_ad:<br><blockquote>&lt;?PHP<br>\$category = \"1\";<br>include(\"path/to/show_news.php\");<br>?&gt;</blockquote>");
  31. }
  32. // Negative Categories v1.0 - addblock
  33. $negativeCategories = false;
  34. if ($category[0] == '-') {
  35. $negativeCategories = true;
  36. $category = substr($category, 1);
  37. }
  38. // Negative Categories v1.0 - End addblock
  39. $category = preg_replace("/ /", "", $category);
  40. $tmp_cats_arr = explode(",", $category);
  41. foreach($tmp_cats_arr as $key=>$value){
  42. if($value != ""){ $requested_cats[$value] = TRUE; }
  43. }
  44.  
  45. if($archive == ""){
  46. $news_file = "$cutepath/data/news.txt";
  47. $comm_file = "$cutepath/data/comments.txt";
  48. }else{
  49. $news_file = "$cutepath/data/archives/$archive.news.arch";
  50. $comm_file = "$cutepath/data/archives/$archive.comments.arch";
  51. }
  52.  
  53. $allow_add_comment = FALSE;
  54. $allow_full_story = FALSE;
  55. $allow_active_news = FALSE;
  56. $allow_comments = FALSE;
  57.  
  58.  
  59.  
  60. //<<<------------ Detarime what user want to do
  61. //if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or ($requested_cats[$ucat] == TRUE ) ) ){
  62. if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "" or $negativeCategories == TRUE) or ($requested_cats[$ucat] == TRUE ) ) ){ if($subaction == "addcomment"){ $allow_add_comment = TRUE; $allow_comments = TRUE; }
  63. if($subaction == "showcomments"){ $allow_comments = TRUE; }
  64. if(($subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"){$allow_full_story = TRUE; }
  65. if($subaction == "showfull") $allow_full_story = TRUE;
  66. if($subaction == "showfull" and $config_show_comments_with_full == "yes") $allow_comments = TRUE;
  67. }
  68. //Calendar
  69. elseif($subaction == "showcalendar") $allow_show_calendar = TRUE;
  70. //Calendar
  71. else{
  72. if($config_reverse_active == "yes"){ $reverse = TRUE; }
  73. $allow_active_news = TRUE;
  74. }
  75. //----------->>> Detarime what user want to do
  76.  
  77. require("$cutepath/inc/shows.inc.php");
  78. if($_GET['archive'] and $_GET['archive'] != ''){ $archive = $_GET['archive']; } // stupid fix ?
  79. unset($static, $template, $requested_cats, $category, $catid, $cat,$reverse, $in_use, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives);
  80. ?>


Ten post edytował donny 9.11.2010, 17:40:07
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 11.10.2025 - 08:22