📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv3.demodesign.com.tr
📝
siparis.php
← Geri Dön
<?php require('ust.php');?> <title>Alışveriş Sepetim - <?php echo $ayar['siteadi']; ?></title> <script type="text/javascript"><!-- window.onload=function(){document.getElementById("yukleniy").style.display="none";} //--> </script> <style type="text/css">div.hbne{opacity:0.9;filter:alpha(opacity=90);position:fixed;z-index:4000;}div.hghd{top:0px;left:0px;} div.hbne{_position:absolute;}div.hghd{_bottom:auto;_top:expression(ie6=(document.documentElement.scrollTop+document.documentElement.clientHeight - 52+"px") );}</style> <meta name="description" content="<?php echo $ayar['des']; ?>"> <meta name="keywords" content="<?php echo $ayar['keyw']; ?>"> <?php require('menu.php'); $kdvm = $DB->query("select * from moduller where id=1")->fetch(PDO::FETCH_ASSOC); ?> <?php $query = $DB->query("SELECT SUM(kdv*urunAdet) FROM sepet WHERE ip='$ip'")->fetch(PDO::FETCH_ASSOC); foreach( $query as $ykdv ){?> <?php }?> <?php $tquery = $DB->query("SELECT SUM(fiyat*urunAdet) FROM sepet WHERE ip='$ip'")->fetch(PDO::FETCH_ASSOC); foreach( $tquery as $ytutar ){?> <?php }?> <?php $yebaksana = $ytutar+$ykdv; if($yebaksana >= $modul['ukargo']){?> <?php $ykargo = "0";?> <?php $ytoplam = $ykdv+$ykargo+$ytutar-$sepet['kupon'];?> <?php if($sepet['kupon']>'0'){?> <?php } ?> <?php } else { ?> <?php $ykargo = $modul['kargo'];?> <?php $ytoplam = $ykdv+$ykargo+$ytutar-$sepet['kupon'];?> <?php } ?> <div class="breadcrumbs"> <div class="container"> <div class="row"> <div class="col-xs-12"> <ul> <li class="home"> <a title="Anasayfa" href="index">Anasayfa</a><span>»</span></li> <li class="category13"><strong>Sipariş</strong></li> </ul> </div> </div> </div> </div> <?php if($sepet['urunid']==''){?> <a href="index"/><center><img src="images/sepet-bos.png"/></center></a> <?php } else { ?> <section class="main-container col1-layout wow bounceInUp animated"> <div class="main container"> <div class="col-main"> <div class="cart"> <div class="page-content page-order"> <div class="row"> <div class="col-main col-sm-9"> <div class="heading-counter warning" style="background: #f7f4ef; font-size: 15px; line-height: 25px; color: #44464f; font-weight: 500;"> <?php if ($_GET["kk"] == "mok") { $sino = $_GET["sino"]; $skontrol = $DB->prepare("SELECT sino, isim, email, telefon, urunler, kadres, mesaj, ip, adres, tutar, kdv, toplam, tarih, durum, uye, kargo, ukd, tc, il, ilce, odeme, uadet, badet, nedir, vd, vno, kupondeger, eurunler, kuponbak, vergidurumu FROM siparisler WHERE sino = ?"); $skontrol->execute([$sino]); if($skontrol->rowCount()) { $sow = $skontrol ->fetch(PDO::FETCH_ASSOC); echo ' <div id="yukleniy" style="background-color:#ffffff;width:100%;height:100%;" class="hbne hghd"> <center> <a target="_blank" style="background-color:transparent;border:none;padding:0px;margin:0px;"> <img style="padding:0px;margin:0px;background-color:transparent;border:none;" src="loader.gif" _fcksavedurl="loader.gif" /> </a></center></div> '; echo "<center> <div> </br> <img width='40%' src='img/basarili.png'></img> </br> Sayın, ".$sow['isim']." , </br> SİPARİŞ NUMARANIZ : <b> ".$sow['sino']." </b> </br> Seçilen Ödeme Yöntemi : ".$sow['odeme']." </br> Sipariş Tutarı (KDV Dahil ) : <b><font size='3'> ".$sow['toplam']." TL </b> </font> </br> Siparişinizi yukarıdaki sipariş numaranız ile sitemiz üzerinden takip edebilirsiniz. Ayrıca siparişinizi durumu değişikliğini tarafınıza EPOSTA </br> veya SMS yoluyla bilgilendireceğimizi belirtmek isteriz. Bizi tercih ettiğiniz için Teşekkür ederiz ...</br> <b> ".$ayar['siteadi']." </b> </br> <b> ".$ayar['slogan']." </b></br> SİPARİŞ VERİLEN İP ADRESİNİZ : ".$sow['ip']." </div> </center></br>"; if($modul['emailbildirim'] =="1"){ $url = $modul['url']; $sunucu = htmlspecialchars(trim($modul['sunucu'])); $posta = htmlspecialchars(trim($modul['eposta'])); $esifre = htmlspecialchars(trim($modul['sifre'])); $port = htmlspecialchars(trim($modul['port'])); $type = htmlspecialchars(trim($modul['type'])); $siteadi = htmlspecialchars(trim($ayar['siteadi'])); $uisim = htmlspecialchars(trim($sow['isim'])); $email = htmlspecialchars(trim($sow['email'])); $sino = htmlspecialchars(trim($sow['sino'])); include("mail/PHPMailerAutoload.php"); $mail = new PHPMailer; $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet ="utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, ''.$siteadi.''); $mail->AddAddress($email); // Maili gonderecegimiz kisi yani alici $mail->addReplyTo($email, $siteadi); $mail->Subject = 'Sipariş Kodu:'.$sino.''; // Konu basligi $mail->Body = ' <table class="x_content" style="width:100%; max-width:600px" cellspacing="0" cellpadding="0" border="0" align="center"> <tbody> <tr> <td style="padding:20px 0"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td align="left"> <a href="'.$url.'" target="_blank" style="text-decoration:none; color:#000000"> <img data-imagetype="External" src="'.$url.'/images/ayarlar/'.$ayar['logo'].'" alt="" style="max-width:140px; max-height:100px"> </a></td> <td align="right"> <a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/website.png" alt="" width="24"> </a> <a href="'.$url.'/iletisim" target="_blank" r el="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/contact.png" alt="" width="24"> </a> <a href="'.$url.'/rss.xml" target="_blank" rel="noopener noreferrer" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/rss.png" alt="" width="24"> </a> </td> </tr> </tbody> </table> </td> </tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td><h2 style="font-size:24px; font-weight:bold; padding:0; margin:0"> <span>Sipariş Dekontu</span></h2></td> <td align="right">'.$sow["tarih"].' </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding:30px 0"> <div style="padding-bottom:20px">Merhaba <b>'.$sow["isim"].'</b>,</div> <span class="markgcoipju7t" >Sipariş</span>inizin durumu : <b style="background-color: rgb(255, 241, 0); color: black"> '.$sow["durum"].' </b> <span class="markgcoipju7t">Sipariş</span> detayları aşağıdadır. </td></tr> <tr><td> <table cellspacing="0" cellpadding="0" border="0"><tbody> <tr> <td style="padding:5px 0; width:100px" valign="top"> <b> <span class="markgcoipju7t" style="background-color: rgb(255, 241, 0); color: black;">Sipariş No</span></b> </td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sow["sino"].'</td></tr> <tr><td style="padding:5px 0; width:100px" valign="top"> <b>Ödeme Türü</b></td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sow["odeme"].'</td></tr><tr> <td style="padding:5px 0; width:100px" valign="top"> <tr><td style="padding:5px 0; width:100px" valign="top"><b>Hediye Notu</b></td> <td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0"><div class="x_overflow-note" style="max-height:100px!important; overflow-y:auto!important">'.$sow["mesaj"].'</div></td> </tr></tbody></table></td></tr></tbody></table></td></tr> <tr> <td style="padding:20px 0"> <table style="border-collapse:collapse" width="100%" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th class="x_order-item-list x_hidden" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="60"></th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="200" align="left">Ürün</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Fiyat</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" align="right">Miktar</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Toplam</th> </tr> </thead> <tbody> <tr> '.$sow["eurunler"].' <tr><td class="x_order-amount-list x_hidden" style="padding:10px 5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:10px 5px" align="right"> <b>Ara Toplam :</b></td> <td class="x_order-amount-list" style="padding:10px 5px" align="right">'.$sow["tutar"].' TL</td></tr> <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"> <b>KDV :</b></td><td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["kdv"].' TL</td> </tr><tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Kargo Ücreti :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["kargo"].' TL</td></tr> '.$sow["kuponbak"].' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Genel Toplam :</b> </td><td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["toplam"].' TL</td></tr> </tbody> </table> </td> </tr> <tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Teslimat Bilgileri</h3> </td><td></td></tr></tbody></table> </td></tr><tr> <td style="padding-bottom:20px"> </td></tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$sow["isim"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"><b>Cep Telefonu</b> : '.$sow["telefon"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$sow["adres"].' / '.$sow["ilce"].' / '.$sow["il"].' </td></tr></tbody></table></td></tr> </tbody></table></td></tr><tr> <td style="padding-bottom:20px"></td></tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> <tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Fatura Bilgileri</h3> </td><td></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td> </tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$sow["isim"].' </td></tr><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Email</b> : '.$sow["email"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Cep Telefonu</b> : '.$sow["telefon"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$sow["kadres"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> '.$sow["vergidurumu"].' </td></tr> </tbody></table></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td></tr><tr><td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Mesafeli Satış Sözleşmesi</h3></td><td> </td></tr></tbody> </table></td></tr> <tr> <td style="padding-bottom:20px"></td></tr><tr><td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr> <td style="border:1px solid #eeeeee; background:#ffffff; border-radius:4px; padding:20px"> <div class="x_overflow-condition" style="max-height:200px!important; overflow-y:auto!important"> <style type="text/css"> <!-- .rps_985b p {margin-bottom:0.1in; direction:ltr; color:rgb(0,0,10); line-height:120%; text-align:left; widows:2; orphans:2} .rps_985b p.x_western {font-family:"Times New Roman",serif; font-size:12pt} .rps_985b p.x_cjk {font-family:"Times New Roman"; font-size:12pt} .rps_985b p.x_ctl {font-family:"Times New Roman"; font-size:12pt} --> </style><p align="justify"><br></p><p align="justify"> '.$ayar['alfooter'].' </ol><p align="justify"><br></p><br></div></td> </tr></tbody></table></td></tr> </tbody></table> </td></tr> <tr><td style="padding:20px 10px" align="center"> <div style="padding-bottom:10px"> <b>'.$siteadi.'</b></br> '.$ayar['slogan'].'</div> <div style="padding-bottom:10px">'.$ayar['adres'].'</div> <div style="padding-bottom:10px"><a href="tel:+'.$ayar['tel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['tel'].'</a> <span>-</span> <a href="tel:+'.$ayar['ceptel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['ceptel'].'</a> </div><div style="padding-bottom:10px"><a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none; color:#000000"> '.$url.'</a> </div></td></tr></tbody></table> '; // Mailin icerigi if(!$mail->Send()){ }else { } } $sonuc = $DB->exec("DELETE FROM sepet where ip= '$ip'"); $kuponkontrol = $DB->prepare("SELECT * FROM kuponlar WHERE id=?"); $kuponkontrol->execute(array($kuponid)); if ($kuponkontrol->rowCount()) { $urowskupon = $kuponkontrol ->fetch(PDO::FETCH_ASSOC); $total = $urowskupon['stok']; $yenikupon = $urowskupon['stok']-1; $kuponsonuccc = $DB->exec("UPDATE kuponlar SET stok='$yenikupon' WHERE id='$kuponid' limit 1"); } $veris = explode(',', $sow['ukd']); $verit = explode(',', $sow['uadet']); foreach(array_combine($veris, $verit) as $anahtar => $se){ $urunkontrol = $DB->prepare("SELECT stok FROM urunler WHERE urunid = ?"); $urunkontrol->execute([$anahtar]); if($urunkontrol->rowCount()) { $urunsow = $urunkontrol ->fetch(PDO::FETCH_ASSOC); $son = $urunsow['stok']-$se; $stokla = $DB->exec("UPDATE urunler SET stok='$son' where urunid='$anahtar'"); } } $bveris = explode(',', $sow['badet']); $bverit = explode(',', $sow['uadet']); foreach(array_combine($bveris, $bverit) as $banahtar => $bse){ $bsurunkontrol = $DB->prepare("SELECT ustok FROM urun_ozellik WHERE id = ?"); $bsurunkontrol->execute([$banahtar]); if($bsurunkontrol->rowCount()) { $burunsow = $bsurunkontrol ->fetch(PDO::FETCH_ASSOC); $sbon = $burunsow['ustok']-$bse; $bstokla = $DB->exec("UPDATE urun_ozellik SET ustok='$sbon' where id='$banahtar'"); } } if($modul['smsbildirim']=='1'){ $dakikkadi = trim($modul['dakikkadi']); $dakiksifre = trim($modul['dakiksifre']); $dakikbaslik = trim($modul['dakikbaslik']); $telim = trim($modul['smsgsm']); $telefon = $sow['telefon']; if($modul['smsapi']=='1'){ } else { $mesaj='Sayın '.$sow['isim'].', Siparişiniz başarıyla bize iletilmiştir. Sipariş Kodunuz '.$sino.' . Toplam Ödediğiniz Tutar : '.$sow['toplam'].' TL,dir. İyi günler dileriz. '.$ayar['siteadi'].''; $baslik = trim($modul['netbaslik']); $telefon = $sow['telefon']; $tel = $modul['smsgsm']; $mesaj = html_entity_decode($mesaj, ENT_COMPAT, "UTF-8"); $mesaj = rawurlencode($mesaj); $baslik = html_entity_decode($baslik, ENT_COMPAT, "UTF-8"); $baslik = rawurlencode($baslik); sendsms($mesaj,$telefon,$baslik); sendsms($mesaj,$tel,$baslik); } } } } else if ($_GET["kk"] == "merr") { echo "Ödeme alınamadı . Bir hata meydana geldi."; } if ($_GET["kk"] == "ok") { $key1 = $modul['iyzi1']; $key2 = $modul['iyzi2']; require "iyzipay/IyzipayBootstrap.php"; IyzipayBootstrap::init(); $options = new \Iyzipay\Options(); $options->setApiKey($key1); $options->setSecretKey($key2); $options->setBaseUrl("https://api.iyzipay.com"); $token = $_POST["token"]; $request = new \Iyzipay\Request\RetrieveCheckoutFormRequest(); $request->setLocale(\Iyzipay\Model\Locale::TR); $request->setToken($token); $checkoutForm = \Iyzipay\Model\CheckoutForm::retrieve($request,$options); if ($checkoutForm->getPaymentStatus() == "SUCCESS" ) { $result = json_decode($checkoutForm->getRawResult(), true); $sino = $result['basketId']; $durum = "Onaylandı"; $ekle = $DB->prepare("UPDATE siparisler SET durum=? where sino=?"); $ekle -> execute(array($durum,$sino)); $skontrol = $DB->prepare("SELECT sino, isim, email, telefon, urunler, kadres, mesaj, ip, adres, tutar, kdv, toplam, tarih, durum, uye, kargo, ukd, tc, il, ilce, odeme, uadet, badet, nedir, vd, vno, kupondeger, eurunler, kuponbak, vergidurumu FROM siparisler WHERE sino = ?"); $skontrol->execute([$sino]); if($skontrol->rowCount()) { $sow = $skontrol ->fetch(PDO::FETCH_ASSOC); echo ' <div id="yukleniy" style="background-color:#ffffff;width:100%;height:100%;" class="hbne hghd"> <center> <a target="_blank" style="background-color:transparent;border:none;padding:0px;margin:0px;"> <img style="padding:0px;margin:0px;background-color:transparent;border:none;" src="loader.gif" _fcksavedurl="loader.gif" /> </a></center></div> '; echo "<center> <div> </br> <img width='40%' src='img/basarili.png'></img> </br> Sayın, ".$sow['isim']." , </br> SİPARİŞ NUMARANIZ : <b> ".$sow['sino']." </b> </br> Seçilen Ödeme Yöntemi : ".$sow['odeme']." </br> Sipariş Tutarı (KDV Dahil ) : <b><font size='3'> ".$sow['toplam']." TL </b> </font> </br> Siparişinizi yukarıdaki sipariş numaranız ile sitemiz üzerinden takip edebilirsiniz. Ayrıca siparişinizi durumu değişikliğini tarafınıza EPOSTA </br> veya SMS yoluyla bilgilendireceğimizi belirtmek isteriz. Bizi tercih ettiğiniz için Teşekkür ederiz ...</br> <b> ".$ayar['siteadi']." </b> </br> <b> ".$ayar['slogan']." </b></br> SİPARİŞ VERİLEN İP ADRESİNİZ : ".$sow['ip']." </div> </center></br>"; if($modul['emailbildirim'] =="1"){ $url = $modul['url']; $sunucu = htmlspecialchars(trim($modul['sunucu'])); $posta = htmlspecialchars(trim($modul['eposta'])); $esifre = htmlspecialchars(trim($modul['sifre'])); $port = htmlspecialchars(trim($modul['port'])); $type = htmlspecialchars(trim($modul['type'])); $siteadi = htmlspecialchars(trim($ayar['siteadi'])); $uisim = htmlspecialchars(trim($sow['isim'])); $email = htmlspecialchars(trim($sow['email'])); $sino = htmlspecialchars(trim($sow['sino'])); include("mail/PHPMailerAutoload.php"); $mail = new PHPMailer; $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet ="utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, ''.$siteadi.''); $mail->AddAddress($email); // Maili gonderecegimiz kisi yani alici $mail->addReplyTo($email, $siteadi); $mail->Subject = 'Sipariş Kodu:'.$sino.''; // Konu basligi $mail->Body = ' <table class="x_content" style="width:100%; max-width:600px" cellspacing="0" cellpadding="0" border="0" align="center"> <tbody> <tr> <td style="padding:20px 0"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td align="left"> <a href="'.$url.'" target="_blank" style="text-decoration:none; color:#000000"> <img data-imagetype="External" src="'.$url.'/images/ayarlar/'.$ayar['logo'].'" alt="" style="max-width:140px; max-height:100px"> </a></td> <td align="right"> <a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/website.png" alt="" width="24"> </a> <a href="'.$url.'/iletisim" target="_blank" r el="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/contact.png" alt="" width="24"> </a> <a href="'.$url.'/rss.xml" target="_blank" rel="noopener noreferrer" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/rss.png" alt="" width="24"> </a> </td> </tr> </tbody> </table> </td> </tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td><h2 style="font-size:24px; font-weight:bold; padding:0; margin:0"> <span>Sipariş Dekontu</span></h2></td> <td align="right">'.$sow["tarih"].' </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding:30px 0"> <div style="padding-bottom:20px">Merhaba <b>'.$sow["isim"].'</b>,</div> <span class="markgcoipju7t" >Sipariş</span>inizin durumu : <b style="background-color: rgb(255, 241, 0); color: black"> '.$sow["durum"].' </b> <span class="markgcoipju7t">Sipariş</span> detayları aşağıdadır. </td></tr> <tr><td> <table cellspacing="0" cellpadding="0" border="0"><tbody> <tr> <td style="padding:5px 0; width:100px" valign="top"> <b> <span class="markgcoipju7t" style="background-color: rgb(255, 241, 0); color: black;">Sipariş No</span></b> </td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sow["sino"].'</td></tr> <tr><td style="padding:5px 0; width:100px" valign="top"> <b>Ödeme Türü</b></td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sow["odeme"].'</td></tr><tr> <td style="padding:5px 0; width:100px" valign="top"> <tr><td style="padding:5px 0; width:100px" valign="top"><b>Hediye Notu</b></td> <td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0"><div class="x_overflow-note" style="max-height:100px!important; overflow-y:auto!important">'.$sow["mesaj"].'</div></td> </tr></tbody></table></td></tr></tbody></table></td></tr> <tr> <td style="padding:20px 0"> <table style="border-collapse:collapse" width="100%" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th class="x_order-item-list x_hidden" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="60"></th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="200" align="left">Ürün</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Fiyat</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" align="right">Miktar</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Toplam</th> </tr> </thead> <tbody> <tr> '.$sow["eurunler"].' <tr><td class="x_order-amount-list x_hidden" style="padding:10px 5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:10px 5px" align="right"> <b>Ara Toplam :</b></td> <td class="x_order-amount-list" style="padding:10px 5px" align="right">'.$sow["tutar"].' TL</td></tr> <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"> <b>KDV :</b></td><td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["kdv"].' TL</td> </tr><tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Kargo Ücreti :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["kargo"].' TL</td></tr> '.$sow["kuponbak"].' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Genel Toplam :</b> </td><td class="x_order-amount-list" style="padding:5px" align="right">'.$sow["toplam"].' TL</td></tr> </tbody> </table> </td> </tr> <tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Teslimat Bilgileri</h3> </td><td></td></tr></tbody></table> </td></tr><tr> <td style="padding-bottom:20px"> </td></tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$sow["isim"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"><b>Cep Telefonu</b> : '.$sow["telefon"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$sow["adres"].' / '.$sow["ilce"].' / '.$sow["il"].' </td></tr></tbody></table></td></tr> </tbody></table></td></tr><tr> <td style="padding-bottom:20px"></td></tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> <tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Fatura Bilgileri</h3> </td><td></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td> </tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$sow["isim"].' </td></tr><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Email</b> : '.$sow["email"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Cep Telefonu</b> : '.$sow["telefon"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$sow["kadres"].' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> '.$sow["vergidurumu"].' </td></tr> </tbody></table></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td></tr><tr><td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Mesafeli Satış Sözleşmesi</h3></td><td> </td></tr></tbody> </table></td></tr> <tr> <td style="padding-bottom:20px"></td></tr><tr><td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr> <td style="border:1px solid #eeeeee; background:#ffffff; border-radius:4px; padding:20px"> <div class="x_overflow-condition" style="max-height:200px!important; overflow-y:auto!important"> <style type="text/css"> <!-- .rps_985b p {margin-bottom:0.1in; direction:ltr; color:rgb(0,0,10); line-height:120%; text-align:left; widows:2; orphans:2} .rps_985b p.x_western {font-family:"Times New Roman",serif; font-size:12pt} .rps_985b p.x_cjk {font-family:"Times New Roman"; font-size:12pt} .rps_985b p.x_ctl {font-family:"Times New Roman"; font-size:12pt} --> </style><p align="justify"><br></p><p align="justify"> '.$ayar['alfooter'].' </ol><p align="justify"><br></p><br></div></td> </tr></tbody></table></td></tr> </tbody></table> </td></tr> <tr><td style="padding:20px 10px" align="center"> <div style="padding-bottom:10px"> <b>'.$siteadi.'</b></br> '.$ayar['slogan'].'</div> <div style="padding-bottom:10px">'.$ayar['adres'].'</div> <div style="padding-bottom:10px"><a href="tel:+'.$ayar['tel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['tel'].'</a> <span>-</span> <a href="tel:+'.$ayar['ceptel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['ceptel'].'</a> </div><div style="padding-bottom:10px"><a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none; color:#000000"> '.$url.'</a> </div></td></tr></tbody></table> '; // Mailin icerigi if(!$mail->Send()){ }else { } } $sonuc = $DB->exec("DELETE FROM sepet where ip= '$ip'"); $kuponkontrol = $DB->prepare("SELECT * FROM kuponlar WHERE id=?"); $kuponkontrol->execute(array($kuponid)); if ($kuponkontrol->rowCount()) { $urowskupon = $kuponkontrol ->fetch(PDO::FETCH_ASSOC); $total = $urowskupon['stok']; $yenikupon = $urowskupon['stok']-1; $kuponsonuccc = $DB->exec("UPDATE kuponlar SET stok='$yenikupon' WHERE id='$kuponid' limit 1"); } $veris = explode(',', $sow['ukd']); $verit = explode(',', $sow['uadet']); foreach(array_combine($veris, $verit) as $anahtar => $se){ $urunkontrol = $DB->prepare("SELECT stok FROM urunler WHERE urunid = ?"); $urunkontrol->execute([$anahtar]); if($urunkontrol->rowCount()) { $urunsow = $urunkontrol ->fetch(PDO::FETCH_ASSOC); $son = $urunsow['stok']-$se; $stokla = $DB->exec("UPDATE urunler SET stok='$son' where urunid='$anahtar'"); } } $bveris = explode(',', $sow['badet']); $bverit = explode(',', $sow['uadet']); foreach(array_combine($bveris, $bverit) as $banahtar => $bse){ $bsurunkontrol = $DB->prepare("SELECT ustok FROM urun_ozellik WHERE id = ?"); $bsurunkontrol->execute([$banahtar]); if($bsurunkontrol->rowCount()) { $burunsow = $bsurunkontrol ->fetch(PDO::FETCH_ASSOC); $sbon = $burunsow['ustok']-$bse; $bstokla = $DB->exec("UPDATE urun_ozellik SET ustok='$sbon' where id='$banahtar'"); } } if($modul['smsbildirim']=='1'){ $dakikkadi = trim($modul['dakikkadi']); $dakiksifre = trim($modul['dakiksifre']); $dakikbaslik = trim($modul['dakikbaslik']); $telim = trim($modul['smsgsm']); $telefon = $sow['telefon']; if($modul['smsapi']=='1'){ } else { $mesaj='Sayın '.$sow['isim'].', Siparişiniz başarıyla bize iletilmiştir. Sipariş Kodunuz '.$sino.' . Toplam Ödediğiniz Tutar : '.$sow['toplam'].' TL,dir. İyi günler dileriz. '.$ayar['siteadi'].''; $baslik = trim($modul['netbaslik']); $telefon = $sow['telefon']; $tel = $modul['smsgsm']; $mesaj = html_entity_decode($mesaj, ENT_COMPAT, "UTF-8"); $mesaj = rawurlencode($mesaj); $baslik = html_entity_decode($baslik, ENT_COMPAT, "UTF-8"); $baslik = rawurlencode($baslik); sendsms($mesaj,$telefon,$baslik); sendsms($mesaj,$tel,$baslik); } } } } $sonuc = $DB->exec("DELETE FROM sepet where ip= '$ip'"); $kuponkontrol = $DB->prepare("SELECT * FROM kuponlar WHERE id=?"); $kuponkontrol->execute(array($kuponid)); if ($kuponkontrol->rowCount()) { $urowskupon = $kuponkontrol ->fetch(PDO::FETCH_ASSOC); $total = $urowskupon['stok']; $yenikupon = $urowskupon['stok']-1; $kuponsonuccc = $DB->exec("UPDATE kuponlar SET stok='$yenikupon' WHERE id='$kuponid' limit 1"); } $veris = explode(',', $ukd); $verit = explode(',', $uadet); foreach(array_combine($veris, $verit) as $anahtar => $se){ $urunkontrol = $DB->prepare("SELECT stok FROM urunler WHERE urunid = ?"); $urunkontrol->execute([$anahtar]); if($urunkontrol->rowCount()) { $urunsow = $urunkontrol ->fetch(PDO::FETCH_ASSOC); $son = $urunsow['stok']-$se; $stokla = $DB->exec("UPDATE urunler SET stok='$son' where urunid='$anahtar'"); } } $bveris = explode(',', $badet); $bverit = explode(',', $uadet); foreach(array_combine($bveris, $bverit) as $banahtar => $bse){ $bsurunkontrol = $DB->prepare("SELECT ustok FROM urun_ozellik WHERE id = ?"); $bsurunkontrol->execute([$banahtar]); if($bsurunkontrol->rowCount()) { $burunsow = $bsurunkontrol ->fetch(PDO::FETCH_ASSOC); $sbon = $burunsow['ustok']-$bse; $bstokla = $DB->exec("UPDATE urun_ozellik SET ustok='$sbon' where id='$banahtar'"); } } } else { } ?> <?php if($_POST['gelen']=="Havale/EFT"){ $sino = sifre_uret(7); $isim = $_POST['isim']; $email = $_POST['email']; $telefon = $_POST['telefon']; $urunler = $_POST['urunler']; $eurunler = $_POST['eurunler']; $kadres = $_POST['kadres']; $banka = $_POST['banka']; $mesaj = $_POST['mesaj']; $ip = $_POST['ip']; $adres = $_POST['adres']; $tutar = $ytutar; $kdv = $ykdv; $toplam = $ytoplam; $tc = $_POST['tc']; $tarih = date("d-m-Y H:i:s"); $durum = "Ödeme Bekleniyor"; $sozlesme = $_POST['sozlesme']; $url = $_POST['url']; $uye = $_POST['uye']; $kargo = $ykargo; $odeme = $_POST['gelen']; $ukd = $_POST['ukd']; $il = $_POST['il']; $ilce = $_POST['ilce']; $kuponid = $_POST['kuponid']; $kupondeger = $_POST['kupondeger']; $uadet = $_POST['uadet']; $badet = $_POST['badet']; $nedir = $_POST['nedir']; $vd = $_POST['vd']; $vno = $_POST['vno']; if($_POST['nedir']=='0'){ $vergidurumu = '<b>T.C Kimlik No</b> : '.$tc; } else { $vergidurumu = '<b>Vergi Dairesi / Vergi No</b> : '.$vd.'/'.$vno; } if($_POST['kuponid']=='0'){ $kuponbak = ''; } else { $kuponbak = ' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>İndirim Tutarı :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$kupondeger.' TL</td></tr>'; } $ekle = $DB->prepare("insert into siparisler set sino=?, isim=?, email=?, telefon=?, tc=?, urunler=?, kadres=?, banka=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, url=?, uye=?, kargo=?, ukd=?, il=?, ilce=?, odeme=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, kuponbak=?, eurunler=?, vergidurumu=?"); $ekle -> execute(array($sino,$isim,$email,$telefon,$tc,$urunler,$kadres,$banka,$mesaj,$ip,$adres,$tutar,$kdv,$toplam,$tarih,$durum,$sozlesme,$url,$uye,$kargo,$ukd,$il,$ilce,$odeme,$uadet,$badet,$nedir,$vd,$vno,$kupondeger,$kuponbak,$eurunler,$vergidurumu)); $skontrol = $DB->prepare("SELECT sino, telefon FROM siparisler WHERE sino = ?"); $skontrol->execute([$sino]); if($skontrol->rowCount()) { $sow = $skontrol ->fetch(PDO::FETCH_ASSOC); echo ' <div id="yukleniy" style="background-color:#ffffff;width:100%;height:100%;" class="hbne hghd"> <center> <a target="_blank" style="background-color:transparent;border:none;padding:0px;margin:0px;"> <img style="padding:0px;margin:0px;background-color:transparent;border:none;" src="loader.gif" _fcksavedurl="loader.gif" /> </a></center></div> '; echo "<center> <div> </br> <img width='40%' src='img/basarili.png'></img> </br> Sayın, $isim , </br> SİPARİŞ NUMARANIZ : <b> $sino </b> </br> Seçilen Ödeme Yöntemi : $odeme </br> Sipariş Tutarı (KDV Dahil ) : <b><font size='3'> $toplam TL </b> </font> </br> Siparişinizi yukarıdaki sipariş numaranız ile sitemiz üzerinden takip edebilirsiniz. Ayrıca siparişinizi durumu değişikliğini tarafınıza EPOSTA </br> veya SMS yoluyla bilgilendireceğimizi belirtmek isteriz. Bizi tercih ettiğiniz için Teşekkür ederiz ...</br> <b> $ayar[siteadi] </b> </br> <b> $ayar[slogan] </b></br> SİPARİŞ VERİLEN İP ADRESİNİZ : $ip </div> </center></br>"; if($modul['emailbildirim'] =="1"){ $url = $modul['url']; $sunucu = htmlspecialchars(trim($modul['sunucu'])); $posta = htmlspecialchars(trim($modul['eposta'])); $esifre = htmlspecialchars(trim($modul['sifre'])); $port = htmlspecialchars(trim($modul['port'])); $type = htmlspecialchars(trim($modul['type'])); $uisim = htmlspecialchars(trim($_POST['isim'])); $siteadi = htmlspecialchars(trim($ayar['siteadi'])); include("mail/PHPMailerAutoload.php"); $mail = new PHPMailer; $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet ="utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, ''.$siteadi.''); $mail->AddAddress($email); // Maili gonderecegimiz kisi yani alici $mail->addReplyTo($email, $siteadi); $mail->Subject = 'Sipariş Kodu:'.$sino.''; // Konu basligi $mail->Body = ' <table class="x_content" style="width:100%; max-width:600px" cellspacing="0" cellpadding="0" border="0" align="center"> <tbody> <tr> <td style="padding:20px 0"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td align="left"> <a href="'.$url.'" target="_blank" style="text-decoration:none; color:#000000"> <img data-imagetype="External" src="'.$url.'/images/ayarlar/'.$ayar['logo'].'" alt="" style="max-width:140px; max-height:100px"> </a></td> <td align="right"> <a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/website.png" alt="" width="24"> </a> <a href="'.$url.'/iletisim" target="_blank" r el="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/contact.png" alt="" width="24"> </a> <a href="'.$url.'/rss.xml" target="_blank" rel="noopener noreferrer" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/rss.png" alt="" width="24"> </a> </td> </tr> </tbody> </table> </td> </tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td><h2 style="font-size:24px; font-weight:bold; padding:0; margin:0"> <span>Sipariş Dekontu</span></h2></td> <td align="right">'.$tarih.' </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding:30px 0"> <div style="padding-bottom:20px">Merhaba <b>'.$isim.'</b>,</div> <span class="markgcoipju7t" >Sipariş</span>inizin durumu : <b style="background-color: rgb(255, 241, 0); color: black"> '.$durum.' </b> <span class="markgcoipju7t">Sipariş</span> detayları aşağıdadır. </td></tr> <tr><td> <table cellspacing="0" cellpadding="0" border="0"><tbody> <tr> <td style="padding:5px 0; width:100px" valign="top"> <b> <span class="markgcoipju7t" style="background-color: rgb(255, 241, 0); color: black;">Sipariş No</span></b> </td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sino.'</td></tr> <tr><td style="padding:5px 0; width:100px" valign="top"> <b>Ödeme Türü</b></td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$odeme.'</td></tr><tr> <td style="padding:5px 0; width:100px" valign="top"> <tr><td style="padding:5px 0; width:100px" valign="top"><b>Hediye Notu</b></td> <td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0"><div class="x_overflow-note" style="max-height:100px!important; overflow-y:auto!important">'.$mesaj.'</div></td> </tr></tbody></table></td></tr></tbody></table></td></tr> <tr> <td style="padding:20px 0"> <table style="border-collapse:collapse" width="100%" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th class="x_order-item-list x_hidden" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="60"></th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="200" align="left">Ürün</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Fiyat</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" align="right">Miktar</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Toplam</th> </tr> </thead> <tbody> <tr> '.$eurunler.' <tr><td class="x_order-amount-list x_hidden" style="padding:10px 5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:10px 5px" align="right"> <b>Ara Toplam :</b></td> <td class="x_order-amount-list" style="padding:10px 5px" align="right">'.$ytutar.' TL</td></tr> <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"> <b>KDV :</b></td><td class="x_order-amount-list" style="padding:5px" align="right">'.$ykdv.' TL</td> </tr><tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Kargo Ücreti :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$ykargo.' TL</td></tr> '.$kuponbak.' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Genel Toplam :</b> </td><td class="x_order-amount-list" style="padding:5px" align="right">'.$toplam.' TL</td></tr> </tbody> </table> </td> </tr> <tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Teslimat Bilgileri</h3> </td><td></td></tr></tbody></table> </td></tr><tr> <td style="padding-bottom:20px"> </td></tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$isim.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"><b>Cep Telefonu</b> : '.$telefon.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$adres.' / '.$ilce.' / '.$il.' </td></tr></tbody></table></td></tr> </tbody></table></td></tr><tr> <td style="padding-bottom:20px"></td></tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> <tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Fatura Bilgileri</h3> </td><td></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td> </tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$isim.' </td></tr><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Email</b> : '.$email.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Cep Telefonu</b> : '.$telefon.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$kadres.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> '.$vergidurumu.' </td></tr> </tbody></table></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td></tr><tr><td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Mesafeli Satış Sözleşmesi</h3></td><td> </td></tr></tbody> </table></td></tr> <tr> <td style="padding-bottom:20px"></td></tr><tr><td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr> <td style="border:1px solid #eeeeee; background:#ffffff; border-radius:4px; padding:20px"> <div class="x_overflow-condition" style="max-height:200px!important; overflow-y:auto!important"> <style type="text/css"> <!-- .rps_985b p {margin-bottom:0.1in; direction:ltr; color:rgb(0,0,10); line-height:120%; text-align:left; widows:2; orphans:2} .rps_985b p.x_western {font-family:"Times New Roman",serif; font-size:12pt} .rps_985b p.x_cjk {font-family:"Times New Roman"; font-size:12pt} .rps_985b p.x_ctl {font-family:"Times New Roman"; font-size:12pt} --> </style><p align="justify"><br></p><p align="justify"> '.$ayar['alfooter'].' </ol><p align="justify"><br></p><br></div></td> </tr></tbody></table></td></tr> </tbody></table> </td></tr> <tr><td style="padding:20px 10px" align="center"> <div style="padding-bottom:10px"> <b>'.$siteadi.'</b></br> '.$ayar['slogan'].'</div> <div style="padding-bottom:10px">'.$ayar['adres'].'</div> <div style="padding-bottom:10px"><a href="tel:+'.$ayar['tel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['tel'].'</a> <span>-</span> <a href="tel:+'.$ayar['ceptel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['ceptel'].'</a> </div><div style="padding-bottom:10px"><a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none; color:#000000"> '.$url.'</a> </div></td></tr></tbody></table> '; // Mailin icerigi if(!$mail->Send()){ }else { } } if($modul['smsbildirim']=='1'){ $dakikkadi = trim($modul['dakikkadi']); $dakiksifre = trim($modul['dakiksifre']); $dakikbaslik = trim($modul['dakikbaslik']); $telim = trim($modul['smsgsm']); $telefon = $telefon; if($modul['smsapi']=='1'){ } else { $mesaj='Sayın '.$isim.', Siparişiniz başarıyla bize iletilmiştir. Sipariş Kodunuz '.$sino.' . Toplam Ödenecek Tutar : '.$toplam.' TL"dir. İyi günler dileriz. '.$ayar['siteadi'].''; $baslik = trim($modul['netbaslik']); $telefon = $telefon; $tel = $modul['smsgsm']; $mesaj = html_entity_decode($mesaj, ENT_COMPAT, "UTF-8"); $mesaj = rawurlencode($mesaj); $baslik = html_entity_decode($baslik, ENT_COMPAT, "UTF-8"); $baslik = rawurlencode($baslik); sendsms($mesaj,$telefon,$baslik); sendsms($mesaj,$tel,$baslik); } } } $sonuc = $DB->exec("DELETE FROM sepet where ip= '$ip'"); $kuponkontrol = $DB->prepare("SELECT * FROM kuponlar WHERE id=?"); $kuponkontrol->execute(array($kuponid)); if ($kuponkontrol->rowCount()) { $urowskupon = $kuponkontrol ->fetch(PDO::FETCH_ASSOC); $total = $urowskupon['stok']; $yenikupon = $urowskupon['stok']-1; $kuponsonuccc = $DB->exec("UPDATE kuponlar SET stok='$yenikupon' WHERE id='$kuponid' limit 1"); } $veris = explode(',', $ukd); $verit = explode(',', $uadet); foreach(array_combine($veris, $verit) as $anahtar => $se){ $urunkontrol = $DB->prepare("SELECT stok FROM urunler WHERE urunid = ?"); $urunkontrol->execute([$anahtar]); if($urunkontrol->rowCount()) { $urunsow = $urunkontrol ->fetch(PDO::FETCH_ASSOC); $son = $urunsow['stok']-$se; $stokla = $DB->exec("UPDATE urunler SET stok='$son' where urunid='$anahtar'"); } } $bveris = explode(',', $badet); $bverit = explode(',', $uadet); foreach(array_combine($bveris, $bverit) as $banahtar => $bse){ $bsurunkontrol = $DB->prepare("SELECT ustok FROM urun_ozellik WHERE id = ?"); $bsurunkontrol->execute([$banahtar]); if($bsurunkontrol->rowCount()) { $burunsow = $bsurunkontrol ->fetch(PDO::FETCH_ASSOC); $sbon = $burunsow['ustok']-$bse; $bstokla = $DB->exec("UPDATE urun_ozellik SET ustok='$sbon' where id='$banahtar'"); } } } elseif($_POST['gelen']=="Kapıda Ödeme"){ $sino = sifre_uret(7); $isim = $_POST['isim']; $email = $_POST['email']; $telefon = $_POST['telefon']; $urunler = $_POST['urunler']; $eurunler = $_POST['eurunler']; $kadres = $_POST['kadres']; $banka = $_POST['banka']; $mesaj = $_POST['mesaj']; $ip = $_POST['ip']; $adres = $_POST['adres']; $tutar = $ytutar; $kdv = $ykdv; $toplam = $ytoplam+$modul['kapi']; $tc = $_POST['tc']; $tarih = date("d-m-Y H:i:s"); $durum = "Ödeme Bekleniyor"; $sozlesme = $_POST['sozlesme']; $url = $_POST['url']; $uye = $_POST['uye']; $kargo = $ykargo; $odeme = $_POST['gelen']; $ukd = $_POST['ukd']; $il = $_POST['il']; $ilce = $_POST['ilce']; $kuponid = $_POST['kuponid']; $kupondeger = $_POST['kupondeger']; $uadet = $_POST['uadet']; $badet = $_POST['badet']; $nedir = $_POST['nedir']; $vd = $_POST['vd']; $vno = $_POST['vno']; $sonkargo = $ykargo+$modul['kapi']; if($_POST['nedir']=='0'){ $vergidurumu = '<b>T.C Kimlik No</b> : '.$tc; } else { $vergidurumu = '<b>Vergi Dairesi / Vergi No</b> : '.$vd.'/'.$vno; } if($_POST['kuponid']=='0'){ $kuponbak = ''; } else { $kuponbak = ' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>İndirim Tutarı :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$kupondeger.' TL</td></tr>'; } $kapi = $modul['kapi']; $ekle = $DB->prepare("insert into siparisler set sino=?, isim=?, email=?, telefon=?, tc=?, urunler=?, kadres=?, banka=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, url=?, uye=?, kargo=?, ukd=?, il=?, ilce=?, odeme=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, kapi=?, kuponbak=?, eurunler=?, vergidurumu=?"); $ekle -> execute(array($sino,$isim,$email,$telefon,$tc,$urunler,$kadres,$banka,$mesaj,$ip,$adres,$tutar,$kdv,$toplam,$tarih,$durum,$sozlesme,$url,$uye,$kargo,$ukd,$il,$ilce,$odeme,$uadet,$badet,$nedir,$vd,$vno,$kupondeger,$kapi,$kuponbak,$eurunler,$vergidurumu)); $skontrol = $DB->prepare("SELECT sino, telefon FROM siparisler WHERE sino = ?"); $skontrol->execute([$sino]); if($skontrol->rowCount()) { $sow = $skontrol ->fetch(PDO::FETCH_ASSOC); echo ' <div id="yukleniy" style="background-color:#ffffff;width:100%;height:100%;" class="hbne hghd"> <center> <a target="_blank" style="background-color:transparent;border:none;padding:0px;margin:0px;"> <img style="padding:0px;margin:0px;background-color:transparent;border:none;" src="loader.gif" _fcksavedurl="loader.gif" /> </a></center></div> '; echo "<center> <div> </br> <img width='40%' src='img/basarili.png'></img> </br> Sayın, $isim , </br> SİPARİŞ NUMARANIZ : <b> $sino </b> </br> Seçilen Ödeme Yöntemi : $odeme </br> Sipariş Tutarı (KDV Dahil ) : <b><font size='3'> $toplam TL </b> </font> </br> Siparişinizi yukarıdaki sipariş numaranız ile sitemiz üzerinden takip edebilirsiniz. Ayrıca siparişinizi durumu değişikliğini tarafınıza EPOSTA </br> veya SMS yoluyla bilgilendireceğimizi belirtmek isteriz. Bizi tercih ettiğiniz için Teşekkür ederiz ...</br> <b> $ayar[siteadi] </b> </br> <b> $ayar[slogan] </b></br> SİPARİŞ VERİLEN İP ADRESİNİZ : $ip </div> </center></br>"; if($modul['emailbildirim'] =="1"){ $url = $modul['url']; $sunucu = htmlspecialchars(trim($modul['sunucu'])); $posta = htmlspecialchars(trim($modul['eposta'])); $esifre = htmlspecialchars(trim($modul['sifre'])); $port = htmlspecialchars(trim($modul['port'])); $type = htmlspecialchars(trim($modul['type'])); $uisim = htmlspecialchars(trim($_POST['isim'])); $siteadi = htmlspecialchars(trim($ayar['siteadi'])); include("mail/PHPMailerAutoload.php"); $mail = new PHPMailer; $mail->IsSMTP(); //$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj $mail->SMTPAuth = true; $mail->SMTPSecure = "$type"; // Güvenli baglanti icin ssl normal baglanti icin tls $mail->Host = "$sunucu"; // Mail sunucusuna ismi $mail->Port = "$port"; // Gucenli baglanti icin 465 Normal baglanti icin 587 $mail->IsHTML(true); $mail->SetLanguage("tr", "phpmailer/language"); $mail->CharSet ="utf-8"; $mail->Username = "$posta"; // Mail adresimizin kullanicı adi $mail->Password = "$esifre"; // Mail adresimizin sifresi $mail->SetFrom($mail->Username, ''.$siteadi.''); $mail->AddAddress($email); // Maili gonderecegimiz kisi yani alici $mail->addReplyTo($email, $siteadi); $mail->Subject = 'Sipariş Kodu:'.$sino.''; // Konu basligi $mail->Body = ' <table class="x_content" style="width:100%; max-width:600px" cellspacing="0" cellpadding="0" border="0" align="center"> <tbody> <tr> <td style="padding:20px 0"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td align="left"> <a href="'.$url.'" target="_blank" style="text-decoration:none; color:#000000"> <img data-imagetype="External" src="'.$url.'/images/ayarlar/'.$ayar['logo'].'" alt="" style="max-width:140px; max-height:100px"> </a></td> <td align="right"> <a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/website.png" alt="" width="24"> </a> <a href="'.$url.'/iletisim" target="_blank" r el="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/contact.png" alt="" width="24"> </a> <a href="'.$url.'/rss.xml" target="_blank" rel="noopener noreferrer" style="text-decoration:none"> <img data-imagetype="External" src="'.$url.'/img/rss.png" alt="" width="24"> </a> </td> </tr> </tbody> </table> </td> </tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td><h2 style="font-size:24px; font-weight:bold; padding:0; margin:0"> <span>Sipariş Dekontu</span></h2></td> <td align="right">'.$tarih.' </td> </tr> </tbody> </table> </td> </tr> <tr> <td style="padding:30px 0"> <div style="padding-bottom:20px">Merhaba <b>'.$isim.'</b>,</div> <span class="markgcoipju7t" >Sipariş</span>inizin durumu : <b style="background-color: rgb(255, 241, 0); color: black"> '.$durum.' </b> <span class="markgcoipju7t">Sipariş</span> detayları aşağıdadır. </td></tr> <tr><td> <table cellspacing="0" cellpadding="0" border="0"><tbody> <tr> <td style="padding:5px 0; width:100px" valign="top"> <b> <span class="markgcoipju7t" style="background-color: rgb(255, 241, 0); color: black;">Sipariş No</span></b> </td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$sino.'</td></tr> <tr><td style="padding:5px 0; width:100px" valign="top"> <b>Ödeme Türü</b></td><td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0">'.$odeme.'</td></tr><tr> <td style="padding:5px 0; width:100px" valign="top"> <tr><td style="padding:5px 0; width:100px" valign="top"><b>Hediye Notu</b></td> <td style="padding:5px 0" width="10" valign="top" align="center">:</td> <td style="padding:5px 0"><div class="x_overflow-note" style="max-height:100px!important; overflow-y:auto!important">'.$mesaj.'</div></td> </tr></tbody></table></td></tr></tbody></table></td></tr> <tr> <td style="padding:20px 0"> <table style="border-collapse:collapse" width="100%" cellspacing="0" cellpadding="0" border="0"> <thead> <tr> <th class="x_order-item-list x_hidden" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="60"></th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="200" align="left">Ürün</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Fiyat</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" align="right">Miktar</th> <th class="x_order-item-list" style="padding:10px 5px; border-bottom:1px solid #eeeeee" width="100" align="right">Toplam</th> </tr> </thead> <tbody> <tr> '.$eurunler.' <tr><td class="x_order-amount-list x_hidden" style="padding:10px 5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:10px 5px" align="right"> <b>Ara Toplam :</b></td> <td class="x_order-amount-list" style="padding:10px 5px" align="right">'.$ytutar.' TL</td></tr> <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"> <b>KDV :</b></td><td class="x_order-amount-list" style="padding:5px" align="right">'.$ykdv.' TL</td> </tr><tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Toplam Kargo Ücreti :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$sonkargo.' TL</td></tr> '.$kuponbak.' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>Genel Toplam :</b> </td><td class="x_order-amount-list" style="padding:5px" align="right">'.$toplam.' TL</td></tr> </tbody> </table> </td> </tr> <tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Teslimat Bilgileri</h3> </td><td></td></tr></tbody></table> </td></tr><tr> <td style="padding-bottom:20px"> </td></tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$isim.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"><b>Cep Telefonu</b> : '.$telefon.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$adres.' / '.$ilce.' / '.$il.' </td></tr></tbody></table></td></tr> </tbody></table></td></tr><tr> <td style="padding-bottom:20px"></td></tr><tr> <td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody> <tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Fatura Bilgileri</h3> </td><td></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td> </tr><tr><td> <table style="border-collapse:collapse; background:#ffffff" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adı Soyadı</b> : '.$isim.' </td></tr><tr> <td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Email</b> : '.$email.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Cep Telefonu</b> : '.$telefon.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> <b>Adres</b> : '.$kadres.' </td></tr> <tr><td style="padding:10px; border-top:1px solid #eeeeee; border-bottom:1px solid #eeeeee"> '.$vergidurumu.' </td></tr> </tbody></table></td></tr></tbody></table></td></tr><tr><td style="padding-bottom:20px"></td></tr><tr><td style="background:#f9f9f9; padding:30px 20px; border:1px solid #eeeeee"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="border-bottom:1px solid #dddddd; padding-bottom:10px"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><h3 style="font-size:16px; font-weight:bold; padding:0; margin:0">Mesafeli Satış Sözleşmesi</h3></td><td> </td></tr></tbody> </table></td></tr> <tr> <td style="padding-bottom:20px"></td></tr><tr><td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody><tr> <td style="border:1px solid #eeeeee; background:#ffffff; border-radius:4px; padding:20px"> <div class="x_overflow-condition" style="max-height:200px!important; overflow-y:auto!important"> <style type="text/css"> <!-- .rps_985b p {margin-bottom:0.1in; direction:ltr; color:rgb(0,0,10); line-height:120%; text-align:left; widows:2; orphans:2} .rps_985b p.x_western {font-family:"Times New Roman",serif; font-size:12pt} .rps_985b p.x_cjk {font-family:"Times New Roman"; font-size:12pt} .rps_985b p.x_ctl {font-family:"Times New Roman"; font-size:12pt} --> </style><p align="justify"><br></p><p align="justify"> '.$ayar['alfooter'].' </ol><p align="justify"><br></p><br></div></td> </tr></tbody></table></td></tr> </tbody></table> </td></tr> <tr><td style="padding:20px 10px" align="center"> <div style="padding-bottom:10px"> <b>'.$siteadi.'</b></br> '.$ayar['slogan'].'</div> <div style="padding-bottom:10px">'.$ayar['adres'].'</div> <div style="padding-bottom:10px"><a href="tel:+'.$ayar['tel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['tel'].'</a> <span>-</span> <a href="tel:+'.$ayar['ceptel'].'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="color:#000000">'.$ayar['ceptel'].'</a> </div><div style="padding-bottom:10px"><a href="'.$url.'" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" style="text-decoration:none; color:#000000"> '.$url.'</a> </div></td></tr></tbody></table> '; // Mailin icerigi if(!$mail->Send()){ }else { } } if($modul['smsbildirim']=='1'){ $dakikkadi = trim($modul['dakikkadi']); $dakiksifre = trim($modul['dakiksifre']); $dakikbaslik = trim($modul['dakikbaslik']); $telim = trim($modul['smsgsm']); $telefon = $telefon; if($modul['smsapi']=='1'){ } else { $mesaj='Sayın '.$isim.', Siparişiniz başarıyla bize iletilmiştir. Sipariş Kodunuz '.$sino.' . Toplam Ödenecek Tutar : '.$toplam.' TL"dir. İyi günler dileriz. '.$ayar['siteadi'].''; $baslik = trim($modul['netbaslik']); $telefon = $telefon; $tel = $modul['smsgsm']; $mesaj = html_entity_decode($mesaj, ENT_COMPAT, "UTF-8"); $mesaj = rawurlencode($mesaj); $baslik = html_entity_decode($baslik, ENT_COMPAT, "UTF-8"); $baslik = rawurlencode($baslik); sendsms($mesaj,$telefon,$baslik); sendsms($mesaj,$tel,$baslik); } } } $sonuc = $DB->exec("DELETE FROM sepet where ip= '$ip'"); $kuponkontrol = $DB->prepare("SELECT * FROM kuponlar WHERE id=?"); $kuponkontrol->execute(array($kuponid)); if ($kuponkontrol->rowCount()) { $urowskupon = $kuponkontrol ->fetch(PDO::FETCH_ASSOC); $total = $urowskupon['stok']; $yenikupon = $urowskupon['stok']-1; $kuponsonuccc = $DB->exec("UPDATE kuponlar SET stok='$yenikupon' WHERE id='$kuponid' limit 1"); } $veris = explode(',', $ukd); $verit = explode(',', $uadet); foreach(array_combine($veris, $verit) as $anahtar => $se){ $urunkontrol = $DB->prepare("SELECT stok FROM urunler WHERE urunid = ?"); $urunkontrol->execute([$anahtar]); if($urunkontrol->rowCount()) { $urunsow = $urunkontrol ->fetch(PDO::FETCH_ASSOC); $son = $urunsow['stok']-$se; $stokla = $DB->exec("UPDATE urunler SET stok='$son' where urunid='$anahtar'"); } } $bveris = explode(',', $badet); $bverit = explode(',', $uadet); foreach(array_combine($bveris, $bverit) as $banahtar => $bse){ $bsurunkontrol = $DB->prepare("SELECT ustok FROM urun_ozellik WHERE id = ?"); $bsurunkontrol->execute([$banahtar]); if($bsurunkontrol->rowCount()) { $burunsow = $bsurunkontrol ->fetch(PDO::FETCH_ASSOC); $sbon = $burunsow['ustok']-$bse; $bstokla = $DB->exec("UPDATE urun_ozellik SET ustok='$sbon' where id='$banahtar'"); } } } elseif($_POST['gelen']=="Kredi Kartı"){ $sino = sifre_uret(7); $isim = $_POST['isim']; $email = $_POST['email']; $telefon = $_POST['telefon']; $urunler = $_POST['urunler']; $eurunler = $_POST['eurunler']; $kadres = $_POST['kadres']; $banka = $_POST['banka']; $mesaj = $_POST['mesaj']; $ip = $_POST['ip']; $adres = $_POST['adres']; $tutar = $ytutar; $kdv = $ykdv; $toplam = $ytoplam; $tc = $_POST['tc']; $tarih = date("d-m-Y H:i:s"); $sozlesme = $_POST['sozlesme']; $url = $_POST['url']; $uye = $_POST['uye']; $kargo = $ykargo; $odeme = $_POST['gelen']; $ukd = $_POST['ukd']; $il = $_POST['il']; $ilce = $_POST['ilce']; $kuponid = $_POST['kuponid']; $kupondeger = $_POST['kupondeger']; $uadet = $_POST['uadet']; $badet = $_POST['badet']; $nedir = $_POST['nedir']; $vd = $_POST['vd']; $vno = $_POST['vno']; $durum = 'Başarısız'; if($_POST['nedir']=='0'){ $vergidurumu = '<b>T.C Kimlik No</b> : '.$tc; } else { $vergidurumu = '<b>Vergi Dairesi / Vergi No</b> : '.$vd.'/'.$vno; } if($_POST['kuponid']=='0'){ $kuponbak = ''; } else { $kuponbak = ' <tr><td class="x_order-amount-list x_hidden" style="padding:5px"></td> <td class="x_order-amount-list" colspan="3" style="padding:5px" align="right"><b>İndirim Tutarı :</b></td> <td class="x_order-amount-list" style="padding:5px" align="right">'.$kupondeger.' TL</td></tr>'; } if($_POST['pos']=='1'){ require "iyzipay/IyzipayBootstrap.php"; $key1 = $modul['iyzi1']; $key2 = $modul['iyzi2']; $durum = "Başarısız"; $ekle = $DB->prepare("insert into siparisler set sino=?, isim=?, email=?, telefon=?, tc=?, urunler=?, kadres=?, banka=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, url=?, uye=?, kargo=?, ukd=?, il=?, ilce=?, odeme=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, eurunler=?, kuponbak=?, vergidurumu=?"); $ekle -> execute(array($sino,$isim,$email,$telefon,$tc,$urunler,$kadres,$banka,$mesaj,$ip,$adres,$tutar,$kdv,$toplam,$tarih,$durum,$sozlesme,$url,$uye,$kargo,$ukd,$il,$ilce,$odeme,$uadet,$badet,$nedir,$vd,$vno,$kupondeger,$eurunler,$kuponbak,$vergidurumu)); $sonfiyat = $ytoplam; $adSoyad = $isim; $last_space = strrpos($adSoyad, ' '); $soyad = substr($adSoyad, $last_space); $ad = substr($adSoyad, 0, $last_space); $rurl = $modul['url'] . "/siparis.html?kk=ok"; IyzipayBootstrap::init(); $options = new \Iyzipay\Options(); $options->setApiKey($key1); $options->setSecretKey($key2); $options->setBaseUrl("https://api.iyzipay.com"); $request = new \Iyzipay\Request\CreateCheckoutFormInitializeRequest(); $request->setLocale(\Iyzipay\Model\Locale::TR); $request->setPrice($sonfiyat); $request->setPaidPrice($ytoplam); $request->setCurrency(\Iyzipay\Model\Currency::TL); $request->setBasketId($sino); $request->setCallbackUrl($rurl); $request->setEnabledInstallments(array(2, 3, 6, 9)); $buyer = new \Iyzipay\Model\Buyer(); $buyer->setId($uye); $buyer->setName($ad); $buyer->setSurname($soyad); $buyer->setGsmNumber($telefon); $buyer->setEmail($email); $buyer->setIdentityNumber($tc); $buyer->setRegistrationAddress($adres); $buyer->setIp($ip); $buyer->setCity($il); $buyer->setCountry($ilce); $request->setBuyer($buyer); $shippingAddress = new \Iyzipay\Model\Address(); $shippingAddress->setContactName($isim); $shippingAddress->setCity($il); $shippingAddress->setCountry($ilce); $shippingAddress->setAddress($adres); $request->setShippingAddress($shippingAddress); $billingAddress = new \Iyzipay\Model\Address(); $billingAddress->setContactName($isim); $billingAddress->setCity($il); $billingAddress->setCountry("Turkey"); $billingAddress->setAddress($adres); $request->setBillingAddress($billingAddress); $basketItems = array(); $uysepet = $DB->prepare("SELECT * FROM urunler INNER JOIN sepet ON urunler.urunid = sepet.urunid WHERE sepet.ip=? ORDER BY sepet.sepetId DESC"); $uysepet->execute(array($ip)); foreach ($uysepet as $sepet) { $sepFiy = $sepet['fiyat']+$sepet['ekfiyat']; $sepetFiyat= number_format($sepFiy, 2, ',', '.'); $ufiyat = ($sepet['fiyat']+$sepet['ekfiyat'])*$sepet['urunAdet']; $item = new \Iyzipay\Model\BasketItem(); $item->setId($sepet['urunkodu']); $item->setName($sepet['urunAdi']); $item->setCategory1("Ürün"); $request->setPaymentGroup(\Iyzipay\Model\PaymentGroup::PRODUCT); $item->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL); $item->setPrice($ytoplam); $basketItems[] = $item; } $request->setBasketItems($basketItems); $checkoutFormInitialize = \Iyzipay\Model\CheckoutFormInitialize::create($request,$options ); print_r($checkoutFormInitialize->getErrorMessage()); print_r($checkoutFormInitialize->getCheckoutFormContent());?> </br> </br> <div id="iyzipay-checkout-form" class="responsive"></div> </br> </br> <?php } elseif($_POST['pos']=='0'){ $payid = $modul['payid']; $paykey = $modul['paykey']; $paysalt = $modul['paysalt']; $merchant_id = $payid; $merchant_key = $paykey; $merchant_salt = $paysalt; $durum = "Başarısız"; $ekle = $DB->prepare("insert into siparisler set sino=?, isim=?, email=?, telefon=?, tc=?, urunler=?, kadres=?, banka=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, url=?, uye=?, kargo=?, ukd=?, il=?, ilce=?, odeme=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, eurunler=?, kuponbak=?, vergidurumu=?"); $ekle -> execute(array($sino,$isim,$email,$telefon,$tc,$urunler,$kadres,$banka,$mesaj,$ip,$adres,$tutar,$kdv,$toplam,$tarih,$durum,$sozlesme,$url,$uye,$kargo,$ukd,$il,$ilce,$odeme,$uadet,$badet,$nedir,$vd,$vno,$kupondeger,$eurunler,$kuponbak,$vergidurumu)); $total =0; $b = 0; $sepet = array(); $uysepet = $DB->prepare("SELECT * FROM urunler INNER JOIN sepet ON urunler.urunid = sepet.urunid WHERE sepet.ip=? ORDER BY sepet.sepetId DESC"); $uysepet->execute(array($ip)); foreach ($uysepet as $urun) { $sepFiy = $urun['fiyat']+$urun['ekfiyat']; $sepetFiyat= number_format($sepFiy, 2, ',', '.'); $ufiyat = ($sepet['fiyat']+$sepet['ekfiyat'])*$sepet['urunAdet']; $tutar = $ufiyat+$kdv; $total = $total + $tutar; array_push($sepet, array($urun["urunAdi"],$ufiyat,1)); } //$payment_amount = $total * 100; $payment_amount = $ytoplam * 100; $merchant_oid = $sino; $user_name = $isim; $user_address = $adres; $user_phone = $telefon; $merchant_ok_url = $modul['url'] . "/siparis.html?kk=mok&sino=".$sino; $merchant_fail_url = $modul['url'] . "/siparis.html?kk=merr"; $user_basket = base64_encode(json_encode($sepet)); $user_ip=$ip; $timeout_limit = "30"; $debug_on = 1; if($modul['tarih']=='1'){ $test_mode = 1; } else { $test_mode = 0; } $no_installment = 0; // Taksit yapılmasını istemiyorsanız, sadece tek çekim sunacaksanız 1 yapın $max_installment = 0; $currency = "TL"; ####### Bu kısımda herhangi bir değişiklik yapmanıza gerek yoktur. ####### $hash_str = $merchant_id .$user_ip .$merchant_oid .$email .$payment_amount .$user_basket.$no_installment.$max_installment.$currency.$test_mode; $paytr_token=base64_encode(hash_hmac('sha256',$hash_str.$merchant_salt,$merchant_key,true)); $post_vals=array( 'merchant_id'=>$merchant_id, 'user_ip'=>$user_ip, 'merchant_oid'=>$merchant_oid, 'email'=>$email, 'payment_amount'=>$payment_amount, 'paytr_token'=>$paytr_token, 'user_basket'=>$user_basket, 'debug_on'=>$debug_on, 'no_installment'=>$no_installment, 'max_installment'=>$max_installment, 'user_name'=>$user_name, 'user_address'=>$user_address, 'user_phone'=>$user_phone, 'merchant_ok_url'=>$merchant_ok_url, 'merchant_fail_url'=>$merchant_fail_url, 'timeout_limit'=>$timeout_limit, 'currency'=>$currency, 'test_mode'=>$test_mode ); $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.paytr.com/odeme/api/get-token"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1) ; curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vals); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $result = @curl_exec($ch); if(curl_errno($ch)) die("PAYTR IFRAME connection error. err:".curl_error($ch)); curl_close($ch); $result=json_decode($result,1); if($result['status']=='success') $token=$result['token']; else die("PAYTR IFRAME failed. reason:".$result['reason']); ######################################################################### ?> <script src="https://www.paytr.com/js/iframeResizer.min.js"></script> <iframe src="https://www.paytr.com/odeme/guvenli/<?php echo $token;?>" id="paytriframe" frameborder="0" scrolling="no" style="width: 100%;"></iframe> <script>iFrameResize({},'#paytriframe');</script> <?php }else{ require("Shopier.php"); $sapi = $modul['sapi']; $skey = $modul['skey']; $shopier = new Shopier($sapi, $skey); $durum = "Başarısız"; $ekle = $DB->prepare("insert into siparisler set sino=?, isim=?, email=?, telefon=?, tc=?, urunler=?, kadres=?, banka=?, mesaj=?, ip=?, adres=?, tutar=?, kdv=?, toplam=?, tarih=?, durum=?, sozlesme=?, url=?, uye=?, kargo=?, ukd=?, il=?, ilce=?, odeme=?, uadet=?, badet=?, nedir=?, vd=?, vno=?, kupondeger=?, eurunler=?, kuponbak=?, vergidurumu=?"); $ekle -> execute(array($sino,$isim,$email,$telefon,$tc,$urunler,$kadres,$banka,$mesaj,$ip,$adres,$tutar,$kdv,$toplam,$tarih,$durum,$sozlesme,$url,$uye,$kargo,$ukd,$il,$ilce,$odeme,$uadet,$badet,$nedir,$vd,$vno,$kupondeger,$eurunler,$kuponbak,$vergidurumu));$total = str_replace(",",".",$toplam); $shopier_ok_url = $modul['url'] . "/shopiersonuc.php"; $shopier->setBuyer(Array( 'id' => ($sino), 'first_name' => $isim, 'last_name' => " ", 'email' => $email, 'phone' => $telefon)); $shopier->setOrderBilling(Array( 'billing_address' => $urun." "."(".$urunAdi.")", 'billing_city' => $il, 'billing_country' => 'turkey', 'billing_postcode' => '90000', )); $shopier->setOrderShipping(Array( 'shipping_address' => $adres, 'shipping_city' => $il, 'shipping_country' => 'turkey', 'shipping_postcode' => '90000', )); echo $shopier->run($sino, $ytoplam, $shopier_ok_url); } // koşul3 sağlanırsa çalışacak kodlar } else{ // yukarıdaki hiçbir koşul sağlanmazsa çalışacak kodlar }?> </div> </div> </div> </div> </div> </div> </div> </div> <?php } ?> <?php require('footer.php');?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula