TA的每日心情 | 懷疑 半小時前 |
---|
簽到天數: 761 天 [LV.10]昇任副理
管理員
  
- 積分
- 12315
  
|
馬上註冊,結交更多好友,享用更多功能,讓你輕鬆玩轉社區。
您需要 登錄 才可以下載或查看,沒有賬號?立即註冊
x
1.牽涉到三個文件
forum.php
source/template/dafault/forum/rate.htm
source/module/forum/forum_misc.php
2.流程
經由上圖
進入forum_misc.php文件中處理
elseif($_GET['action'] == 'rate' && $_GET['pid']) {
rate 為評分加減進行操作
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');
} else {
$creditsarray[$id] = $score;
if($rating['isself']) {
$sub_self_credit[$id] = -abs($score);
}
$rate += $score;
$ratetimes += ceil(max(abs($rating['min']), abs($rating['max'])) / 5);
}
} else {
showmessage('thread_rate_ctrl');
}
}
}
|
|