[geeklog-cvs] geeklog-1.3/public_html profiles.php,1.38,1.39
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Fri Jan 28 03:42:52 EST 2005
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv5563/public_html
Modified Files:
profiles.php
Log Message:
Switched to "short" GET/POST arrays
Index: profiles.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** profiles.php 19 Oct 2004 10:53:18 -0000 1.38
--- profiles.php 28 Jan 2005 08:42:50 -0000 1.39
***************
*** 6,19 ****
// +---------------------------------------------------------------------------+
// | profiles.php |
- // | This pages let's GL user communicate with each other without risk of |
- // | their email address being intercepted by spammers. |
// | |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 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 |
// +---------------------------------------------------------------------------+
// | |
--- 6,19 ----
// +---------------------------------------------------------------------------+
// | profiles.php |
// | |
+ // | This pages lets GL users communicate with each other without risk of |
+ // | their email address being intercepted by spammers. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2005 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
! // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
! // | Jason Whittenburg - jwhitten AT securitygeeks DOT com |
! // | Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
// | |
***************
*** 133,137 ****
function contactform($uid, $subject='', $message='')
{
! global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN, $HTTP_COOKIE_VARS;
$retval = '';
--- 133,137 ----
function contactform($uid, $subject='', $message='')
{
! global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN;
$retval = '';
***************
*** 158,167 ****
$isAdmin = false;
}
if ((($P['emailfromadmin'] == 1) && $isAdmin) ||
(($P['emailfromuser'] == 1) && !$isAdmin)) {
! $username = DB_getItem ($_TABLES['users'], 'username',
! "uid = '$uid'");
! $retval = COM_startBlock ($LANG08[10] . ' ' . $username);
$mail_template = new Template ($_CONF['path_layout'] . 'profiles');
$mail_template->set_file ('form', 'contactuserform.thtml');
--- 158,167 ----
$isAdmin = false;
}
+
+ $displayname = COM_getDisplayName ($uid);
if ((($P['emailfromadmin'] == 1) && $isAdmin) ||
(($P['emailfromuser'] == 1) && !$isAdmin)) {
! $retval = COM_startBlock ($LANG08[10] . ' ' . $displayname);
$mail_template = new Template ($_CONF['path_layout'] . 'profiles');
$mail_template->set_file ('form', 'contactuserform.thtml');
***************
*** 183,189 ****
$retval .= COM_endBlock ();
} else {
! $username = DB_getItem ($_TABLES['users'], 'username',
! "uid = '$uid'");
! $retval = COM_startBlock ($LANG08[10] . ' ' . $username, '',
COM_getBlockTemplate ('_msg_block', 'header'));
$retval .= $LANG08[35];
--- 183,187 ----
$retval .= COM_endBlock ();
} else {
! $retval = COM_startBlock ($LANG08[10] . ' ' . $displayname, '',
COM_getBlockTemplate ('_msg_block', 'header'));
$retval .= $LANG08[35];
***************
*** 270,274 ****
$subject = COM_undoSpecialChars(strip_tags(stripslashes('Re: '.$A['title'])));
! COM_mail ($toemail, $subject, $mailtext, $mailfrom);
COM_updateSpeedlimit ('mail');
--- 268,272 ----
$subject = COM_undoSpecialChars(strip_tags(stripslashes('Re: '.$A['title'])));
! COM_mail ($mailto, $subject, $mailtext, $mailfrom);
COM_updateSpeedlimit ('mail');
***************
*** 288,292 ****
function mailstoryform($sid)
{
! global $_TABLES, $HTTP_COOKIE_VARS, $_CONF, $LANG08, $_USER, $LANG_LOGIN;
$retval = '';
--- 286,290 ----
function mailstoryform($sid)
{
! global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN;
$retval = '';
***************
*** 312,316 ****
--- 310,318 ----
$result = DB_query("SELECT email FROM {$_TABLES['users']} WHERE uid = {$_USER['uid']}");
$A = DB_fetchArray($result);
+
$from = $_USER['username'];
+ if (($_CONF['show_fullname'] == 1) && !empty ($_USER['fullname'])) {
+ $from = $_USER['fullname'];
+ }
$fromemail = $A['email'];
}
***************
*** 341,348 ****
$display = '';
! if (isset ($HTTP_POST_VARS['what'])) {
! $what = COM_applyFilter ($HTTP_POST_VARS['what']);
! } else if (isset ($HTTP_GET_VARS['what'])) {
! $what = COM_applyFilter ($HTTP_GET_VARS['what']);
} else {
$what = '';
--- 343,350 ----
$display = '';
! if (isset ($_POST['what'])) {
! $what = COM_applyFilter ($_POST['what']);
! } else if (isset ($_GET['what'])) {
! $what = COM_applyFilter ($_GET['what']);
} else {
$what = '';
***************
*** 351,359 ****
switch ($what) {
case 'contact':
! $uid = COM_applyFilter ($HTTP_POST_VARS['uid'], true);
if ($uid > 1) {
! $display .= contactemail ($uid, $HTTP_POST_VARS['author'],
! $HTTP_POST_VARS['authoremail'], $HTTP_POST_VARS['subject'],
! $HTTP_POST_VARS['message']);
} else {
$display .= COM_refresh ($_CONF['site_url'] . '/index.php');
--- 353,361 ----
switch ($what) {
case 'contact':
! $uid = COM_applyFilter ($_POST['uid'], true);
if ($uid > 1) {
! $display .= contactemail ($uid, $_POST['author'],
! $_POST['authoremail'], $_POST['subject'],
! $_POST['message']);
} else {
$display .= COM_refresh ($_CONF['site_url'] . '/index.php');
***************
*** 362,366 ****
case 'emailstory':
! $sid = COM_applyFilter ($HTTP_GET_VARS['sid']);
if (empty ($sid)) {
$display = COM_refresh ($_CONF['site_url'] . '/index.php');
--- 364,368 ----
case 'emailstory':
! $sid = COM_applyFilter ($_GET['sid']);
if (empty ($sid)) {
$display = COM_refresh ($_CONF['site_url'] . '/index.php');
***************
*** 376,392 ****
case 'sendstory':
! $sid = COM_applyFilter ($HTTP_POST_VARS['sid']);
if (empty ($sid)) {
$display = COM_refresh ($_CONF['site_url'] . '/index.php');
} else {
! $display .= mailstory ($sid, $HTTP_POST_VARS['to'],
! $HTTP_POST_VARS['toemail'], $HTTP_POST_VARS['from'],
! $HTTP_POST_VARS['fromemail'], $HTTP_POST_VARS['shortmsg']);
}
break;
default:
! if (isset ($HTTP_GET_VARS['uid'])) {
! $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
} else {
$uid = 0;
--- 378,393 ----
case 'sendstory':
! $sid = COM_applyFilter ($_POST['sid']);
if (empty ($sid)) {
$display = COM_refresh ($_CONF['site_url'] . '/index.php');
} else {
! $display .= mailstory ($sid, $_POST['to'], $_POST['toemail'],
! $_POST['from'], $_POST['fromemail'], $_POST['shortmsg']);
}
break;
default:
! if (isset ($_GET['uid'])) {
! $uid = COM_applyFilter ($_GET['uid'], true);
} else {
$uid = 0;
More information about the geeklog-cvs
mailing list