Example #1
0
 file<?php 
                                    if (count($_SESSION['clip']) !== 1) {
                                        echo 's';
                                    }
                                    ?>
</div><strong><?php 
                                    echo $_SESSION['cliptype'] == 'm' ? 'Move to...' : 'Copy to...';
                                    ?>
</strong></div><div class="boxd"><?php 
                                    foreach ($_SESSION['clip'] as $clipfile) {
                                        ?>
<div class="overflowable"><img src="images/icons/<?php 
                                        echo fticon(fext($clipfile));
                                        ?>
.gif" /> <?php 
                                        echo filefrompath($clipfile);
                                        ?>
</div><?php 
                                    }
                                    ?>
<div style="text-align:right;"><input type="button" value="<?php 
                                    echo $_SESSION['cliptype'] == 'm' ? 'Move here' : 'Copy here';
                                    ?>
" onclick="f_pastehere()" /></div><div style="text-align:right;"><input type="button" value="Cancel" onclick="f_declipall()" /></div></div></div><br />';
    parent.sidebar.document.getElementById('clipboard').style.display = 'block';
<?php 
                                } else {
                                    ?>
    parent.sidebar.document.getElementById('clipboard').innerHTML = '';
    parent.sidebar.document.getElementById('clipboard').style.display = 'none';
<?php 
function fm_fileinfo($d)
{
    $path = $GLOBALS['prepath'] . $d;
    $file = filefrompath($path);
    if (!fm_exists($d)) {
        return FALSE;
    }
    $size = filesize($path);
    $modified = filemtime($path);
    $ext = fext($file);
    return array('name' => $file, 'bname' => endsWith($file, '/') ? substr($file, 0, -1) : $file, 'id' => file2id($file), 'isdir' => filetype($path) == 'dir', 'size' => $size, 'tsize' => textfilesize($size), 'modified' => $modified, 'tmodified' => date("M j, Y g:i:s A", $modified), 'tdmodified' => date("M j, Y", $modified), 'perms' => substr(sprintf('%o', fileperms($path)), -3), 'owner' => fileowner($path), 'group' => filegroup($path), 'ext' => $ext, 'img' => fticon($ext), 'type' => textfiletype($ext), 'ft' => ft($ext), 'writable' => fm_iswritable($d), 'isvimg' => isvimg($ext), 'imgsize' => (isvimg($ext) || $ext == 'psd' || $ext == 'bmp') && $size <= 5242880 ? @getimagesize($path) : FALSE);
}
Example #3
0
function fileinfo($path)
{
    $file = filefrompath($path);
    if (!file_exists($path)) {
        return FALSE;
    }
    $size = filesize($path);
    $modified = filemtime($path);
    $ext = getfext($file);
    return array('name' => $file, 'id' => filetype($path) == 'dir' ? 'fold_' . substr($file, 0, -1) : 'file_' . $file, 'isdir' => filetype($path) == 'dir', 'size' => $size, 'tsize' => textfilesize($size), 'modified' => $modified, 'tmodified' => date("F j, Y g:i:s A", $modified), 'perms' => substr(sprintf('%o', fileperms($path)), -4), 'ext' => $ext, 'img' => textfileimg($ext), 'type' => textfiletype($ext), 'ft' => ft($ext), 'extac' => getfextac($ext), 'isvimg' => isvimg($ext), 'imgsize' => (isvimg($ext) || $ext == 'psd' || $ext == 'bmp') && $size <= 5242880 ? $imgsize = @getimagesize($path . $file) : FALSE);
}