本文整理汇总了PHP中table::header方法的典型用法代码示例。如果您正苦于以下问题:PHP table::header方法的具体用法?PHP table::header怎么用?PHP table::header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类table
的用法示例。
在下文中一共展示了table::header方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDefault
public function onDefault()
{
$tables = $this->db->table()->get(true);
$header['title'] = '数据库管理';
page::header($header);
page::add('<div id="page" class="clearfix">');
page::add('<div id="side">');
block::header('数据库基本信息');
table::header();
table::row(array('w60' => '数据库名称', '2' => '' . $this->db->config['database'] . ''));
table::row(array('w60' => '数据库版本', '2' => '' . $this->db->version(true) . ''));
table::row(array('w60' => '数据库大小', '2' => '<b>' . $this->db->size() . '</b> '));
table::row(array('w60' => '数据表个数', '2' => '<b>' . count($tables) . '</b> 个'));
table::footer();
block::footer();
page::add('</div>');
page::add('<div id="main">');
page::top();
page::navbar($this->navbar(), 'table');
//zotop::dump($tables);
form::header(array('class' => 'ajax'));
$column['select'] = '<input name="id" class="selectAll" type="checkbox"/>';
$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) {
$size = $table['Data_length'] + $table['Index_length'];
$column = array();
$column['select'] = '<input name="id[]" class="select" type="checkbox"/>';
$column['name'] = '<b>' . $table['Name'] . '</b><h5>' . $table['Comment'] . '</h5>';
$column['size w60'] = (string) format::size($size);
$column['Rows w60'] = $table['Rows'];
$column['Engine w60'] = $table['Engine'];
$column['collation w100'] = $table['Collation'];
$column['manage view w60'] = '<a href="' . url::build('system/database/table/record') . '">浏览</a>';
$column['manage delete'] = '<a href="' . url::build('system/database/table/delete') . '" class="confirm">删除</a>';
table::row($column);
}
table::footer();
page::add('<div style="height:200px;"></div>');
form::buttons(array('type' => 'select', 'style' => 'width:180px', 'options' => array('check' => '优化', 'delete' => '删除')), array('type' => 'submit', 'value' => '执行操作'));
form::footer();
page::bottom();
page::add('</div>');
page::add('</div>');
page::footer();
}
示例2: onDefault
public function onDefault()
{
$User = zotop::model('zotop.user');
$list = $User->getAll(array('select' => '*', 'where' => array('modelid', '=', 'system'), 'orderby' => 'logintime desc'));
$page['title'] = '系统用户管理';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header();
$column = array();
$column['status w30 center'] = '状态';
$column['username'] = '账号名称';
$column['name'] = '姓名';
$column['loginnum'] = '登录次数';
$column['loginip w120'] = '登录IP';
$column['logintime w150'] = '登录时间';
$column['manage lock'] = '锁定';
$column['manage rename'] = '修改密码';
$column['manage edit'] = '编辑';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($list as $user) {
$user['status-icon'] = $user['status'] == -1 ? html::image(url::theme() . '/image/icon/lock.gif') : html::image(url::theme() . '/image/icon/user.gif');
$column = array();
$column['status w30 center'] = $user['status-icon'];
$column['username'] = '<a><b>' . $user['username'] . '</b></a><h5>' . $user['email'] . '</h5>';
$column['name w60'] = $user['name'];
$column['loginnum w60'] = $user['loginnum'];
$column['loginip w120'] = $user['loginip'];
$column['logintime w150'] = time::format($user['logintime']);
if ($user['status'] == -1) {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/user/lock', array('id' => $user['id'], 'status' => 0)) . '">解锁</a>';
} else {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/user/lock', array('id' => $user['id'])) . '">锁定</a>';
}
$column['manage rename'] = '<a href="' . zotop::url('zotop/user/changepassword', array('id' => $user['id'])) . '">修改密码</a>';
$column['manage edit'] = '<a href="' . zotop::url('zotop/user/changeinfo', array('id' => $user['id'])) . '">编辑</a>';
$column['manage delete'] = '<a>删除</a>';
table::row($column);
}
table::footer();
form::buttons();
form::footer();
page::bottom();
page::footer();
}
示例3: onDefault
public function onDefault()
{
$role = zotop::model('zotop.role');
$list = $role->getAll(array('select' => '*', 'orderby' => 'order desc'));
$page['title'] = '系统用户管理';
//zotop::dump($role->db()->lastsql());
page::header($page);
page::top();
page::navbar($this->navbar());
form::header();
$column = array();
$column['status w30 center'] = '状态';
$column['id w30 center'] = '编号';
$column['rolename'] = '角色名称';
$column['manage lock'] = '锁定';
$column['manage edit'] = '编辑';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($list as $role) {
$role['status-icon'] = $role['status'] == -1 ? html::image(url::theme() . '/image/icon/lock.gif') : html::image(url::theme() . '/image/icon/ok.gif');
$column = array();
$column['status w30 center'] = $role['status-icon'];
$column['id w30 center'] = $role['id'];
$column['rolename'] = '<a><b>' . $role['name'] . '</b></a><h5>' . $role['description'] . '</h5>';
if ($role['status'] == -1) {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/role/lock', array('id' => $role['id'], 'status' => 0)) . '">解锁</a>';
} else {
$column['manage lock'] = '<a class="confirm" href="' . zotop::url('zotop/role/lock', array('id' => $role['id'])) . '">锁定</a>';
}
$column['manage edit'] = '<a href="' . zotop::url('zotop/role/edit', array('id' => $role['id'])) . '">编辑</a>';
$column['manage delete'] = '<a>删除</a>';
table::row($column);
}
table::footer();
form::buttons();
form::footer();
page::bottom();
page::footer();
}
示例4: array
$this->header();
$this->top();
$this->navbar();
$column = array();
$column['w30 center'] = '';
$column['name'] = '名称';
$column['type'] = '类型';
$column['encoding'] = '编码';
$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['center'] = '<div class="zotop-icon zotop-icon-file folder"></div>';
$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'] .= ' <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);
}
示例5: array
overflow-y:auto;
overflow-x:hidden;
}
table.list .extra{
display:none;
_display:block;
}
</style>
<?php
form::header();
$column = array();
$column['w30 center'] = '编号';
$column['title'] = '标题';
$column['manage edit'] = '编辑';
$column['manage delete'] = '删除';
$column['extra w10'] = '';
table::header('list sortable', $column);
foreach ($dataset['data'] as $row) {
$column = array();
$column['w30 center'] = $row['id'];
$column['title'] = '<input name="id[]" type="hidden" value="' . $row['id'] . '"/><b>' . $row['title'] . '</b><h5>' . $row['description'] . '</h5>';
$column['manage edit'] = '<a href="' . zotop::url('blog/category/edit/' . $row['id']) . '" id="category' . $row['id'] . '" class="dialog">修改</a>';
$column['manage delete'] = '<a href="' . zotop::url('blog/category/delete/' . $row['id']) . '" class="confirm">删除</a>';
$column['extra w10'] = '';
table::row($column);
}
table::footer();
form::buttons(array('type' => 'submit', 'value' => '保存排序'), array('type' => 'button', 'value' => '关闭', 'class' => 'zotop-dialog-close'));
form::footer('<span class="zotop-icon zotop-icon-notice"></span>拖动并保存,改变顺序');
$this->bottom();
$this->footer();
示例6: 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();
}
示例7: onInstall
public function onInstall($id = '')
{
$module = zotop::model('zotop.module');
$modules = $module->notInstalled();
//模块安装
if (!empty($id)) {
$install = $module->install($id);
if ($install) {
msg::success('操作成功', '模块安装成功,请稍候', zotop::url('zotop/module/install'));
}
msg::error('操作失败', '模块安装失败,请检查模块是否已经存在!');
}
$page['title'] = '模块安装';
page::header($page);
page::top();
page::navbar($this->navbar());
//block::header('操作说明');
echo '<ul class="notice">';
echo ' <li>安装模块前,请确认将该模块文件夹上传至服务器上的模块目录下面目录下面(/zotop/modules)</li>';
echo ' <li>上传完成后,刷新页面,模块将会出现在下面的待安装模块列表中</li>';
echo '</ul>';
//block::footer();
block::header('待安装模块');
$column = array();
$column['logo w30'] = '';
$column['name'] = '名称';
$column['version w50'] = '版本';
$column['manage edit'] = '安装';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($modules as $module) {
$column = array();
$column['logo w30'] = html::image($module['icon'], array('width' => '32px'));
$column['name'] = '<a><b>' . $module['name'] . '</b></a><h5>' . $module['description'] . '</h5>';
$column['version'] = $module['version'];
$column['manage edit'] = html::a(zotop::url('zotop/module/install', array('id' => $module['id'])), '安装', array('class' => 'confirm'));
$column['manage delete'] = '删除';
table::row($column);
}
table::footer();
block::footer();
page::bottom();
page::footer();
}
示例8: 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();
}
示例9: array
<?php
$this->header();
$this->top();
$this->navbar();
?>
<style type="text/css">
div.icon-area{float:left;width:50px;text-align:center;}
div.label-area{float:left;width:180px;}
div.field-area{float:left;}
div.field-area h5{clear:both;}
</style>
<?php
form::header();
table::header('list sortable');
foreach ($configs as $config) {
$type = $config['type'];
$description = $config['description'];
$settings = (array) json_decode($config['settings']);
$attrs = array('type' => $config['type'] == 'folder' ? 'hidden' : $config['type'], 'name' => $config['id'], 'value' => $config['value'], 'valid' => $config['valid']);
$attrs = array_merge($attrs, $settings);
$column = array();
$input = '';
if ($type == 'folder') {
$input .= '<div class="icon-area"><div class="zotop-icon zotop-icon-file folder"></div></div>';
$input .= '<a href="' . zotop::url('system/config/index/' . $config['id']) . '"><b>' . $config['title'] . '</b></a><h5>' . $config['description'] . '</h5>';
$input .= field::get($attrs);
} else {
$input .= '<div class="icon-area"><div class="zotop-icon zotop-icon-file txt"></div></div>';
$input .= '<div class="label-area"><b>' . $config['title'] . '</b><h5 class="red">' . $config['id'] . '</h5></div>';
$input .= '<div class="field-area">' . field::get($attrs) . '<span class="field-valid"></span><h5>' . $config['description'] . '</h5>' . '</div>';
示例10: array
$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">
<?php
block::header('数据库基本信息');
table::header();
table::row(array('w60' => '主机名称', '2' => '' . $database['hostname'] . ''));
table::row(array('w60' => '端口', '2' => '' . $database['hostport'] . ''));
table::row(array('w60' => '数据库', '2' => '' . $database['database'] . ''));
table::row(array('w60' => '用户名', '2' => '' . $database['username'] . ''));
table::row(array('w60' => '密码', '2' => '' . $database['password'] . ''));
table::row(array('w60' => '版本', '2' => '' . $database['version'] . ''));
table::row(array('w60' => '总大小', '2' => '<b>' . $database['size'] . '</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',
示例11: 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'] . ' 默认:' . $field['default'] . ' 空值:' . $field['null'] . ' 整理:' . $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();
}
示例12: 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();
}