Файловый менеджер - Редактировать - /home/d46091/invoice.ecogenix.in/view_challan.php
Назад
<?php // Include database connection require_once('includes/connection.php'); // Check if ID is provided if (!isset($_GET['id']) || empty($_GET['id'])) { header("Location: view_challans.php"); exit(); } $id = mysqli_real_escape_string($conn, $_GET['id']); // Get challan data $query = "SELECT * FROM road_challans WHERE id = '$id'"; $result = mysqli_query($conn, $query); // Check if challan exists if (mysqli_num_rows($result) == 0) { header("Location: view_challans.php"); exit(); } $challan = mysqli_fetch_assoc($result); // Include header require_once('includes/header.php'); ?> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 20px; background-color: #f5f5f5; } .container { max-width: 800px; margin: 0 auto; background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .header { text-align: center; margin-bottom: 30px; } .header h1 { margin: 0; padding: 0; font-size: 24px; text-decoration: underline; } .info-section { display: flex; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; } .info-group { width: 48%; } .info-item { margin-bottom: 15px; } .info-item label { font-weight: bold; display: inline-block; min-width: 120px; } .info-item span { display: inline-block; } table { width: 100%; border-collapse: collapse; margin-bottom: 20px; } table, th, td { border: 1px solid #333; } th, td { padding: 10px; text-align: left; } th { background-color: #f2f2f2; } .driver-info, .disclaimer, .signature { margin-bottom: 20px; } .signature { text-align: left; margin-top: 40px; text-decoration: underline; font-style: italic; } .buttons { text-align: center; margin-top: 20px; display: flex; justify-content: center; gap: 10px; } .btn { padding: 10px 20px; color: white; border: none; cursor: pointer; font-size: 16px; text-decoration: none; border-radius: 4px; display: inline-block; } .print-btn { background-color: #4CAF50; } .edit-btn { background-color: #FF9800; } .delete-btn { background-color: #F44336; } .back-btn { background-color: #2196F3; } @media print { .buttons { display: none; } } </style> <div class="content"> <div class="container"> <div class="header"> <h1>ROAD CHALLAN</h1> </div> <div class="text-center"> <div class="info-item"> <h4><strong><?php echo htmlspecialchars($challan['consignorName']); ?><br><?php echo htmlspecialchars($challan['consignorAddress']); ?>, <br>+91 <?php echo htmlspecialchars($challan['consignorPhone']); ?>, Pincode - <?php echo htmlspecialchars($challan['consignorPincode']); ?></strong></h4> </div> </div> <div class="info-section"> <div class="info-group"> <div class="info-item"> <label>Name:</label> <span><?php echo htmlspecialchars($challan['name']); ?></span> </div> <div class="info-item"> <label>Address:</label> <span><?php echo htmlspecialchars($challan['address1']); ?></span> </div> </div> <div class="info-group"> <div class="info-item"> <label>Challan No.:</label> <span><?php echo htmlspecialchars($challan['challan_no']); ?></span> </div> <div class="info-item"> <label>Date:</label> <span><?php echo htmlspecialchars($challan['date']); ?></span> </div> <div class="info-item"> <label>Destination:</label> <span><?php echo htmlspecialchars($challan['destination']); ?></span> </div> <div class="info-item"> <label>Vehicle No.:</label> <span><?php echo htmlspecialchars($challan['vehicle_no']); ?></span> </div> <div class="info-item"> <label>DRIVER NO:</label> <span><?php echo htmlspecialchars($challan['driver_no']); ?></span> </div> <div class="info-item"> <label>Purchase Order No.:</label> <span><?php echo htmlspecialchars($challan['purchase_order_no']); ?></span> </div> </div> </div> <table> <thead> <tr> <th>Quantity</th> <th>Description of Goods</th> <th> HSN</th> </tr> </thead> <tbody> <tr> <td><?php echo htmlspecialchars($challan['quantity']); ?></td> <td> <?php echo htmlspecialchars($challan['description']); ?> </td> <td> <?php echo htmlspecialchars($challan['hsn']); ?> </td> </tr> </tbody> </table> <div class="disclaimer"> We are not responsible for Quality, Quantity, <br> Weight etc. after delivery of goods. </div> <div class="signature"> Receiver's Signature with Seal </div> <div class="buttons"> <a href="print_challan.php?id=<?php echo $challan['id']; ?>" class="btn print-btn">Print</a> <!-- <a href="edit_challan.php?id=<?php echo $challan['id']; ?>" class="btn edit-btn">Edit</a> <a href="delete_challan.php?id=<?php echo $challan['id']; ?>" class="btn delete-btn" onclick="return confirm('Are you sure you want to delete this challan?');">Delete</a> --> <a href="challan.php" class="btn back-btn">Back to List</a> </div> </div> </div> <?php // Include footer require_once('includes/footer.php'); // Close the database connection mysqli_close($conn); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка