Exemplo n.º 1
0
function getFileListWidthData($exp_reg, $dir = ".")
{
    $files = array();
    $handle = opendir($dir);
    while ($file = readdir($handle)) {
        if (preg_match($exp_reg, $file)) {
            $files[] = array('name' => $file, 'date' => date("d/m/Y H:i:s", filemtime($dir . $file)), 'size' => convertFileSize(filesize($dir . $file)));
        }
    }
    closedir($handle);
    sort($files);
    return $files;
}
Exemplo n.º 2
0
?>
" target="_blank" class="button"><?php 
echo $e->__('btnFactsheet', $_SESSION['iso_locale']);
?>
</a><span>PDF (<?php 
echo convertFileSize(filesize(getcwd() . $pdf_factsheet));
?>
)</span></li>
					<li><a href="/landing<?php 
echo $pdf_floorplans;
?>
" target="_blank" class="button"><?php 
echo $e->__('btnFloorplans', $_SESSION['iso_locale']);
?>
</a><span>PDF (<?php 
echo convertFileSize(filesize(getcwd() . $pdf_floorplans));
?>
)</span></li>
				</ul>
			</div>
		</div>
		
		<div id="disclaimer">
			<p><?php 
echo $e->__('disclaimer', $_SESSION['iso_locale']);
?>
</p>
			<div id="bh3-logo">
				<img alt="BH III LLC - New Owner/Developer for Trump Hollywood" src="<?php 
echo $base_root;
?>
Exemplo n.º 3
0
 /**
  * Generate a report about how much space users are using.
  *
  * @return	array
  */
 public function reportSizes()
 {
     // Get all users
     $users = $this->all();
     // Eager load some relationships
     $users = $users->load('items', 'items.files');
     $report = [];
     foreach ($users as $user) {
         if ($user->items->count() > 0) {
             $report[$user->id]['user'] = $user;
             $report[$user->id]['prettySize'] = "N/A";
             foreach ($user->items as $item) {
                 foreach ($item->files as $file) {
                     if (array_key_exists('size', $report[$user->id])) {
                         $report[$user->id]['size'] += (int) $file->size;
                     } else {
                         $report[$user->id]['size'] = (int) $file->size;
                     }
                     $report[$user->id]['prettySize'] = convertFileSize($report[$user->id]['size']);
                 }
             }
         }
     }
     usort($report, function ($a, $b) {
         return $b['prettySize'] - $a['prettySize'];
     });
     return $report;
 }
Exemplo n.º 4
0
				<ul>
					<?php 
$pdf_brochure = "/pdf/Trump-Hollywood-Rack.pdf";
if (file_exists(getcwd() . "/pdf/Trump-Hollywood-Rack-" . $_SESSION['iso_locale'] . ".pdf")) {
    $pdf_brochure = "/pdf/Trump-Hollywood-Rack-" . $_SESSION['iso_locale'] . ".pdf";
}
?>
					<li><a href="<?php 
echo $base_root;
echo $pdf_brochure;
?>
" target="_blank" class="button"><?php 
echo $e->__('btnBrochure', $_SESSION['iso_locale']);
?>
</a><span>PDF (<?php 
echo convertFileSize(filesize(getcwd() . $pdf_brochure));
?>
)</span></li>
				</ul>
			</div>
		</div>
		
		<div id="disclaimer">
			<p><?php 
echo $e->__('disclaimer', $_SESSION['iso_locale']);
?>
</p>
			<div id="bh3-logo">
				<img alt="BH III LLC - New Owner/Developer for Trump Hollywood" src="<?php 
echo $base_root;
?>
Exemplo n.º 5
0
 /**
  * Generate the report about item sizes.
  *
  * @return	object
  */
 public function reportUserSizes(User $user)
 {
     // Get all the items
     $items = $user->items;
     // Eager load some relationships
     $items = $items->load('files', 'product', 'type', 'user');
     $report = ['Skin' => ['color' => '#03a9f4', 'highlight' => '#14b4fc', 'value' => 0, 'prettySize' => "N/A", 'label' => 'Skins'], 'MOD' => ['color' => '#e51c23', 'highlight' => '#ea4a4f', 'value' => 0, 'prettySize' => "N/A", 'label' => 'MODs'], 'Rank Set' => ['color' => '#8bc34a', 'highlight' => '#97c95d', 'value' => 0, 'prettySize' => "N/A", 'label' => 'Rank Sets']];
     foreach ($items as $item) {
         foreach ($item->files as $file) {
             if (array_key_exists('size', $report[$item->type->name])) {
                 $report[$item->type->name]['size'] += (int) $file->size;
             } else {
                 $report[$item->type->name]['size'] = (int) $file->size;
             }
             $report[$item->type->name]['prettySize'] = convertFileSize($report[$item->type->name]['size']);
             $report[$item->type->name]['value'] = $report[$item->type->name]['size'];
         }
     }
     return $report;
 }