} else { require_once '../helper/Page.php'; require_once '../helper/Pagination.php'; require_once '../entities/Category.php'; require_once '../entities/Product.php'; require_once '../helper/Controls.php'; $page = new Page(); $page->addCSS("assets/js/jRange-master/jquery.range.css"); $page->addCSS("assets/css/jrange.css"); $page->addJavascript("assets/js/jRange-master/jquery.range.js"); $page->startBody(); $control = new Controls(Controls::Insert); //Chưa chọn loại sản phẩm; // khi chọn loại sản phẩm //Load danh mục loại sản phầm $ListCat = Category::loadAll(); $maxPrice = Product::getValueMaxColName('Price'); $maxPrice = empty($maxPrice) ? 0 : ceil($maxPrice / 1000000); // /1 triệu đồng $maxInStock = Product::getValueMaxColName('InStock'); $maxInStock = empty($maxInStock) ? 0 : $maxInStock; $token = "token=" . $_GET["token"]; ?> <div class="page-header"> <div class="pull-right"> <span class="btn btn-default btn-file"> <span><i class="entypo-upload"></i></span> <input type="file" id="files" name="exportExcel[]"/> </span> <span class="btn btn-default btn-file"> <span><i class="entypo-upload"></i></span>
$pathNew .= '.' . $type; $File->moveFile($pathNew); } else { //print_r($errors); } } } if (empty($error)) { } } } $insert = null; $update = null; $delete = null; $control = new Controls(Controls::Insert); $ListCategories = Category::loadAll(); $Product = new Product(); if (isset($_POST["btnSave"])) { if (isset($_POST["txtControl"])) { $control->setValue($_POST["txtControl"]); } if (isset($_POST["txtProID"])) { $Product->setProID($_POST["txtProID"]); } if (isset($_POST["txtProName"])) { $Product->setProName($_POST["txtProName"]); } if (isset($_POST["txtImageURL_Old"])) { $Product->setImageURL($_POST["txtImageURL_Old"]); } if (isset($_POST["txtProPrice"])) {