Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Vertinimo kodas

Parašė Mr NBA· 2008 Rugp. 19 09:08:39
#7

<tr>
<td align='center' width='160' rowspan='5' class='tbl2'>\n";
   $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&#235;ra");
   $rdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_ratings WHERE rate_subject = '$lookup' ORDER BY rate_date DESC LIMIT 1"));
   echo "Vartotojø &#225;vertinimas: $vert<br>\n";
   if (iMEMBER) {
      if (!dbcount("(*)","user_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '$lookup'")) {
         echo " <form method='post' action='".FUSION_SELF."?lookup=$lookup'>\n<select name='rating' class='textbox'>\n";
         for ($i = 1; $i < 11; $i++) echo "<option value='$i'>$i</option>\n";
         echo "</select> <input name='rate' type='submit' value='Vertinti' class='textbox'>\n</form>\n";
      }



Redagavo Mr NBA· 2008 Rugp. 19 09:08:53