test / satin-al.php
canerky3636's picture
Upload 28 files
bdb1674
<?php
include 'include/menu.php';
if (isset($_SESSION['uye_mail'])) {
} else {
?>
<script>
$(document).ready(function () {
swal({
title: "ÜYE GİRİŞİ YAPMALISINIZ!",
text: "Satın alma işlemi için üye girişi yapmalısınız! <br /> Yönlendiriliyorsunuz lütfen bekleyin.<br /><br /><br />",
type: "warning",
timer: '4000',
showConfirmButton: false
});
});
</script>
<?php
$sayfaURL = "http";
if(isset($_SERVER["HTTPS"])){
if($_SERVER["HTTPS"] == "on"){
$sayfaURL .= "s";
}
}
$sayfaURL .= "://";
$sayfaURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; ?>
<meta http-equiv="refresh" content="4; URL=hesabim/uye-girisi?sepet=ok">
<?php }
$user=$db->prepare("SELECT * from uye where uye_mail=:uye_mail");
$user->execute(array(
'uye_mail' => $_SESSION['uye_mail']
));
$userprint=$user->fetch(PDO::FETCH_ASSOC);
if ($userprint['uye_onaymail']=='0') {
Header( "Location:hesabim/uye-onay?uyeonay=no" );
}
if ($userprint['uye_onaytel']=='0') {
Header( "Location:hesabim/uye-onay?uyeonay=no" );
}
$urunler = $_SESSION['urunler'];
?>
<title><?php echo $settingsprint['ayar_title'] ?></title>
<meta name="description" content="<?php echo $settingsprint['ayar_description'] ?>">
<meta name="keywords" content="<?php echo $settingsprint['ayar_keywords'] ?>">
</head>
<!-- Page title -->
<section id="page-title" class="page-title-classic" style="background: url(trex/assets/img/genel/pattern10.png)">
<div class="container">
<div class="breadcrumb">
<ul>
<li><a href="<?php echo $settingsprint['ayar_siteurl']; ?>">AnaSayfa</a> </li>
<li class="active">SİPARİŞ FORMU</li>
</ul>
</div>
<div class="page-title">
<h1>SİPARİŞ FORMU</h1>
</div>
</div>
</section>
<!-- end: Page title -->
<!-- Page Content -->
<section id="page-content">
<div class="container">
<div class="row">
<!-- SİPARİŞ FORMU -->
<form action="admin/controller/function.php" method="POST">
<!-- Start input -->
<p style="margin-top: -20px; border: none;" type="text" class="form-control">
<table class="table">
<thead>
<tr>
<th class="cart-product-remove"></th>
<th class="cart-product-thumbnail">Ürün</th>
<th class="cart-product-price">Fiyat</th>
<th class="cart-product-quantity">Adet</th>
<th class="cart-product-subtotal">Toplam</th>
</tr>
</thead>
<tbody>
<?php
foreach($urunler as $urun) {
$toplam += $urun['fiyat'];
?>
<tr>
<td class="cart-product-remove">
</td>
<td style="width: 70%;" class="cart-product-thumbnail">
<div class="cart-product-thumbnail-name"><?php echo $urun["urun"]; ?></div>
</td>
<td style="width: 10%;" class="cart-product-price">
<span class="amount"><i class="fa fa-try"></i><?php echo $urun["fiyat"]; ?></span>
</td>
<td style="width: 10%;" class="cart-product-quantity">
<div class="quantity">
<input type="text" class="qty" value="<?php echo $urun["adet"]; ?>" readonly name="quantity">
</div>
</td>
<?php $toplam = $urun["adet"]*$urun["fiyat"]; ?>
<td style="width: 10%;" class="cart-product-subtotal">
<span class="amount"><i class="fa fa-try"></i><?php echo $toplam; ?></span>
</td>
</tr>
<?php $geneltoplam += $toplam; } ?>
</tbody>
</table>
<table class="table">
<tbody>
<tr>
<td class="cart-product-name">
<strong>Genel Toplam</strong>
</td>
<td class="cart-product-name text-right">
<span class="amount color lead"><strong><i class="fa fa-try"></i><?php echo $geneltoplam; ?></strong></span>
</td>
</tr>
</tbody>
</table>
</p>
<!-- End input -->
<!-- Start select -->
<p>
<?php
$odeme=$db->prepare("SELECT * from odeme where odeme_durum=1");
$odeme->execute();
?>
<labeldeme Tipi:</label>
<select class="form-control" required name="siparis_odeme" data-jcf='{"wrapNative": false, "wrapNativeOnMobile": false}'>
<option required value="">Ödeme Tipi Seçiniz</option>
<?php while($odemecek=$odeme->fetch(PDO::FETCH_ASSOC)) {
if($odemecek['odeme_id'] == 3){ ?>
<option required value="credit_card"><?php echo $odemecek['odeme_adi']; ?> - (<small style="color: #fff;"><?php echo $odemecek['odeme_not']; ?></small>)</option>
<? }else {?>
<option required value="<?php echo $odemecek['odeme_adi']; ?>"><?php echo $odemecek['odeme_adi']; ?> - (<small style="color: #fff;"><?php echo $odemecek['odeme_not']; ?></small>)</option>
<?php }} ?>
</select>
</p>
<!-- End select -->
<input class="btn btn-gfort" required style="width: 100%;" type="submit" name="siparisver" value="SİPARİŞİ TAMAMLA">
<input type="hidden" name="siparis_ad" value="<?php echo $userprint['uye_id']; ?>">
<input type="hidden" name="siparis_fiyat" value="<?php echo $geneltoplam; ?>">
</form>
<!--#SİPARİŞ FORMU -->
</div>
</div>
</section>
<!-- end: Page Content -->
<?php include 'include/footer.php'; ?>