topicadimin.php文件手动升级,是我辛辛苦苦才整理出来的,请大家多多支持
1.找到
- require_once DISCUZ_ROOT.'./include/post.php';
复制代码
在后面加
- require $discuz_root.'./include/discuzcode.php';
- //全局定义短信内容之一
- $msg_2="
- 如有疑问,请查看[url=http://www.9232.org/rules.php]社区守则[/url]以及各版块置顶的管理规则,或[url=http://www.9232.org/post.php?action=newthread&fid=15]向管理员反映[/url]。";
- //全局定义短信内容之一
- $jfkarmaoptions = '';
- $jf=$jfmaxkarmarate = "10"; //积分最高或最低限额设定
- $jfoffset = ceil($jfmaxkarmarate / 10);
- for($jfvote = - $jfmaxkarmarate + $jfoffset; $jfvote <= $jfmaxkarmarate; $jfvote += $jfoffset) {
- $jfvotenum = $jfvote > 0 ? '+'.$jfvote : $jfvote;
- if ($jfvote=="-1"){$selected="selected";}
- $jfkarmaoptions .= $jfvote ? "<option value="$jfvote" $selected>$jfvotenum</option>\n" : NULL;
- $selected="";
- }
- unset($jfvote, $jfvotenum, $jfoffset);
- $lbkarmaoptions = '';
- $lb=$lbmaxkarmarate = "30"; //社区币最高或最低限额设定
- $lboffset = ceil($lbmaxkarmarate / 30);
- for($lbvote = - $lbmaxkarmarate + $lboffset; $lbvote <= $lbmaxkarmarate; $lbvote += $lboffset) {
- $lbvotenum = $lbvote > 0 ? '+'.$lbvote : $lbvote;
- if ($lbvote== "-1"){$selected="selected";}
- $lbkarmaoptions .= $lbvote ? "<option value="$lbvote" $selected>$lbvotenum</option>\n" : NULL;
- $selected=""; }
- unset($lbvote, $lbvotenum, $lboffset);
- ////操作原因,分值判断
- function ctrl_msg(){
- global $title,$content,$docredit,$domoney,$msg,$jf,$lb;
- $title = dhtmlspecialchars(censor(trim($title)));
- $content = dhtmlspecialchars(censor(trim($content)));
- $docredit = dhtmlspecialchars(censor(trim($docredit)));
- $domoney = dhtmlspecialchars(censor(trim($domoney)));
- $msg = trim(censor(parseurl($msg)));
- if($title =="" and $content ==""){showmessage('admin_ctrl_invalid');}
- if ($docredit >$jf or $docredit < -$jf or $domoney >$lb or $domoney < -$lb){showmessage('admin_ctrl2_invalid');}
- }
- ////操作原因,分值判断
复制代码
2.找到
- if($operation == 'move' && $allowmove) {
- if(!$moveto) {
- showmessage('admin_move_invalid');
- }
-
复制代码
然后在后面加上
- ctrl_msg(); //调用函数
- $query= $db->query("SELECT name FROM $table_forums WHERE fid=$fid");
- while($result = $db->fetch_array($query))
- {
- $czfirstfn = $result['name'];
- }
-
- $query= $db->query("SELECT name FROM $table_forums WHERE fid=$moveto");
- while($result = $db->fetch_array($query))
- {
- $czsecondfn = $result['name'];
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- $czsubject="移动主题短消息通知";
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,且进行了 积分$docredit, 率币$domoney 的操作!";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,没有对您的分值进行操作!";
- }
- $msg_3="\n\n你的贴子由\n\n $czfirstfn 版块\n\n移到\n\n $czsecondfn 版块";
- $msgtext=$msg_1.$msg.$msg_3.$msg_2;
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
3.找到
- }elseif($operation == 'stick' && $allowtop){
- accesscheck($query);
- if($level < 0 || $level > 3) {
- showmessage('undefined_action');
- }
复制代码
替换
- }elseif($operation == 'stick' && $allowtop){
-
- ctrl_msg(); //调用函数
- if($level < 0 || $level > 3) {
- showmessage('undefined_action');
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if($level=="0"){if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除置顶,且进行了 积分$docredit, 率币$domoney 的操作!";
- $action_m="解除置顶";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除置顶,没有对您的分值进行操作!";
- $action_m="解除置顶";}
- }else{if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被置顶,且进行了 积分$docredit, 率币$domoney 的操作!";
- $action_m="置顶";}else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被置顶,没有对您的分值进行操作!";
- $action_m="置顶";}}
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."主题短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
4.找到
- }elseif($operation == 'delete' && $allowdelpost) {
复制代码
在后面加入
5.找到
- while($post = $db->fetch_array($query)) {
- $uids .= "$comma$post[authorid]";
- $comma = ',';
- if ($post['aid']) $haveattach++;
- }
- updatemember('-', $uids, $deletedcredits);
复制代码
替换为
- while($post = $db->fetch_array($query)) {
- $uids .= "$comma$post[authorid]";
- $comma = ',';
- if ($post['aid']) $haveattach++;
- }
- updatemember('-', $uids, '0');
复制代码
6.找到
- $db->query("DELETE FROM $table_attachments WHERE tid IN ($tids)");
- }
复制代码
在后面加
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 率币$domoney 的操作!";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
- }
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."主题短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
7.找到
- }elseif($operation == 'close' && $allowclose){
- $close = $type ? 1 : 0;
复制代码
替换成
- }elseif($operation == 'close' && $allowclose){
-
- ctrl_msg(); //调用函数
- $close = $type ? 1 : 0;
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if($type=="0"){
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="解除锁定";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,没有对您的分值进行操作!";$action_m="解除锁定";
- }
- }else{if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="锁定";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,没有对您的分值进行操作!";$action_m="锁定";
- }}
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."主题短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid IN ($tids)");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
8.找到
- showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
复制代码
在后面加上
9.找到
- showmessage('admin_succeed', "forumdisplay.php?fid=$fid&page=$page");
复制代码
在后面加入
10.找到
- $pids = implode_ids( $delete );
复制代码
在后面加入
11.找到
- header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
- }
-
- updatemember('-', $uids, $deletedcredits);
复制代码
替换为
- header("Location: {$boardurl}topicadmin.php?action=delete&fid=$fid&tid=$tid&page=$page&fpage=$fpage");
- }
-
- updatemember('-', $uids, '0');
复制代码
在后面加入
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE pid IN ($pids)");
- $czsubject="删除帖子短消息通知";
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $msg_1="您在帖子“".$temsubject."”的回贴因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 率币$domoney 的操作!";
- }else{$msg_1="您在帖子“".$temsubject."”的回贴因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
- }
- $msgtext=$msg_1.$msg.$msg_2;
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid FROM $table_posts WHERE pid IN ($pids)");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
12.找到
- if($level < 0 || $level > 3) {
- showmessage('undefined_action', NULL, 'HALTED');
- }
复制代码
在后面加入
- $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$tid'");
- ctrl_msg(); //调用函数
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- if($level > 0){
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被加入了精华,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="加入精华";
- }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被加入精华,没有对您的分值进行操作!";$action_m="加入精华";
- }
- }else{if ($updateur != "1") {
- $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除精华,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="解除精华";
- }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除精华,没有对您的分值进行操作!";$action_m="解除精华";
- }}
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$thread[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
-
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$thread[authorid]'");
-
-
- } else{
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
- /* 禁止根据精华级别进行加积分
复制代码
13.找到
- $digest_mark=($level-intval($thread['digest']))*$digestcredits;
复制代码
删除后面的
- $db->query("UPDATE $table_threads SET digest='$level' WHERE tid='$tid'");
复制代码
14.找到
- $db->query("UPDATE $table_members SET credit=credit".($digest_mark > 0 ? '+' : '')."$digest_mark WHERE uid='$thread[authorid]'");
- }
复制代码
在后面加上
15.找到
- } elseif($action == 'delete' && $allowdelpost) {
- if(!submitcheck('deletesubmit')) {
- include template('topicadmin_delete');
- } else {
复制代码
在后面加入
16.找到
- while($post = $db->fetch_array($query)) {
- $uids .= "$comma$post[authorid]";
- $comma = ',';
- if ($post['aid']) $aids++;
- }
- updatemember('-', $uids, $deletedcredits);
复制代码
替换成
- while($post = $db->fetch_array($query)) {
- $uids .= "$comma$post[authorid]";
- $comma = ',';
- if ($post['aid']) $aids++;
- }
- updatemember('-', $uids, '0');
复制代码
在后面添加
- if($ynmsg==1)
- {
- $czsubject="删除主题短消息通知";
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid'");
- while($memberidz = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberidz[subject]."“因[b] ".$title." [/b]而被删除,且进行了 积分$docredit, 率币$domoney 的操作!";
- }else{$msg_1="您发表的帖子“".$memberidz[subject]."“因[b] ".$title." [/b]而被删除,没有对您的分值进行操作!";
- }
- $msgtext=$msg_1.$msg.$msg_2;
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberidz[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberidz[authorid]'"); }
-
- $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE tid='$tid'");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_posts WHERE tid='$tid'");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
17.找到
- include template('topicadmin_openclose');
- } else {
复制代码
在后面加入
18.找到
- $db->query("UPDATE $table_threads SET closed='$openclose' WHERE tid='$tid' AND fid='$fid'");
复制代码
在后面加入
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if($type=="0"){
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="解除锁定";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被解除锁定,没有对您的分值进行操作!";$action_m="解除锁定";
- }
- }else{if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="锁定";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被锁定,没有对您的分值进行操作!";$action_m="锁定";
- }}
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."主题短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
19.找到
- showmessage('admin_move_invalid');
- }
- $displayorderadd = !$adminglobal ? ", displayorder='0'" : NULL;
复制代码
在后面加入
- ctrl_msg(); //调用函数
- $query= $db->query("SELECT name FROM $table_forums WHERE fid=$fid");
- while($result = $db->fetch_array($query))
- {
- $czfirstfn = $result['name'];
- }
-
- $query= $db->query("SELECT name FROM $table_forums WHERE fid=$moveto");
- while($result = $db->fetch_array($query))
- {
- $czsecondfn = $result['name'];
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
- $czsubject="移动主题短消息通知";
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,且进行了 积分$docredit, 率币$domoney 的操作!";
- }else{$msg_1="您发表的帖子“".$memberid[subject]."“因[b] ".$title." [/b]而被转移,没有对您的分值进行操作!";
- }
- $msg_3="\n\n你的贴子由\n\n $czfirstfn 版块\n\n移到\n\n $czsecondfn 版块";
- $msgtext=$msg_1.$msg.$msg_3.$msg_2;
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$memberid[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$memberid[authorid]'");
- }
-
- } else{
- $query = $db->query("SELECT authorid, subject FROM $table_threads WHERE tid='$tid' AND fid='$fid'");
- while($memberid = $db->fetch_array($query)) {
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$memberid[authorid]'");
- }
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码
20.找到
- $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
- $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
- }
复制代码
删除后面的
- else {
- $db->query("INSERT INTO $table_threads (fid, creditsrequire, iconid, author, authorid, subject, dateline, lastpost, lastposter, views, replies, displayorder, digest, closed, poll, attachment)
- VALUES ('$thread[fid]', '$thread[creditsrequire]', '$thread[iconid]', '".addslashes($thread['author'])."', '$thread[authorid]', '$thread[subject]', '$thread[dateline]', '$thread[lastpost]', '$thread[lastposter]', '0', '0', '0', '0', '$thread[tid]', '0', '0')");
- $db->query("UPDATE $table_threads SET fid='$moveto' $displayorderadd WHERE tid='$tid' AND fid='$fid'");
- $db->query("UPDATE $table_posts SET fid='$moveto' WHERE tid='$tid' AND fid='$fid'");
- }
复制代码
21.找到
- include template('topicadmin_topuntop');
- } else {
- if($level < 0 || $level > 3) {
- showmessage('undefined_action');
- }
复制代码
在后面加入
- ctrl_msg(); //调用函数
- //帖子操作短信通知 hack by xiori 2005-3-18
- if($ynmsg==1)
- {
- if($content !=""){$title=$content;}
- if ($msg !=""){
- $msg="
- 以下为".$discuz_user."给您的附言:[color=blue]".$msg."[/color]";
- }
- if($level > 0){
- if ($updateur != "1") {
- $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被置顶,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="置顶";
- }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被置顶,没有对您的分值进行操作!";$action_m="置顶";
- }
- }else{if ($updateur != "1") {
- $msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除置顶,且进行了 积分$docredit, 率币$domoney 的操作!";$action_m="解除置顶";
- }else{$msg_1="您发表的帖子“".$temsubject."“因[b] ".$title." [/b]而被解除置顶,没有对您的分值进行操作!";$action_m="解除置顶";
- }}
- $msgtext=$msg_1.$msg.$msg_2;
- $czsubject=$action_m."短消息通知";
- $db->query("INSERT INTO $table_pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
- VALUES('$discuz_user', '$discuz_uid', '$thread[authorid]', 'inbox', '1', '$czsubject', '$timestamp', '$msgtext')");
-
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");
- }
- $db->query("UPDATE $table_members SET newpm='1' WHERE uid='$thread[authorid]'");
-
-
- } else{
- if ($updateur != "1") {
- $db->query("UPDATE $table_members SET money=money+$domoney,credit=credit+$docredit WHERE uid = '$thread[authorid]'");
- }
- }
- //帖子操作短信通知 hack by xiori 2005-3-18
复制代码 |