Parašė shit-· 2009 Kov. 7 16:03:49
#1
Pameginau profilyje pakeisti jo vietą, viskas puikiai pavyko, bet dabar kai prabalsuoji meta tave į google.lt ir kažkodėl neužsifiksuoja balsas, gal blogai kodą nukopinau? Štai kodas:
$v = 0;
$result = dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '$lookup'");
while ($datax = dbarray($result)) $v = $v+$datax['rate_opt'];
$res = $v;
$vert = (dbrows($result) != 0 ? round($res/dbrows($result),2) : "Nėra");
$rdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '$lookup' ORDER BY rate_date DESC LIMIT 1"));
echo"
<tr>
<td width='1%' class='tbl1' style='white-space:nowrap'><b>Įvertinimas:</b></td>";
echo"<td class='tbl2'><form method='post' action='".FUSION_SELF."?lookup=$lookup'>\n$vert | <select name='rating' class='textbox'>";
for ($i = 1; $i < 11; $i++) echo "<option value='$i'>$i</option>\n";
echo "</select><input name='rate' type='submit' value='Vertinti' class='textbox'></td>\n</form>\n";
if (iMEMBER) {
if (!dbcount("(*)","user_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '$lookup'")) {
}
}