Ejemplo n.º 1
0
        if (!empty($_GET['q'])) {
            $search_title = $_GET['q'];
            $conditions[] = "model_name like '%" . $search_title . "%'";
        }
        if (!empty($_GET['display'])) {
            $display = $_GET['display'];
            $conditions[] = "display = '" . $display . "'";
        }
    }
    if ($do == "del" && !empty($id)) {
        $deleted = false;
        //$deleted = $game->del($id);
    }
    if ($do == "edit") {
        if (!empty($id)) {
            $item = $handset->read("*", $id);
        }
    }
}
if (empty($pid) || empty($gid)) {
    flash("Hãy chọn file game và sản phẩm cần thêm thiết bị hỗ trợ!", "product.php");
}
$amount = $handset->findCount(null, $conditions);
$page->displaypg = 50;
$page->setPagenav($amount);
//print_r($conditions);
$result = $handset->findAll("*", null, $conditions, "brand_name ASC", $page->firstcount, $page->displaypg);
//print_r($result);
setvar("Items", $result);
setvar("ByPages", $page->pagenav);
template($tpl_file);