// Copyright 2001,2002,2003,2004,2005,2006, Chris Heart - ALL RIGHTS RESERVED WORLDWIDE
// contactAdmin.html
include("../tpndblib.inc");
include("../tpnuserlib.inc");
include("../tpnsecurity.inc");
if ($message)
unset ($message);
function checkEmailContact ($email)
{
if ( $email )
{
$email = strtolower( trim( $email ) );
if ( ! eregi( "^[_\-\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$", $email ) )
$message .= "
Your EMail Address appears to be invalid. Please resubmit.
";
}
else
$message = "Your email address is empty !
";
return $message;
}
if ( isset( $actionflag ) && $actionflag == "sendEmail" )
{
$message = checkEmail( $form[EMAIL]);
// $message .= checkEmailContact( $form[EMAIL] );
if ( empty( $form[MSG] ) || ( strlen( $form[MSG] ) <20 ) )
{
$message .= "No Message Body or Message Body Too Short.
";
}
if ( $message == "" )
{
if ( empty( $form[SUBJECT] ) )
{
$subject = "Email from TPN Admin Form";
}
else
{
$subject = "$form[SUBJECT]";
}
$user = getRow( "USERS", "UID", "$form[user_id]" );
if ( $form[ad_id] )
{
$ad = getRow( "PROFILES", "SID", "$form[ad_id]" );
}
$timenow = date("jS M Y - G:i");
$form[NAME]=ucfirst($form[NAME]);
$timesent = "Time Email Sent : $timenow Australian EST";
$to = "webmaster@personals.net.au";
$msg = stripslashes($form[MSG]);
$emailmsg = "A message from $form[NAME] at $form[EMAIL] to the Webmaster\n\nMessage as follows:\nMessage:\n\n$msg\n\nMessage Ends\n\n$timesent\n\nA copy is sent to the sender for confirmation purposes.";
$option = "From: $form[EMAIL]\r\nReply_to: $form[EMAIL]\r\nCC: $form[EMAIL]\r\nX_From: $user[UID] - $REMOTE_ADDR\r\nX_UserOS: $HTTP_USER_AGENT\r\nX_Keyword: TPN_contactAdmin\r\n";
mail( $to, $subject, $emailmsg, $option ); // send to Member and CC to Sender
$teen[message] = "Your Email has been sent to the Webmaster";
if ( $tpn[logged_in] )
header( "Location: membersmenu.html?".SID );
else
header( "Location: login.html" );
}
}
?>
include("../tpnheadwords.inc"); ?>
Send Email To Webmaster
if ( ( $tpn[logged_in] ) && $tpn[id] == 1 )
require( "../tpnheader3.inc" );
else
include("../tpnheader.inc");
include("../tpnpublicnav.inc");
?>
Send Email to Webmaster
if ( ! empty( $message ) )
print_error($message);
?>
include ("../tpnfooter.inc");
?>
Last updated on print date( "d M Y \a\\t H:i:s", filemtime( basename( $PHP_SELF ) ) ) ?> Australian EST.