Beispiel #1
0
        $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
?>
             


    </div>
    <?php 
Page($tongitem);
?>
</div>
Beispiel #2
0
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php 
$error = "";
$hash = "";
if (!isset($_SESSION)) {
    session_start();
}
if (isset($_GET['u']) && isset($_GET['pw'])) {
    $id = $_GET['u'];
    include_once 'objects/taikhoan.php';
    include_once 'include/functions.php';
    $taikhoan = TaiKhoan::LayTheoID($id);
    $hashmatkhau = md5($taikhoan->ID . $taikhoan->TenDangNhap . $taikhoan->MatKhau . $taikhoan->NgayDangKy . $taikhoan->DangNhapCuoi);
    $hash = $_GET['pw'];
    if ($hash == $hashmatkhau) {
        $_SESSION['taikhoan'] = serialize($taikhoan);
        include_once './include/doimatkhauquen.php';
        return;
    } else {
        header("location:index.php");
        return;
    }
}
if (isset($_POST['submit'])) {
    if ($_POST['email'] != "" && ValidateEmail($_POST['email'])) {
        include_once 'include/functions.php';
        include_once './objects/taikhoan.php';
        include_once './include/mail.php';
        $taikhoan = TaiKhoan::LayTaiKhoanTheoEmail($_POST['email']);
        if ($taikhoan != NULL) {
            $hashmatkhau = md5($taikhoan->ID . $taikhoan->TenDangNhap . $taikhoan->MatKhau . $taikhoan->NgayDangKy . $taikhoan->DangNhapCuoi);
Beispiel #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));
}
Beispiel #4
0
    <div class="doimatkhau-email">

        <div class="doimatkhau-title">Tên: </div>
        <div class="doimatkhau-textbox">
            <input placeholder="Tên hiển thị" type="text" name="name" value="<?php 
echo TaiKhoan::LayTheoID($taikhoan->ID)->TenHienThi;
?>
">
        </div>
        <br><br><hr>
    </div>
    <div class="doimatkhau-email">
        <div class="doimatkhau-title">Đổi email:</div> 
        <div class="doimatkhau-textbox">
            <input placeholder="Email mới" type="text" name="email" value="<?php 
echo TaiKhoan::LayTheoID($taikhoan->ID)->Email;
?>
">
        </div>
        <br><br><hr>
    </div>
    <table>
        <tr>
            <td>Mật khẩu cũ</td>
            <td><input placeholder="Mật khẩu cũ" type="password" name="matkhaucu"></td>
        </tr>
        <tr>
            <td>Mât khẩu mới</td>
            <td> <input placeholder="Mật khẩu mới" type="password" name="matkhaumoi"></td>
        </tr>
        <tr>
Beispiel #5
0
    ?>
</a><br>
                                            <span>Tác Giả :</span>&nbsp;&nbsp;<a
                                                href="#"><?php 
    echo $tailieu->TacGia;
    ?>
</a><br>
                                            <span>Năm Phát Hành :</span>&nbsp;&nbsp;<a
                                                href="#"><?php 
    echo ToDate($tailieu->NamPhatHanh);
    ?>
</a><br>
                                            <span>Người chia sẻ :</span>&nbsp;&nbsp;<a href="#">
                                                <?php 
    $maTK = $tailieu->NguoiUpload;
    $tk = TaiKhoan::LayTheoID($maTK);
    echo $tk->TenDangNhap;
    ?>
</a><br>

                                            <span>Ngày Upload :</span>&nbsp;&nbsp;<a
                                                href="#"><?php 
    echo ToDate($tailieu->ThoiGianUpload);
    ?>
</a><br>
                                            <span>Loại File :</span>&nbsp;&nbsp;<a
                                                href="#"><?php 
    echo $tailieu->LoaiFile;
    ?>
</a><br>
                                            <span>Download :</span>&nbsp;&nbsp;<a