示例#1
0
		{
			if(strtolower(substr($file,strlen($file)-strlen($ImgExt),strlen($ImgExt))) == strtolower($ImgExt))
			{
				$filename = CreateImgTag(str_replace(" ","%20","?Img=1&Path=".base64_encode(cyr_convert($Path."/".$file,$CharsetOnFS,"u"))),$file);
			}
		}
	}
	
	$filename = $UseImgIfExists ? CreateIcon($file,$filename) : $filename;
	$DownLink = "<a href=\"?DownLoad=1&Path=".base64_encode($Path."/".$file)."\">".$filename."</a>";
	$Info = "[<a href=\"javascript:OpenInfo('".base64_encode($Path."/".$file)."')\">Info</a>]";
	$Write = is_writable($ExploreDir."/".$Path."/".$file) ? "[<a href=\"?Path=".base64_encode($Path)."&Delete=".base64_encode($Path."/".$file)."\">Delete</a>]" : "";
	
	$TD["name"] = $DownLink;
	$TD["date"] = FileDate($lsdir."/".$file);
	$TD["size"] = SizeFile($lsdir."/".$file);
	$TD["info"] = $Info;
	if($AllowWrite) $TD["write"] = $Write;
	
	$Table[]=$TD;
}

//Options
if(!isset($Table)) $Table[] = array("name"=>"","date"=>"","size"=>"","info"=>"");

$DescrRow = "";
$DescrArr = DirDescr($lsdir,false);
foreach($DescrArr as $value) $DescrRow .= $value;
$DescrRow = $DescrRow == "" ? "&nbsp;" : "\n<PRE>\n".$DescrRow."</PRE>\n";

$FootRow = "Версия: <strong>".$Version."</strong> Разработка и дизайн: <strong><a href=\"http://3x.ru\" target=\"_blank\">3x</a></strong> this script was created by <strong><a href=\"mailto:lopatich@onmail.ru\">Kobra</a></strong> and <strong><a href=\"mailto:kerzzz@onmail.ru\">Kerzzz</a></strong>";
示例#2
0
            if ($data_file) {
                ?>
  <tr>
    <td><a href="<?php 
                echo AutoLink($link_source, $route, $menu, $data_file['id'], "", "");
                ?>
"><?php 
                echo $data_file['nama'];
                ?>
</a></td>
    <td align="center"><?php 
                echo $data_file['DotType'];
                ?>
</td>
    <td align="center"><?php 
                echo SizeFile($data_file['size']);
                ?>
</td>
  </tr>
<?php 
            }
        }
    }
    ?>
</tbody>
</table>
</div>
<div id="buat-baru" class="modal fade">
  <div class="modal-dialog modal-full">
    <form action="<?php 
    echo $TargetForm;
示例#3
0
if ($menu == "" || $menu == $querystring) {
    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']);
示例#4
0
    ///control form
    $link_form_eksekusi_berhasil = $linkgaleri . $dir_images_baru . "&status=berhasil";
    $link_form_eksekusi_gagal = $linkgaleri . $dir_images_baru . "&status=gagal";
    $TargetForm = $linkgaleri . $dir_images_baru;
}
$_SESSION['dir_folder'] = $dir_images;
$array_images = ArrayDir($dir_images);
$array_peta_dir = explode("/", $dir_images_baru);
if (isset($_GET['detailfile']) && $_GET['detailfile'] != "") {
    $folder_awal = DIR_IMAGES . $id_pengguna . "/";
    $viewdetailfile = true;
    $src_image = $folder_awal . $_GET['detailfile'];
    $detail_file = pathinfo($src_image);
    $typefile = $detail_file['extension'];
    $namafile = $detail_file['filename'];
    $sizefile = SizeFile(filesize($src_image));
    list($lebarfile, $tinggifile, $dttype, $attrfile) = getimagesize($src_image);
}
/////delete file
if (isset($_POST['delete-galeri'])) {
    if ($array_images) {
        $sa = 0;
        foreach ($array_images as $data_gbr) {
            if ($data_gbr) {
                $sa++;
                $log_txt = "{$nama_pengguna} delete photo <strong>'" . $_POST['gambar' . $sa] . "'</strong>\n";
                LogSys($log_txt, "delete");
                if (isset($_POST['gambar' . $sa])) {
                    delete_files($_POST['gambar' . $sa]);
                }
                if (isset($_POST['cache' . $sa])) {
示例#5
0
 $target_file = DIR_FILE . $today . "_" . linkbersih($_FILES['file']['name']);
 $ContentType_file = $_FILES['file']['type'];
 $size_file = $_FILES['file']['size'];
 $src_file = $link_source . $target_file;
 $array_DotType = $alow_type_file;
 $uploadstatus = 1;
 $error_status = false;
 //cek tipe
 if (!in_array($DotType_file, $array_DotType)) {
     $uploadstatus = 0;
     $error_status[] = "Type {$DotType_file} tidak di izinkan untuk di upload";
 }
 //cek ukuran
 if ($size_file >= MAXFILE) {
     $uploadstatus = 0;
     $error_status[] = "Ukuran file terlalu besar, Ukuran File Anda " . SizeFile($size_file) . " ukuran maksimal " . SizeFile(MAXFILE);
 }
 //upload file baru
 if ($uploadstatus === 0) {
     $statusganti = ",file gagal menggantikan ERROR: " . implode(",", $error_status);
 } else {
     if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
         //delete(unlike) file lama
         unlink(TanpaHosting($data_file['src']));
         $sql = "UPDATE filemanager SET src='{$src_file}', DotType='{$DotType_file}', ContentType='{$ContentType_file}', password='******', size='{$size_file}' WHERE id='{$idpost}'";
         //update database
         if ($conn->query($sql) === TRUE) {
             $statusganti = ",file berhasil diganti";
         } else {
             $statusganti = ",tapi gagal masukin database";
         }