<?php require_once 'header.inc.php'; include_once '../backend/config/autoload.inc.php'; if (!isset($_SESSION['u_id'])) { echo "<meta http-equiv='refresh' content='0;url=index.php'>"; exit; } use classes as cls; $order = new cls\order(); $data_order = $order->get_order_all(); ?> <div class="clearfix"></div> <div class="content"> <h2 class="title">รายการสั่งซื้อสินค้า</h2> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>Order ID</th> <th>ราคารวม</th> <th>วันที่ทำรายการ</th> <th>สถานะการจ่ายเงิน</th> </tr> </thead> <tbody> <?php $i = 1; foreach ($data_order as $k => $v) { ?>
<?php require_once 'header.inc.php'; if (!isset($_SESSION['member_id']) || !isset($_GET['cash_id'])) { echo "<meta http-equiv='refresh' content='0;url=index.php'>"; exit; } use classes as cls; $order = new cls\order(); $order->member_id = $_SESSION['member_id']; $order->cash_id = $_GET['cash_id']; $data = array(); $data = $order->get_cash_detail(); /* [cash_id] => 00000000003 [request_cash] => 250.07 [status] => pending [date_added] => 2016-01-31 16:10:59 [date_expired] => 1970-01-02 07:00:00 [manager_id] => 0 [date_update_status] => 2016-01-31 16:10:59 [order_id] => 00000000005 [member_id] => 00000000005 */ // $expire = 60 * 60 * 24; // มีค่าเท่ากับ 1 วัน // print 'current time : ' . time() . '<BR>'; // print $data['date_expired'] . ' = expire date : ' . strtotime($data['date_expired']); // exit; if ($data['status'] == 'pending') { $current = time(); $expire_date = strtotime($data['date_expired']);
<?php require_once 'header.inc.php'; if (!isset($_SESSION['member_id']) || !isset($_GET['product_id'])) { echo "<meta http-equiv='refresh' content='0;url=list-product.php'>"; exit; } // require_once 'backend/config/autoload.inc.php'; use classes as cls; $product = new cls\product(); $order = new cls\order(); $product->product_id = $_GET['product_id']; $product->member_id = $_SESSION['member_id']; $data = $product->get_product_by_product_id('all'); if ($data === false) { echo "<meta http-equiv='refresh' content='0;url=list-product.php'>"; exit; } if (count($data) == 0) { echo "<meta http-equiv='refresh' content='0;url=list-product.php'>"; exit; } $order->product_id = $_GET['product_id']; $count_order = $order->count_order_by_product_id(); ?> <div class="content"> <br /> <div class="col-md-6"> <img src="uploads/member_<?php echo $_SESSION['member_id'] . DS . $data['product_mockup']; ?>
<?php session_start(); require_once 'config/autoload.inc.php'; use classes as cls; $order = new cls\order(); $data = array(); $data = json_decode($_POST['data'], 1); $new_data = array(); foreach ($data as $key => $value) { $new_data[$value['name']] = $value['value']; } /* [cash_id] => 00000000003 [order_id] => 00000000005 [bank_to] => กสิกรไทย [request_cash] => 250.07 [hidden-request_cash] => 250.07 [transfer-detail] => messages */ $order->member_id = $_SESSION['member_id']; $order->cash_id = $new_data['cash_id']; $order->order_id = $new_data['order_id']; if ($order->update_cash_status($new_data['request_cash'], $new_data['bank_to'], $new_data['transfer-detail'])) { print 1; } else { print 0; }
<?php require_once 'header.inc.php'; if (!isset($_SESSION['member_id'])) { echo "<meta http-equiv='refresh' content='0;url=index.php'>"; exit; } use classes as cls; $order = new cls\order(); $member = new cls\member(); $product = new cls\product(); $data_detail = $order->get_order_detail_by_order_id($_GET['order_id']); ?> <div class="clearfix"></div> <div class="content"> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>รูปภาพ</th> <th>ชื่อลาย</th> <th>ราคาเคดิต</th> <th>จำนวนซื้อ</th> <th>รวม (บาท)</th> <th>วันที่ทำรายการ</th> <th>สถานะ</th> </tr> </thead> <tbody> <?php
<?php require_once 'header.inc.php'; if (!isset($_SESSION['member_id'])) { echo "<meta http-equiv='refresh' content='0;url=index.php'>"; exit; } use classes as cls; $order = new cls\order(); $order->member_id = $_SESSION['member_id']; $data_order = $order->get_order_by_member_id(); ?> <div class="clearfix"></div> <div class="content"> <h2 class="title">รายการสั่งซื้อสินค้า</h2> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>Order ID</th> <th>ราคารวม</th> <th>วันที่ทำรายการ</th> <th>ประเภทการสั่งซื้อ</th> <th>สถานะ</th> </tr> </thead> <tbody> <?php $i = 1; foreach ($data_order as $k => $v) {
<?php session_start(); if (!isset($_SESSION['member_id']) || !isset($_POST['data'])) { echo "<meta http-equiv='refresh' content='0;url=index.php'>"; exit; } require_once 'config/autoload.inc.php'; use classes as cls; $order = new cls\order(); $member = new cls\member(); $product = new cls\product(); $data = json_decode($_POST['data'], 1); $rows = $data[0]['value']; $new_data = array(); foreach ($data as $key => $value) { $new_data[$value['name']] = $value['value']; } /* Array ( [txt_amount1] => 1 [hidden_rows] => 2 [slc_size1] => s [txt_detail1] => aaa [txt_address1] => bbb [txt_amount2] => 1 [slc_size2] => m [txt_detail2] => ccc [txt_address2] => ddd )