<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tavsiye Et</title>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<form method="post" action="?kontrol=tamam" enctype="multipart/form-data">
<table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#000000" id="table6" style="border-collapse: collapse">
  <tr>
    <td><table border="1" width="100%" cellspacing="0" cellpadding="0" bgcolor="#88B8C6" height="25" bordercolor="#000000" id="table6" style="border-collapse: collapse">
      <tr>
        <td width="100%"><span class="style1">Sitemizi Arkadaşınıza Tavsiye Edin</span></td>
      </tr>
    </table>
    <br />
    <table width="100%" border="0">
      <tr>
        <td>İsminiz:</td>
        <td><label>
          <input type="text" name="isim" id="isim" />
        </label></td>
      </tr>
      <tr>
        <td>Mail Adresiniz</td>
        <td><label>
          <input type="text" name="mail" id="mail" />
        </label></td>
      </tr>
      <tr>
        <td>Arkadaşınızın Mail Adresi</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>1-
          <label>
          <input type="text" name="ark1" id="ark1" />
          </label></td>
        <td><div align="center">
          <label>
          <input type="submit" name="gonder" id="gonder" value="Gönder" />
          </label>
        </div></td>
      </tr>
      <tr>
        <td><label></label></td>
        <td><div align="center">
          <label></label>
          <input type="submit" name="button2" id="button2" value="Temizle" />
        </div></td>
      </tr>
      <tr>
        <td><label></label></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2"><div align="center"><?php 
												if(isset($_GET['kontrol'])):
													$kontrol = $_GET['kontrol'];
													if($kontrol == 'tamam'):
														include('fonksiyon.php');
													if(isset($_POST['isim']) && isset($_POST['mail']) && isset($_POST['ark1'])){ 
	
		$isim = $_POST['isim'];
		$mail = $_POST['mail'];
		$ark1 = $_POST['ark1'];
	
		
		 
			if(empty($isim) && empty($mail) && empty($ark1)){
				echo 'Lütfen Boş Alan Bırakmayınız';	
			}elseif(!eregi('^[a-zA-Z0-9_\-\.}+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$',$mail)){
				echo 'Mail Adresinizi Doğru Giriniz..';
			}else{
			if(isset($isim) && isset($mail) && isset($ark1)){
				
				
				$headers  = 'MIME-Version: 1.0' . "\r\n";   
				$headers .= 'Content-type: text/html; charset=iso-8859-9' . "\r\n";   
				$headers .= 'To: Alıcı 1 <alici1@eposta.com>, Alıcı 2 <alici2@eposta.com>' . "\r\n";   
				$headers .= 'From: LapponiaHotel Tavsiye Sistemi <tavsiyesistem@LapponiaHotel.com>' . "\r\n";   
				$headers .= 'Reply-To: Yanit E-Postasi <yanit@eposta.com>' . "\r\n";   
				$headers .= 'X-Mailer: PHP/' . phpversion() . "\r\n";   
				$headers .= 'Cc: acikkopya@eposta.com' . "\r\n";   
				$headers .= 'Bcc: gizlikopya@eposta.com' . "\r\n";   
  				
				$alici_eposta = $ark1;   
				$eposta_konusu = 'Tavsiye Maili';   
				$eposta_mesaji = '<b><i>'.$isim.'\'isimli Arkadasiniz Bizi Tavsiye Ediyor... <br /></i></b>';   
				mail($alici_eposta, $eposta_konusu, $eposta_mesaji, $headers); 
				echo 'Gönderildi';
						}
	}
	}
	
													endif;
												endif;
		
		 ?></div></td>
        </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>
İşine Yara İnşallah