當前位置: 首頁>>代碼示例>>PHP>>正文


PHP format::byte方法代碼示例

本文整理匯總了PHP中format::byte方法的典型用法代碼示例。如果您正苦於以下問題:PHP format::byte方法的具體用法?PHP format::byte怎麽用?PHP format::byte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在format的用法示例。


在下文中一共展示了format::byte方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: size

 public static function size($file, $format = false)
 {
     $file = path::decode($file);
     $size = @filesize($file);
     if ($format) {
         $size = format::byte($size, $format);
     }
     return $size;
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:9,代碼來源:file.php

示例2: array

    $column['name'] = '<a href="' . zotop::url('webftp/index/index', array('dir' => rawurlencode($dir . '/' . $folder))) . '"><b>' . $folder . '</b></a>';
    $column['name'] .= '<h5>';
    $column['name'] .= '<a href="' . zotop::url('webftp/folder/rename', array('dir' => rawurlencode($dir), 'file' => $file)) . '" class="dialog">重命名</a>';
    $column['name'] .= '&nbsp;&nbsp;<a href="' . zotop::url('webftp/folder/delete', array('dir' => rawurlencode($dir), 'file' => $file)) . '" class="dialog">刪除</a>';
    $column['name'] .= '</h5>';
    $column['type w60'] = '文件夾';
    $column['encoding w60'] = '';
    $column['size w60'] = '--';
    $column['atime w120'] = time::format(@fileatime($path . DS . $folder));
    $column['mtime w120'] = time::format(@filemtime($path . DS . $folder));
    table::row($column);
}
foreach ($files as $file) {
    $column = array();
    $column['center'] = '<div class="zotop-icon zotop-icon-file ' . file::ext($file) . '"></div>';
    $column['name'] = '<div><b>' . $file . '</b></div>';
    $column['name'] .= '<h5>';
    $column['name'] .= '<a href="' . zotop::url('webftp/file/edit', array('file' => url::encode($dir . '/' . $file))) . '" class="dialog">編輯</a>';
    $column['name'] .= '&nbsp;&nbsp;<a href="' . zotop::url('webftp/file/rename', array('file' => url::encode($dir . '/' . $file))) . '" class="dialog">重命名</a>';
    $column['name'] .= '&nbsp;&nbsp;<a href="' . zotop::url('webftp/file/delete', array('file' => url::encode($dir . '/' . $file))) . '" class="dialog">刪除</a>';
    $column['name'] .= '</h5>';
    $column['type w60'] = '文件';
    $column['encoding w60'] = file::isUTF8($path . DS . $file) ? 'UTF8' : '';
    $column['size w60'] = format::byte(@filesize($path . DS . $file));
    $column['atime w120'] = time::format(@fileatime($path . DS . $file));
    $column['mtime w120'] = time::format(@filemtime($path . DS . $file));
    table::row($column);
}
table::footer();
$this->bottom();
$this->footer();
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:index.php

示例3: size

 public function size()
 {
     $tables = $this->tables();
     foreach ($tables as $table) {
         $size += $table['size'];
     }
     return format::byte($size);
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:8,代碼來源:mysql.php

示例4: array

form::header(array('valid' => 'false', 'class' => 'list', 'action' => zotop::url('system/file/action')));
$column = array();
$column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
$column['w40 center'] = '圖標';
$column['name'] = '名稱';
$column['user_name'] = '用戶名';
//$column['type'] = '類型';
$column['size w60'] = '大小';
$column['atime w120'] = '創建時間';
table::header('list', $column);
foreach ($files as $file) {
    $column = array();
    $column['select'] = html::checkbox(array('name' => 'id[]', 'value' => $file['id'], 'class' => 'select'));
    $column['center w40'] = $file['type'] == 'image' ? '<div class="image">' . html::image($file['path'], array('style' => 'display:none;')) . '</div>' : '<div class="zotop-icon zotop-icon-file ' . file::ext($file['path']) . '"></div>';
    $column['name'] = '<div><b>' . $file['name'] . '</b></div>';
    $column['name'] .= '<h5>';
    $column['name'] .= '<a href="' . zotop::url('system/file/down/' . $file['id']) . '">下載</a>';
    $column['name'] .= '&nbsp;&nbsp;<a href="' . zotop::url('system/file/edit/' . $file['id']) . '" class="dialog">編輯</a>';
    $column['name'] .= '&nbsp;&nbsp;<a href="' . zotop::url('system/file/delete/' . $file['id']) . '" class="confirm">刪除</a>';
    $column['name'] .= '</h5>';
    $column['user_name w100'] = '<a><b>' . $file['user_username'] . '</b></a><div class="textflow w100">' . $file['user_name'] . '</div>';
    //$column['type w60'] = ''.$file['type'].'';
    $column['size w60'] = '' . format::byte($file['size']) . '';
    $column['atime w120'] = '' . time::format($file['createtime']) . '';
    table::row($column);
}
table::footer();
form::buttons(array('type' => 'submit', 'value' => '永久刪除'));
form::footer($pagination);
$this->bottom();
$this->footer();
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:index.php

示例5: onDefault

 public function onDefault()
 {
     $db = zotop::db();
     $host = $db->config('hostname');
     $dbName = $db->config('database');
     $dbVersion = $db->version(true);
     $dbSize = $db->size();
     $tables = zotop::db()->tables(true);
     $header['title'] = '數據庫管理:' . $dbName;
     page::header($header);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="side">');
     block::header('數據庫基本信息');
     table::header();
     table::row(array('w60' => '數據庫主機', '2' => '' . $host . ''));
     table::row(array('w60' => '數據庫名稱', '2' => '' . $dbName . ''));
     table::row(array('w60' => '數據庫版本', '2' => '' . $dbVersion . ''));
     table::row(array('w60' => '數據庫大小', '2' => '<b>' . $dbSize . '</b> '));
     table::row(array('w60' => '數據表個數', '2' => '<b>' . count($tables) . '</b> 個'));
     table::footer();
     block::footer();
     block::header('創建數據表');
     form::header(array('action' => zotop::url('database/table/create'), 'template' => 'div'));
     form::field(array('type' => 'text', 'name' => 'tablename', 'label' => zotop::t('表名稱'), 'style' => 'width:180px', 'valid' => '{required:true}', 'description' => '不含前綴,係統會自動加上前綴'));
     form::buttons(array('type' => 'submit', 'value' => '創建'));
     form::footer();
     block::footer();
     page::add('</div>');
     page::add('<div id="main">');
     page::top();
     page::navbar($this->navbar(), 'tables');
     //zotop::dump($tables);
     form::header(array('class' => 'list', 'action' => zotop::url('database/table/action')));
     $column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
     $column['name'] = '數據表名稱';
     $column['size  w60'] = '大小';
     $column['Rows  w60'] = '記錄數';
     $column['Engine  w60'] = '類型';
     $column['Collation  w100'] = '整理';
     $column['manage view w60'] = '瀏覽';
     $column['manage delete'] = '刪除';
     page::add('<div style="height:400px;">');
     table::header('list', $column);
     foreach ($tables as $table) {
         $column = array();
         $column['select'] = html::checkbox(array('name' => 'table[]', 'value' => $table['name'], 'class' => 'select'));
         $column['name'] = '<a href="' . url::build('database/field/default', array('tablename' => $table['name'])) . '"><b>' . $table['name'] . '</b></a><h5>' . $table['comment'] . '</h5>';
         $column['size w60'] = (string) format::byte($table['size']);
         $column['Rows  w60'] = $table['rows'];
         $column['Engine  w60'] = $table['engine'];
         $column['collation  w100'] = $table['collation'];
         $column['manage view w60'] = '<a href="' . url::build('database/table/edit', array('tablename' => $table['name'])) . '">設置</a>';
         $column['manage delete'] = '<a href="' . url::build('database/table/delete', array('tablename' => $table['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     page::add('</div>');
     form::buttons(array('type' => 'select', 'name' => 'operation', 'style' => 'width:180px', 'options' => array('optimize' => '優化', 'delete' => '刪除'), 'value' => 'check'), array('type' => 'submit', 'value' => '執行操作'));
     form::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:64,代碼來源:table.php

示例6: array

    $column['manage delete'] = '<a href="' . zotop::url('database/field/delete', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm">刪除</a>';
    table::row($column, 'select');
}
table::footer();
form::buttons(array('type' => 'submit', 'value' => '瀏覽選中項'));
form::footer();
$this->bottom();
?>
</div>
</div>
<div id="side">
<?php 
block::header('數據表信息');
table::header();
table::row(array('w60 bold' => '名稱', '2' => '' . $table['name'] . ''));
table::row(array('w60 bold' => '大小', '2' => '' . format::byte($table['size']) . ''));
table::row(array('w60 bold' => '記錄數', '2' => '<b>' . $table['rows'] . '</b> '));
table::row(array('w60 bold' => '整理', '2' => '' . $table['collation'] . ''));
table::row(array('w60 bold' => '創建時間', '2' => '' . $table['createtime'] . ''));
table::row(array('w60 bold' => '更新時間', '2' => '' . $table['updatetime'] . ''));
//table::row(array('w60 bold'=>'注釋','2'=>''.$table['comment'].''));
table::footer();
block::footer();
block::header('索引信息');
$column = array();
//$column['i w10'] = '';
$column['field'] = '字段';
$column['type w50'] = '類型';
$column['manage dropindex'] = '刪除';
table::header('list', $column);
foreach ($indexes as $index) {
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:index.php

示例7: onDefault

 public function onDefault($dir = '')
 {
     $path = ROOT . DS . trim($dir, DS);
     $path = path::clean($path);
     $folders = dir::folders($path);
     $files = dir::files($path);
     $fileext = array('php', 'css', 'js', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'psd', 'html', 'htm', 'tpl', 'rar', 'zip', 'mp3');
     $page['title'] = '文件管理器';
     page::header($page);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="main">');
     page::add('<div id="main-inner">');
     page::top();
     page::navbar($this->navbar(), 'default');
     $column = array();
     $column['select'] = '';
     $column['name'] = '名稱';
     $column['type'] = '類型';
     $column['size w60'] = '大小';
     $column['atime w120'] = '創建時間';
     $column['mtime w120'] = '修改時間';
     $column['manage rename w80'] = '重命名';
     $column['manage edit w80'] = '編輯';
     $column['manage delete'] = '刪除';
     table::header('list', $column);
     foreach ($folders as $folder) {
         $column = array();
         $column['select w20 center'] = html::image(url::theme() . '/image/fileext/folder.gif');
         $column['name'] = '<a href="' . zotop::url('filemanager/index/default', array('dir' => $dir . DS . $folder)) . '"><b>' . $folder . '</b></a>';
         $column['type w60'] = '文件夾';
         $column['size w60'] = '--';
         $column['atime w120'] = time::format(@fileatime($path . DS . $folder));
         $column['mtime w120'] = time::format(@filemtime($path . DS . $folder));
         $column['manage rename w80'] = '<a>重命名</a>';
         $column['manage edit w80'] = '<a class="disabled">編輯</a>';
         $column['manage delete'] = '<a>刪除</a>';
         table::row($column);
     }
     foreach ($files as $file) {
         $column = array();
         $column['select w20 center'] = in_array(file::ext($file), $fileext) ? html::image(url::theme() . '/image/fileext/' . file::ext($file) . '.gif') : html::image(url::theme() . '/image/fileext/unknown.gif');
         $column['name'] = '<a href="' . zotop::url('filemanager/index/default', array('dir' => $dir . DS . $file)) . '"><b>' . $file . '</b></a>';
         $column['type w60'] = '文件';
         $column['size w60'] = format::byte(@filesize($path . DS . $file));
         $column['atime w120'] = time::format(@fileatime($path . DS . $file));
         $column['mtime w120'] = time::format(@filemtime($path . DS . $file));
         $column['manage rename w80'] = '<a>重命名</a>';
         $column['manage edit w80'] = '<a href="' . zotop::url('filemanager/file/edit', array('filename' => $dir . DS . $file, 'dir' => '***')) . '">編輯</a>';
         $column['manage delete'] = '<a>刪除</a>';
         table::row($column);
     }
     table::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::add('<div id="side">');
     block::header('快捷操作');
     echo '<ul class="list">';
     echo '<li class="file"><a href="' . zotop::url('zotop/file/newfile') . '" class="dialog">新建文件</a></li>';
     echo '<li class="folder"><a href="' . zotop::url('zotop/file/newfolder') . '" class="dialog">新建文件夾</a></li>';
     echo '<li class="folder"><a href="' . zotop::url('zotop/file/upload') . '" class="dialog">文件上傳</a></li>';
     echo '</ul>';
     block::footer();
     block::header('其他位置');
     echo '<ul class="list">';
     echo '<li class="root"><a>根目錄</a></li>';
     echo '<li class="root"><a>模板目錄</a></li>';
     echo '<li class="root"><a>模塊目錄</a></li>';
     echo '<li class="root"><a>緩存目錄</a></li>';
     echo '</ul>';
     block::footer();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:75,代碼來源:index.php

示例8: array

		});
		$iframe.load(function(){
			$(this).prev('.loader').hide();
			$(this).show();				
		});
		$('#uploaded').append($iframe);
})

</script>
<style type="text/css">
	body.dialog{
		width:750px;
	}
</style>
<?php 
$this->navbar();
?>
<div id="uploaded" style="margin:10px;text-align:center;height:180px;overflow:hidden;text-align:center;border:solid 1px #ebebeb;background:#fff;">
	<div class="loader" style="line-height:180px;_margin-top:100px;"><span class="zotop-icon zotop-icon-loading"></span>正在加載已上傳文件</div>
</div >
<?php 
form::header(array('id' => 'upload', 'enctype' => 'multipart/form-data'));
form::field(array('type' => 'hidden', 'name' => 'globalid', 'label' => 'globalid', 'value' => '', 'valid' => 'required:true'));
form::field(array('type' => 'hidden', 'name' => 'field', 'label' => 'field', 'value' => '', 'valid' => 'required:true'));
form::field(array('type' => 'file', 'label' => zotop::t('圖片選擇'), 'name' => 'file', 'value' => '', 'valid' => "{required:true,accept:'{$alowexts}',messages:{required:'請選擇圖片',accept:'不支持該格式文件'}}", 'description' => '支持格式:<b>' . $allowexts . '</b> , 圖片大小 <= <b>' . format::byte($maxsize * 1024) . '</b>'));
form::field(array('type' => 'checkbox', 'options' => array('watermark' => zotop::t('原圖水印'), 'thumb' => zotop::t('生成縮略圖')), 'name' => 'field', 'label' => zotop::t('圖片設置'), 'value' => ''));
form::field(array('type' => 'select', 'options' => array('0' => '選擇分類') + $categorys, 'label' => zotop::t('圖片分類'), 'name' => 'folderid', 'value' => '0', 'description' => '<a href="' . zotop::url('system/folder/add') . '" class="dialog">新建分類</a> <a href="' . zotop::url('system/folder') . '" class="dialog">管理分類</a>'));
form::field(array('type' => 'textarea', 'label' => zotop::t('圖片描述'), 'name' => 'description', 'value' => '', 'style' => 'height:20px;', 'description' => '請輸入圖片的描述信息'));
form::buttons(array('type' => 'submit', 'value' => '上傳圖片'), array('type' => 'button', 'value' => zotop::t('關閉'), 'class' => 'zotop-dialog-close'));
form::footer();
$this->footer();
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:upload.php

示例9: foreach

$this->navbar();
form::header(array('class' => 'list', 'action' => zotop::url('database/table/action')));
$column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
$column['name'] = '數據表名稱';
$column['size  w60'] = '大小';
$column['Rows  w60'] = '記錄數';
$column['Engine  w60'] = '類型';
$column['Collation  w100'] = '整理';
$column['manage view w60'] = '瀏覽';
$column['manage delete'] = '刪除';
table::header('list', $column);
foreach ($tables as $table) {
    $column = array();
    $column['select'] = html::checkbox(array('name' => 'table[]', 'value' => $table['name'], 'class' => 'select'));
    $column['name'] = '<a href="' . zotop::url('database/field/index', array('tablename' => $table['name'])) . '"><b>' . $table['name'] . '</b></a><h5>' . $table['comment'] . '</h5>';
    $column['size w60'] = (string) format::byte($table['size']);
    $column['Rows  w60'] = $table['rows'];
    $column['Engine  w60'] = $table['engine'];
    $column['collation  w100'] = $table['collation'];
    $column['manage view w60'] = '<a href="' . zotop::url('database/table/edit', array('tablename' => $table['name'])) . '" class="dialog">設置</a>';
    $column['manage delete'] = '<a href="' . zotop::url('database/table/delete', array('tablename' => $table['name'])) . '" class="confirm">刪除</a>';
    table::row($column, 'select');
}
table::footer();
form::buttons(array('type' => 'select', 'name' => 'operation', 'style' => 'width:180px', 'options' => array('optimize' => '優化', 'delete' => '刪除'), 'value' => 'check'), array('type' => 'submit', 'value' => '執行操作'));
form::footer();
$this->bottom();
?>
</div>
</div>
<div id="side">
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:index.php

示例10: onDefault

 public function onDefault($tablename)
 {
     $tables = zotop::db()->tables(true);
     $table = $tables[$tablename];
     $fields = array();
     if (isset($table)) {
         $fields = zotop::db()->table($tablename)->fields(true);
     }
     $indexes = zotop::db()->table($tablename)->index();
     $page['title'] = '數據庫管理 <i>></i> 數據表 [ <b>' . $tablename . '</b> ]  <h6>' . $table['comment'] . '</h6>';
     page::header($page);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="main">');
     page::add('<div id="main-inner">');
     page::top();
     page::navbar($this->navbar($tablename), 'fields');
     form::header(array('class' => 'list'));
     $column = array();
     $column['select'] = html::checkbox(array('name' => 'id', 'class' => 'selectAll'));
     //$column['key w30 center'] = '索引';
     $column['name'] = '字段名稱';
     $column['type w150'] = '字段類型';
     //$column['null w50'] = '空值';
     //$column['default w100'] = '默認值';
     //$column['comment'] = '注釋';
     $column['manage pri'] = '主鍵';
     $column['manage index'] = '索引';
     $column['manage unique'] = '唯一';
     $column['manage fulltext'] = '全文';
     $column['manage edit'] = '修改';
     $column['manage delete'] = '刪除';
     table::header('list', $column);
     foreach ($fields as $field) {
         $column = array();
         $column['select'] = html::checkbox(array('name' => 'id[]', 'class' => 'select'));
         //$column['key w30 center'] = '<span class="'.$field['key'].'">'.$field['key'].'</span>';
         $column['name'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '" title="注釋:' . $field['comment'] . '&#13;默認:' . $field['default'] . '&#13;空值:' . $field['null'] . '&#13;整理:' . $field['collation'] . '"><b class="' . $field['key'] . '">' . $field['name'] . '</b></a><h5>' . $field['comment'] . '</h5>';
         $column['type w150'] = $field['type'] . (empty($field['length']) ? '' : '(' . $field['length'] . ')');
         //$column['null w50'] = $field['null'];
         //$column['default w100'] = $field['default'];
         //$column['comment'] = $field['comment'];
         $column['manage pri'] = '<a href="' . zotop::url('database/field/primaryKey', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為主鍵?</h2>\'}">主鍵</a>';
         $column['manage index'] = '<a href="' . zotop::url('database/field/index', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要索引該字段?</h2>\'}">索引</a>';
         $column['manage unique'] = '<a href="' . zotop::url('database/field/unique', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為唯一?</h2>\'}">唯一</a>';
         if (stripos((string) $field['type'], 'varchar') !== false || stripos((string) $field['type'], 'text') !== false) {
             $column['manage fulltext'] = '<a href="' . zotop::url('database/field/fulltext', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為全文索引?</h2>\'}">全文</a>';
         } else {
             $column['manage fulltext'] = '<a class="disabled">全文</a>';
         }
         $column['manage edit'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '">修改</a>';
         $column['manage delete'] = '<a href="' . zotop::url('database/field/delete', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     form::buttons(array('type' => 'submit', 'value' => '瀏覽選中項'));
     form::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::add('<div id="side">');
     block::header('數據表信息');
     table::header();
     table::row(array('w60 bold' => '名稱', '2' => '' . $table['name'] . ''));
     table::row(array('w60 bold' => '大小', '2' => '' . format::byte($table['size']) . ''));
     table::row(array('w60 bold' => '記錄數', '2' => '<b>' . $table['rows'] . '</b> '));
     table::row(array('w60 bold' => '整理', '2' => '' . $table['collation'] . ''));
     table::row(array('w60 bold' => '創建時間', '2' => '' . $table['createtime'] . ''));
     table::row(array('w60 bold' => '更新時間', '2' => '' . $table['updatetime'] . ''));
     //table::row(array('w60 bold'=>'注釋','2'=>''.$table['comment'].''));
     table::footer();
     block::footer();
     block::header('索引信息');
     $column = array();
     $column['i w10'] = '';
     $column['field'] = '字段';
     $column['type w30'] = '類型';
     $column['manage dropindex'] = '刪除';
     table::header('list', $column);
     foreach ($indexes as $index) {
         $column = array();
         $column['i w10 center'] = '>';
         $column['field'] = '<b>' . $index['field'] . '</b>';
         $column['type w30'] = $index['type'];
         $column['manage dropindex'] = '<a href="' . url::build('database/field/dropindex', array('table' => $tablename, 'index' => $index['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     block::footer();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:92,代碼來源:field.php

示例11: array

echo zotop::url('zotop/image/edit', array('image' => url::encode($image['path'])));
?>
" class="dialog">編輯圖片</a>
</div>

<div id="image-preview" style="margin:10px;text-align:center;height:300px;overflow:hidden;">
<?php 
echo html::image($image['path'], array('width' => '100%'));
?>
</div>
<div style="text-align:center;padding:3px;">
	<span>名稱:<?php 
echo $image['name'];
?>
 大小:<?php 
echo format::byte($image['size']);
?>
 寬高:<?php 
echo (int) $image['width'];
?>
px × <?php 
echo (int) $image['height'];
?>
px </span>
</div>
<div class="buttons">
	<?php 
echo field::get('hidden', array('id' => 'thumb', 'value' => $image['path']));
?>
	<?php 
echo field::get('hidden', array('id' => 'image', 'value' => $image['path']));
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:preview.php

示例12:

    $column['size w60'] = '' . format::byte($file['size']) . '';
    $column['atime w120'] = '' . time::format($file['createtime']) . '';
    table::row($column);
}
table::footer();
form::buttons(array('type' => 'submit', 'value' => '永久刪除'));
form::footer($pagination);
$this->bottom();
$this->mainFooter();
$this->sideHeader();
?>

<?php 
block::header('統計信息');
table::header();
table::row(array('w60' => zotop::t('文件大小'), '2' => format::byte($totalsize)));
table::row(array('w60' => zotop::t('文件數量'), '2' => $totalcount . zotop::t(' 個')));
table::footer();
block::footer();
?>


<?php 
block::header('按文件類型查看');
?>
<div class="navbarlist">
	<ul class="list2">
		<li><a href="<?php 
echo zotop::url('zotop/file/index');
?>
"><span class="zotop-icon zotop-icon-file all"></span>全部文件</a></li>
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:31,代碼來源:index.php

示例13: onSystem

 public function onSystem()
 {
     $header['title'] = '控製中心';
     $phpinfo = array();
     $server = $_SERVER['SERVER_ADDR'] . ' / ' . PHP_OS;
     $php = $_SERVER['SERVER_SOFTWARE'];
     $safemode = @ini_get('safe_mode') ? ' 開啟' : '關閉';
     if (@ini_get('file_uploads')) {
         $upload_max_filesize = ini_get('upload_max_filesize');
     } else {
         $upload_max_filesize = '<b class="red">---</b>';
     }
     $upload_filesize = format::byte(dir::size(ZOTOP_UPLOAD));
     $database = zotop::db()->config();
     $database['size'] = zotop::db()->size();
     $database['version'] = zotop::db()->version();
     $database['db'] = $database['hostname'] . ':' . $database['hostport'] . '/' . $database['database'];
     page::header($header);
     page::top();
     page::navbar($this->navbar());
     block::header('服務器信息');
     table::header();
     table::row(array('side 1 w60' => '服務器', 'main  w300 1' => $server, 'side 2 w60 ' => 'WEB服務器', 'main 2' => $php));
     table::row(array('side 1 w60' => '安全模式', 'main 1' => $safemode, 'side 2 w60 ' => 'PHP版本', 'main 2' => PHP_VERSION));
     table::row(array('side 1 w60' => '程序版本', 'main 1' => zotop::config('zotop.version'), 'side 2 w60 ' => '程序根目錄', 'main 2' => ROOT));
     table::footer();
     block::footer();
     block::header('文件夾權限<span>如果某個文件或目錄被檢查到“無法寫入”(以紅色列出),請即刻通過 FTP 或其他工具修改其屬性(例如設置為 777),以確保程序功能的正常使用</span>');
     table::header();
     table::row(array('side 1 w60' => '配置目錄', 'main w300 1' => '', 'side 2 w60 ' => '備份目錄', 'main 2' => ''));
     table::row(array('side 1 w60' => '運行目錄', 'main w300 1' => '', 'side 2 w60 ' => '模塊目錄', 'main 2' => ''));
     table::footer();
     block::footer();
     block::header('數據庫信息');
     table::header();
     table::row(array('side 1 w60' => '驅動名稱', 'main w300 1' => $database['driver'], 'side 2 w60 ' => '數據庫', 'main 2' => $database['db']));
     table::row(array('side 1 w60' => '數據庫版本', 'main 1' => $database['version'], 'side 2 w60 ' => '占用空間', 'main 2' => $database['size']));
     table::footer();
     block::footer();
     block::header('文件上傳');
     table::header();
     table::row(array('side 1 w60' => '上傳許可', 'main w300 1' => $upload_max_filesize, 'side 2 w60 ' => '已上傳文件', 'main 2' => '<span class="loading">' . $upload_filesize . '</span>'));
     table::footer();
     block::footer();
     page::bottom();
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:47,代碼來源:main.php


注:本文中的format::byte方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。