|
29 Aug 2003, 22:41
|
#1
|
Banned
Join Date: Jul 2003
Location: Swansea
Posts: 148
|
Be afraid
PHP Code:
// ############## Send out email notification ############ function sendnotification ($threadid, $userid, $postid) { // $threadid = threadid to send from; // $userid = userid of who made the post // $postid = only sent if post is moderated -- used to get username correctly global $DB_site, $enableemail, $message, $bbtitle, $webmasteremail, $bburl, $postusername, $bbuserinfo; if (!$enableemail) { return; } $threadinfo = getthreadinfo($threadid); $foruminfo = getforuminfo($threadinfo[forumid]); // get last reply time if ($postid) { $dateline=$DB_site->query_first("SELECT dateline FROM post WHERE postid='$postid'"); $lastposttime=$DB_site->query_first("SELECT dateline FROM post WHERE threadid = '$threadid' AND dateline < $dateline[dateline] AND visible = 1 ORDER BY dateline DESC LIMIT 1"); } else { $lastposttime=$DB_site->query_first("SELECT dateline FROM post WHERE threadid='$threadid' ORDER BY dateline DESC LIMIT 1"); } $useremails=$DB_site->query("SELECT user.*, style.templatesetid FROM subscribethread,user,usergroup LEFT JOIN style ON (IF(user.styleid=0, 1, user.styleid)=style.styleid) WHERE subscribethread.threadid='$threadid' AND subscribethread.userid=user.userid AND usergroup.usergroupid=user.usergroupid AND user.userid<>'$userid' AND user.usergroupid<>'3' AND usergroup.canview = 1 AND user.lastactivity>'$lastposttime[dateline]'"); $threadinfo[title]=unhtmlspecialchars($threadinfo['title']); $temp = $bbuserinfo['username']; if ($postid) { $postinfo = getpostinfo($postid); $bbuserinfo['username'] = unhtmlspecialchars($postinfo['username']); } else { if (!$bbuserinfo['userid']) { $bbuserinfo['username'] = unhtmlspecialchars($postusername); } else { $bbuserinfo['username'] = unhtmlspecialchars($bbuserinfo['username']); } } $getmail = $DB_site->query("SELECT template, templatesetid, title FROM template WHERE title IN ('email_notify', 'emailsubject_notify') ORDER BY templatesetid DESC"); while ($fgetmail = $DB_site->fetch_array($getmail)) { $mailcache["$fgetmail[templatesetid]"][$fgetmail['title']] = str_replace("\\'","'", addslashes($fgetmail['template'])); } while ($touser=$DB_site->fetch_array($useremails)) { $touser['username']=unhtmlspecialchars($touser['username']); // check templatesetid is loaded into cache, else use -1 if (!isset($mailcache["$touser[templatesetid]"]['email_notify'])) { $emailmsg = $mailcache["-1"]['email_notify']; } else { $emailmsg = $mailcache["$touser[templatesetid]"]['email_notify']; } if (!isset($mailcache["$touser[templatesetid]"]['email_notify'])) { $emailsubject = $mailcache["-1"]['emailsubject_notify']; } else { $emailsubject = $mailcache["$touser[templatesetid]"]['emailsubject_notify']; } eval("\$emailmsg = \"$emailmsg\";"); eval("\$emailsubject = \"$emailsubject\";"); vbmail($touser['email'], $emailsubject, $emailmsg); } $bbuserinfo['username'] = $temp; }
:eek:
|
|
|
29 Aug 2003, 22:42
|
#2
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
__________________
I find it kind of funny
I find it kind of sad
The dreams in which i'm dying
Are the best i've ever had
|
|
|
29 Aug 2003, 22:48
|
#3
|
- Sex Therapist -
Join Date: Mar 2001
Location: Next to you!
Posts: 354
|
the end is near
__________________
<Pyr0> but i dont want cum on my scanner
<meaple> its glass, it wipes off
<Pyr0> i dont trust you
<meaple> I want 2 c ur cum
<Pyr0> patience young padowan
<AliasX> oh jeasus
<AliasX> this channel did turn gay
*** yahwe ( [email protected]) has joined channel #forums
<Oye> that cant be a coincidence
<meaple> he heard you
|
|
|
29 Aug 2003, 23:48
|
#4
|
Dirte
Join Date: Apr 2002
Posts: 5,573
|
Am i a bad person when i don't "get" that?
__________________
"Freedom, morality, and the human dignity of the individual consists precisely in this; that he makes waffles not because he is forced to do so, but because he freely conceives it, wants it, and loves it."
|
|
|
30 Aug 2003, 00:20
|
#5
|
cynic
Join Date: May 2000
Location: Bishop Auckland Co. Durham
Posts: 8,809
|
what the hell does that mean?
__________________
lazy
|
|
|
30 Aug 2003, 00:23
|
#6
|
Mr. Blobby
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
|
OH NOES
|
|
|
30 Aug 2003, 09:05
|
#7
|
no
Join Date: Jan 2002
Location: in a chair
Posts: 329
|
Quote:
Originally posted by Snurx
Am i a bad person when i don't "get" that?
|
|
|
|
|
All times are GMT +1. The time now is 02:02.
| |