Quote:
Originally Posted by flypaper
The threads go straight into the forum. Link to the hackjob is http://uselessforums.com/submitnews.php
And I was talking in the Ucash/Ushop forum yesterday and someone mentioned PMing a member after they were 'theifed'. I liked the idea and tried to poke around and see if there was a function to send PMs like creating threads, but couldn't find one.
|
Hmmm. Looks like there isn't a function to do it, but these DB queries do:
PHP Code:
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pmtext\n\t(fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)\nVALUES\n\t($bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', '$title', '$message', '" . addslashes(serialize($tostring)) . "', $iconid, " . TIMENOW . ", $signature, $disablesmilies)");
PHP Code:
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "pm (pmtextid, userid, folderid, messageread) VALUES ($pmtextid, $bbuserinfo[userid], -1, 1)");
PHP Code:
$DB_site->shutdown_query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1 WHERE userid=$bbuserinfo[userid]");
Can anyone explain how I pass whatever is needed in these queries and/or what the queries are exactly doing?
edit: I should probably start a new thread.