From 8ac6579f2dd3fe8e4739585dd24df51f3c54e7ac Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 4 Jul 2012 18:49:11 -0700 Subject: Added yahoo to OpenID logins Added debug email method. Now sending debug email on duplicate emails found in the DB --- globe.php | 85 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 41 insertions(+), 44 deletions(-) (limited to 'globe.php') diff --git a/globe.php b/globe.php index 8fb1994..051603d 100644 --- a/globe.php +++ b/globe.php @@ -5,16 +5,11 @@ session_start(); //Database login: //include_once 'db.inc.php'; +//!! CONFIRM THIS DOMAIN BEFORE TRANSFER +//$mydomain = "http://www.mazetd.4xg.net/"; +$mydomain = "http://www.pathery.com/"; -$mydomain = "http://www.mazetd.4xg.net"; - -//https://www.google.com/accounts/o8/id?id=AItOawl4GX29ka40T4ZeuXnR2FVsP4LZWaED_T8 -//https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawl - - -include_once("./includes/header.php"); - - +//include_once("./includes/header.php"); function sql_clean($string) { if (get_magic_quotes_gpc()) { @@ -60,37 +55,6 @@ function CookieLogin() { } -//error_reporting(0); -//$old_error_handler = set_error_handler("userErrorHandler"); -function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { - $time=date("d M Y H:i:s"); - // Get the error type from the error number - $errortype = array (1 => "Error", - 2 => "Warning", - 4 => "Parsing Error", - 8 => "Notice", - 16 => "Core Error", - 32 => "Core Warning", - 64 => "Compile Error", - 128 => "Compile Warning", - 256 => "User Error", - 512 => "User Warning", - 1024 => "User Notice"); - $errlevel=$errortype[$errno]; - - //Write error to log file (CSV format) - $errfile=fopen("errors.csv","a"); - fputs($errfile,"\"$time\",\"$filename: - $linenum\",\"($errlevel) $errmsg\"\r\n"); - fclose($errfile); - - //if($errno!=2 && $errno!=8) { - //Terminate script if fatal error - //die("A fatal error has occurred. Script execution has been aborted"); - //} -} - - @@ -150,8 +114,8 @@ Function CheckAuth($page) { } //!! Contains domain !! -Function DoRedirect($message = "Thanks", $to = "http://www.mazetd.4xg.net/", $duration = "3") { - $to=(is_null($to)?'http://www.mazetd.4xg.net/':$to); +Function DoRedirect($message = "Thanks", $to = "http://www.pathery.com/", $duration = "3") { + $to=(is_null($to)?'http://www.pathery.com/':$to); if ($duration == 0) { header("Location: $to"); @@ -178,10 +142,43 @@ Function DoRedirect($message = "Thanks", $to = "http://www.mazetd.4xg.net/", $du "; - } +function EmailError($data) { + $to = 'snapwilliam@gmail.com'; + $mycompany = "Pathery"; + + $fromemail = "snap@pathery.com"; + $replyemail = "snap@pathery.com"; + + # -=-=-=- MIME BOUNDARY + $mime_boundary = "----$mycompany----".md5(time()); + # -=-=-=- MAIL HEADERS + + $subject = "Pathery Error Report"; + $headers = "From: $mycompany <$fromemail>\n"; + $headers .= "Reply-To: $mycompany <$replyemail>\n"; + $headers .= "MIME-Version: 1.0\n"; + $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n"; + # -=-=-=- TEXT EMAIL PART + + $message = "--$mime_boundary\n"; + $message .= "Content-Type: text/plain; charset=UTF-8\n"; + $message .= "Content-Transfer-Encoding: 8bit\n\n"; + + $message .= "Request from website: \n"; + foreach ($data as $title => $value) + $message.= "$title: $value\n"; + + # -=-=-=- HTML EMAIL PART + //None + # -=-=-=- FINAL BOUNDARY + $message .= "--$mime_boundary--\n\n"; + # -=-=-=- SEND MAIL + $mail_sent = @mail( $to, $subject, $message, $headers ); + Return $mail_sent; +} -?> +?> \ No newline at end of file -- cgit v1.2.3