mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-05 00:04:00 +01:00
Properties screen
Shows basic info for files, accessed from file manager menu
This commit is contained in:
29
lib/file-folder-properties.css
Normal file
29
lib/file-folder-properties.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select:none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
|
||||
.properties {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
.properties .column {display: inline-block; width: 220px; font-size: 10px; float: left}
|
||||
57
lib/file-folder-properties.php
Normal file
57
lib/file-folder-properties.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php include("settings.php");?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ICE Coder - <?php echo $versionNo;?> :: File/Folder Properties</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="file-folder-properties.css">
|
||||
</head>
|
||||
|
||||
<body class="properties">
|
||||
|
||||
<h1 id="title">properties</h1>
|
||||
|
||||
<?php
|
||||
$fileName=str_replace("|","/",strClean($_GET['fileName']));
|
||||
?>
|
||||
<h2><?php echo basename($fileName); ?></h2><br>
|
||||
<span class="column" style="width: 150px">Size: <?php
|
||||
$bytes = filesize($fileName);
|
||||
// Change into kilobytes
|
||||
$outputSize = ($bytes/1024);
|
||||
$outputUnit = "kb";
|
||||
// Maybe we should show in megabytes?
|
||||
if ($outputSize >= 1024) {
|
||||
$outputSize = ($outputSize/1024);
|
||||
$outputUnit = "mb";
|
||||
}
|
||||
echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)";
|
||||
?></span>
|
||||
<span class="column" style="margin: 0 10px">Modified: <?php echo date( "D d M Y g:i:sa", filemtime($fileName)); ?></span>
|
||||
<span class="column">Last Accessed: <?php echo date( "D d M Y g:i:sa", fileatime($fileName)); ?></span>
|
||||
<br><br>
|
||||
<span class="column" style="width: 150px">Type: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
|
||||
<span class="column" style="margin: 0 10px">Readable / Writeable: <?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writeable($fileName) ? "Yes" : "No"; ?></span>
|
||||
<span class="column">Root path: <?php echo str_replace($docRoot,"",$fileName);?></span>
|
||||
<span style="font-size:10px">
|
||||
<br><br>
|
||||
Full path:<br><?php echo $fileName;?>
|
||||
<br><br>
|
||||
</span>
|
||||
<span class="column" style="width: 150px">
|
||||
Permissions:
|
||||
<?
|
||||
$chmodInfo = substr(sprintf('%o', fileperms($fileName)), -4);
|
||||
echo $chmodInfo;
|
||||
?>
|
||||
</span>
|
||||
<span class="column" style="margin: 0 10px">
|
||||
<?php
|
||||
$perms = str_split($chmodInfo);
|
||||
?>
|
||||
</span>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user