klcefkan adlı üyeden alıntı: mesajı görüntüle
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mutabakat</title>
<style>
/* Genel stil */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}

.container {
width: 90%;
max-width: 1200px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #ddd;
}

.header img {
height: 100px;
}

.footer {
margin-top: 20px;
text-align: center;
}

.footer button {
padding: 10px 20px;
background-color: #007bff;
font-size: 16px;
color: #fff;
border: none;
cursor: pointer;
border-radius: 5px;
}

.footer button:hover {
background-color: #0056b3;
}

/* Form ve Tablo stil */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}

th, td {
padding: 10px;
text-align: left;
border: 1px solid #ddd;
}

th {
background-color: #f4f4f4;
}

td {
width: 25%;
}

input[type="text"] {
padding: 8px;
width: 100%;
margin-top: 5px;
border: 1px solid #ddd;
}

.form-container {
margin-top: 10px;
}

input[type="submit"] {
background-color: #008CBA;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 12px;
}

input[type="submit"]:hover {
background-color: #007B9E;
}

/* Responsive Stil */
@media (max-width: 768px) {
.header {
flex-direction: column;
align-items: flex-start;
}

.header img {
height: 80px;
margin-bottom: 10px;
}

table, input[type="submit"] {
font-size: 14px;
}

.footer button {
font-size: 14px;
padding: 8px 15px;
}

.container {
padding: 15px;
margin: 10px;
}
}

@media print {
.footer button {
display: none;
}
}

/* Tablo hizalama düzeni */
.balance-table th, .balance-table td {
width: 25%; /* Bu genişlik ile üstteki tablolar ile hizalanacak */
}

</style>
</head>
<body>
<div class="container">
<div class="header">
<img src="logo.png" alt="Firma Bilgisi">
</div>
<div class="form-container">
<h2>Mutabakat Gönderen Firma Bilgileri</h2>
<table>
<tr>
<th>Firma Ünvanı</th>
<td>Gönderici Firma A.Ş.</td>
<th>Vergi Dairesi</th>
<td>Kurumlar V.D.</td>
</tr>
<tr>
<th>Firma Yetkilisi</th>
<td>Yetkili Ad Soyad</td>
<th>Vergi Numarası</th>
<td>0000000000</td>
</tr>
<tr>
<th>Firma Email</th>
<td>yetkili@mail.com</td>
<th>Adres</th>
<td>Firmanın Adresi</td>
</tr>
<tr>
<th>Firma Telefon</th>
<td>90 212 000 00 00</td>
<th>Firma Faks</th>
<td>90 212 000 00 00</td>
</tr>
</table>

<form name="mutabakatForm" action="islem.php" method="post" onsubmit="return validateForm()" enctype="multipart/form-data">
<h2>Mutabakat Bilgileri</h2>
<table>
<tr>
<th>Firma Ünvanı</th>
<td><?php echo htmlspecialchars($row['CUSTOMER']); ?></td>
<th>Mutabakat Dönemi</th>
<td><?php echo date('d-m-Y', strtotime($row['DONEMILK'])); ?> - <?php echo date('d-m-Y', strtotime($row['DONEMSON'])); ?></td>
</tr>
<tr>
<th>Firma E-Mail</th>
<td><?php echo htmlspecialchars($row['MAIL']); ?></td>
<th>Onaylayan IP</th>
<td><?php if (!empty($row['CEVAPIP'])) {
echo htmlspecialchars($row['CEVAPIP']);
} else {
echo htmlspecialchars($kullanici_ip);
} ?></td>
</tr>
<tr>
<th>Firma Yetkilisi</th>
<td><?php echo htmlspecialchars($row['NAME']); ?></td>
<th>Mutabakat Tarihi</th>
<td><?php echo date('d-m-Y', strtotime($row['TARIH'])); ?></td>
</tr>
<tr>
<th>Durum</th>
<td><?php
if ($row['DURUM'] === 'Evet') {
echo "Mutabık";
} elseif ($row['DURUM'] === 'Hayır') {
echo "Mutabık Değil";
} else {
echo "Mutabakat Bekleniyor";
} ?>
</td>
<th>Yanıtlayan</th>
<td><?php
if (!empty($row['ONAYLAYAN'])) {
$cevaptar = new DateTime($row['CEVAPTAR']);
echo htmlspecialchars($row['ONAYLAYAN']) . " (" . $cevaptar->format('d-m-Y H:i:s') . ")";
} else {
echo '<input type="text" name="onaylayan" placeholder="Adınız Soyadınız" required>';
}
?></td>
</tr>
</table>

<!-- Borç / Alacak, Bakiye, Para Birimi Tablosu -->
<table class="balance-table">
<tr>
<th>Borç / Alacak</th>
<td><?php echo htmlspecialchars($row['BAKTUR']); ?></td>
</tr>
<tr>
<th>Bakiye</th>
<td><?php echo htmlspecialchars($row['BAKIYE']); ?></td>
</tr>
<tr>
<th>Para Birimi</th>
<td><?php echo htmlspecialchars($row['CURRENCY']); ?></td>
</tr>
</table>

<div class="footer">
<div class="button-group">
<?php if (empty($row['DURUM'])): ?>
<button type="button" onclick="selectOption('Evet')">Mutabıkız</button>
<button type="button" onclick="selectOption('Hayır')">Mutabık Değiliz</button>
<?php endif; ?>
</div><br>

<?php if (empty($row['DURUM'])): ?>
<input type="hidden" id="durum" name="durum" value="">
<input type="submit" value="Gönder">
<?php endif; ?>

<!-- DURUM "Evet" ise yazdırma butonu -->
<?php if ($row['DURUM'] === 'Evet'): ?>
<button onclick="printPage()">Mutabakatı Yazdır</button>
<?php endif; ?>
</div>
</form>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mutabakat</title>
<style>
/* Genel stil */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}

.container {
width: 90%;
max-width: 1200px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #ddd;
}

.header img {
height: 100px;
}

.footer {
margin-top: 20px;
text-align: center;
}

.footer button {
padding: 10px 20px;
background-color: #007bff;
font-size: 16px;
color: #fff;
border: none;
cursor: pointer;
border-radius: 5px;
}

.footer button:hover {
background-color: #0056b3;
}

/* Form ve Tablo stil */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}

th, td {
padding: 10px;
text-align: left;
border: 1px solid #ddd;
}

th {
background-color: #f4f4f4;
}

td {
width: 25%;
}

input[type="text"] {
padding: 8px;
width: 100%;
margin-top: 5px;
border: 1px solid #ddd;
}

.form-container {
margin-top: 10px;
}

input[type="submit"] {
background-color: #008CBA;
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 12px;
}

input[type="submit"]:hover {
background-color: #007B9E;
}

/* Responsive Stil */
@media (max-width: 768px) {
.header {
flex-direction: column;
align-items: flex-start;
}

.header img {
height: 80px;
margin-bottom: 10px;
}

table, input[type="submit"] {
font-size: 14px;
}

.footer button {
font-size: 14px;
padding: 8px 15px;
}

.container {
padding: 15px;
margin: 10px;
}
}

@media print {
.footer button {
display: none;
}
}

/* Tablo hizalama düzeni */
.balance-table th, .balance-table td {
width: 25%; /* Bu genişlik ile üstteki tablolar ile hizalanacak */
}

/* Tablo sütun hizalamalarını düzeltme */
.form-container table th,
.form-container table td {
width: 25%;
text-align: left;
}

/* Tablo hizalama ve kayma engelleme */
.form-container table {
table-layout: fixed;
}

</style>
</head>
<body>
<div class="container">
<div class="header">
<img src="logo.png" alt="Firma Bilgisi">
</div>
<div class="form-container">
<h2>Mutabakat Gönderen Firma Bilgileri</h2>
<table>
<tr>
<th>Firma Ünvanı</th>
<td>Gönderici Firma A.Ş.</td>
<th>Vergi Dairesi</th>
<td>Kurumlar V.D.</td>
</tr>
<tr>
<th>Firma Yetkilisi</th>
<td>Yetkili Ad Soyad</td>
<th>Vergi Numarası</th>
<td>0000000000</td>
</tr>
<tr>
<th>Firma Email</th>
<td>yetkili@mail.com</td>
<th>Adres</th>
<td>Firmanın Adresi</td>
</tr>
<tr>
<th>Firma Telefon</th>
<td>90 212 000 00 00</td>
<th>Firma Faks</th>
<td>90 212 000 00 00</td>
</tr>
</table>

<form name="mutabakatForm" action="islem.php" method="post" onsubmit="return validateForm()" enctype="multipart/form-data">
<h2>Mutabakat Bilgileri</h2>
<table>
<tr>
<th>Firma Ünvanı</th>
<td><?php echo htmlspecialchars($row['CUSTOMER']); ?></td>
<th>Mutabakat Dönemi</th>
<td><?php echo date('d-m-Y', strtotime($row['DONEMILK'])); ?> - <?php echo date('d-m-Y', strtotime($row['DONEMSON'])); ?></td>
</tr>
<tr>
<th>Firma E-Mail</th>
<td><?php echo htmlspecialchars($row['MAIL']); ?></td>
<th>Onaylayan IP</th>
<td><?php if (!empty($row['CEVAPIP'])) {
echo htmlspecialchars($row['CEVAPIP']);
} else {
echo htmlspecialchars($kullanici_ip);
} ?></td>
</tr>
<tr>
<th>Firma Yetkilisi</th>
<td><?php echo htmlspecialchars($row['NAME']); ?></td>
<th>Mutabakat Tarihi</th>
<td><?php echo date('d-m-Y', strtotime($row['TARIH'])); ?></td>
</tr>
<tr>
<th>Durum</th>
<td><?php
if ($row['DURUM'] === 'Evet') {
echo "Mutabık";
} elseif ($row['DURUM'] === 'Hayır') {
echo "Mutabık Değil";
} else {
echo "Mutabakat Bekleniyor";
} ?>
</td>
<th>Yanıtlayan</th>
<td><?php
if (!empty($row['ONAYLAYAN'])) {
$cevaptar = new DateTime($row['CEVAPTAR']);
echo htmlspecialchars($row['ONAYLAYAN']) . " (" . $cevaptar->format('d-m-Y H:i:s') . ")";
} else {
echo '<input type="text" name="onaylayan" placeholder="Adınız Soyadınız" required>';
}
?></td>
</tr>
</table>

<!-- Borç / Alacak, Bakiye, Para Birimi Tablosu -->
<table class="balance-table">
<tr>
<th>Borç / Alacak</th>
<td><?php echo htmlspecialchars($row['BAKTUR']); ?></td>
</tr>
<tr>
<th>Bakiye</th>
<td><?php echo htmlspecialchars($row['BAKIYE']); ?></td>
</tr>
<tr>
<th>Para Birimi</th>
<td><?php echo htmlspecialchars($row['CURRENCY']); ?></td>
</tr>
</table>

<div class="footer">
<div class="button-group">
<?php if (empty($row['DURUM'])): ?>
<button type="button" onclick="selectOption('Evet')">Mutabıkız</button>
<button type="button" onclick="selectOption('Hayır')">Mutabık Değiliz</button>
<?php endif; ?>
</div><br>

<?php if (empty($row['DURUM'])): ?>
<input type="hidden" id="durum" name="durum" value="">
<input type="submit" value="Gönder">
<?php endif; ?>

<!-- DURUM "Evet" ise yazdırma butonu -->
<?php if ($row['DURUM'] === 'Evet'): ?>
<button onclick="printPage()">Mutabakatı Yaz