<html lang="tr"> <head> <meta charset="UTF-8"> <meta name="viewport" c initial-scale=1.0"> <title>Sepetim</title> <style> body, html { height: 100%; margin: 0; padding: 0; font-family: Arial, sans-serif; background-color: #f2f2f2; color: #333; } .container { display: flex; justify-content: center; align-items: center; min-height: 100vh; flex-direction: column; } .content { max-width: 80%; text-align: center; border: 2px solid #333; border-radius: 10px; padding: 20px; background-color: #fff; } table { width: 100%; max-width: 1000px; margin: 20px auto; border-collapse: collapse; color: #333; background-color: #fff; } th, td { padding: 15px; border-bottom: 1px solid #ddd; } th { background-color: #333; color: #fff; } tr:hover { background-color: #f2f2f2; } .confirm-button { background-color: #4CAF50; border: none; color: white; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; border-radius: 5px; cursor: pointer; transition-duration: 0.4s; } .confirm-button:hover { background-color: #45a049; } .success-message { color: green; font-weight: bold; display: none; } .notification { background-color: #333; color: #fff; padding: 10px; margin-top: 20px; border: 2px solid #fff; border-radius: 5px; margin-bottom: 20px; } </style> </head> <body>
Sepetim <?php function createNotification($urun_kodu, $order_quantity_36, $order_quantity_38, $order_quantity_40, $order_quantity_42) { $notification = "Ürün Kodu: " . $urun_kodu . "
"; $notification .= "36 Beden Adeti: " . $order_quantity_36 . "
"; $notification .= "38 Beden Adeti: " . $order_quantity_38 . "
"; $notification .= "40 Beden Adeti: " . $order_quantity_40 . "
"; $notification .= "42 Beden Adeti: " . $order_quantity_42 . "
"; $file = 'bildirimler.txt'; $current = file_get_contents($file); $current .= $notification . "
"; // Her bildirim için 1 satır file_put_contents($file, $current); } if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['order_submit'])) { $urun_kodu = $_POST['urun_kodu']; $order_quantity_36 = $_POST['order_quantity_36']; $order_quantity_38 = $_POST['order_quantity_38']; $order_quantity_40 = $_POST['order_quantity_40']; $order_quantity_42 = $_POST['order_quantity_42']; echo "

Sepetinizdeki ürün: $urun_kodu

"; echo "

36 Beden: $order_quantity_36 adet

"; echo "

38 Beden: $order_quantity_38 adet

"; echo "

40 Beden: $order_quantity_40 adet

"; echo "

42 Beden: $order_quantity_42 adet

"; createNotification($urun_kodu, $order_quantity_36, $order_quantity_38, $order_quantity_40, $order_quantity_42); } else { echo "

Sepetinizde ürün bulunmamaktadır.

"; } ?> >" method="post"> <input class="confirm-button" type="submit" name="order_submit" value="ONAYLA"> </form>

Siparişiniz alındı.

<?php $file = 'bildirimler.txt'; if(file_exists($file)) { $contents = file_get_contents($file); $lines = explode("
", $contents); $total_lines = count($lines); $num_columns = ceil($total_lines / 8); // Toplam bildirimlerin sütun sayısını hesapla for ($i = 0; $i < $num_columns; $i++) { echo "
"; for ($j = 0; $j < 8; $j++) { $index = $i * 8 + $j; if ($index < $total_lines) { echo $lines[$index] . "
"; } } echo "
"; } } else { echo "Bildirim bulunmamaktadır."; } ?>
[removed] document.getElementById('orderForm').addEventListener('submit', function(event) { document.getElementById('successMessage').style.display = 'block'; document.querySelector('.confirm-button').style.display = 'none'; }); [removed] </body> </html>