Pobrałem stąd skrypt
http://www.egrafik.pl/download/skrypty-php...ars-rating.htmlWgrał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ą;
<?php
require_once 'config.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
<?php echo $title; ?></title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="keywords" content="
<?php echo $keywords; ?>" />
<meta name="description" content="
<?php echo $description; ?>" />
</head>
<body>
<?php
require_once 'class/gamesClass.php';
$class = new games;
$gamesList = $class -> getGames();
?>
<?php
require_once 'top.php';
?>
<div id="body_area">
<div class="left">
<div class="morelinks_top"></div>
<div class="morelinks_area">
<div class="morelinks_head">Kategorie </div>
<div class="links_morearea">
<?php
$categories = $class -> getCategories();
foreach ($categories as $res) {
echo "<a href=\"gamesList.php?id={$res['id']}\" class=\"morelink\">{$res['name']}</a>"; }
?>
</div>
</div>
<div class="morelinks_bottom"></div>
</div>
<div class="body_area1">
<div class="banner_bottom"></div>
<div class="mid">
<div style="width:740px; height:auto; float:left; margin-bottom:10px;">
<?php
require_once 'reklamy/reklama3.php';
?>
</div>
<?php
(int
) $id = intval($_GET['id']);
$game = $class -> getGame($id);
foreach ($game as $res) {
$id = $res['id'];
$name = $res['name'];
$ime_url = $res['img_url'];
$game_url = $res['game_url'];
$ile_odwiedzin = $res['ile_odwiedzin'];
$kategoria_id = $res['kategoria_id'];
$xx = $res['xx'];
$yy = $res['yy'];
$description = $res['description'];
}
$ile_odwiedzin++;
$class -> addOdwiedziny($id, $ile_odwiedzin);
?>
<iframe src="
<?php echo $game_url ?>" frameborder="0" style="border:none;" width="
<?php echo $xx; ?>" height="
<?php echo $yy; ?>" scrolling="no"></iframe>
<br /><br />
<?php echo $description; ?>
</div>
</div>
</div>
<?php
require_once 'bottom.php';
?>
</body>
</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.