'; } else { if($SYSTEM_TYPE == 1){ connect_me(); $check = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM `emaillist` WHERE `user_email`='$_POST[user_email]'")); if($check[0] > 0){ $message = 'Your email is already on the mailing list.'; } } else { $file = fopen($FILE_LOCATION,'r'); while($read = fread($file,1024657)){ $emailist .= $read; } fclose($file); $lines = explode("\n",$emailist); foreach($lines as $line){ $record = explode('|++|',$line); if($record[0] == $_POST['user_email']){ $message = 'Email adresiniz listemizde zaten mevcut.


'; } } } } if($message == NULL){ $user_email = $_POST['user_email']; $delete_code = generate_session(8); $status = generate_session(10); if($REQUIRE_CONFIRM == 1){ $email_status = '0|'.$status; $conf = 'You still need to confirm your email by clicking on the link we emailed you just now.'; $email_conf = 'Please click on '.$EMAIL_OPTIONS['URL'].'mailing_list.php?act_id='.$status.' to confirm your request
If you did not make the request, simply ignore this email.'; } else { $email_status = '1'; $email_conf = 'Our site does not require email confirmation, your email was added'; } if($SYSTEM_TYPE == 1){ $insert = mysql_query("INSERT INTO `emaillist` (`user_email`,`email_status`,`delete_code`) VALUES ('$user_email','$email_status','$delete_code')"); if($insert){ $message = 'Email adresiniz listemize eklendi.


'.$conf; } } else { $file = fopen($FILE_LOCATION,'a'); if($file){ fwrite($file,"$user_email|++|$email_status|++|$delete_code\n"); fclose($file); $message = 'Email adresiniz listemize eklendi.


'.$conf; } } if($message != NULL){ //Setup subject template $user_message = str_replace('$+confirm_require+$',$email_conf,$REQUIRE_TEMPLATE); //Setup headers $user_header = "Return-Path: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n"; $user_header .= "From: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n"; $user_header .= "Content-Type: ".$EMAIL_OPTIONS['TYPE']."; charset=".$EMAIL_OPTIONS['CHARSET'].";\n\n\r\n"; //send email mail ($user_email,'Mailing List Addition Request',$user_message,$user_header); } } if($SYSTEM_TYPE == 1){disconnect_me();} } //if removing oneself from mailing list if($_GET['rmid'] != NULL && $ALLOW_REMOVAL == 1){ $delete_code = $_GET['rmid']; if($SYSTEM_TYPE == 1){ connect_me(); $check = mysql_fetch_row(mysql_query("SELECT `user_email` FROM `emaillist` WHERE `delete_code`='$delete_code'")); if($check[0] != NULL){ $remove = mysql_query("DELETE FROM `emaillist` WHERE `delete_code`='$delete_code'"); if($remove){ $message = 'Your email has been removed from our mailing list.'; $the_email = $check[0]; } } disconnect_me(); } else { $file = fopen($FILE_LOCATION,'r'); while($read = fread($file,1024657)){ $emailist .= $read; } fclose($file); $lines = explode("\n",$emailist); foreach($lines as $line){ $record = explode('|++|',$line); if($record[2] != $delete_code){ $new_list .= $email."\n"; } else { $the_email = $record[0]; $message = 'Your email has been removed from our mailing list.'; } } $file_w = fopen($FILE_LOCATION,'w'); fwrite($file_w,$new_list); fclose($file_w); } if($message == NULL){ $message = 'Email not found.'; } else { //Setup subject template $user_message = str_replace('$+email_address+$',$the_email,$REMOVE_TEMPLATE); //Setup headers $user_header = "Return-Path: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n"; $user_header .= "From: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n"; $user_header .= "Content-Type: ".$EMAIL_OPTIONS['TYPE']."; charset=".$EMAIL_OPTIONS['CHARSET'].";\n\n\r\n"; //send email mail ($the_email,'Mailing List Removal Confirmation',$user_message,$user_header); } } //If confirming email if($_GET['act_id'] != NULL){ $status_code = '0|'.$_GET['act_id']; if($SYSTEM_TYPE == 1){ connect_me(); $check = mysql_fetch_row(mysql_query("SELECT `user_email` FROM `emaillist` WHERE `email_status`='$status_code'")); if($check[0] != NULL){ $remove = mysql_query("UPDATE `emaillist` SET `email_status`='1' WHERE `email_status`='$status_code'"); if($remove){ $message = 'Your email has been confirmed.'; } } disconnect_me(); } else { $file = fopen($FILE_LOCATION,'r'); while($read = fread($file,1024657)){ $emailist .= $read; } fclose($file); $lines = explode("\n",$emailist); foreach($lines as $line){ $record = explode('|++|',$line); if($record[1] != $status_code){ $new_list .= $email."\n"; } else { $new_list .= $record[0].'|++|1|++|'.$record[2]."\n";; $message = 'Your email has been confirmed.'; } } $file_w = fopen($FILE_LOCATION,'w'); fwrite($file_w,$new_list); fclose($file_w); } } /* +++++++++++++++++++++++++++++++++++++ END FILE ---------------------------------------*/ /* Partner Sites: ==================== Free File Upload: http://www.HotFile.us Free Image Hosting: http://www.MyImage.us Free Games (all type of games): http://www.FunTimes.us Free Templates: http://www.allfreetemplates.us PHP Skills and Tricks: http://www.phptricks.com */ ?>


MAILING LIST

Mail Adresiniz: