<?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=login.php'>";
    exit;
}
use classes as cls;
$product = new cls\product();
?>
<div class="container">
    <h1>รายการลายเสื้อรอยืนยันราคา</h1>
    <div class="table-responsive">

        <table class="table">
            <thead>
                <tr>
                    <th>#</th>
                    <th>Mock up</th>
                    <th>Product ID</th>
                    <th>ชื่อลาย</th>
                    <th>วันที่ทำเพิ่มข้อมูล</th>
                    <th>ดูรายละเอียด</th>
                </tr> 
            </thead>
            <tbody>
                <?php 
$data = array();
$data = $product->get_product_wait_confirm();
//print_r($data);
<?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 
Example #3
0
<?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();
include_once 'config/autoload.inc.php';
use classes as cls;
$product = new cls\product();
//echo print_r($_POST);
$product->manager_id = $_SESSION['u_id'];
if ($product->set_product_price_by_product_id($_POST)) {
    print '1';
} else {
    print '0';
}
Example #5
0
<?php

session_start();
if (!isset($_POST) || !isset($_SESSION['member_id']) || !isset($_FILES)) {
    echo "<meta http-equiv='refresh' content='0;url=index.php'>";
    exit;
}
require_once 'config/autoload.inc.php';
use classes as cls;
$product = new cls\product();
$product->member_id = $_SESSION['member_id'];
/* Mockup */
$success = 1;
$mockup = $product->upload_mockup($_FILES['fileMockUp']);
if ($mockup === true) {
    // Insert data into database
    if ($product->set_product($_POST, $product->file_name)) {
        $product_file_number = 1;
        // หมายเลขฟิลด์ในฐานข้อมูล 1-6
        for ($i = 1; $i <= 6; $i++) {
            // ตรวจสอบว่าช่อง upload file ตัวไหนที่ไม่มีรูปภาพก็ให้ข้ามไปช่องต่อไป
            if (!empty($_FILES['file' . $i]['name'])) {
                $files = $product->upload_files($_FILES['file' . $i], $i);
                if ($files !== true) {
                    echo 'File : ' . $i . ' error === ' . $files;
                    $success = 0;
                } else {
                    if ($product->update_file_product($product_file_number)) {
                        $product_file_number++;
                    } else {
                        echo 'Update product name : ' . $this->file_name . ' incorrect <BR>';
<?php

require_once 'header.inc.php';
if (!isset($_SESSION['u_id'])) {
    echo "<meta http-equiv='refresh' content='0;url=login.php'>";
    exit;
}
require_once '../backend/config/autoload.inc.php';
use classes as cls;
$product = new cls\product();
$product->product_id = $_GET['product_id'];
$data = $product->get_product_wait_confirm_by_product_id();
if ($data === false) {
    echo "<meta http-equiv='refresh' content='0;url=list-confirm-product.php'>";
    exit;
}
?>
<div class="content">
    <br />
    <div class="col-md-6">
        <img src="../uploads/member_<?php 
echo $data['member_id'] . '/' . $data['product_mockup'];
?>
" class="img-rounded" style="width: 100%;" alt="" />
        <div class="clearfix"></div>
        <br />

        <div class="col-md-3">
            <?php 
if ($data['product_file1'] != '') {
    ?>
Example #7
0
<?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
)
Example #8
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;
$product = new cls\product();
$order = new cls\order();
$member = new cls\member();
$product->member_id = $_SESSION['member_id'];
$data = array();
$data = $product->get_product_by_member_id();
?>
    <div class="clearfix"></div>
    <div class="content">
        <h2 class="title col-md-6">ลายเสื้อทั้งหมด
        <a class="btn btn-primary" id="bnt-gridView" href="#"><i class="fa fa-th"></i> Grid View</a>

        <a class="btn btn-primary" id="bnt-listView" href="#"><i class="fa fa-list"></i> List View</a>
    </h2>
        <!-- <div class="col-lg-6 search">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Search for...">
                <span class="input-group-btn">
                <button class="btn btn-raised btn-primary" type="button"><i class="fa fa-search"></i> ค้นหา!</button>
            </span>
            </div>
        </div> -->
        <div class="clearfix"></div>