本文整理汇总了PHP中Backend::getListProduct方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::getListProduct方法的具体用法?PHP Backend::getListProduct怎么用?PHP Backend::getListProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::getListProduct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PHPExcel
$link .= "&parent_id={$parent_id}";
$link_form .= "&parent_id={$parent_id}";
if ($cate_id == $parent_id) {
$cate_id = -1;
}
} else {
$parent_id = -1;
}
if (isset($_GET['manu_id']) && $_GET['manu_id'] > 0) {
$manu_id = (int) $_GET['manu_id'];
$link .= "&manu_id={$manu_id}";
$link_form .= "&manu_id={$manu_id}";
} else {
$manu_id = -1;
}
$arrTotal = $model->getListProduct($product_code, $product_name, $cate_type_id, $parent_id, $cate_id, $manu_id, $is_new, $is_saleoff, $is_hot, $trangthai, -1, -1);
require_once 'PHPExcel.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// Set document properties
$objPHPExcel->getProperties()->setCreator("HoangNH")->setLastModifiedBy("HoangNH")->setTitle("Office 2007 XLSX vinawatch.com")->setSubject("Office 2007 XLSX vinawatch.com")->setDescription("")->setKeywords("")->setCategory("");
// Add some data
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', 'Mã sản phẩm')->setCellValue('B1', 'Tên sản phẩm')->setCellValue('C1', 'Menu danh mục')->setCellValue('D1', 'Danh mục')->setCellValue('E1', 'Trạng thái')->setCellValue('F1', 'Giá sản phẩm')->setCellValue('G1', 'Giá đã giảm')->setCellValue('H1', 'Số lượng deal')->setCellValue('I1', 'Ngày bắt đầu')->setCellValue('J1', 'Ngày kết thúc')->setCellValue('K1', 'Số lượng đã bán')->setCellValue('L1', 'Seo Title')->setCellValue('M1', 'Meta description')->setCellValue('N1', 'Meta Keyword');
$i = 1;
if (!empty($arrTotal['data'])) {
foreach ($arrTotal['data'] as $value) {
$i++;
$start_date = $value['start_date'] > 0 ? date('d-m-Y', $value['start_date']) : "";
$end_date = $value['end_date'] > 0 ? date('d-m-Y', $value['end_date']) : "";
// Add some data
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $i, $value['product_code'])->setCellValue('B' . $i, $value['product_name'])->setCellValue('C' . $i, $value['cate_type_id'])->setCellValue('D' . $i, $value['cate_id'])->setCellValue('E' . $i, $value['trangthai'])->setCellValue('F' . $i, $value['price'])->setCellValue('G' . $i, $value['price_saleoff'])->setCellValue('H' . $i, $value['deal_amount'])->setCellValue('I' . $i, $start_date)->setCellValue('J' . $i, $end_date)->setCellValue('K' . $i, $value['daban'])->setCellValue('L' . $i, $value['meta_title'])->setCellValue('M' . $i, $value['meta_description'])->setCellValue('N' . $i, $value['meta_keyword']);
示例2: ceil
}
if (isset($_GET['cate_type_id']) && $_GET['cate_type_id'] > 0) {
$arrCustom['cate_type_id'] = $_GET['cate_type_id'];
$link .= "&cate_type_id=" . $arrCustom['cate_type_id'];
$link_form .= "&cate_type_id=" . $arrCustom['cate_type_id'];
} else {
$arrCustom['cate_type_id'] = 1;
}
if (isset($_GET['menu_type']) && $_GET['menu_type'] > 0) {
$menu_type = $_GET['menu_type'];
} else {
$menu_type = -1;
}
$cate_type_id = $arrCustom['cate_type_id'];
$detailCateType = $model->getDetail('cate_type', $cate_type_id);
$listTotal = $model->getListProduct($arrCustom, $parent_id, $name, -1, -1);
$total_record = $listTotal['total'];
$total_page = ceil($total_record / 100);
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$offset = 100 * ($page - 1);
$list = $model->getListProduct($arrCustom, $parent_id, $name, $offset, 100);
if ($cate_type_id > 0) {
$cateParentArr = $model->getListCateTree($cate_type_id);
} else {
$cateParentArr = $model->getListCateParent();
}
$cateTypeArr = $model->getListCateType();
?>
<div class="row">
<div class="col-md-12">
<section class="content-header">
示例3: ceil
}
if (isset($_GET['cate_type_id']) && $_GET['cate_type_id'] > 0) {
$cate_type_id = (int) $_GET['cate_type_id'];
$link .= "&cate_type_id={$cate_type_id}";
$link_form .= "&cate_type_id={$cate_type_id}";
} else {
$cate_type_id = -1;
}
if (isset($_GET['cate_id']) && $_GET['cate_id'] > 0) {
$cate_id = (int) $_GET['cate_id'];
$link .= "&cate_id={$cate_id}";
$link_form .= "&cate_id={$cate_id}";
} else {
$cate_id = -1;
}
$arrTotal = $model->getListProduct($product_code, $product_name, $cate_type_id, $cate_id, $is_new, $is_saleoff, $is_hot, $trangthai, -1, -1);
$total_page = ceil($arrTotal['total'] / 20);
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$offset = 20 * ($page - 1);
$arrList = $model->getListProduct($product_code, $product_name, $cate_type_id, $cate_id, $is_new, $is_saleoff, $is_hot, $trangthai, $offset, $limit);
?>
<form id="exportForm" action="export.php">
<input type="hidden" name="product_code" value="<?php
echo $product_code;
?>
">
<input type="hidden" name="product_name" value="<?php
echo $product_name;
?>
">
<input type="hidden" name="cate_type_id" value="<?php