楼主,我改了一个晚上了,怎么也没法改成按积分的。
现在采纳贴时可以给发贴者和回贴者加那个积分。
可在发贴时不能扣发贴者的押金。(如果是银行可以的,改成积分不行)
newthread.php
我改的文件:
$tid = $db->insert_id();
}
if($poll==1) {
$db->query("INSERT INTO $table_polls (tid, pollopts)
VALUES ('$tid', '$pollopts')");
} else if($poll==2) {
$thank2=2*$thanks;
$query = $db->query("SELECT credit FROM $table_members WHERE uid='$discuz_uid'");
$mem=$db->fetch_array($query);
if($mem['credit']>=$thank2)
{
$lastmoney=$mem['credit']-$thank2;
$db->query("update $table_members set credit='$lastmoney' where uid='$discuz_uid'");
$db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, poll, attachment)
VALUES ('$fid', '$viewperm', '$iconid', '$discuz_user', '$discuz_uid', '$subject', '$timestamp', '$timestamp', '$discuz_user', '$displayorder', '$digest', '$poll', '".attachtype($last_attach_type, 'id')."')");
$tid = $db->insert_id();
$db->query("INSERT INTO asks (tid, tm)
VALUES ('$tid', '$thanks')");
}else{
showmessage("以".$thanks."作悬赏,需要".$thank2."作抵押,您的钱可能不足","post.php?action=newthread&fid=$fid&poll=ask");
}
} |