예제 #1
0
    header("Location: " . AutoLink($link_source, "category", "download", "", "", ""));
} else {
    //klo menu gak kosong
    //detail post yang download
    $sql = "SELECT * FROM filemanager WHERE kode = '{$menu}'";
    $data_file = TampilData($sql, $conn);
    $nama_file = $data_file['nama'];
    $password_file = $data_file['password'];
    $diskripsi_file = $data_file['diskripsi'];
    $ContentType_file = $data_file['ContentType'];
    $DotType_file = $data_file['DotType'];
    $tanggal_file = $data_file['tgl_upload'];
    $diskripsi_file = $data_file['diskripsi'];
    $own_file = $data_file['own'];
    $size_file = SizeFile($data_file['size']);
    $src_file = TanpaHosting($data_file['src']);
    $detailfile = true;
    $text_meta_title = $nama_file;
    $breadcrumbs[] = array("text" => $nama_file, "href" => "#");
    if ($password_file == "" || $logged || isset($_SESSION['bolehdownload']) && $_SESSION['bolehdownload'] == $TargetForm && (isset($_GET['download']) && $_GET['download'] == "done")) {
        if (file_exists($src_file)) {
            $log_txt = "{$nama_pengguna} mendownload file {$nama_file} \n";
            LogSys($log_txt, "normal");
            header('Content-Description: ' . $diskripsi_file);
            header('Content-Type: ' . $ContentType_file);
            header('Content-Disposition: attachment; filename=' . $nama_file . "." . $DotType_file);
            header('Expires: 0');
            header('Cache-Control: must-revalidate');
            header('Pragma: public');
            header('Content-Length: ' . $data_file['size']);
            readfile($src_file);
예제 #2
0
파일: file.php 프로젝트: rizalhans/RanaCMS
                    $statusganti = ",file berhasil diganti";
                } else {
                    $statusganti = ",tapi gagal masukin database";
                }
            }
        }
    }
    $sql = "UPDATE filemanager SET nama='{$nama_file}', diskripsi='{$diskripsi_file}' WHERE id='{$idpost}'";
    if ($conn->query($sql) === TRUE) {
        $log_txt = "{$nama_pengguna} Edit File <strong>'{$nama_file}'</strong>\n";
        LogSys($log_txt, "normal");
        $_SESSION['kalimat_status'] = "Update berhasil" . $statusganti;
        header("Location: " . LINK_LANJUT . "status=berhasil");
    } else {
        $_SESSION['kalimat_status'] = "Update Gagal" . $statusganti;
        header("Location: " . LINK_LANJUT . "status=gagal");
    }
}
if (isset($_POST['delete-file'])) {
    unlink(TanpaHosting($src_file));
    $log_txt = "{$nama_pengguna} delete File <strong>'{$idpost} - {$src_file}'</strong>\n";
    LogSys($log_txt, "delete");
    $sql = "DELETE FROM filemanager WHERE id='{$idpost}'";
    if ($conn->query($sql) === TRUE) {
        $_SESSION['kalimat_status'] = "Hapus Data berhasil";
        header("Location: " . AutoLink($link_source, $route, $menu, "", "", "") . $hub . "status=berhasil");
    } else {
        $_SESSION['kalimat_status'] = "Hapus Data Gagal";
        header("Location: " . AutoLink($link_source, $route, $menu, "", "", "") . $hub . "status=gagal");
    }
}
예제 #3
0
function RowSite($data_dir)
{
    $array_from_menu = ArrayDir(TanpaHosting($data_dir));
    $array_data_dir = false;
    if ($array_from_menu) {
        foreach ($array_from_menu as $site_dir) {
            if ($site_dir) {
                $array_data_dir[] = array("text" => kapital_str(PathFile($data_dir . $site_dir, 'filename')), "file" => $site_dir, "value" => PathFile($data_dir . $site_dir, 'filename'));
            }
        }
    }
    return $array_data_dir;
}
예제 #4
0
                <label  class="nama-gbr">

                <input  type="checkbox" name="gambar<?php 
                    echo $sa;
                    ?>
" value="<?php 
                    echo $dir_images . $data_gbr;
                    ?>
" />

                <input  type="hidden" name="cache<?php 
                    echo $sa;
                    ?>
" value="<?php 
                    echo TanpaHosting(Thumbnail($dir_images . $data_gbr, 250));
                    ?>
" />

                <?php 
                    echo $data_gbr;
                    ?>

                </label>

                <?php 
                } else {
                    ?>

                <div class="folder inside-folder thumbnail" data-value="<?php 
                    echo $dir_images_baru . $data_gbr . "/";