LiteSpeed Linux server2.poyrazhosting.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64 safemode : OFF MySQL: OFF | Perl: OFF | cURL: ON | WGet: OFF > / home / cuneytsener53 / istakip.snrsoft.com.tr / | Server Ip : 104.21.78.54 |
Filename | /home/cuneytsener53/istakip.snrsoft.com.tr/teklifyazdir_basicform.php |
Size | 10.51 kb |
Permission | rw-r--r-- |
Owner | |
Create time | 04-Mar-2025 08:29 |
Last modified | 18-Mar-2024 19:15 |
Last accessed | 29-Mar-2025 23:21 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
include 'db.php';
$date = date("Y-m-d");
if(isset($_GET['teklif_id'])){
$teklif_id = $_GET['teklif_id'];
$teklif_baslik = $db->query("SELECT tf.tarih as teklif_tarihi, tf.DOVIZ_TIPI, mst.musteri_mail, mst.musteri_adres, mst.musteri_telefon, tf.id as teklif_id, tf.kosullar, tf.musteri_id, mst.musteri_adi as musteri_adi, tf.isin_adi, tf.teklifi_hazirlayan, tf.durum, tf.kalemler FROM teklifler tf left join musteriler mst On mst.id = tf.musteri_id WHERE tf.id = '$teklif_id' ORDER BY tf.id DESC LIMIT 1" )->fetch(PDO::FETCH_ASSOC);
if($teklif_baslik['DOVIZ_TIPI'] == 0 ){ $doviz_tipi = '₺'; }
else if($teklif_baslik['DOVIZ_TIPI'] == 1 ) { $doviz_tipi = '$'; }
else if($teklif_baslik['DOVIZ_TIPI'] == 2 ) { $doviz_tipi = '€'; }
/*
$teklif_baslik = $db->query("SELECT t.id, t.teklifi_hazirlayan, t.tarih, t.kayit_eden, t.kayit_tarihi, m.musteri_adi, m.musteri_adres, m.musteri_mail, m.musteri_yetkili, m.musteri_telefon, m.sektor_id, t.musteri_id, t.genel_toplam from teklif_baslik t LEFT JOIN musteriler m On m.id = t.musteri_id WHERE t.id = '$teklif_id' ")->fetch(PDO::FETCH_ASSOC); */
$ayar = $db->query("SELECT * FROM ayar")->fetch(PDO::FETCH_ASSOC);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teklif Formu-#<?php echo $teklif_id; ?></title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<section id="invoice">
<div class="container my-md-2 py-1">
<!--
<div class=" d-md-flex justify-content-between align-items-center mb-5 ">
<div class="mt-5 mt-md-0">
<h2 class="display-6 text-success fw-bold">Gerçek Bilgisayar Teklif Formu </h2>
<p class="m-0">Teklif No : # <?= $teklif_id; ?></p>
</div>
<div class="mt-5 mt-md-0">
<img src="images/logo_dark.png" alt="">
</div>
</div> -->
<div class="row" style="padding: 15px;">
<div class="col-md-9" style="text-align: left"><img src="upload/<?php echo $ayar_bilgi->logo; ?>" width="350px" height="100px" ></div>
<div class="col-md-3" class="text-right"><h2><?php echo date('Y-m-d'); ?></h2></div>
</div>
<div class="bg-light rounded-5 p-5">
<div class="d-md-flex justify-content-between">
<div>
<p class="text-success fw-bold">Sayın;</p>
<h6><?php echo $teklif_baslik['musteri_adi']; ?></h6>
<ul class="list-unstyled">
<li><?php echo $teklif_baslik['musteri_mail']; ?></li>
<li><?php echo $teklif_baslik['musteri_adres']; ?></li>
<li><?php echo $teklif_baslik['musteri_telefon']; ?></li>
</ul>
</div>
<div class="text-md-end mt-5 mt-md-0">
<p class="text-dark fw-bold">Teklif Formu - #<?php echo $teklif_id; ?></p>
<h6><?php echo $ayar_bilgi->title; ?></h6>
<ul class="list-unstyled">
<li><?php echo $ayar_bilgi->email; ?></li>
<li><?php echo $ayar_bilgi->telefon; ?></li>
<li><?php echo $ayar_bilgi->adres; ?></li>
<li><?php echo $ayar_bilgi->website; ?></li>
</ul>
</div>
</div>
<!--
<div class="d-md-flex justify-content-between mt-4">
<div class="mt-5 mt-md-0">
<p class="text-success fw-bold">Ödeme Bilgileri</p>
<h5>Payment Info</h5>
<ul class="list-unstyled">
<li><span class="fw-semibold">Account No: </span> 102 3345 56938</li>
<li><span class="fw-semibold">Account Name: </span> William Peter</li>
<li><span class="fw-semibold">Branch Name: </span> XYZ </li>
</ul>
</div>
<div class="text-md-end mt-5 mt-md-0">
<p class="text-success fw-bold">Date</p>
<h5>Invoice Date</h5>
<ul class="list-unstyled">
<li><span class="fw-semibold">Invoice Date:</span> 20 May, 2024</li>
<li><span class="fw-semibold">Due Date:</span> 20 June, 2024</li>
</ul>
</div>
</div> -->
</div>
<table class="table border my-3">
<thead>
<tr class="bg-success">
<th scope="col" class="text-white">Ürün & Hizmet Adı</th>
<th scope="col" class="text-white">Açıklama</th>
<th scope="col" class="text-white">Miktar</th>
<th scope="col" class="text-white">Fiyat</th>
<th scope="col" class="text-white">Toplam</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($teklif_baslik['kalemler'])){
$i = 0;
$toplam = 0;
$ara_toplam = 0;
foreach(json_decode($teklif_baslik['kalemler']) as $kalem){ ?>
<tr>
<td>
<b><?php echo $kalem->kalem_baslik; ?></b>
</td>
<td><?php echo $kalem->kalem_aciklama; ?></td>
<td><?php echo $kalem->kalem_miktar; ?></td>
<td><?php echo $kalem->kalem_fiyat; ?></td>
<td><?php echo $aratop = number_format($kalem->kalem_miktar * $kalem->kalem_fiyat); ?> <?php echo $doviz_tipi; ?> </td>
</tr>
<?php $toplam += $kalem->kalem_miktar * $kalem->kalem_fiyat; }
}
?>
<tr>
<td></td>
<td></td>
<td></td>
<td class="fw-bold">Ara Toplam</td>
<td class="fw-bold"><?php echo number_format($toplam); ?> <?php echo $doviz_tipi; ?> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="fw-bold">KDV</td>
<td class="fw-bold"><?php echo 0; ?> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-success fs-5 fw-bold">Genel Toplam</td>
<td class="text-success fs-5 fw-bold"><?php echo number_format($toplam); ?> <?php echo $doviz_tipi; ?></td>
</tr>
</tbody>
</table>
<div class="bg-light rounded-5 p-3">
<div class="row mt-4 mb-5">
<div class="col-md-12 mt-5 mt-md-0">
<h5 class="fw-bold mb-4 ">Şartlar & Koşullar</h5>
<?php
if(!empty($teklif_baslik['kosullar'])){
foreach(json_decode($teklif_baslik['kosullar']) as $key => $kosul){
$ksl = 'kosul_'.$i;
if($kosul->kosul_1 != ""){ echo '<li>'.$kosul->kosul_1.'</li>'; }
if($kosul->kosul_2 != ""){ echo '<li>'.$kosul->kosul_2.'</li>'; }
if($kosul->kosul_3 != ""){ echo '<li>'.$kosul->kosul_3.'</li>'; }
if($kosul->kosul_4 != ""){ echo '<li>'.$kosul->kosul_4.'</li>'; }
if($kosul->kosul_5 != ""){ echo '<li>'.$kosul->kosul_5.'</li>'; }
if($kosul->kosul_6 != ""){ echo '<li>'.$kosul->kosul_6.'</li>'; }
if($kosul->kosul_7 != ""){ echo '<li>'.$kosul->kosul_7.'</li>'; }
if($kosul->kosul_8 != ""){ echo '<li>'.$kosul->kosul_8.'</li>'; }
if($kosul->kosul_9 != ""){ echo '<li>'.$kosul->kosul_9.'</li>'; }
}
}
?>
</div>
</div>
<!--
<div class="text-center mt-5">
<p class="text-muted"><span class="fw-semibold">NOTICE: </span> A finance charge of 1.5% will be
made on
unpaid balances after 30 days.</p>
</div>
</div>
<div id="footer-bottom">
<div class="container mt-5 border-top">
<div class="row mt-4">
<div class="col-md-6 copyright">
<p>© 2024 Invoice. All Rights Reserved.</p>
</div>
<div class="col-md-6 text-md-end">
<p>Free HTML Template by: <a href="https://templatesjungle.com/" target="_blank"
class="text-decoration-none text-black-50">
TemplatesJungle</a> </p>
</div>
</div>
</div>
</div> -->
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
<script>
/*
window.addEventListener("load", window.print());
window.onafterprint = function(event) { window.close(); };
*/
</script>
</body>
</html>
include 'db.php';
$date = date("Y-m-d");
if(isset($_GET['teklif_id'])){
$teklif_id = $_GET['teklif_id'];
$teklif_baslik = $db->query("SELECT tf.tarih as teklif_tarihi, tf.DOVIZ_TIPI, mst.musteri_mail, mst.musteri_adres, mst.musteri_telefon, tf.id as teklif_id, tf.kosullar, tf.musteri_id, mst.musteri_adi as musteri_adi, tf.isin_adi, tf.teklifi_hazirlayan, tf.durum, tf.kalemler FROM teklifler tf left join musteriler mst On mst.id = tf.musteri_id WHERE tf.id = '$teklif_id' ORDER BY tf.id DESC LIMIT 1" )->fetch(PDO::FETCH_ASSOC);
if($teklif_baslik['DOVIZ_TIPI'] == 0 ){ $doviz_tipi = '₺'; }
else if($teklif_baslik['DOVIZ_TIPI'] == 1 ) { $doviz_tipi = '$'; }
else if($teklif_baslik['DOVIZ_TIPI'] == 2 ) { $doviz_tipi = '€'; }
/*
$teklif_baslik = $db->query("SELECT t.id, t.teklifi_hazirlayan, t.tarih, t.kayit_eden, t.kayit_tarihi, m.musteri_adi, m.musteri_adres, m.musteri_mail, m.musteri_yetkili, m.musteri_telefon, m.sektor_id, t.musteri_id, t.genel_toplam from teklif_baslik t LEFT JOIN musteriler m On m.id = t.musteri_id WHERE t.id = '$teklif_id' ")->fetch(PDO::FETCH_ASSOC); */
$ayar = $db->query("SELECT * FROM ayar")->fetch(PDO::FETCH_ASSOC);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teklif Formu-#<?php echo $teklif_id; ?></title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<section id="invoice">
<div class="container my-md-2 py-1">
<!--
<div class=" d-md-flex justify-content-between align-items-center mb-5 ">
<div class="mt-5 mt-md-0">
<h2 class="display-6 text-success fw-bold">Gerçek Bilgisayar Teklif Formu </h2>
<p class="m-0">Teklif No : # <?= $teklif_id; ?></p>
</div>
<div class="mt-5 mt-md-0">
<img src="images/logo_dark.png" alt="">
</div>
</div> -->
<div class="row" style="padding: 15px;">
<div class="col-md-9" style="text-align: left"><img src="upload/<?php echo $ayar_bilgi->logo; ?>" width="350px" height="100px" ></div>
<div class="col-md-3" class="text-right"><h2><?php echo date('Y-m-d'); ?></h2></div>
</div>
<div class="bg-light rounded-5 p-5">
<div class="d-md-flex justify-content-between">
<div>
<p class="text-success fw-bold">Sayın;</p>
<h6><?php echo $teklif_baslik['musteri_adi']; ?></h6>
<ul class="list-unstyled">
<li><?php echo $teklif_baslik['musteri_mail']; ?></li>
<li><?php echo $teklif_baslik['musteri_adres']; ?></li>
<li><?php echo $teklif_baslik['musteri_telefon']; ?></li>
</ul>
</div>
<div class="text-md-end mt-5 mt-md-0">
<p class="text-dark fw-bold">Teklif Formu - #<?php echo $teklif_id; ?></p>
<h6><?php echo $ayar_bilgi->title; ?></h6>
<ul class="list-unstyled">
<li><?php echo $ayar_bilgi->email; ?></li>
<li><?php echo $ayar_bilgi->telefon; ?></li>
<li><?php echo $ayar_bilgi->adres; ?></li>
<li><?php echo $ayar_bilgi->website; ?></li>
</ul>
</div>
</div>
<!--
<div class="d-md-flex justify-content-between mt-4">
<div class="mt-5 mt-md-0">
<p class="text-success fw-bold">Ödeme Bilgileri</p>
<h5>Payment Info</h5>
<ul class="list-unstyled">
<li><span class="fw-semibold">Account No: </span> 102 3345 56938</li>
<li><span class="fw-semibold">Account Name: </span> William Peter</li>
<li><span class="fw-semibold">Branch Name: </span> XYZ </li>
</ul>
</div>
<div class="text-md-end mt-5 mt-md-0">
<p class="text-success fw-bold">Date</p>
<h5>Invoice Date</h5>
<ul class="list-unstyled">
<li><span class="fw-semibold">Invoice Date:</span> 20 May, 2024</li>
<li><span class="fw-semibold">Due Date:</span> 20 June, 2024</li>
</ul>
</div>
</div> -->
</div>
<table class="table border my-3">
<thead>
<tr class="bg-success">
<th scope="col" class="text-white">Ürün & Hizmet Adı</th>
<th scope="col" class="text-white">Açıklama</th>
<th scope="col" class="text-white">Miktar</th>
<th scope="col" class="text-white">Fiyat</th>
<th scope="col" class="text-white">Toplam</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($teklif_baslik['kalemler'])){
$i = 0;
$toplam = 0;
$ara_toplam = 0;
foreach(json_decode($teklif_baslik['kalemler']) as $kalem){ ?>
<tr>
<td>
<b><?php echo $kalem->kalem_baslik; ?></b>
</td>
<td><?php echo $kalem->kalem_aciklama; ?></td>
<td><?php echo $kalem->kalem_miktar; ?></td>
<td><?php echo $kalem->kalem_fiyat; ?></td>
<td><?php echo $aratop = number_format($kalem->kalem_miktar * $kalem->kalem_fiyat); ?> <?php echo $doviz_tipi; ?> </td>
</tr>
<?php $toplam += $kalem->kalem_miktar * $kalem->kalem_fiyat; }
}
?>
<tr>
<td></td>
<td></td>
<td></td>
<td class="fw-bold">Ara Toplam</td>
<td class="fw-bold"><?php echo number_format($toplam); ?> <?php echo $doviz_tipi; ?> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="fw-bold">KDV</td>
<td class="fw-bold"><?php echo 0; ?> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-success fs-5 fw-bold">Genel Toplam</td>
<td class="text-success fs-5 fw-bold"><?php echo number_format($toplam); ?> <?php echo $doviz_tipi; ?></td>
</tr>
</tbody>
</table>
<div class="bg-light rounded-5 p-3">
<div class="row mt-4 mb-5">
<div class="col-md-12 mt-5 mt-md-0">
<h5 class="fw-bold mb-4 ">Şartlar & Koşullar</h5>
<?php
if(!empty($teklif_baslik['kosullar'])){
foreach(json_decode($teklif_baslik['kosullar']) as $key => $kosul){
$ksl = 'kosul_'.$i;
if($kosul->kosul_1 != ""){ echo '<li>'.$kosul->kosul_1.'</li>'; }
if($kosul->kosul_2 != ""){ echo '<li>'.$kosul->kosul_2.'</li>'; }
if($kosul->kosul_3 != ""){ echo '<li>'.$kosul->kosul_3.'</li>'; }
if($kosul->kosul_4 != ""){ echo '<li>'.$kosul->kosul_4.'</li>'; }
if($kosul->kosul_5 != ""){ echo '<li>'.$kosul->kosul_5.'</li>'; }
if($kosul->kosul_6 != ""){ echo '<li>'.$kosul->kosul_6.'</li>'; }
if($kosul->kosul_7 != ""){ echo '<li>'.$kosul->kosul_7.'</li>'; }
if($kosul->kosul_8 != ""){ echo '<li>'.$kosul->kosul_8.'</li>'; }
if($kosul->kosul_9 != ""){ echo '<li>'.$kosul->kosul_9.'</li>'; }
}
}
?>
</div>
</div>
<!--
<div class="text-center mt-5">
<p class="text-muted"><span class="fw-semibold">NOTICE: </span> A finance charge of 1.5% will be
made on
unpaid balances after 30 days.</p>
</div>
</div>
<div id="footer-bottom">
<div class="container mt-5 border-top">
<div class="row mt-4">
<div class="col-md-6 copyright">
<p>© 2024 Invoice. All Rights Reserved.</p>
</div>
<div class="col-md-6 text-md-end">
<p>Free HTML Template by: <a href="https://templatesjungle.com/" target="_blank"
class="text-decoration-none text-black-50">
TemplatesJungle</a> </p>
</div>
</div>
</div>
</div> -->
</div>
</section>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
<script>
/*
window.addEventListener("load", window.print());
window.onafterprint = function(event) { window.close(); };
*/
</script>
</body>
</html>