showmessage('thread_rate_anonymous', NULL);
 } elseif ($post['status'] & 1) {
     showmessage('thread_rate_banned', NULL);
 }
 $allowrate = TRUE;
 if (!$_G['setting']['dupkarmarate']) {
     if (C::t('forum_ratelog')->count_by_uid_pid($_G['uid'], $_GET['pid'])) {
         showmessage('thread_rate_duplicate', NULL);
     }
 }
 $page = intval($_GET['page']);
 require_once libfile('function/misc');
 $maxratetoday = getratingleft($_G['group']['raterange']);
 if (!submitcheck('ratesubmit', 1)) {
     $referer = $_G['siteurl'] . 'forum.php?mod=viewthread&tid=' . $_G['tid'] . '&page=' . $page . ($_GET['from'] ? '&from=' . $_GET['from'] : '') . '#pid' . $_GET['pid'];
     $ratelist = getratelist($_G['group']['raterange']);
     include template('forum/rate');
 } else {
     $reason = checkreasonpm();
     $rate = $ratetimes = 0;
     $creditsarray = $sub_self_credit = array();
     getuserprofile('extcredits1');
     foreach ($_G['group']['raterange'] as $id => $rating) {
         $score = intval($_GET['score' . $id]);
         if (isset($_G['setting']['extcredits'][$id]) && !empty($score)) {
             if ($rating['isself'] && intval($_G['member']['extcredits' . $id]) - $score < 0) {
                 showmessage('thread_rate_range_self_invalid', '', array('extcreditstitle' => $_G['setting']['extcredits'][$id]['title']));
             }
             if (abs($score) <= $maxratetoday[$id]) {
                 if ($score > $rating['max'] || $score < $rating['min']) {
                     showmessage('thread_rate_range_invalid');
Example #2
0
 $creditselect = '';
 $postData =& $pingService->postData;
 $showReply = $pingService->checkReply($tid) === true ? true : false;
 $userGroupsService = L::loadClass('UserGroups', 'user');
 $systemGroup = $userGroupsService->getUserGroupIds('system');
 //新会员 发帖时间限制
 if (!S::inArray($groupid, $systemGroup) && $db_postallowtime && $timestamp - $winddb['regdate'] < $db_postallowtime * 60) {
     $showReply = false;
 }
 $creditselect = array();
 foreach ($pingService->markset as $cid => $value) {
     $creditselect[$cid] = $credit->cType[$cid];
     $raterange[$cid] = array('min' => $value['minper'], 'max' => $value['maxper'], 'mrpd' => $value['leavepoint']);
 }
 $creditselect == '' && showmsg('markright_set_error');
 $noneJsonList = getratelist($raterange, $pingService->markset);
 $ratelist = pwJsonEncode($noneJsonList);
 $jscredit = pwJsonEncode($pingService->markset);
 $reason_sel = '';
 $reason_a = explode("\n", $db_admingradereason);
 foreach ($reason_a as $k => $v) {
     if ($v = trim($v)) {
         $reason_sel .= "<option value=\"{$v}\">{$v}</option>";
     } else {
         $reason_sel .= "<option value=\"\">-------</option>";
     }
 }
 /*
 		if (!$pingService->ifmsg && $groupid!='3') {
 			$check_Y = 'disabled';
 			$check_N = 'checked';