7.1版misc.php修改方法
- $getattachcredits = $forum['getattachcredits'] ? unserialize($forum['getattachcredits']) : $creditspolicy['getattach'];
复制代码 后添加
- $jm_uidlist = $db->result($db->query("SELECT uidlist FROM {$tablepre}attachments_once WHERE aid='$aid'"),0);
- if(empty($jm_uidlist)) $jm_uidlist = '|';
- if(strpos($jm_uidlist,$discuz_uid)>0){//check uid in uidlist
- $ck = substr(md5($aid.$timestamp.md5($authkey)), 0, 8);
- $key = md5($aid.md5($authkey).$timestamp);
- $policymsg = $p = '';
- foreach($getattachcredits as $id => $policy) {
- $policy = 0;
- $policymsg .= $p.($extcredits[$id]['img'] ? $extcredits[$id]['img'].' ' : '').$extcredits[$id]['title'].' '.$policy.' '.$extcredits[$id]['unit'];
- $p = ', ';
- }
- }else{
复制代码- checklowerlimit($getattachcredits, -1);
复制代码 后添加- $jm_uidlist .= "|$discuz_uid";
- $db->query("REPLACE INTO {$tablepre}attachments_once (aid, uidlist, dateline)
- VALUES ('$aid', '$jm_uidlist','$timestamp')");
复制代码 测试通过 |