🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# checklowerlimit /** * 检查积分下限 * @param string $action: 策略动作Action或者需要检测的操作积分值使如*extcredits1积分进行减1操作检测array('extcredits1' => -1) * @param Integer $uid: 用户UID * @param Integer $coef: 积分放大倍数/负数为减分操作 * @param Integer $returnonly: 只要返回结果,不用中断程序运行 */ function checklowerlimit($action, $uid = 0, $coef = 1, $fid = 0, $returnonly = 0) { } ~~~ function check_update_credits(){ $config = $this->config; $check = checklowerlimit(array('extcredits'.$config['credits']=>'-'.$config['credits_num']), 1, 1, 0, '1'); if ($check === true) { updatemembercount(1, array('extcredits'.$config['credits']=>'-'.$config['credits_num']), false, '', 0, '', 'aaa', 'bbb'); return true; }else{ return -1; } } ~~~