Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem z gwiazdkowym systemem oceniania., Jak sobie z tym poradzić
kamiluspl
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 30.05.2012

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


Pobrałem stąd skrypt http://www.egrafik.pl/download/skrypty-php...ars-rating.html
Wgrałem wszystko jak należy.

W instrukcji napisane jest ,że po wgraniu mam umieścić to:<? require_once("rate.php"); ?> <? echo rate("5starsdemo");?>
w miescu które chcę ceniać.

Wszystko ok tylko mam mały problem, mam stronę z grami online i nie wiem w którym miejscu to dać aby każda gra miała swoją indywidualną ocenę a nie wszystkie takie samą. Jakoś trzeba to powiązać adresem ur lub id.

tak wygląda strona z grą;
  1. <?php
  2. require_once 'config.php';
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <title><?php echo $title; ?></title>
  9. <link href="style.css" rel="stylesheet" type="text/css" />
  10. <meta name="keywords" content="<?php echo $keywords; ?>" />
  11. <meta name="description" content="<?php echo $description; ?>" />
  12. </head>
  13.  
  14. <body>
  15.  
  16. <?php
  17.  
  18. require_once 'class/gamesClass.php';
  19. $class = new games;
  20. $gamesList = $class -> getGames();
  21.  
  22. ?>
  23.  
  24. <?php
  25. require_once 'top.php';
  26. ?>
  27. <div id="body_area">
  28. <div class="left">
  29. <div class="morelinks_top"></div>
  30. <div class="morelinks_area">
  31. <div class="morelinks_head">Kategorie </div>
  32. <div class="links_morearea">
  33.  
  34. <?php
  35. $categories = $class -> getCategories();
  36.  
  37. foreach ($categories as $res) {
  38. echo "<a href=\"gamesList.php?id={$res['id']}\" class=\"morelink\">{$res['name']}</a>";
  39. }
  40. ?>
  41.  
  42. </div>
  43. </div>
  44. <div class="morelinks_bottom"></div>
  45. </div>
  46. <div class="body_area1">
  47. <div class="banner_bottom"></div>
  48. <div class="mid">
  49.  
  50. <div style="width:740px; height:auto; float:left; margin-bottom:10px;">
  51. <?php
  52. require_once 'reklamy/reklama3.php';
  53. ?>
  54. </div>
  55.  
  56. <?php
  57. (int) $id = intval($_GET['id']);
  58.  
  59. $game = $class -> getGame($id);
  60. foreach ($game as $res) {
  61.  
  62. $id = $res['id'];
  63. $name = $res['name'];
  64. $ime_url = $res['img_url'];
  65. $game_url = $res['game_url'];
  66. $ile_odwiedzin = $res['ile_odwiedzin'];
  67. $kategoria_id = $res['kategoria_id'];
  68. $xx = $res['xx'];
  69. $yy = $res['yy'];
  70. $description = $res['description'];
  71. }
  72.  
  73. $ile_odwiedzin++;
  74.  
  75. $class -> addOdwiedziny($id, $ile_odwiedzin);
  76. ?>
  77.  
  78. <iframe src="<?php echo $game_url ?>" frameborder="0" style="border:none;" width="<?php echo $xx; ?>" height="<?php echo $yy; ?>" scrolling="no"></iframe>
  79.  
  80. <br /><br />
  81. <?php echo $description; ?>
  82.  
  83. </div>
  84.  
  85. </div>
  86. </div>
  87. <?php
  88. require_once 'bottom.php';
  89. ?>
  90.  
  91. </body>
  92. </html>



W którym miejscu, jak to zrobić, aby działało tak jak wspomniałem. Osobna gra, osobna ocena a nie dam 4 gwiazdki pod jedną i potem pod każdą wyświetlają sie już 4.
Z góry dziękuję za pomoc.
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: 20.08.2025 - 09:06