, Kelly ' . "\r\n"; $headers .= "From: Admin <$ADMIN_EMAIL>" . "\r\n"; //$headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: Admin <$ADMIN_EMAIL>' . "\r\n"; function notify_admin ($mailto, $mailmessage, $mail_headers) { mail("$mailto", "Super Bowl Squares", "$mailmessage", "$mail_headers"); //echo "mail(\"$mailto\", \"Super Bowl Squares\", \"$mailmessage\", \"$mail_headers\")
;"; } ?>

ADMINISTRATOR APPROVAL

Confirm user selected square when payment is verified, or release the square if allowed time for payment has expired.
Square
Confirm
Release
Notes to User
 

Home Numbers Scores Logout

0){ $input = ""; $whereclause = "("; for($e=0; $e"; $query="SELECT * FROM VNSB_squares WHERE $whereclause"; //echo $query."
"; $result = mysql_query($query); if (!$result) { echo mysql_error(); exit; } $USER_EMAIL_LIST = ''; while ($record = mysql_fetch_assoc($result)) { $USER_EMAIL = ''; $USER_EMAIL = $record["EMAIL"]; $pos = strpos($USER_EMAIL_LIST,$USER_EMAIL); if($pos === false) { // string $USER_EMAIL NOT found in $USER_EMAIL_LIST $USER_EMAIL_LIST = $USER_EMAIL_LIST .",".$USER_EMAIL; } } $USER_EMAIL_LIST = substr_replace($USER_EMAIL_LIST,"",0,1); $bodyMessage = "\r\nNOTIFICATION\r\n"; //echo $bodyMessage."
"; if ($CONFIRM==1 AND $RELEASE!=1) { $query="UPDATE VNSB_squares SET CONFIRM='1' WHERE $whereclause"; $bodyMessage .= "Your square $square_list is now confirmed.\r\n\n"; } else if ($RELEASE==1 AND $CONFIRM!=1) { $query="UPDATE VNSB_squares SET NAME='AVAILABLE', EMAIL='', NOTES='', DATE='', CONFIRM='0' WHERE $whereclause"; $bodyMessage .= "Your square $square_list selection is now released due to no payment.\r\n"; $bodyMessage .= "If this is an error, please contact me or re-select your square.\r\n\n"; } else if (($CONFIRM!=1 AND $RELEASE!=1) OR ($RELEASE==1 AND $CONFIRM==1) ) { echo "

Must select ONLY one 'Confirm' or 'Release' !!!

"; echo "

Back

"; exit; } //echo $query."
"; $result = mysql_query($query); if (!$result) { echo mysql_error(); } else { $bodyMessage .= $NOTES."\r\n\n"; $bodyMessage .= "Good Luck and enjoy the game.\r\n"; $bodyMessage .= "The Commissioner\r\n"; $bodyMessage .= "$superbowlURL\r\n"; notify_admin($USER_EMAIL_LIST,$bodyMessage,$headers); echo "

Square(s) ".$square_list." updated successful

"; echo "

Emailed to: ".$USER_EMAIL_LIST."

"; echo "

Home Admin Logout

"; unset($confirmation, $SQUARE, $CONFIRM, $RELEASE, $NOTES, $ADM_EMAIL, $ADM_PASSWORD); } }else{ echo "

Must select at least one Square to Confirm or Release' !!!

"; echo "

Back

"; exit; } } ?>