function file_merete($fajl) { if (file_exists($fajl)) { return byteConvert(filesize($fajl)); } else { return 0; } }
function stampa($j, $d, $i, $f = 1, $l = "") { /* $j => numero file/dir $d => directory $f => se file 0, se dir 1*/ if (!$f) { $url = 'javascript: changedir(\'' . $l . $i . '/\')'; $img = 'folder'; $dimension = whichsize($d . $i); $resto = '<a href="javascript: zipunzip(\'zip\',\'' . $d . $i . '\');"><img src="img/btn_icons/zip.gif" alt="zip"/></a><a href="javascript: clr(\'' . str_replace("./", "", $d) . $i . '\');"><img src="img/btn_icons/cleardir.gif" alt="cleardir"/></a>'; } else { $e = array_pop(explode(".", $i)); $url = $d . $i; $img = whichimg($e); $dimension = byteConvert(filesize($d . $i)); $resto = zipedit($e, $d, $i); } eval("stampa_t(\"" . GetTemplate("lib/templates/list.html") . "\");"); if (in_array($e, array(gif, png, jpg, jpeg))) { return $i; } }
?> </nobr></li> <li><nobr><?php printf(gettext("Image cache size: <strong>%s</strong>"), byteConvert(gallerystats_filesize_r(SERVERPATH . '/' . CACHEFOLDER))); ?> </nobr></li> <li><nobr><?php printf(gettext("HTML cache size: <strong>%s</strong>"), byteConvert(gallerystats_filesize_r(SERVERPATH . '/' . STATIC_CACHE_FOLDER))); ?> </nobr></li> <li><nobr><?php printf(gettext("Uploaded folder size: <strong>%s</strong>"), byteConvert(gallerystats_filesize_r(SERVERPATH . '/' . UPLOAD_FOLDER))); ?> </nobr></li> <li><nobr><?php printf(gettext("Zenphoto scripts size: <strong>%s</strong>"), byteConvert(gallerystats_filesize_r(SERVERPATH . '/' . ZENFOLDER))); ?> </nobr></li> </ul> <?php if (!isset($_GET['stats']) and !isset($_GET['fulllist'])) { ?> <ul class="statistic_navlist"> <li><strong><?php echo gettext("Images"); ?> </strong> <ul> <li><a href="#images-latest"><?php
/** * Prints a download link for a file, depending on the plugin options including the downloadcount and filesize * @param string $file the path to a file to print a download link. * @param string $linktext Optionally how you wish to call the link. Set/leave to NULL to use the filename. */ function printDownloadURL($file, $linktext = NULL) { if (substr($file, 0, 1) != '/' && strpos($file, ':') === false) { $file = SERVERPATH . '/' . getOption('downloadList_directory') . '/' . $file; } $filesize = ''; if (getOption('downloadList_showfilesize')) { $filesize = @filesize(internalToFilesystem($file)); $filesize = ' (' . byteConvert($filesize) . ')'; } if (getOption('downloadList_showdownloadcounter')) { $downloaditem = DownloadList::getListItemFromDB($file); if ($downloaditem) { $downloadcount = ' - ' . sprintf(ngettext('%u download', '%u downloads', $downloaditem['data']), $downloaditem['data']); } else { $downloadcount = ' - ' . gettext('0 downloads'); } $filesize .= $downloadcount; } if (empty($linktext)) { $filename = basename($file); } else { $filename = $linktext; } echo '<a href="' . html_encode(getDownloadURL($file)) . '" rel="nofollow" class="downloadlist_link">' . html_encode($filename) . '</a><small>' . $filesize . '</small>'; }
</p> <p><?php echo gettext("<strong>Dimensions:</strong>"); ?> <br /><?php echo $image->getWidth(); ?> x <?php echo $image->getHeight() . ' ' . gettext('px'); ?> </p> <p><?php echo gettext("<strong>Size:</strong>"); ?> <br /><?php echo byteConvert($image->getImageFootprint()); ?> </p> </td> <td align="left" valign="top"><?php echo gettext("Owner:"); ?> </td> <td style="width:100%;"> <?php if (zp_loggedin(MANAGE_ALL_ALBUM_RIGHTS)) { ?> <select name="<?php echo $currentimage; ?> -owner">
if ($key == $file['name']) { $file_alt = $value[alt]; $file_description = $value[description]; $file_index = $value[index]; $file_type = $value[type]; } } } $obj['filename'] = $file['name']; $obj['index'] = $file_index; $obj['url'] = $file['fullRelativeUrl']; $obj['extension'] = $file['ext']; $obj['alt'] = $file_alt; $obj['description'] = $file_description; $obj['bytesize'] = $file['size']; $obj['size'] = byteConvert($file['size']); $obj['type'] = $file_type; $obj['date'] = $file['lastmod']; $obj['width'] = $file['image_width']; $obj['height'] = $file['image_height']; $thumb = str_replace("HTTP_MODAUTH=&", "", $file['thumb']); //thumbs works only if you logged in $obj['thumb'] = $thumb; $obj['thumb_width'] = $file['thumb_width']; $obj['thumb_height'] = $file['thumb_height']; if ($file['image_width'] != $file['image_height']) { $tmb_h = $tmb_max_height; $tmb_w = $file['image_width'] * $tmb_max_height / $file['image_height']; } if ($file['image_width'] == $file['image_height']) { $tmb_h = $tmb_max_height;
function stampa($j, $d, $i, $f = 1, $l = "") { /* $j => numero file/dir $d => directory $f => se file 0, se dir 1*/ if (!$f) { $url = 'javascript: changedir(\'' . str_replace("//", "/", $l . $i) . '/\')'; $img = 'folder'; $dimension = whichsize($d . $i); } else { $e = array_pop(explode(".", $i)); $url = str_replace("//", "/", $d . $i); $img = whichimg($e); $dimension = byteConvert(filesize($d . $i)); } eval("stampa_t(\"" . GetTemplate("templates/minilist.html") . "\");"); }