User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > General Discussions
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 29 Aug 2003, 22:41   #1
Costa
Banned
 
Join Date: Jul 2003
Location: Swansea
Posts: 148
Costa is an unknown quantity at this point
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:
Costa is offline   Reply With Quote
Unread 29 Aug 2003, 22:42   #2
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
__________________
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
Ragnarak is offline   Reply With Quote
Unread 29 Aug 2003, 22:48   #3
AliasX
- Sex Therapist -
 
Join Date: Mar 2001
Location: Next to you!
Posts: 354
AliasX is an unknown quantity at this point
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
AliasX is offline   Reply With Quote
Unread 29 Aug 2003, 23:48   #4
Snurx
Dirte
 
Join Date: Apr 2002
Posts: 5,573
Snurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus wouldSnurx spreads love and joy to the forum in the same way Jesus would
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."
Snurx is offline   Reply With Quote
Unread 30 Aug 2003, 00:20   #5
roadrunner_0
cynic
 
roadrunner_0's Avatar
 
Join Date: May 2000
Location: Bishop Auckland Co. Durham
Posts: 8,809
roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.roadrunner_0 has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
what the hell does that mean?
__________________
lazy
roadrunner_0 is offline   Reply With Quote
Unread 30 Aug 2003, 00:23   #6
Leshy
Mr. Blobby
 
Leshy's Avatar
 
Join Date: Nov 2000
Location: Belgium
Posts: 8,271
Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.Leshy has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
OH NOES
__________________
http://www.leshy.net
Leshy is offline   Reply With Quote
Unread 30 Aug 2003, 09:05   #7
SepH
no
 
SepH's Avatar
 
Join Date: Jan 2002
Location: in a chair
Posts: 329
SepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to beholdSepH is a splendid one to behold
Quote:
Originally posted by Snurx
Am i a bad person when i don't "get" that?
SepH is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 02:02.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018