Exemplo n.º 1
0
function DataTag($file, $Require)
{
    $DataTag = new \CmsDev\AdminFilesystem\Metadata();
    return $DataTag->data($file, $Require);
}
Exemplo n.º 2
0
 private static function file_info($file, $Require = 'kb')
 {
     $info = \getimagesize($file);
     $i = '';
     if ($Require == 'HV') {
         if ($info[0] > $info[1]) {
             $i = '<span class="image-h" title="' . \SKT_ADMIN_FileSystems_ImageH . '"></span>';
         } else {
             if ($info[0] < $info[1]) {
                 $i = '<span class="image-v" title="' . \SKT_ADMIN_FileSystems_ImageV . '"></span>';
             } else {
                 $i = '<span class="image-x" title="' . \SKT_ADMIN_FileSystems_ImageX . '"></span>';
             }
         }
     }
     if ($Require == 'size') {
         $i = '<span class="image-size"><b>' . $info[0] . ' x ' . $info[1] . '</b></span>';
     }
     if ($Require == 'kb') {
         $kb = \filesize($file) / 1024;
         $kb = (int) $kb;
         $i = '<span class="file-kb">' . $kb . ' kb</span>';
     }
     if ($Require == 'tags') {
         $i = '<span class="file-tags" rel="' . Code::Encode($file) . '" title="' . \SKT_ADMIN_FileSystems_Meta_ModalTitle . '"><i class="skt-icon-tags"></i></span>';
     }
     if ($Require == 'Title') {
         $DataTag = new \CmsDev\AdminFilesystem\Metadata();
         $i = $DataTag->data($file, 'Title');
     }
     return $i;
 }