<?phpglobal $vbulletin, $prepared;$usersid = $prepared['userid'];$ipoints = $vbulletin->db->query_first(" SELECT COUNT(*) FROM " . TABLE_PREFIX . "user.ipoints WHERE userid = " . $usersid . " ");$imodpp = 150; if ($ipoints >= 1) { $imodpp = $imodpp * ($ipoints * 2.5); } if ($ipoints > 0) { $vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "user SET reputation = reputation - " . $imodpp . " WHERE userid = " . $usersid) ); }?>