All pastes #487997 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-14 19:32 UTC
rendered paste body
<?php

if( $GLOBALS[ 'SCRIPT' ] != 'vs.php'
    && $GLOBALS[ 'SCRIPT' ] != 'vu.php'
    && $GLOBALS[ 'SCRIPT' ] != 'signup.php' )
{
	die( 'You probably want to go <a href="../">here</a>.' );
}

$sql2 = "
	SELECT
        first_name,
        last_name,
        email
	FROM $GLOBALS[TB_USERS]
	WHERE user_id = '$user_id'
";

$query2 = sqlQuery( $sql2 );

$array2 = sqlFetchArray( $query2 );

$first_name = $array2[ 'first_name' ];

$recipient = "$array2[first_name] $array2[last_name] <$array2[email]>";

$subject = 'Signup Complete';

$tmpHTMLComments = $GLOBALS[ 'SITE_HTML_COMMENTS' ];

$GLOBALS[ 'SITE_HTML_COMMENTS' ] = false;

if( $GLOBALS[ 'SITE_SEND_HTML_EMAILS' ] )
{
	$emailSignupComplete = getTemplate( 'emailSignupCompleteHTML' );
}
else
{
	$emailSignupComplete = getTemplate( 'emailSignupComplete' );
}

eval( "\$emailSignupComplete = \"$emailSignupComplete\";" );

$GLOBALS[ 'SITE_HTML_COMMENTS' ] = $tmpHTMLComments;

$headers = <<<EOF
From: $GLOBALS[SITE_OWNER_NAME] <$GLOBALS[SITE_OWNER_EMAIL]>
X-Sender: <$GLOBALS[SITE_OWNER_EMAIL]>
Return-Path: <$GLOBALS[SITE_OWNER_EMAIL]>
Error-To: <$GLOBALS[SITE_OWNER_EMAIL]>
X-Mailer: $_SERVER[SERVER_NAME]

EOF;

if( $GLOBALS[ 'SITE_SEND_HTML_EMAILS' ] )
{

$headers  .= <<<EOF
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1

EOF;

}

if( !mail( $recipient, $subject, $emailSignupComplete, $headers ) )
{
	die( 'mail failed to send' );
}

?>