thlb
05/10/2003, 18h14
bonjour a tous !
quand je post un message il ya tjs ce message d'affiché :
Warning: Failed to Connect in c:\easyphp\www\admin\functions.php on line 2314
g regardé sur functions.php
mais je ne trouve pas l'erreur.
voici la partie concernée:
// ############## 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.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND user.userid<>'$userid'
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']);
}
}
while ($touser=$DB_site->fetch_array($useremails)) {
$touser['username']=unhtmlspecialchars($touser['username']);
eval("\$emailmsg = \"".gettemplate("email_notify",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); <---- ligne 2314
}
$bbuserinfo['username'] = $temp;
}
*************************
g indiqué la ligne qui sois disant bug
merci a tous
thlb
quand je post un message il ya tjs ce message d'affiché :
Warning: Failed to Connect in c:\easyphp\www\admin\functions.php on line 2314
g regardé sur functions.php
mais je ne trouve pas l'erreur.
voici la partie concernée:
// ############## 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.*
FROM subscribethread,user
WHERE subscribethread.threadid='$threadid'
AND subscribethread.userid=user.userid
AND user.userid<>'$userid'
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']);
}
}
while ($touser=$DB_site->fetch_array($useremails)) {
$touser['username']=unhtmlspecialchars($touser['username']);
eval("\$emailmsg = \"".gettemplate("email_notify",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); <---- ligne 2314
}
$bbuserinfo['username'] = $temp;
}
*************************
g indiqué la ligne qui sois disant bug
merci a tous
thlb