| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/mybackend/orders/ |
Upload File : |
<?php require_once("../include/class.php");?>
<?php require_once("../include/header.php");?>
<?php require_once("../include/nav_top.php");?>
<?php require_once("../include/sidebar.php");?>
<?php include("table_name.php");?>
<div id="main-content">
<div class="container-fluid">
<ul class="breadcrumb">
<li><a href="../<?php echo $name_folder; ?>/list.php"><?php echo ucfirst($name_table) ?></a><span class="divider">»</span></li>
<li class="active">List</li>
</ul>
<div class="row-fluid">
<div class="span12">
<div class="widget-block">
<div class="widget-head">
<h5>List</h5>
<div class="widget-control pull-right">
<a href="../<?php echo $name_folder ?>/list.php" data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="add.php"><i class="icon-plus"></i> Add New</a></li>
<!--<li><a href="#"><i class="icon-ok"></i> Bulk Approved</a></li>
<li><a href="#"><i class="icon-minus-sign"></i> Bulk Remove</a></li>-->
</ul>
</div>
</div>
<div class="widget-content">
<div class="widget-box">
<?php
if($_SESSION['er']=='true')
{
?>
<div class="alert alert-success fade in">
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>บันทึก</strong> เสร็จแล้วร้อยค่ะ
</div>
<?php
}
if($_SESSION['er']=='true-mail')
{
?>
<div class="alert alert-success fade in">
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>บันทึก และ ส่ง E-mail </strong> เสร็จแล้วร้อยค่ะ
</div>
<?php
}
if($_SESSION['er']=='de_true')
{
?>
<div class="alert alert-success fade in">
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>ลบข้อมูล</strong> เสร็จแล้วร้อยค่ะ
</div>
<?php
}
if($_SESSION['er']=='false')
{
?>
<div class="alert alert-error fade in">
<button data-dismiss="alert" class="close" type="button">×</button>
<strong>ระบบขัดข้อง</strong> กรุณาทำรายการใหม่ค่ะขอบคุณค่ะ
</div>
<?php
}
?>
<?php
$max_rows = 12; // แสดงจำนวนแถวต่อหน้า
$page_number = 0;
if(isset($_GET['page_number']))
{
$page_number = $_GET['page_number'];
}
$sql_s = ' id > 0';
$all_array = array('table'=>$name_table,'where'=>$sql_s);
$start_row = $page_number * $max_rows;
$all_sql = $view_db->view($all_array);
$all_result = $view_db->q_re($all_sql);
$total_rows = $view_db->q_nr($all_result);
$total_rows_num = mysqli_num_rows($all_result);
$total_pages = ceil($total_rows/$max_rows)-1;
////////////////////////////////////////
$list = array('table'=>$name_table,'where'=>$sql_s, 'limit'=> "$start_row,$max_rows",'order'=> "ORDER BY id DESC");
$view = $view_db->view($list);
$result = $view_db->q_re($view);
$num_tr = 1;
$num = 1+($page_number*$max_rows);
$num_o=1;
?>
<div style="padding:15px;color:#F00;">Item number : <?php echo $total_rows_num;?> list</div>
<table class=" table" style="font-size:12px;">
<thead>
<tr>
<th width="7%">
ลำดับ
</th>
<th width="15%">
รายชื่อผู้สั่งซื้อ
</th>
<th width="15%">
ราคารวม
</th>
<th width="15%">
การชำระเงิน
</th>
<th width="10%">
สถานะการชำระเงินออนไลน์
</th>
<th width="10%">
สถานะการสั่งซื่อ
</th>
<th width="15%">
วันที่
</th>
<th width="10%">
การจัดการ
</th>
</tr>
</thead>
<tbody>
<?php
while($row = $view_db->q_ro($result))
{
$sql_os = array('table'=>'order_status','where'=>"name = '".$row['status_pm']."' AND status = 1");
$view_os = $view_db->view($sql_os);
$row_os = $view_db->q($view_os);
$sql_os2 = array('table'=>'order_status','where'=>"id = '".$row['status']."' AND status = 1");
$view_os2 = $view_db->view($sql_os2);
$row_os2 = $view_db->q($view_os2);
?>
<tr>
<td><?php echo $num; ?>. </td>
<td><?php echo $row['name'].' '.$row['lastname']; ?></td>
<td> <?php echo number_format($row['total'], 2, '.', ',');?> ฿ </td>
<td>
<?php
$sql1 = array('table'=>'payment_method ','where'=>"id = '". $row["id_pm"]."'");
$view_sql1 = $view_db->view($sql1);
$row1 = $view_db->q($view_sql1);
echo $row1['name'];
?>
</td>
<td>
<?php echo $row_os['detail']; ?>
</td>
<td>
<?php echo $row_os2['detail']; ?>
</td>
<td style="color:#F00"><?php echo $util_class->day_m_th_re($row['up_date']) ?></td>
<td>
<a href="info.php?id=<?php echo $row['id']?>" title="แสดงรายการ <?php echo $row['name'].' '.$row['lastname']; ?>"><i class="black-icons post_card"></i></a>
<a href="edit.php?id=<?php echo $row['id']?>" title="แก้ไข <?php echo $row['name'].' '.$row['lastname']; ?>"><i class="black-icons pencil"></i></a>
<a href="editimg.php?id=<?php echo $row['id']?>" title="ยืนยันการโอนเงิน <?php echo $row['name'].' '.$row['lastname']; ?>"><i class="black-icons paperclip"></i></a>
<a href="../../cart/order_credit.php?id=<?php echo base64_encode($row['id'])?>" target="_blank" title="Link credit by MPAY <?php echo $row['name'].' '.$row['lastname']; ?>"><i class="black-icons link"></i></a>
<a onClick="if(!confirm('ยืนยัน การลบข้อมูลแบบถาวร ?')){return false;}" href="delete.php?id=<?php echo $row['id']?>" title="ลบ <?php echo $row['name'].' '.$row['lastname']; ?>"><i class="black-icons trashcan"></i></a>
</td>
</tr>
<?php
$num++;
}
?>
</tbody>
</table>
<div >
<div class="row" align="center" style="margin-top:30px;">
<div class="col-md-12 BerDedToday-page">
<?php
if($total_rows_num > 0)
{
page_news($page_number,$total_pages,'list.php','');
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php unset($_SESSION['er']);?>
<?php require_once("../include/footer_js.php");?>
</body>
</html>