Exemple #1
0
         <li><a href="?act=profile&k=info">Sửa thông tin </a></li>
         <li><a href="?act=profile&k=listupload">Danh sách upload</a></li>
         <li><a href="?act=profile&k=yeuthich">Danh sách yêu thích</a></li>
     </ul>
 </div>
 <div id="profile-content">
     <?php 
 if (isset($_GET['k'])) {
     $key = $_GET['k'];
     switch ($key) {
         case "info":
             include_once './include/doimatkhau.php';
             break;
         case "listupload":
             echo '<div id="content-title">Danh sách upload</div>';
             $kq = TaiLieu::LayTaiLieuTheoTaiKhoan($taikhoan->ID);
             $page = 1;
             if (isset($_GET['page'])) {
                 $page = $_GET['page'];
             }
             $tailieu = array_slice($kq, ($page - 1) * 12, 12);
             foreach ($tailieu as $tl) {
                 ShowSlideYeuThich($tl->ID, $tl->Ten, $taikhoan->TenDangNhap, $tl->LuotXem, $type, $tl->LoaiFile, 0, $taikhoan->ID);
             }
             Page(count($kq));
             break;
         case "yeuthich":
             include_once './include/yeuthich.php';
             break;
         default:
             break;
Exemple #2
0
 public static function XoaTaiLieuTheoTaiKhoan($idTaiKhoan)
 {
     BinhLuan::XoaTatCaTheoTaiKhoan($idTaiKhoan);
     YeuThich::XoaYeuThichTheoTaiKhoan($idTaiKhoan);
     $arrTaiLieu = TaiLieu::LayTaiLieuTheoTaiKhoan($idTaiKhoan);
     foreach ($arrTaiLieu as $value) {
         //echo $value->ID.'</br>';
         static::XoaTaiLieu($value->ID);
     }
 }
Exemple #3
0
<?php

$type = 'ebook';
if (isset($_GET['type'])) {
    $type = $_GET['type'];
}
$page = 1;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
}
if (isset($_GET['k'])) {
    $key = $_GET['k'];
    $kq = TaiLieu::LayTaiLieuTheoTaiKhoan($key);
    $nguoiupload = TaiKhoan::LayTheoID($key);
    $tailieu = array_slice($kq, ($page - 1) * 12, 12);
    foreach ($tailieu as $tl) {
        ShowProduct($tl->ID, $tl->DanhMucCon, $tl->Ten, $tl->MoTa, $nguoiupload->TenHienThi, $tl->LuotXem, $tl->LuotDownLoad, $tl->HinhAnh, $tl->LoaiFile, $type, $tl->NguoiUpload);
    }
    Page(count($kq));
}