ss - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of ss.php

  1. <?php 
  2. include'netting/baglan.php';
  3. error_reporting(E_ALL);
  4. ini_set("display_errors", 1);
  5. //################################################################################################################
  6. //                                              LIVESEARCH KODLARI
  7. //################################################################################################################
  8. /* Database Bağlantısı */
  9. //     if (isset($_REQUEST['term'])) { // Bir terim gelip gelmediğini kontrol ediyoruz.
  10. //         $term = $_REQUEST['term']; // Gelen terimi değişkene atıyoruz.
  11. //         /* Gelen terim ile eşleşen kayıt olup olmadığını sorguluyoruz. */
  12. //         $sSorgu=$db->query("SELECT * FROM il WHERE isim LIKE '".$term."%'", PDO::FETCH_ASSOC);
  13. //         if ($sSorgu) { // Sorgulama sonucu dolu olursa eğer sonuçları ekrana basıyoruz.
  14. //             $sSorgu=$db->query("SELECT * FROM il WHERE isim LIKE '".$term."%' limit 4", PDO::FETCH_ASSOC);
  15. //             foreach($sSorgu as $scek){ 
  16. //                 $name = $scek['isim'];
  17. //                 echo '<li class="list-group-item sonuclar">'.$name.'</li>';
  18. //             }
  19. ?>
  20.  <script type="text/javascript">
  21. //               //   const myLists = document.querySelectorAll('.liveresult');
  22.  
  23. //               //   document.addEventListener('click', (event) => {
  24. //               //     myLists.forEach(myList => {
  25. //               //       if (!myList.contains(event.target)) {
  26. //               //         myList.style.display = 'none';
  27. //               //     }
  28. //               // });
  29. //               // });
  30. // const myDiv = document.getElementById("liveresult");
  31. // document.addEventListener("click", (event) => {
  32. //   if (!event.target.classList.contains("myClass") && event.target.tagName !== "BODY") {
  33. //     myDiv.style.display = "none";
  34. //   }
  35. // });
  36.  </script>
  37. <?php 
  38. //       }else{
  39. //             // Eğer eşleşen kayıt yoksa alttaki uyarıyı ekrana basıyoruz.
  40. //         echo '<li class="list-group-item">Eşleşen kayıt bulunamadı.</li>';
  41. //     }
  42. // }
  43.  
  44.  
  45. use PHPMailer\PHPMailer\PHPMailer;
  46. use PHPMailer\PHPMailer\Exception;
  47.  
  48. require 'src/Exception.php';
  49. require 'src/PHPMailer.php';
  50. require 'src/SMTP.php';
  51.  
  52.  
  53.  
  54. //################################################################################################################
  55. //KULLANICI TARAFINDAN GELEN TARİHLERİ ALIN!
  56. if (isset($_POST['from']) && isset($_POST['to'])) {
  57.     // KULLANICIDAN GELEN DEĞERLER
  58.     $giristarihi  =   postduzenle($_POST['from']);
  59.     $cikistarihi  =   postduzenle($_POST['to']);
  60.     $villaid      =   postduzenle(intval($_POST['villaid']));
  61.  
  62.     if (strlen($giristarihi)==10 && strlen($cikistarihi)==10) {
  63.  
  64.         $villasorgu=$db->prepare("SELECT * from villadetay where villaid=?");
  65.         $villasorgu->execute(array($villaid));
  66.         $villadetay=$villasorgu->fetch(PDO::FETCH_ASSOC);
  67.         // VİLLA VAR MI KONTROLU
  68.         if ($villaid!=$villadetay['villaid']) {
  69.             echo 'Ürün Bulunamadı!';
  70.             exit();
  71.         }else{
  72.             $villaid=$villadetay['villaid'];
  73.             //KULLANICININ SEÇMİŞ OLDUĞU TARİH ARALIĞINDAKİ GÜNLER
  74.             $kullanicininsectigigunler_array = array();
  75.             $start          =   new DateTime($giristarihi);
  76.             $end            =   new DateTime($cikistarihi);
  77.             $end->modify('+1 day'); // 1 Gün daha ekliyoruz çünkü son seçtiği tarihi listelemek için
  78.             $interval       =   new DateInterval('P1D');
  79.             $period         =   new DatePeriod($start, $interval, $end);
  80.             $i=0;
  81.             foreach ($period as $date) {
  82.                 $kullanicininsectigigunler = $date->format('m/d/Y');
  83.                 array_push($kullanicininsectigigunler_array, $kullanicininsectigigunler);
  84.                 $i++;
  85.             }
  86.             // REZERVASYONLU OLAN GÜNLER
  87.             $sSorgu=$db->query("SELECT * FROM rezervasyon WHERE villaid=$villaid AND durum=1", PDO::FETCH_ASSOC);
  88.             $rezervasyonlugunler_array = array();
  89.             foreach($sSorgu as $scek){ 
  90.             $giristarihleri  =  $scek['giris_tarih'];
  91.             $cikistarihleri  =  $scek['cikis_tarih'];
  92.  
  93.             $start           =  new DateTime($giristarihleri);
  94.             $end             =  new DateTime($cikistarihleri);
  95.             $end->modify('+1 day'); // SON SEÇTİĞİ TARİHİ LİSTELEMEK İÇİN "1" GÜN DAHA EKLİYORUZ
  96.             $interval        =  new DateInterval('P1D');
  97.             $period          =  new DatePeriod($start, $interval, $end);
  98.                 foreach ($period as $date) {
  99.                     $rezervasyonlugunler = $date->format('m/d/Y');
  100.                     array_push($rezervasyonlugunler_array, $rezervasyonlugunler);
  101.                 }
  102.             }
  103.             $overlap=array_intersect($rezervasyonlugunler_array, $kullanicininsectigigunler_array);
  104.             if (count($overlap) > 0) {
  105.                 echo'<hr><span style="color: red;">"<b>Rezervasyona Uygun Değildir!</b>"</span><br>Seçtiğiniz Tarih Aralığı Müsait Değildir';
  106.                 exit();
  107.             }elseif($i==0) {
  108.                 echo'<hr><span style="color: red;">"<b>Rezervasyona Uygun Değildir!</b>"</span><br>Giriş Tarihi, Çıkış Tarihinden Önce Olmalıdır';
  109.                 exit();
  110.             }else{
  111.  
  112.             // FİYAT BİLGİSİ HESAPLAMA
  113.               // BAŞLANGIÇ DEĞERLERİ
  114.               // ÖDEME LİSTESİ VE ÖDEME TÜRÜ
  115.               
  116.               $OnOdemeOrani             =   isset($siteayar['onOdemeOrani'])              ?  $siteayar['onOdemeOrani']              : 0;
  117.               $odemeTuru                =   isset($villadetay['odeme_yontemi'])           ?  $villadetay['odeme_yontemi']           : "tamOdeme"
  118.  
  119.               $fiyat['konaklama']       =   0;
  120.               $min['konaklama_gunu']    =   isset($villadetay['min_konaklama_suresi'])    ?  $villadetay['min_konaklama_suresi']    : 0;
  121.  
  122.               $fiyat['temizlik']        =   isset($villadetay['temizlik_ucreti'])         ?  $villadetay['temizlik_ucreti']         : 0;
  123.               $min['temizlik_gunu']     =   isset($villadetay['min_temizlikucreti_gunu']) ?  $villadetay['min_temizlikucreti_gunu'] : 0;
  124.  
  125.               $fiyat['depozito']        =   isset($villadetay['depozito_ucreti'])         ?  $villadetay['depozito_ucreti']         : 0;
  126.  
  127.               $fiyat['onOdeme']         =   0;
  128.               $fiyat['kalanOdenicek']   =   0;
  129.               $fiyat['toplamOdencek']   =   0;
  130.  
  131.               $sonucYazisi              =   "Fatal Error (null)";
  132.  
  133.  
  134.                 // ÖDEME YÖNTEMİ DOĞRU MU KONTROLÜ
  135.                 if ($odemeTuru<>"tamOdeme" && $odemeTuru<>"onOdeme") {
  136.                   echo '<hr><span style="color: red;">"<b>Rezervasyona Uygun Değildir!</b>"</span><br>Ödeme Yöntemi Geçerli Değildir. Lütfen Bizimle İletişime Geçiniz.';
  137.                   exit();
  138.                 }
  139.  
  140.  
  141.                 // KULLANICININ SEÇMİŞ OLDUĞU GÜNLER
  142.                 $from_date = new DateTime($_POST['from']);
  143.                 $to_date = new DateTime($_POST['to']);
  144.                 // ###################################
  145.                 $gun_sayisi = $from_date->diff($to_date)->days + 1;
  146.                 $gunler = [];
  147.                 for ($i = 0; $i < $gun_sayisi; $i++) {
  148.                     $gunler[] = $from_date->format('Y-m-d');
  149.                     $from_date->modify('+1 day');
  150.                 }
  151.                 // FİYAT BİLGİLERİNİ HESAPLAMA
  152.                 $donemlikFiyatlar = $db->query("SELECT * FROM donemlik_fiyatlar WHERE villaid=$villaid", PDO::FETCH_ASSOC)->fetchAll();
  153.                 foreach ($gunler as $gun) {
  154.                     // Fiyat Şuan Yok
  155.                     $fiyatSuanVarMi = false;
  156.                     foreach ($donemlikFiyatlar as $donemlikFiyat) {
  157.                         $fiyat_baslangic = new DateTime($donemlikFiyat['baslangic_tarihi']);
  158.                         $fiyat_bitis = new DateTime($donemlikFiyat['bitis_tarihi']);
  159.                         if ($gun >= $fiyat_baslangic->format('Y-m-d') && $gun <= $fiyat_bitis->format('Y-m-d')) {
  160.                             // Fiyat Şuan Var
  161.                             $fiyatSuanVarMi = true;
  162.                             // Konaklama Fiyatına Alınan Değerleri Aktar
  163.                             $fiyat['konaklama'] += $donemlikFiyat['fiyat'];
  164.                             break;
  165.                         }
  166.                     }
  167.                     // Eğer Fiyat Yoksa Hata Yazdır
  168.                     if (!$fiyatSuanVarMi) {
  169.                         echo '<hr><span style="color: red;">"<b>Rezervasyona Uygun Değildir!</b>"</span><br>Fiyat bilgisi bulunmayan günler mevcut.<br>Lütfen Dönemlik Fiyatlar Listemize Bakınız';
  170.                         exit();
  171.                     }
  172.                 }
  173.                 // KULLANICININ SEÇTİĞİ GÜN MİN KONAKLAMA SÜRESİ ALTINDA MI ?
  174.                 if ($gun_sayisi<$min['konaklama_gunu']) {
  175.                     echo'<hr><span style="color: red;">"<b>Rezervasyona Uygun Değildir!</b>"</span><br>Seçtiğiniz günler minimum konaklama süresinin altındadır.<br><b> Minimum '.$min['konaklama_gunu'].' Gün Seçmeniz Gerekiyor!</b>';
  176.                     exit();    
  177.                 }
  178.  
  179.  
  180.                   $fiyat['toplamOdencek']     =     $fiyat['konaklama']+$fiyat['depozito'];
  181.                   
  182.                   // SONUÇ YAZISI (KONAKLAMA ÜCRET;)
  183.                   $sonucYazisi='<hr><div style="color: green;"><b>REZERVASYONA UYGUNDUR</b></div><div style="color: black;"><div style="float: left; width: 50%;">Konaklama ('.$gun_sayisi.' Gece):</div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['konaklama']).' ₺</b></div><div style="clear: both;"></div></div><div style="color: black;"><div style="float: left; width: 50%;">Depozito Ücreti:</div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['depozito']).' ₺</b></div><div style="clear: both;"></div></div>';
  184.                                                 // <div style="color: black;"><div style="float: left; width: 50%;">Depozito Ücreti:</div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($depozitoUcreti).' ₺</b></div><div style="clear: both;"></div></div>
  185.                   // KULLANICININ SEÇTİĞİ GÜN SAYISINA GÖRE TEMİZLİK ÜCRETİ EKLENSİN VEYA EKLENMESİN KONTROLÜ (TEMİZLİK ÜCRETİ)
  186.                   if ($gun_sayisi < $min['temizlik_gunu']) {
  187.                     $fiyat['toplamOdencek']+=$fiyat['temizlik'];
  188.                     $sonucYazisi.='<div style="color: black;"><div style="float: left; width: 50%;">Temizlik Ücreti:</div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['temizlik']).' ₺</b></div><div style="clear: both;"></div></div>';
  189.                   }
  190.  
  191.                   // ÖN ÖDEME TUTARINI HESAPLAMA İŞLEMİ
  192.                   if ($odemeTuru=="onOdeme") {
  193.                     // ÖNDEN ÖDENİCEK FİYAT
  194.                     $fiyat['onOdeme']      =     ($fiyat['toplamOdencek'] * intval($OnOdemeOrani)) / 100;
  195.  
  196.                     // KALAN ÖDENİCEK FİYAT
  197.                     $sonucYazisi          .=    '<div style="color: black;"><div style="float: left; width: 50%;"><b>TOPLAM FİYAT:</b></div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['toplamOdencek']).' ₺</b></div><div style="clear: both;"></div></div>';
  198.                     $fiyat['kalanOdenicek']   =     $fiyat['toplamOdencek']  - $fiyat['onOdeme'];
  199.                     $sonucYazisi          .=    '<hr><div style="color: black;"><div style="float: left; width: 50%;"><b>Ön Ödeme:</b></div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['onOdeme']).' ₺</b></div><div style="clear: both;"></div></div>';
  200.                     $sonucYazisi          .=    '<div style="color: black;"><div style="float: left; width: 50%;"><b>Eve Girişte Ödenecek:</b></div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['kalanOdenicek']).' ₺</b></div><div style="clear: both;"></div></div>';
  201.  
  202.                   }else{
  203.                     $sonucYazisi          .=    '<hr><div style="color: black;"><div style="float: left; width: 50%;"><b>Ödenecek Fiyat:</b></div><div style="float: right; width: 50%; text-align: right;"><b>'.fiyat($fiyat['toplamOdencek']).' ₺</b></div><div style="clear: both;"></div></div>';
  204.                   }
  205. // 
  206.                   echo $sonucYazisi;
  207.  
  208.  
  209.  
  210.  
  211.                 if (isset($_POST["a"])==1 && isset($_SESSION['kadi'])) {
  212.                     if ($kullanici['yetki']!=1) {
  213.                       $durum=0;
  214.                     $rezervasyonsorgu=$db->prepare("SELECT * from rezervasyon where kullanici_id=? AND villaid=? AND durum=0 ORDER BY ID DESC LIMIT 1");
  215.                     $rezervasyonsorgu->execute(array($kullanici['id'],$villaid));
  216.                     $rezervasyondetay=$rezervasyonsorgu->fetch(PDO::FETCH_ASSOC);
  217.  
  218.                     if ($rezervasyondetay) {
  219.                         $stmt = $db->prepare("DELETE FROM rezervasyon WHERE kullanici_id =? AND villaid =? AND durum=0 LIMIT 1");
  220.                         $stmt->execute(array($kullanici['id'],$villaid));
  221.                         $stmt2=$stmt->fetch(PDO::FETCH_ASSOC);
  222.                         if ($stmt2) {
  223.                             echo"Silindi";
  224.                         }
  225.                     }  
  226.                     }else{
  227.                       $durum=1;
  228.                     }
  229.  
  230.  
  231.                      $rezervasyonekle = $db->prepare("INSERT INTO rezervasyon (`villaid`,`giris_tarih`,`cikis_tarih`,`durum`,`kullanici_id`,`ad_soyad`,`telefon`,`mail`,`detay`,`fiyat`,`onOdemeFiyati`,`villayaGiristeOdenecek`,`adet`,`tarih`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
  232.                      $rezervasyonekle->execute(array($villadetay['villaid'],$giristarihi,$cikistarihi,$durum,$kullanici['id'],$kullanici['ad']." ".$kullanici['soyad'],$kullanici['telefon'],$kullanici['mail'],"Notu Yok",$toplamOdencekFiyat,$onOdemeFiyati,$villayaGiristeOdenecek,$depozitoUcreti,$temizlikUcreti,$i,$simdikizaman));
  233.  
  234.                     if ($rezervasyonekle) {
  235.                         $rezervasyonsorgu=$db->prepare("SELECT * from rezervasyon where kullanici_id=? AND villaid=? AND durum=0 LIMIT 1");
  236.                         $rezervasyonsorgu->execute(array($kullanici['id'],$villaid));
  237.                         $rezervasyondetay=$rezervasyonsorgu->fetch(PDO::FETCH_ASSOC);
  238.                         $id=$rezervasyondetay['id'];
  239.                         echo'V7IoJ2m2n/NtvnLgGsZozAL3qaV/wRZBtBrgbGSQkPs=';
  240.                         
  241.                         $villasorgu2=$db->prepare("SELECT * from villalar where id=?");
  242.                         $villasorgu2->execute(array($villaid));
  243.                         $villa=$villasorgu2->fetch(PDO::FETCH_ASSOC);
  244.  
  245.  
  246. $mail = new PHPMailer(true); //PHPMailer Sınıfı aktif ettik.
  247. try {
  248.  
  249.     $mail->setLanguage('tr'); //Dil ayarını yaptık.
  250.     //$mail->SMTPDebug = 2;  herhangi bir hata oluştuğunda ayrıntılı bir şekilde bilgi verecektir.
  251.     $mail->isSMTP();  //SMTP ayarını aktif etmek.
  252.     $mail->Host = 'mail.kurumsaleposta.com'; //mail servisi host name
  253.     $mail->SMTPAuth = true; //smtp sunucu
  254.     $mail->Username = 'noreply@seyahatvillam.com'; //alıcı mail adresi
  255.     $mail->Password = 'SabanYasar94';  //alıcı mail adresi parolası
  256.     $mail->SMTPSecure = 'SSL'; //STMP güvenliği
  257.     $mail->Port = 587; //STMP port ayarı
  258.     $mail->CharSet = 'UTF-8';
  259.  
  260.     // maili gönderen kişi
  261.     $mail->setFrom("noreply@seyahatvillam.com", "Seyahat Villam | NoReply"); //Gonderen mail
  262.     $mail->addAddress($kullanici['mail'],""); //alıcı mail
  263.     $mail->addReplyTo("noreply@seyahatvillam.com", "Seyahat Villam | NoReply"); //Gonderen mail
  264.  
  265.  
  266.  
  267.     $mail->isHTML(true); //HTML formatı aktif
  268.     $mail->Subject = "Rezervasyon Detaylarınız"; //Mesaj konusu
  269.     $mail->Body = '
  270. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  271. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
  272. <head>
  273. <!--[if gte mso 9]>
  274. <xml>
  275.   <o:OfficeDocumentSettings>
  276.     <o:AllowPNG/>
  277.     <o:PixelsPerInch>96</o:PixelsPerInch>
  278.   </o:OfficeDocumentSettings>
  279. </xml>
  280. <![endif]-->
  281.   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  282.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  283.   <meta name="x-apple-disable-message-reformatting">
  284.   <!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]-->
  285.   <title></title>
  286.   
  287.     <style type="text/css">
  288.       @media only screen and (min-width: 620px) {
  289.   .u-row {
  290.     width: 600px !important;
  291.   }
  292.   .u-row .u-col {
  293.     vertical-align: top;
  294.   }
  295.  
  296.   .u-row .u-col-100 {
  297.     width: 600px !important;
  298.   }
  299.  
  300. }
  301.  
  302. @media (max-width: 620px) {
  303.   .u-row-container {
  304.     max-width: 100% !important;
  305.     padding-left: 0px !important;
  306.     padding-right: 0px !important;
  307.   }
  308.   .u-row .u-col {
  309.     min-width: 320px !important;
  310.     max-width: 100% !important;
  311.     display: block !important;
  312.   }
  313.   .u-row {
  314.     width: 100% !important;
  315.   }
  316.   .u-col {
  317.     width: 100% !important;
  318.   }
  319.   .u-col > div {
  320.     margin: 0 auto;
  321.   }
  322. }
  323. body {
  324.   margin: 0;
  325.   padding: 0;
  326. }
  327.  
  328. table,
  329. tr,
  330. td {
  331.   vertical-align: top;
  332.   border-collapse: collapse;
  333. }
  334.  
  335. p {
  336.   margin: 0;
  337. }
  338.  
  339. .ie-container table,
  340. .mso-container table {
  341.   table-layout: fixed;
  342. }
  343.  
  344. * {
  345.   line-height: inherit;
  346. }
  347.  
  348. a[x-apple-data-detectors='."true".'] {
  349.   color: inherit !important;
  350.   text-decoration: none !important;
  351. }
  352.  
  353. table, td { color: #000000; } #u_body a { color: #0000ee; text-decoration: underline; } @media (max-width: 480px) { #u_content_heading_1 .v-container-padding-padding { padding: 30px 10px 20px !important; } #u_content_heading_1 .v-font-size { font-size: 26px !important; } #u_content_image_1 .v-src-width { width: auto !important; } #u_content_image_1 .v-src-max-width { max-width: 50% !important; } #u_content_text_1 .v-container-padding-padding { padding: 60px 10px 10px !important; } #u_content_text_2 .v-container-padding-padding { padding: 10px !important; } #u_content_button_1 .v-container-padding-padding { padding: 10px !important; } #u_content_button_1 .v-size-width { width: 65% !important; } #u_content_text_3 .v-container-padding-padding { padding: 10px 10px 30px !important; } #u_content_social_1 .v-container-padding-padding { padding: 30px 10px 10px !important; } #u_content_text_4 .v-container-padding-padding { padding: 10px 10px 30px !important; } }
  354.     </style>
  355.   
  356.   
  357.  
  358. <!--[if !mso]><!--><link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" rel="stylesheet" type="text/css"><link href="https://fonts.googleapis.com/css2?family=Epilogue:wght@500&display=swap" rel="stylesheet" type="text/css"><!--<![endif]-->
  359.  
  360. </head>
  361.  
  362. <body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #ecf0f1;color: #000000">
  363.   <!--[if IE]><div class="ie-container"><![endif]-->
  364.   <!--[if mso]><div class="mso-container"><![endif]-->
  365.   <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #ecf0f1;width:100%" cellpadding="0" cellspacing="0">
  366.   <tbody>
  367.   <tr style="vertical-align: top">
  368.     <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
  369.     <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #ecf0f1;"><![endif]-->
  370.     
  371.  
  372. <div class="u-row-container" style="padding: 0px;background-color: transparent">
  373.   <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
  374.     <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
  375.       <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: transparent;"><![endif]-->
  376.       
  377. <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
  378. <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
  379.   <div style="height: 100%;width: 100% !important;">
  380.   <!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
  381.   
  382. <table id="u_content_heading_1" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  383.   <tbody>
  384.     <tr>
  385.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:60px 10px 20px;font-family:'."Open Sans".',sans-serif;" align="left">
  386.         
  387.   <h1 class="v-font-size" style="margin: 0px; line-height: 130%; text-align: center; word-wrap: break-word; font-family: Epilogue; font-size: 32px; "><strong>Seyahat Villam | Rezervasyon</strong></h1>
  388.  
  389.       </td>
  390.     </tr>
  391.   </tbody>
  392. </table>
  393.  
  394. <table id="u_content_image_1" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  395.   <tbody>
  396.     <tr>
  397.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 0px;font-family:'."Open Sans".',sans-serif;" align="left">
  398.         
  399. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  400.   <tr>
  401.     <td style="padding-right: 0px;padding-left: 0px;" align="center">
  402.       
  403.       <img align="center" border="0" src="seyahatvillam.com/images/image-4.png" alt="" title="" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 55%;max-width: 319px;" width="319" class="v-src-width v-src-max-width"/>
  404.       
  405.     </td>
  406.   </tr>
  407. </table>
  408.  
  409.       </td>
  410.     </tr>
  411.   </tbody>
  412. </table>
  413.  
  414.   <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
  415.   </div>
  416. </div>
  417. <!--[if (mso)|(IE)]></td><![endif]-->
  418.       <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
  419.     </div>
  420.   </div>
  421. </div>
  422.  
  423.  
  424.  
  425. <div class="u-row-container" style="padding: 0px;background-color: transparent">
  426.   <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
  427.     <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
  428.       <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: transparent;"><![endif]-->
  429.       
  430. <!--[if (mso)|(IE)]><td align="center" width="600" style="background-color: #ffffff;width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
  431. <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
  432.   <div style="background-color: #ffffff;height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
  433.   <!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
  434.   
  435. <table id="u_content_text_1" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  436.   <tbody>
  437.     <tr>
  438.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:60px 30px 10px;font-family:'."Open Sans".',sans-serif;" align="left">
  439.         
  440.   <div class="v-font-size" style="line-height: 140%; text-align: justify; word-wrap: break-word;">
  441.     <p style="font-size: 14px; line-height: 140%;"><strong>Merhaba '.$kullanici['ad']." ".$kullanici['soyad'].'</strong>,</p>
  442. <p style="font-size: 14px; line-height: 140%;"> </p>
  443. <p style="font-size: 14px; line-height: 140%;">Siparişiniz şu anda oluşturuldu ve ilgili kişilere sipariş detaylarınız gönderildi. En yakın zamanda Seyahat Villam Yetkililerimiz sizi arayıp bilgi vereceklerdir.</p>
  444. <p style="font-size: 14px; line-height: 140%;">Bizi tercih ettiğiniz için teşekkür ederiz.</p>
  445. <p style="font-size: 14px; line-height: 140%;"> </p>
  446. <p style="font-size: 14px; line-height: 140%;"> </p>
  447. <p style="font-size: 14px; line-height: 140%;"><strong>Ürün Adı:</strong> '.$villa['villa_ad'].'</p>
  448. <p style="line-height: 140%;"><strong>Sipariş Numarası:</strong> #'.$id.'</p>
  449. <p style="line-height: 140%;"><strong>Sipariş Tarihi:</strong> '.$rezervasyondetay['tarih'].'</p>
  450. <p style="line-height: 140%;"><strong><span style="text-decoration: line-through; line-height: 19.6px;">-------------------------------------------------------------</span></strong></p>
  451. <p style="line-height: 140%;"><strong>Giriş Tarihi:</strong> '.tarih($rezervasyondetay['giris_tarih']).'</p>
  452. <p style="line-height: 140%;"><strong>Çıkış Tarihi:</strong> '.tarih($rezervasyondetay['cikis_tarih']).'</p>
  453. <p style="line-height: 140%;"> </p>
  454. <p style="line-height: 140%;"><span style="font-size: 16px; line-height: 22.4px;"><strong>Ön ödeme:</strong></span></p>
  455. <p style="line-height: 140%;"><span style="color: #000000; line-height: 19.6px;">'.fiyat($onOdemeFiyati)." TL".' ('.$i.' Gün)</span></p>
  456. <p style="line-height: 140%;"><span style="font-size: 16px; line-height: 22.4px;"><strong>Villaya Girişte Ödenecek:</strong></span></p>
  457. <p style="line-height: 140%;"><span style="color: #000000; line-height: 19.6px;">'.fiyat($villayaGiristeOdenecek)." TL".' ('.$i.' Gün)</span></p>
  458. <p style="line-height: 140%;"> </p>
  459. <p style="line-height: 140%;"><span style="font-size: 16px; line-height: 22.4px;"><strong>Toplam Ödenicek Fiyat:</strong></span></p>
  460. <p style="line-height: 140%;"><span style="color: #000000; line-height: 19.6px;">'.fiyat($toplamOdencekFiyat)." TL".' ('.$i.' Gün)</span></p>
  461. <p style="line-height: 140%;"> </p>
  462.   </div>
  463.  
  464.       </td>
  465.     </tr>
  466.   </tbody>
  467. </table>
  468.  
  469. <table id="u_content_text_2" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  470.   <tbody>
  471.     <tr>
  472.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 10px 30px;font-family:'."Open Sans".',sans-serif;" align="left">
  473.         
  474.   <div class="v-font-size" style="line-height: 140%; text-align: left; word-wrap: break-word;">
  475.     <p style="font-size: 14px; line-height: 140%;"><strong>Sipariş İptali için:</strong></p>
  476.   </div>
  477.  
  478.       </td>
  479.     </tr>
  480.   </tbody>
  481. </table>
  482.  
  483. <table id="u_content_button_1" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  484.   <tbody>
  485.     <tr>
  486.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 10px 30px;font-family:'."Open Sans".',sans-serif;" align="left">
  487.         
  488.   <!--[if mso]><style>.v-button {background: transparent !important;}</style><![endif]-->
  489. <div align="left">
  490.   <!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="" style="height:37px; v-text-anchor:middle; width:168px;" arcsize="0%"  stroke="f" fillcolor="#ff5770"><w:anchorlock/><center style="color:#FFFFFF;font-family:'."Open Sans".',sans-serif;"><![endif]-->  
  491.     <a href="" target="_blank" class="v-button v-size-width v-font-size" style="box-sizing: border-box;display: inline-block;font-family:'."Open Sans".',sans-serif;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #ff5770; border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px; width:30%; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;font-size: 14px;">
  492.       <span style="display:block;padding:10px 20px;line-height:120%;">IPTAL</span>
  493.     </a>
  494.   <!--[if mso]></center></v:roundrect><![endif]-->
  495. </div>
  496.  
  497.       </td>
  498.     </tr>
  499.   </tbody>
  500. </table>
  501.  
  502. <table id="u_content_text_3" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  503.   <tbody>
  504.     <tr>
  505.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:10px 10px 60px 30px;font-family:'."Open Sans".',sans-serif;" align="left">
  506.         
  507.   <div class="v-font-size" style="line-height: 140%; text-align: left; word-wrap: break-word;">
  508.     <p style="font-size: 14px; line-height: 140%;">Saygılarımızla,</p>
  509. <p style="font-size: 14px; line-height: 140%;"> </p>
  510. <p style="font-size: 14px; line-height: 140%;"><span style="color: #ff5770; line-height: 19.6px;"><strong>Keyifli Tatiller!!!</strong></span></p>
  511. <p style="font-size: 14px; line-height: 140%;">Seyahat Villam Ekibi</p>
  512.   </div>
  513.  
  514.       </td>
  515.     </tr>
  516.   </tbody>
  517. </table>
  518.  
  519.   <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
  520.   </div>
  521. </div>
  522. <!--[if (mso)|(IE)]></td><![endif]-->
  523.       <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
  524.     </div>
  525.   </div>
  526. </div>
  527.  
  528.  
  529.  
  530. <div class="u-row-container" style="padding: 0px;background-color: transparent">
  531.   <div class="u-row" style="Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
  532.     <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
  533.       <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: transparent;"><![endif]-->
  534.       
  535. <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
  536. <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;">
  537.   <div style="height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
  538.   <!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
  539.   
  540. <table id="u_content_social_1" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  541.   <tbody>
  542.     <tr>
  543.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:60px 10px 10px;font-family:'."Open Sans".',sans-serif;" align="left">
  544.         
  545. <div align="center">
  546.   <div style="display: table; max-width:140px;">
  547.   <!--[if (mso)|(IE)]><table width="140" cellpadding="0" cellspacing="0" border="0"><tr><td style="border-collapse:collapse;" align="center"><table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; mso-table-lspace: 0pt;mso-table-rspace: 0pt; width:140px;"><tr><![endif]-->
  548.   
  549.     
  550.     <!--[if (mso)|(IE)]><td width="32" style="width:32px; padding-right: 15px;" valign="top"><![endif]-->
  551.     <table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="width: 32px !important;height: 32px !important;display: inline-block;border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 15px">
  552.       <tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
  553.         <a href="https://instagram.com/" title="Instagram" target="_blank">
  554.           <img src="seyahatvillam.com/images/image-1.png" alt="Instagram" title="Instagram" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
  555.         </a>
  556.       </td></tr>
  557.     </tbody></table>
  558.     <!--[if (mso)|(IE)]></td><![endif]-->
  559.     
  560.     <!--[if (mso)|(IE)]><td width="32" style="width:32px; padding-right: 15px;" valign="top"><![endif]-->
  561.     <table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="width: 32px !important;height: 32px !important;display: inline-block;border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 15px">
  562.       <tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
  563.         <a href="https://facebook.com/" title="Facebook" target="_blank">
  564.           <img src="seyahatvillam.com/images/image-2.png" alt="Facebook" title="Facebook" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
  565.         </a>
  566.       </td></tr>
  567.     </tbody></table>
  568.     <!--[if (mso)|(IE)]></td><![endif]-->
  569.     
  570.     <!--[if (mso)|(IE)]><td width="32" style="width:32px; padding-right: 0px;" valign="top"><![endif]-->
  571.     <table align="left" border="0" cellspacing="0" cellpadding="0" width="32" height="32" style="width: 32px !important;height: 32px !important;display: inline-block;border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: 0px">
  572.       <tbody><tr style="vertical-align: top"><td align="left" valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
  573.         <a href="https://twitter.com/" title="Twitter" target="_blank">
  574.           <img src="seyahatvillam.com/images/image-3.png" alt="Twitter" title="Twitter" width="32" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: 32px !important">
  575.         </a>
  576.       </td></tr>
  577.     </tbody></table>
  578.     <!--[if (mso)|(IE)]></td><![endif]-->
  579.     
  580.     
  581.     <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
  582.   </div>
  583. </div>
  584.  
  585.       </td>
  586.     </tr>
  587.   </tbody>
  588. </table>
  589.  
  590. <table id="u_content_text_4" style="font-family:'."Open Sans".',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
  591.   <tbody>
  592.     <tr>
  593.       <td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:10px 100px 60px;font-family:'."Open Sans".',sans-serif;" align="left">
  594.         
  595.   <div class="v-font-size" style="line-height: 160%; text-align: center; word-wrap: break-word;">
  596.     <p style="font-size: 14px; line-height: 160%;">Uygun fiyatlı güvenilir villa kiralama hizmeti <span style="color: #000000; line-height: 22.4px;"><a rel="noopener" href="http://www.SeyahatVillam.com" target="_blank" style="color: #000000;">www.SeyahatVillam.com</a></span></p>
  597. <p style="font-size: 14px; line-height: 160%;"> </p>
  598. <p style="font-size: 14px; line-height: 160%; text-align: center;">© 2023 All Rights Reserved</p>
  599.   </div>
  600.  
  601.       </td>
  602.     </tr>
  603.   </tbody>
  604. </table>
  605.  
  606.   <!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
  607.   </div>
  608. </div>
  609. <!--[if (mso)|(IE)]></td><![endif]-->
  610.       <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
  611.     </div>
  612.   </div>
  613. </div>
  614.  
  615.  
  616.     <!--[if (mso)|(IE)]></td></tr></table><![endif]-->
  617.     </td>
  618.   </tr>
  619.   </tbody>
  620.   </table>
  621.   <!--[if mso]></div><![endif]-->
  622.   <!--[if IE]></div><![endif]-->
  623. </body>
  624.  
  625. </html>
  626.  
  627.     ';
  628.  
  629.     $mail->send();
  630. } catch (Exception $e){
  631.     echo $e->errorMessage();
  632. }
  633.  
  634.  
  635.  
  636.                     }
  637.                 }
  638.             }
  639.         }
  640.     }else{
  641.         echo'<hr><div style="color: red;" class="form-group mb-2"><b>Boş alan bırakmayınız!</b></div>';
  642.         exit();
  643.     }
  644. }else{
  645.     echo'Lütfen tarih seçiniz!';
  646.     exit();
  647. }
  648.  
  649. ?>
File Description
  • ss
  • PHP Code
  • 29 Sep-2023
  • 37.3 Kb
You can Share it: