<?php require_once PLUGIN_DIR_PATH . 'admin/device.class.php'; require_once PLUGIN_DIR_PATH . 'admin/room.class.php'; require_once PLUGIN_DIR_PATH . 'admin/TypeDevice.class.php'; require_once PLUGIN_DIR_PATH . 'admin/provide.class.php'; $class = new Device(); $room = new Room(); $type_device = new TypeDevice(); $provide = new Provide(); $data = $class->getTable($where = "", $orderField = "matb", $groupByField = "", Global_Define::KC_MANAGEMENT_ORDER . ' LIMIT ' . $class->num_item); $num_page = $class->CountPage(); $list_room = $room->getTable($where = "", $orderField = "maphong", $groupByField = "", ''); $list_type = $type_device->getTable($where = "", $orderField = "maloaitb", $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('CHÀO MỪNG BẠN TỚI CHƯƠNG TRÌNH QUẢN LÝ THIẾT BỊ PHÒNG THỰC HÀNH!', KC_DOMAIN); ?>
public static function type_device($type, $data) { require_once 'TypeDevice.class.php'; $class = new TypeDevice(); $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; default: break; } if ($status) { wp_send_json_success($status); } else { wp_send_json_error($status); } }
<?php require_once PLUGIN_DIR_PATH . 'admin/TypeDevice.class.php'; $class = new TypeDevice(); $data = $class->getTable($where = "", $orderField = "maloaitb", $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"> <a class="welcome-panel-close" href="#">Hủy</a> <div class="welcome-panel-content"> <h3><?php _e('Quản lý thiết bị môn học!', KC_DOMAIN); ?> </h3> <!-- Action select --> <div id="tool-box"> <div class="tablenav top postbox-container block-none"></div> <div class="tablenav top postbox-container select"> <form action="#" method="POST" id="form-action"> <div class="alignleft actions bulkactions">