public static function provide($type, $data)
 {
     require_once 'provide.class.php';
     $class = new Provide();
     $status = false;
     $class->setData($data);
     switch ($type) {
         case 'add':
             $status = $class->add();
             break;
         case 'update':
             $status = $class->update();
             break;
         case 'delete':
             $status = $class->delete();
             break;
         case 'getsingle':
             $status = $class->getsingle();
             break;
         case 'getpage':
             $status = $class->getpage();
             break;
         case 'search':
             $status = $class->search();
             break;
         default:
             break;
     }
     if ($status) {
         wp_send_json_success($status);
     } else {
         wp_send_json_error($class->error);
     }
 }
예제 #2
0
<?php

require_once PLUGIN_DIR_PATH . 'admin/provide.class.php';
$class = new Provide();
$data = $class->getTable($where = "", $orderField = "mancc", $groupByField = "", Global_Define::KC_MANAGEMENT_ORDER . ' LIMIT ' . $class->num_item);
$num_page = $class->CountPage();
?>
<div id="wpbody" role="main">

<div id="wpbody-content" aria-label="Nội dung chính" tabindex="0" style="overflow: hidden;">



<div class="wrap">
    <h1><?php 
_e('Quản lý thiết bị phòng thực hành', KC_DOMAIN);
?>
</h1>


    <div id="welcome-panel" class="welcome-panel">
        <input type="hidden" id="welcomepanelnonce" name="welcomepanelnonce" value="d0b9b07e0f">        <a class="welcome-panel-close" href="http://manager.dev/wp-admin/?welcome=0">Hủy</a>
            <div class="welcome-panel-content">
                <h3><?php 
_e('Quản lý nhà cung cấp!', KC_DOMAIN);
?>
</h3>
                        <!-- Action select -->
                    <div id="tool-box">
                        <div class="tablenav top postbox-container block-none"></div>
예제 #3
0
<?php

require_once PLUGIN_DIR_PATH . 'admin/accessories.class.php';
require_once PLUGIN_DIR_PATH . 'admin/room.class.php';
require_once PLUGIN_DIR_PATH . 'admin/provide.class.php';
$class = new Accessories();
$room = new Room();
$provide = new Provide();
$data = $class->getTable($where = "", $orderField = "malk", $groupByField = "", Global_Define::KC_MANAGEMENT_ORDER . ' LIMIT ' . $class->num_item);
$num_page = $class->CountPage();
$list_room = $room->getTable($where = "", $orderField = "maphong", $groupByField = "", '');
$list_provide = $provide->getTable($where = "", $orderField = "mancc", $groupByField = "", '');
?>
<div id="wpbody" role="main">

<div id="wpbody-content" aria-label="Nội dung chính" tabindex="0" style="overflow: hidden;">



<div class="wrap">
    <h1><?php 
_e('Quản lý thiết bị phòng thực hành', KC_DOMAIN);
?>
</h1>


    <div id="welcome-panel" class="welcome-panel">
        <input type="hidden" id="welcomepanelnonce" name="welcomepanelnonce" value="d0b9b07e0f">        <a class="welcome-panel-close" href="http://manager.dev/wp-admin/?welcome=0">Hủy</a>
            <div class="welcome-panel-content">
                <h3><?php 
_e('Quản lý linh kiện!', KC_DOMAIN);