| Server IP : 46.202.172.170 / Your IP : 216.73.216.59 Web Server : LiteSpeed System : Linux fr-int-web1904.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64 User : u627918583 ( 627918583) PHP Version : 8.2.28 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u627918583/domains/techtime-om.com/public_html/controlPanel/ |
Upload File : |
<?php
include "master.php";
if(isset($_POST['btnAdd'])){
$id_code = $_POST['id_code'];
if (isset($_POST['code'])) {
$code = $_POST['code'];
}else {
$code = 0;
}
$sql = "UPDATE `orders` SET `code`='$code' WHERE `id` = $id_code";
$rs = $db->dbQuery($sql);
$err = "تم التعديل بنجاح";
echo '<script>
$(document).ready(function(){
$("#snackbar").addClass("show");
setTimeout(function(){
$("#snackbar").removeClass("show");
}, 3000);
});
</script>';
echo "<meta http-equiv='refresh' content='3;URL=order.php'>";
}
?>
<div class="row">
<div class="col-sm-12">
<div class="card-box table-responsive">
<div class="col-md-2 pull-right">
<a href="delete-all-order.php" onclick="return confirm('هل انت متأكد !!');" class="btn btn-danger form-control text-white">حذف جميع الطلبات</a>
</div>
<h4 class="header-title m-t-0 m-b-30">الطلبات</h4>
<table id="datatable" class="table table-striped table-bordered" style="text-align: center;">
<thead>
<tr>
<th style="text-align: center;">#</th>
<th style="text-align: center;">رقم الطلب</th>
<th style="text-align: center;">الأسم</th>
<th style="text-align: center;">الايميل</th>
<th style="text-align: center;">واتساب</th>
<th style="text-align: center;">الاقساط</th>
<th style="text-align: center;">الدفعة</th>
<th style="text-align: center;">الدولة</th>
<th style="text-align: center;">OFF/IN CODE</th>
<th style="text-align: center;">الحالة</th>
</tr>
</thead>
<tbody>
<?php
$db = new Database();
$query = "SELECT * FROM `orders`";
$result = $db->dbQuery($query);
if($db->dbNumRows( $result)){
$rows = $db->dbFetchResult($result);
foreach($rows as $row){ ?>
<tr>
<th scope="row"> <?= $row[0]; ?></th>
<td> <?= $row['user']; ?> </td>
<td> <?= $row['name']; ?> </td>
<td> <?= $row['email']; ?> </td>
<td> <?= $row['whatsapp']; ?> </td>
<td> <?= $row['Installment'] != '' ? ($row['Installment'] == 0 ? 'نقدا' : $row['Installment'] . ' اشهر') : ''; ?></td>
<td> <?= $row['FirstBatch']; ?></td>
<td> <?= $row['coin']; ?></td>
<td>
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="col-md-4">
<input type="hidden" name="id_code" value="<?= $row['id']; ?>">
<input type="checkbox" name="code" id="" value="1" <?= $row['code'] == 1 ? 'checked' : 0 ?>>
</div>
<div class="form-group center" >
<button type="submit" name="btnAdd" id="success-alert" class="btn btn-xs btn-success text-white">تعديل</button>
</div>
</form>
</td>
<td>
<a class="btn btn-xs btn-success text-white" href="view-order.php?&id=<?= $row[0] ?>"><i class="fa fa-eye fa-fw"></i> عرض الطلب</a>
<a class="btn btn-xs btn-warning text-white" href="invoice.php?&id=<?= $row['user'] ?>"><i class="fa fa-eye fa-fw"></i> فاتورة </a>
<a class="btn btn-xs btn-warning text-white" href="hasibat.php?&id=<?= $row['user'] ?>"><i class="fa fa-eye fa-fw"></i> حاسبات </a>
<a class="btn btn-xs btn-warning text-white" href="installmet.php?id=<?= $row['user']; ?>"><i class="fa fa-eye fa-fw"></i> عقد التقسيط </a>
<a class="btn btn-xs btn-warning text-white" href="RecepitVoucher.php?&id=<?= $row['user'] ?>"><i class="fa fa-eye fa-fw"></i> سند قبض </a>
<a class="btn btn-xs btn-danger text-white" href="delete-order.php?id=<?= $row[0] ?>" onclick="return confirm('هل انت متأكد !!');"><i class="fa fa-trash-o"></i></a>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div><!-- end col -->
</div>
<!-- end row -->
<?php
include "footer.php";
?>