Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [php][html] Problem z odpowiednim czutaniem danych
Forum PHP.pl > Forum > Przedszkole
MaciekDZN
index.php :
  1. <?php
  2. #===============================================================
  3. include('funkcje.php');
  4. #===============================================================
  5. # tytuł strony
  6. $title = 'eM-Pe-3.cba.pl - tysišce mp3 !!';
  7. # nagłówki 1, 2, 3 i 4
  8. $naglowek1 = 'Info';
  9. $naglowek2 = 'Najnowsze mp3';
  10. $naglowek3 = 'ShoutBox';
  11. $naglowek4 = 'Newsy na stronie';
  12. $s = ' ';
  13. # tre?ć przypisywana do danego nagłówka, np. $naglowek1 i $tresc1 tworzš jedno z 4 pól
     na stronie
  14. $tresc1 = 'Witam na stronie z której można pobrać ogromne ilości mp3!! Chyba wiecej Info wa
    m nie potrzeba ;-). '
    ;
  15. $t2='Narazie na stronie trwajš testy i aktualizacje, wieksza część strony nie jest ud
    ostepniona...
  16. <a href="index.php">[Czekaj...]</a><br>';
  17. $tresc2 = ($t2).($s);
  18.  
  19. $tresc3 = '
  20.  
  21. <html>
  22. <head>
  23.  
  24. <style type="text/css">
  25. table {background: #FFFFFF; border:solid 0px #9200F2;}
  26. td {font-family: Arial; font-size: 12px;}
  27. li {list-style-type: none; }
  28. li:hover {list-style-type: none; background: #C564FF;}
  29. .tekst {}
  30. input {background: #D3B3FF; border:solid 1px #9200F2; }
  31. hr { border:solid 1px #000000;}
  32. .ostatni {font-size: 10px;}
  33. .ostatniwyraz {font-size: 20px;}
  34. .ostatnitlo {background: #000000; border:solid 1px #000000;}
  35. </style>
  36.  
  37.  
  38.  
  39. echo (
  40. echo "<center><table border="0" width="33%"><tr><td>";
  41.  
  42. $polenr1 = trim($weq);
  43. $polenr2 = trim($weq2);
  44. if(empty($polenr1) and empty($polenr1)) {
  45. echo "<center><form action="" method="post">
  46. Nick: <input class="tekst" type="text" name="$weq2" value="" size="" /><br>
  47. Treść: <input class="tekst" type="text" name="$weq" value="" size="" /><br>
  48. <input type="submit" value="Dopisz"/></form></center>";
  49.  
  50. } else {
  51. echo "<center><form action="" method="post">
  52. Nick: <input class="tekst" type="text" name="weq2" value="" size="" /><br>
  53. Treść: <input class="tekst" type="text" name="weq" value="" size="" /><br>
  54. <input type="submit" value="Dopisz"/></form></center>";
  55. $filtr = ($polenr1);
  56. $filtr = str_replace("0","",$filtr);
  57. $filtr = str_replace("1","",$filtr);
  58. $filtr = str_replace("2","",$filtr);
  59. $filtr = str_replace("3","",$filtr);
  60. $filtr = str_replace("4","",$filtr);
  61. $filtr = str_replace("5","",$filtr);
  62. $filtr = str_replace("6","",$filtr);
  63. $filtr = str_replace("7","",$filtr);
  64. $filtr = str_replace("8","",$filtr);
  65. $filtr = str_replace("9","",$filtr);
  66. $filtr = str_replace("<","",$filtr);
  67. $filtr = str_replace(">","",$filtr);
  68. $filtr = str_replace("."," ",$filtr);
  69. $filtr = str_replace("="," ",$filtr);
  70. $filtr = str_replace("kurw","",$filtr);
  71. $filtr = str_replace("huj","",$filtr);
  72. $filtr = str_replace("dup","",$filtr);
  73. $filtr = str_replace("jeb","",$filtr);
  74. $filtr = str_replace("cip","",$filtr);
  75. $filtr = str_replace("kuta","",$filtr);
  76.  
  77. $filtr = str_replace("www","",$filtr);
  78. $filtr = str_replace("pl","",$filtr);
  79. $filtr = str_replace("PL","",$filtr);
  80. $filtr = str_replace("com","",$filtr);
  81. $filtr = str_replace("COM","",$filtr);
  82. $filtr = str_replace("photoblog","",$filtr);
  83. $filtr = str_replace("blog","",$filtr);
  84. $filtr = str_replace("onet","",$filtr);
  85. $filtr = str_replace("ONET","",$filtr);
  86. $filtr = str_replace("http://","",$filtr);
  87.  
  88. $old_content = file("box.txt");
  89. $lines = count($old_content);
  90.  
  91. $new = fopen("box.txt", "w");
  92. flock($new, 2);
  93. fwrite($new, "<b>$polenr2: </b>$filtr<br>\n");
  94. for($i=0; $i<$lines;$i++) {
  95. fwrite($new, $old_content[$i]);
  96. }
  97. flock($new, 3);
  98. fclose($new);}
  99. include ("box.txt");
  100. echo </td></tr></table>;
  101. </head>
  102. </html>
  103.  
  104. );
  105. ';
  106.  
  107. $tresc4 = '
  108. MaciekDZN | 01.01.2008<br>
  109. Witam ! ';
  110.  
  111. head($title, $naglowek1, $naglowek2, $naglowek3, $naglowek4, $tresc1, $tresc2, $tresc3, $tresc4);
  112.  
  113. footer();
  114.  
  115. ?>


funkcje.php :

  1. <?php
  2.  
  3.  
  4. #################################################################
  5.  
  6. function head($title, $naglowek1, $naglowek2, $naglowek3, $naglowek4, $tresc1, $tresc2, $tresc3, $tresc4) {
  7. echo '
  8. <html>
  9.  
  10. <head>
  11. <meta http-equiv="Content-Language" content="pl">
  12. <link rel="stylesheet" href="style.css" type="text/css">
  13. <title>'.$title.'</title>
  14. <META name="robots" content="index,follow,all">
  15. <META name="description" content="tysiące mp3 download">
  16. <META name="keywords" content="tysiące mp3 download">
  17. <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
  18. </head>
  19.  
  20. <body>
  21. <center>
  22. <table width="900" border="0" cellpadding="0" cellspacing="0">
  23.  
  24. <!-- LOGO -->
  25. <tr>
  26. <td background="images/gradient_l.png" width="900" height="133" colspan="2">
  27. <a href="index.php"><img src="images/logo.png" align="left" border="0"></a></td>
  28. </tr>
  29.  
  30. <!-- MENU GÓRNE -->
  31. <tr>
  32. <td background="images/gradient_m.png" width="900" height="36" colspan="2">
  33. <a href="index.php" class="menu">Home</a>
  34. <a href="download.php" class="menu">Download</a>
  35. <a href="add1.php" class="menu">Dodaj...</a>
  36. <a href="kontakt.php" class="menu">Kontakt</a>
  37. <a href="/ksiega/" class="menu">Księga Gości</a>
  38. </td>
  39. </tr>
  40.  
  41. <!-- TŁO tlo_news_gl.png -->
  42. <tr>
  43. <td width="330" height="200" valign="top" class="tlo_news_gl">
  44. <div class="tytul">'.$naglowek1.'</div>
  45. <div class="news">'.$tresc1.'</div>
  46.  
  47. <!-- TŁO tlo_news_gr.png -->
  48. <td width="570" height="200" valign="top" class="tlo_news_gr">
  49. <div class="tytul" style="color: #ffffff;">'.$naglowek2.'</div><div class="news" style="color: #ffffff;">'.$tresc2.'</div>
  50. </td>
  51.  
  52. </td>
  53. </tr>
  54.  
  55. <!-- CZYSTE BG -->
  56. <tr>
  57. <td width="330" valign="top">
  58. <div class="tytul">'.$naglowek3.'</div>
  59. <img src="images/linia.png"><br>
  60. <div class="news">'.$tresc3.'</div>
  61.  
  62. <!-- TŁO tlo_news.png -->
  63. <td width="570" height="215" valign="top" class="tlo_news">
  64. <div class="tytul">'.$naglowek4.'</div><div class="news">'.$tresc4.'</td>
  65.  
  66. </td>
  67. </tr>
  68. ';
  69. }
  70.  
  71.  
  72. #################################################################
  73.  
  74.  
  75. function footer() {
  76. echo '
  77. <!-- STOPKA -->
  78. <tr>
  79. <td background="images/gradient_s.png" width="900" height="35" align="center" colspan="2" class="stopka">
  80. Š 2007 Website design by <a href="http://www.yoyo.pl">eM-Pe-3 - tysiące mp3 !!!</a>
  81.  
  82. </td>
  83. </tr>
  84.  
  85. <!-- ODBICIE -->
  86. <tr>
  87. <td background="images/odbicie_s.png" width="900" height="88" colspan="2"></td>
  88. </tr>
  89.  
  90. <!-- RESZTA -->
  91. </table>
  92.  
  93. </center>
  94. </body>
  95.  
  96. </html>
  97. ';
  98. }
  99.  
  100.  
  101. #################################################################
  102.  
  103. ?>


chodzi mi o shoutbox
tak wyświetla mi tą strone:
loff
gdybys uzywał edytora z podswietlaniem składni to bys wiedział - odpowiedz brzmi: bo uwaza to za $tresc3 - sporz na swoj post - znak konczacy jest dopiero w 105 linijce kodu
MaciekDZN
ja o tym wiem ze sie konczy w 105 linijce bo to jest cały skrypt shoutboxa ktorego próbuje dodac.
jakbys umiał to przerób mi to tak zeby to jakoś poprawnie zadziałało.
franki01
Linie 54. popraw na:

Kod
<input type="submit" value="Dopisz"/></form></center>';


Linie 100. popraw na:

Kod
echo '</td></tr></table>


Usun wszystko z linii 104., a w 105. popraw na:

Kod
';
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.