Ejemplo n.º 1
0
            $item = $gamehandset->read("*", $id);
        }
    }
}
if (isset($_POST["del"])) {
    $deleted = false;
    if (is_array($_POST['id'])) {
        $deleted = $gamehandset->del($_POST['id']);
        //echo "Tét" . $deleted;
        if ($deleted) {
            flash("Quá trình xóa lựa chọn thành công");
        } else {
            flash("Quá trình xóa lựa chọn thất bại");
        }
    }
}
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");
} else {
    $conditions[] = "product_id=" . $pid;
    $conditions[] = "game_id=" . $gid;
}
$amount = $gamehandset->findCount(null, $conditions);
$page->displaypg = 20;
$page->setPagenav($amount);
//print_r($conditions);
$result = $gamehandset->findAll("*", null, $conditions, "id desc", $page->firstcount, $page->displaypg);
//print_r($result);
setvar("Items", $result);
setvar("ByPages", $page->pagenav);
template($tpl_file);