Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][SQL]Jak wyswietlic dane zewzgledu na domene
imashjan82
post
Post #1





Grupa: Zarejestrowani
Postów: 71
Pomógł: 2
Dołączył: 2.12.2009

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


Mam baze danych i okolo 40 domen pod tym samym adresem. Chodzi mi o to jak to napisac zeby dane baza danych wyswietlala tresc zewzgledu na domene. AWszystkie domeny sa skierowane na ten sam katalog. Moze ktos podpowiedziec. Czy do tego potrzebna jest sesja? Bardzo prosze o podpowiedz.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
imashjan82
post
Post #2





Grupa: Zarejestrowani
Postów: 71
Pomógł: 2
Dołączył: 2.12.2009

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


  1. <?
  2.  
  3. mysql_connect("xxx","xxx","xxx");
  4.  
  5. $page_title = $_SERVER[HTTP_HOST];
  6. ?>
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
  10. <title><? print "$page_title"; ?></title>
  11. <style type="text/css">
  12. a.link{color:#ff0000; text-decoration:none;}
  13. </style>
  14. </head>
  15. <body>
  16. <div align="center">
  17. <table cellpadding="0" cellspacing="0" width="800" border="1">
  18. <tr>
  19. <td colspan="2" align="center"><b style="font-size:12px; color:ff0000;"><? print"$page_title";?></b></td>
  20. </tr>
  21. <tr>
  22. <td width="200" align="center" bgcolor="#fff000">
  23.  
  24. <script language='JavaScript' type='text/javascript' src='http://www.iiads.eu/adx.js'></script>
  25. <script language='JavaScript' type='text/javascript'>
  26. <!--
  27. if(!document.phpAds_used) document.phpAds_used = ',';
  28. phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
  29.  
  30. document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
  31. document.write ("http://www.iiads.eu/adjs.php?n=" + phpAds_random);
  32. document.write ("&amp;what=zone:1");
  33. document.write ("&amp;exclude=" + document.phpAds_used);
  34. if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
  35. document.write ("'><" + "/script>");
  36. //-->
  37. </script>
  38. <noscript>
  39. <a href='http://www.iiads.eu/adclick.php?n=a9320cbb' target='_blank'>
  40. <img src='http://www.iiads.eu/adview.php?what=zone:1&amp;n=a9320cbb' border='0' alt=''>
  41. </a>
  42. </noscript><br /><b>Friendly sites :</b><br />
  43. <? $site = mysql_query("SELECT * FROM strony");
  44. while($site && $rekord = mysql_fetch_array($site)){
  45. print"<a href='http://www.".$rekord['domena']."' class='link'><b>".$rekord['tytul']."</b></a> <br />";
  46. }
  47. ?></td>
  48. <td width="600"><?
  49. $site = mysql_query("Select * From strony where link!=".$_SERVER[HTTP_HOST].";");
  50. while($site && $rekord = mysql_fetch_array($site)) {
  51. print_r"".$rekord['tresc']."";
  52. }
  53. ?></td>
  54. </tr>
  55. <tr>
  56. <td colspan="2" align="center" bgcolor="#ff0000">2010 <b><? print"$_SERVER[HTTP_HOST]"?></b></td>
  57. </tr>
  58. </table>
  59. </div>
  60. </body>
  61. </html>
  62.  


A oto bład

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in index.php on line 52
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: 9.10.2025 - 20:56