Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML][PHP]Mam problem w skrypcie, pomocy!
Forum PHP.pl > Forum > Przedszkole
donny
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
john_doe
za mało informacji ....
na tą chwilę mogę powiedzieć, że coś masz źle smile.gif
bemol
Chodzi o adres:
http://akordeon-portal.pl/artykul.php?star...n=&id=&
coś ucina wartości kilku zmiennych $_GET:
ucat, archive, subaction i id
to dlatego nie wyświetla się zawartość.
donny
co mam w takim razie zrobić z tym fantem? i powiedzcie jakich informacji potrzebujecie, aby mi pomóc?
CuteOne
wklej skrypt artykuly.php
donny
  1. <html>
  2.  
  3. <head>
  4. <title>Polski Portal Akordeonowy</title>
  5. <meta name="description" content="Polski Portal Akordeonowy">
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
  7. <meta http-equiv="Content-Language" content="pl">
  8. <meta name="keywords" content="akordeon">
  9. <meta name="Author" content="****">
  10. <meta name="Reply-to" content="****">
  11.  
  12. <link rel="stylesheet" type="text/css" href="style.css">
  13.  
  14. </head>
  15.  
  16. <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
  17.  
  18. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="19"><tr><td height="19" width="100%" background="images/tlo_top.jpg">
  19. <div align="center"><table cellpadding="0" cellspacing="0" width="820" height="19"><tr><td width="820" height="19"><p align="center">
  20.  
  21. <? include "top.php" ?>
  22.  
  23.  
  24. </td></tr></table></div></td></tr></table>
  25.  
  26. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="19"><tr><td height="19" width="100%" background="images/tlo.jpg">
  27. <div align="center"><table cellpadding="0" cellspacing="0" width="820" height="19"><tr><td width="820" height="19"><p align="center">
  28.  
  29. <table cellpadding="0" cellspacing="0" background="images/tlo_center2.jpg" width="820" height="14">
  30. <tr><td width="820" height="14"></td></tr></table>
  31. <table cellpadding="0" cellspacing="0" background="images/tlo_center.jpg" width="820" height="19">
  32. <tr><td width="60"></td><td valign="top" width="184">
  33.  
  34. <? include "menu.php" ?>
  35.  
  36.  
  37. </td><td width="22"></td><td valign="top" width="497">
  38.  
  39. <table cellpadding="0" cellspacing="0" width="497" height="0"><tr><td width="497" height="0"><? include "reklamanadinfo.php" ?></td></tr></table>
  40. <table cellpadding="0" cellspacing="0" width="497" height="93" background="images/tlo_informacje.jpg">
  41. <tr><td height="74"></td></tr><tr><td valign="top" height="19" width="497"><p align="center">
  42. <?PHP
  43. $template="news";
  44. include("cms/show_news.php");
  45. ?>
  46. </td></tr></table>
  47.  
  48.  
  49. </td><td height="19" width="57"></td>
  50. </tr>
  51. </table>
  52.  
  53.  
  54. </td></tr></table></div></td></tr></table>
  55.  
  56. <table border="0" cellpadding="0" cellspacing="0" width="100%" height="19"><tr><td height="19" width="100%" background="images/tlo.jpg">
  57. <div align="center"><table cellpadding="0" cellspacing="0" width="820" height="19"><tr><td width="820" height="19"><p align="center">
  58.  
  59. <? include "stopka.php" ?>
  60.  
  61.  
  62. </td></tr></table></div></td></tr></table>
  63.  
  64. </body>
  65.  
  66. </html>
bemol
wklej ten plik: "cms/show_news.php"
donny
  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. ?>
ciekawskiii
edytuj zes te dwa posty i wyswietl kody jak nalezy:/
uzyj bbcode
donny
edytowałem
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.