Dimon Posted August 30, 2010 Share Posted August 30, 2010 hey friends , this is the code which is making the report function work in a script ... elseif($action == 'report') { if(!$reportpost) { showmessage('thread_report_disabled'); } if(!$discuz_uid) { showmessage('not_loggedin', NULL, 'HALTED'); } if(!$thread || !is_numeric($pid)) { showmessage('undefined_action', NULL, 'HALTED'); } $discuz_action = 123; $floodctrl = $floodctrl * 3; if($timestamp - $lastpost < $floodctrl) { showmessage('thread_report_flood_ctrl'); } if(!submitcheck('reportsubmit')) { include template('reportpost'); exit; } else { $posturl = "{$boardurl}viewthread.php?tid=$tid".($page || $pid ? "&page=$page#pid$pid" : NULL); $uids = 0; $adminids = ''; $reportto = array(); if(is_array($to) && count($to)) { if(isset($to[3])) { $query = $db->query("SELECT uid FROM {$tablepre}moderators WHERE fid='$fid'"); while($member = $db->fetch_array($query)) { $uids .= ','.$member['uid']; } } if(!$uids || ($reportpost >= 2 && $to[2])) { $adminids .= ',2'; } if($reportpost == 3 && $to[1]) { $adminids .= ',1'; } if($adminids) { $query = $db->query("SELECT uid FROM {$tablepre}members WHERE adminid IN (".substr($adminids, 1).")"); if(!$db->num_rows($query)) { $query = $db->query("SELECT uid FROM {$tablepre}members WHERE adminid='1'"); } while($member = $db->fetch_array($query)) { $uids .= ','.$member['uid']; } } $query = $db->query("SELECT uid, ignorepm FROM {$tablepre}memberfields WHERE uid IN ($uids)"); while($member = $db->fetch_array($query)) { if(!preg_match("/(^{ALL}$|(,|^)\s*".preg_quote($discuz_user, '/')."\s*(,|$))/i", $member['ignorepm'])) { if(!in_array($member['uid'], $reportto)) { $reportto[] = $member['uid'] && uid==5; } } } if($reportto) { $reason = stripslashes($reason); sendpm(implode(',', $reportto), 'reportpost_subject', 'reportpost_message'); } $db->query("UPDATE {$tablepre}members SET lastpost='$timestamp' WHERE uid='$discuz_uid'"); showmessage('thread_report_succeed', "viewthread.php?tid=$tid"); } else { showmessage('thread_report_invalid'); } }what i want to do is, when a member clicks the report button the report is sent to only moderators of that particular category/forum. is it possible to make the report to be sent to a separate group along with the moderators of that particular section ?for example there is a group called anti spam squad, i want it such that the report is sent to both the moderators of that particular section and also every member of the group anti spam squad ...thanks Link to comment Share on other sites More sharing options...
thescientist Posted August 30, 2010 Share Posted August 30, 2010 could you make an associate table for moderators and anti spam squads such that when someone hits report, you go through the table of mods and send to those who are mods of that particular sub forum, and then send one to all members of the anti spam squad? Link to comment Share on other sites More sharing options...
Dimon Posted August 30, 2010 Author Share Posted August 30, 2010 could you make an associate table for moderators and anti spam squads such that when someone hits report, you go through the table of mods and send to those who are mods of that particular sub forum, and then send one to all members of the anti spam squad?ya how's that ? sorry i am totally a "NOOB" ... i don't understand anything but basics Link to comment Share on other sites More sharing options...
Dimon Posted August 31, 2010 Author Share Posted August 31, 2010 anyone please, i need it badly Link to comment Share on other sites More sharing options...
Dimon Posted September 3, 2010 Author Share Posted September 3, 2010 no one yet ? Link to comment Share on other sites More sharing options...
niche Posted September 3, 2010 Share Posted September 3, 2010 for more info on arrays (associative, etc): http://www.w3schools.com/php/php_arrays.asp Link to comment Share on other sites More sharing options...
Dimon Posted September 3, 2010 Author Share Posted September 3, 2010 for more info on arrays (associative, etc): http://www.w3schools.com/php/php_arrays.asp i've read it ! if you can... help me getting solution to this problem please Link to comment Share on other sites More sharing options...
niche Posted September 3, 2010 Share Posted September 3, 2010 If the script, you included in this thread, is yours just be as specific as possible about your question. If it isn't yours then it will be difficult to ask an informed question. If it's not yours now is as good as time as any to re-write it, make it yours, and get the help you need. It's not nearly as hard as you might think. Just focus on the steps and work on one step at a time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.