// USER reputation funk function userreputation($user_id, $post_id="", $type="") { global $db_prefix; $result = dbquery("SELECT SUM(IF(type=1,1,-1)) as total FROM ".$db_prefix."reputation WHERE to_id = '$user_id' GROUP BY to_id"); if (dbrows($result) != 0) { $data = dbarray($result); $total = $data['total']; $info = "Reputacija: color='".($total<0?"red"$total>0?"green":"black"))."'>".($total<=0?"":"+")."$total"; } else { $info = "Reputacija: color='black'>0"; } ?tai visas kodas: // USER reputation funk function userreputation($user_id, $post_id="", $type="") { global $db_prefix; $result = dbquery("SELECT SUM(IF(type=1,1,-1)) as total FROM ".$db_prefix."reputation WHERE to_id = '$user_id' GROUP BY to_id"); if (dbrows($result) != 0) { $data = dbarray($result); $total = $data['total']; $info = "Reputacija: ".($total<=0?"":"+")."$total"; } else { $info = "Reputacija: 0"; }