[geeklog-cvs] geeklog-1.3/public_html profiles.php,1.20,1.21
dhaun at geeklog.net
dhaun at geeklog.net
Fri Feb 7 13:34:58 EST 2003
Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv30932
Modified Files:
profiles.php
Log Message:
Append user's signature when sending an email to some other user.
Index: profiles.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** profiles.php 5 Jan 2003 21:23:51 -0000 1.20
--- profiles.php 7 Feb 2003 18:34:56 -0000 1.21
***************
*** 10,18 ****
// | |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000,2001 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony at tonybibbs.com |
! // | Mark Limburg - mlimburg at users.sourceforge.net |
! // | Jason Wittenburg - jwhitten at securitygeeks.com |
// +---------------------------------------------------------------------------+
// | |
--- 10,19 ----
// | |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony at tonybibbs.com |
! // | Mark Limburg - mlimburg at users.sourceforge.net |
! // | Jason Whittenburg - jwhitten at securitygeeks.com |
! // | Dirk Haun - dirk at haun-online.de |
// +---------------------------------------------------------------------------+
// | |
***************
*** 49,53 ****
function contactemail($uid,$author,$authoremail,$subject,$message)
{
! global $_TABLES, $_CONF, $LANG08, $LANG_CHARSET;
if (!empty($author) && !empty($subject) && !empty($message)) {
--- 50,54 ----
function contactemail($uid,$author,$authoremail,$subject,$message)
{
! global $_TABLES, $_CONF, $_USER, $LANG08, $LANG_CHARSET;
if (!empty($author) && !empty($subject) && !empty($message)) {
***************
*** 63,70 ****
$charset = $LANG_CHARSET;
}
$subject = strip_tags (stripslashes ($subject));
$subject = substr ($subject, 0, strcspn ($subject, "\r\n"));
$RET = @mail($A['username'] . ' <' . $A['email'] . '>', $subject,
! strip_tags(stripslashes($message)),
"From: $author <$authoremail>\r\n" .
"Return-Path: <$authoremail>\r\n" .
--- 64,82 ----
$charset = $LANG_CHARSET;
}
+
+ // Append the user's signature to the message
+ $sig = '';
+ if ($_USER['uid'] > 1) {
+ $sig = DB_getItem ($_TABLES['users'], 'sig', "uid={$_USER['uid']}");
+ if (!empty ($sig)) {
+ $sig = strip_tags (COM_stripslashes ($sig));
+ $sig = "\r\n\r\n-- \r\n" . $sig;
+ }
+ }
+
$subject = strip_tags (stripslashes ($subject));
$subject = substr ($subject, 0, strcspn ($subject, "\r\n"));
$RET = @mail($A['username'] . ' <' . $A['email'] . '>', $subject,
! strip_tags(stripslashes($message)) . $sig,
"From: $author <$authoremail>\r\n" .
"Return-Path: <$authoremail>\r\n" .
More information about the geeklog-cvs
mailing list