Quote:
Originally Posted by sv1cec
You are welcome Sir!
Rgds
|
Unfortunately this won't work for me.

I need to know how to modify the original author's hack to send the email warning.
The only references I can find to PM there are in warn.php
here:
Code:
function SendPM($message,$title,$to,$from){
global $DB;
// Permssions Crap XD your getting a damn PM!! XD
// Parse It Out
$title = addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
$message = addslashes(fetch_censored_text($message));
$to=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'"); // Grab Member Its Going TO
if($from=="BOT"){
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$rpg_option['pmbot']}'"); // FROM Teh Bot =D
} else {
$from=$DB->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
}
// Insert The Message
$to_string["$to[userid]"] = $to['username'];
$now=time();
$DB->query("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
// id thingy
$DB->query("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$DB->insert_id().", '{$to['userid']}')");
// Update pm count
$DB->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
}
and here:
Code:
// Send PM!! =D
$messageb="You have been warned for the post: }/showthread.php?p={$_POST['post']}]Your Post. Your warning level is now: {$level}. This action was taken for the following reason: {$_POST['comment']}. Please reply back if you have a dispute. {$bbuserinfo[username]}";
$messageb=ParseInput($messageb);
$title="You have been warned";
$to=$user['userid'];
$from=$bbuserinfo['userid'];
SendPM($messageb,$title,$to,$from);
// Redirect