Exemple #1
0
} else {
    $trang = 1;
}
if (isset($_GET['type'])) {
    $type = $_GET['type'];
    if (isset($_GET['d'])) {
        $danhmuccon = $_GET['d'];
        $lishtailieu = TaiLieu::LayTatCaTaiLieuTheoDanhMucCon($danhmuccon, $trang - 1);
        $tongitem = TaiLieu::DemTatCaTaiLieuTheoDanhMucCon($danhmuccon);
    } else {
        $lishtailieu = TaiLieu::LayTatCaTaiLieu($type, $trang - 1);
        $tongitem = TaiLieu::DemTatCaTaiLieuTheoLoai($type);
    }
} else {
    $lishtailieu = TaiLieu::LayTatCaTaiLieu('ebook', $trang - 1);
    $tongitem = TaiLieu::DemTatCaTaiLieuTheoLoai($type);
}
?>

<div id="content">
    <div id="list-item">
        <?php 
//print_r($lishtailieu);
foreach ($lishtailieu as $tl) {
    $nguoiupload = TaiKhoan::LayTheoID($tl->NguoiUpload);
    ShowProduct($tl->ID, $tl->DanhMucCon, $tl->Ten, $tl->MoTa, $nguoiupload->TenHienThi, $tl->LuotXem, $tl->LuotDownLoad, $tl->HinhAnh, $tl->LoaiFile, $type, $tl->NguoiUpload);
}
//ham xua tool tip cua 1 tai lieu ra table
?>