Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Funkcja newsów na głównej problem
jackraymund
post
Post #1





Grupa: Zarejestrowani
Postów: 217
Pomógł: 21
Dołączył: 10.06.2011
Skąd: Głogów

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


  1. <?php
  2. require 'conn.php';
  3. ?>
  4. <?php
  5. $add_site = true;
  6. include "include/function.php";
  7. ?>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9. <html>
  10. <meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
  11. <head>
  12. <title><?php echo Title($_GET['go']); ?></title>
  13. <style type="text/css">
  14. <!--
  15.  
  16. body {
  17. font-family: Verdana Arial;
  18. font-size: 12px;
  19. }
  20.  
  21. -->
  22. </style>
  23. </head>
  24. <body>
  25. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  26. <tr>
  27. <td width="100%" colspan="3"><?php include "include/naglowek.php"; ?></td>
  28. </tr>
  29. <tr>
  30. <td width="15%" valign="top"><?php include "include/menu_lewe.php"; ?></td>
  31. <td width="70%" valign="top">
  32. <?php
  33.  
  34. $temp = mysql_query("SELECT *
  35. FROM `posts`") or die(mysql_error());
  36. $temp=mysql_fetch_array($temp);
  37. $id=$temp['tytul'];
  38. $id2=$temp['tresc'];
  39. echo "<b>$id</b><br>";
  40. echo "$id2<br>";
  41.  
  42. $go = $_GET['go'];
  43. if(!empty($go)) {
  44. if(is_file("page/$go.php")) include "page/$go.php";
  45. else echo "<br />Nie ma taki ej strony :-(";
  46. }
  47. else include "page/start.html";
  48.  
  49. ?>
  50. </td>
  51. <td width="15%" valign="top"><?php include "include/menu_prawe.php"; ?></td>
  52. </tr>
  53. <tr>
  54. <td width="100%" colspan="3"><?php include "include/stopka.php"; ?></td>
  55. </tr>
  56. </table>
  57. </body>
  58. </html>
  59.  
  60. <?php
  61. function IP_prawdziwe(){
  62.  
  63. if ($_SERVER['HTTP_X_FORWARDED_FOR']) {
  64. $ip_prawdziwe = $_SERVER['HTTP_X_FORWARDED_FOR'];
  65. }
  66. else {
  67. $ip_prawdziwe = $_SERVER['REMOTE_ADDR'];
  68. }
  69.  
  70. return $ip_prawdziwe;
  71. }
  72. ?>

Witam powyżej jest kod do index.php
i jest taki problem.
Strona wygląda tak
http://jackraymund.xaa.pl/aha/aha/index.php
Przy każdej podstronie jest ten news jak zrobić aby był tylko na index.php?


--------------------
Wykonuje zlecenia na pobieranie danych ze stron i różne boty.
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: 19.08.2025 - 10:14