本文整理汇总了PHP中form::header方法的典型用法代码示例。如果您正苦于以下问题:PHP form::header方法的具体用法?PHP form::header怎么用?PHP form::header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form
的用法示例。
在下文中一共展示了form::header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDefault
public function onDefault()
{
if (form::isPostBack()) {
msg::error('开发中', '数据保存开发中,请稍后……');
}
$header['title'] = '系统设置';
page::header($header);
page::top();
page::navbar($this->navbar(), 'main');
form::header();
block::header('网站基本信息');
form::field(array('type' => 'text', 'label' => zotop::t('网站名称'), 'name' => 'zotop.site.title', 'value' => zotop::config('zotop.site.title'), 'description' => zotop::t('网站名称,将显示在标题和导航中')));
form::field(array('type' => 'text', 'label' => zotop::t('网站域名'), 'name' => 'zotop.site.domain', 'value' => zotop::config('zotop.site.domain'), 'description' => zotop::t('网站域名地址,不包含http://,如:www.zotop.com')));
form::field(array('type' => 'text', 'label' => zotop::t('备案信息'), 'name' => 'zotop.site.icp', 'value' => zotop::config('zotop.site.icp'), 'description' => zotop::t('页面底部可以显示 ICP 备案信息,如果网站已备案,在此输入您的授权码,它将显示在页面底部,如果没有请留空')));
form::field(array('type' => 'select', 'options' => array('0' => '不显示', '1' => '显示'), 'label' => zotop::t('授权信息'), 'name' => 'zotop.site.license', 'value' => zotop::config('zotop.site.license'), 'description' => zotop::t('页脚部位显示程序官方网站链接')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => zotop::config('zotop.site.about')));
block::footer();
block::header('联系信息设置');
form::field(array('type' => 'text', 'label' => zotop::t('公司名称'), 'name' => 'zotop.site.title', 'value' => '', 'description' => zotop::t('网站隶属的公司或者组织名称')));
form::field(array('type' => 'textarea', 'label' => zotop::t('网站简介'), 'name' => 'zotop.site.about', 'value' => ''));
block::footer();
form::buttons(array('type' => 'submit'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例2: onDefault
public function onDefault()
{
if (form::isPostBack()) {
$post = array();
$post['username'] = request::post('username');
$post['password'] = request::post('password');
$post['logintime'] = time();
$user = zotop::model('zotop.user');
$data = $user->read($post['username'], 'username');
//zotop::dump($data);
if ($data == false) {
msg::error('登陆失败', zotop::t('账户名称`{$username}`不存在,请检查!', array('username' => $post['username'])));
}
zotop::user($data);
msg::success('登陆成功', '登陆成功,系统正在加载中', 'reload', 2);
}
if (zotop::user() != null) {
zotop::redirect('zotop/index');
}
$header['title'] = '用户登录';
$header['js'] = url::module() . '/admin/js/login.js';
$header['body']['class'] = "login";
page::header($header);
block::header(array('id' => 'LoginWindow', 'title' => '用户登录'));
form::header(array('title' => '', 'description' => '请输入用户名和密码', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('帐 户(U)'), 'name' => 'username', 'value' => zotop::user('username'), 'valid' => 'required:true'));
form::field(array('type' => 'password', 'label' => zotop::t('密 码(P)'), 'name' => 'password', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '登 陆'), array('type' => 'button', 'name' => 'options', 'value' => '选 项'));
form::footer();
block::footer();
page::footer();
}
示例3: onSend
public function onSend()
{
$header['title'] = '发送短消息';
dialog::header($header);
form::header(array('title' => '', 'description' => '请输入收信人的账户并输入短消息内容', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('收信人'), 'name' => 'sendto', 'value' => '', 'description' => '请输入收信人的账户名称,多个账户之间请用’逗号‘隔开'));
form::field(array('type' => 'textarea', 'label' => zotop::t('内 容'), 'name' => 'content', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '发 送'), array('type' => 'button', 'name' => 'close', 'value' => '取消', 'class' => 'zotop-dialog-close'));
form::footer();
dialog::footer();
}
示例4: onBing
public function onBing()
{
$header['title'] = 'Bing搜索';
dialog::header($header);
dialog::navbar($this->navbar(), 'bing');
form::header(array('title' => '', 'description' => '<span class="zotop-tip">请先搜索图片,然后插入</span>'));
dialog::add(html::iframe('images', 'about:blank', array('width' => '100%', 'style' => 'width:100%;height:200px;')));
form::buttons(array('id' => 'UploadImages', 'type' => 'submit', 'value' => '插入图片'), array('type' => 'button', 'value' => zotop::t('取消'), 'class' => 'zotop-dialog-close'));
form::footer();
dialog::footer();
}
示例5: onImage
public function onImage()
{
$header['title'] = '上传图片';
$header['js'][] = url::module() . '/admin/js/upload.js';
dialog::header($header);
form::header(array('title' => '', 'description' => '', 'class' => 'ajax'));
form::add(array('type' => 'text', 'label' => t('图片地址'), 'name' => 'image', 'value' => 'http://www.baidu.com/logo.gif', 'description' => '请输入图片地址测试赋值'));
form::add(array('type' => 'textarea', 'label' => t('图片说明'), 'name' => 'content', 'value' => ''));
form::buttons(array('id' => 'UploadImage', 'type' => 'button', 'value' => '上传图片'), array('type' => 'button', 'value' => '取消', 'class' => 'zotop-dialog-close'));
form::footer();
dialog::footer();
}
示例6: 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();
}
示例7: onEdit
public function onEdit($file)
{
if (form::isPostBack()) {
$content = request::post('source');
msg::success('保存测试', '测试,继续编辑或者返回' . zotop::dump($content, true), 'reload');
}
$source = file::read(ROOT . $file);
$page['title'] = '文件编辑器';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header(array('class' => 'sourceEditor'));
form::field(array('type' => 'label', 'label' => zotop::t('文件名称'), 'name' => 'filename', 'value' => $file, 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'source', 'label' => zotop::t('文件内容'), 'name' => 'source', 'value' => $source, 'valid' => 'required:true', 'description' => zotop::t('')));
form::buttons(array('type' => 'submit', 'value' => '保存文件'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例8: onDefault
public function onDefault()
{
$header['title'] = '用户登录';
$header['js'] = '
$(function(){
$("div.block").show().center().drag(".block-header");
window.onresize=function(){
$("div.block").center();
};
})
';
$header['body']['class'] = "login";
page::header($header);
block::header(array('id' => 'LoginWindow', 'title' => '用户登录'));
form::header(array('title' => '', 'description' => '请输入用户名和密码', 'class' => 'ajax'));
form::add(array('type' => 'text', 'label' => t('帐 户(U)'), 'name' => 'username', 'value' => ''));
form::add(array('type' => 'password', 'label' => t('密 码(P)'), 'name' => 'password', 'value' => ''));
form::buttons(array('type' => 'submit', 'value' => '登 陆'), array('type' => 'button', 'name' => 'options', 'value' => '选 项'));
form::footer();
block::footer();
page::footer();
}
示例9: onDefault
public function onDefault()
{
$header['title'] = '测试表单';
page::header($header);
page::top();
page::navbar(array(array('id' => 'form', 'title' => '测试表单', 'href' => url::build('system/test')), array('id' => 'info', 'title' => '系统信息', 'href' => url::build('system/index/info'))), 'form');
form::header(array('class' => 'ajax'));
block::header(array('title' => '基本信息', 'action' => 'more'));
form::add(array('type' => 'checkbox', 'label' => t('多选框'), 'name' => 'test1', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => array('1', '2'), 'description' => '最多只允许选择三项'));
form::add(array('type' => 'checkbox', 'label' => t('多选框'), 'name' => 'test11', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1'), 'value' => array('1', '2'), 'class' => 'block', 'description' => '最多只允许选择三项'));
form::add(array('type' => 'select', 'label' => '下拉列表', 'name' => 'test22', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => array('2', '4'), 'description' => '提示信息'));
form::add(array('type' => 'select', 'label' => '下拉列表', 'name' => 'test2', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => '2', 'description' => '提示信息'));
form::add(array('type' => 'text', 'label' => '文本框', 'name' => 'test3', 'value' => '2的飞洒的发生地', 'description' => '提示信息'));
block::footer();
block::header(array('title' => '高级信息', 'action' => 'more'));
form::add(array('type' => 'image', 'label' => '上传图片', 'name' => 'test4', 'value' => '2的飞洒的发生地', 'valid' => 'required:true', 'description' => '提示信息'));
form::add(array('type' => 'textarea', 'label' => '文本框', 'name' => 'test32', 'value' => '2的飞洒的发生地', 'valid' => 'required:true,maxlength:500', 'description' => '提示信息'));
form::add(array('label' => '组合', 'type' => 'group', 'fields' => array(array('label' => '年', 'name' => 'year', 'type' => 'text'), array('label' => '月', 'name' => 'month', 'type' => 'text'), array('label' => '日', 'name' => 'day', 'type' => 'text')), 'description' => '生成一个复合控件'));
block::footer();
form::buttons(array('type' => 'submit'), array('type' => 'reset'));
form::footer();
page::bottom();
page::footer();
}
示例10: array
<?php
$this->header();
//$this->top();
//$this->navbar();
form::header(array('icon' => 'notice', 'title' => '注意:', 'description' => 'SQL语句一旦执行,将无法逆转,请确保执行的SQL语句安全', 'template' => 'div'));
form::field(array('type' => 'textarea', 'name' => 'sql', 'label' => '请输入SQL语句并执行', 'value' => $table['comment'], 'valid' => '{required:true}', 'style' => 'width:98%;height:150px;', 'description' => '一旦执行将无法撤销,请确保执行的SQL语句安全'));
form::buttons(array('type' => 'submit', 'value' => '执行sql语句'), array('type' => 'button', 'value' => '关闭', 'class' => 'zotop-dialog-close'));
form::footer();
//$this->bottom();
$this->footer();
示例11: array
$('.image').each(function(){
var image = $(this).find('img').attr('src');
if ( image && image.length > 4 ){
$(this).simpletip({
content:'<img src="'+image+'"/>',
onBeforeShow:function(){
$('.tooltip').zoomImage(400,300,{valign:false,onerror:false});
},
offset:[10,0]
});
}
});
})
</script>
<?php
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>';
示例12: array
<?php
$this->header();
?>
<div id="main">
<div id="main-inner">
<?php
$this->top();
$this->navbar();
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'] . ')');
示例13: onBackup
public function onBackup()
{
$header['title'] = '数据库管理 <i>></i> 数据表设置:' . $tablename . ' ';
page::header($header);
page::top();
page::navbar($this->navbar(), 'backup');
form::header();
form::field(array('type' => 'select', 'options' => array('all' => '全部数据', 'custom' => '自定义备份'), 'name' => 'type', 'label' => '备份类型', 'value' => 'all', 'valid' => '{required:true}'));
form::field(array('type' => 'text', 'name' => 'length', 'label' => '分卷长度', 'value' => '2048', 'description' => '分卷备份时文件长度限制,单位:<b>KB</b>', 'valid' => '{required:true}'));
form::field(array('type' => 'text', 'name' => 'filename', 'label' => '备份文件名', 'value' => '', 'valid' => '{required:true}'));
form::buttons(array('type' => 'submit'), array('type' => 'button', 'value' => '返回前页', 'class' => 'back', 'onclick' => 'history.go(-1);'));
form::footer();
page::bottom();
page::footer();
}
示例14: onChangeInfo
public function onChangeInfo($id)
{
$user = zotop::model('zotop.user');
$user->id = (int) $id;
if (form::isPostBack()) {
$post = form::post();
$update = $user->update($post, $user->id);
if ($update) {
msg::success('保存成功', '资料设置成功,正在刷新页面,请稍后……', zotop::url('zotop/user'));
}
}
$data = $user->read();
$data['updatetime'] = TIME;
$page['title'] = '修改我的资料';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header();
block::header('账户信息');
form::field(array('type' => 'label', 'label' => zotop::t('账户名称'), 'name' => 'username', 'value' => $data['username'], 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'text', 'label' => zotop::t('安全问题'), 'name' => 'question', 'value' => $data['question'], 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'text', 'label' => zotop::t('安全答案'), 'name' => 'answer', 'value' => $data['answer'], 'valid' => '', 'description' => zotop::t('')));
block::footer();
block::header('个人信息');
form::field(array('type' => 'text', 'label' => zotop::t('真实姓名'), 'name' => 'name', 'value' => $data['name'], 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'radio', 'options' => array('男' => '男', '女' => '女'), 'label' => zotop::t('性别'), 'name' => 'gender', 'value' => $data['gender'], 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'image', 'label' => zotop::t('头像'), 'name' => 'image', 'value' => $data['image'], 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'text', 'label' => zotop::t('电子邮件'), 'name' => 'email', 'value' => $data['email'], 'valid' => 'required:true,email:true', 'description' => zotop::t('')));
form::field(array('type' => 'textarea', 'label' => zotop::t('个人签名'), 'name' => 'sign', 'value' => $data['sign'], 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'hidden', 'label' => zotop::t('更新时间'), 'name' => 'updatetime', 'value' => $data['updatetime'], 'valid' => '', 'description' => zotop::t('')));
block::footer();
form::buttons(array('type' => 'submit'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例15: array
$('input[name=title]').blur(function(){
var title = $(this).val();
if( title ){
$('input[name=settings[meta_title]]').val(title);
$('input[name=settings[meta_keywords]]').val(title);
}
});
});
</script>
<style type="text/css">
body.dialog {width:700px;}
body.dialog .form-body{height:400px;overflow:auto;}
</style>
<?php
form::header(array('icon' => 'category', 'title' => zotop::t('新建栏目'), 'description' => zotop::t('新建一个栏目,并设置栏目的名称,模型及相关属性')));
box::header('基本信息');
form::field(array('type' => 'hidden', 'label' => zotop::t('栏目编号'), 'name' => 'id', 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'hidden', 'label' => zotop::t('上级栏目'), 'name' => 'parentid', 'value' => (int) $data['id']));
form::field(array('type' => 'disabled', 'label' => zotop::t('上级栏目'), 'name' => 'parent_name', 'value' => $data['title']));
form::field(array('type' => 'text', 'label' => zotop::t('栏目名称'), 'name' => 'title', 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'textarea', 'label' => zotop::t('栏目说明'), 'name' => 'description', 'description' => zotop::t('')));
form::field(array('type' => 'select', 'options' => array('' => zotop::t('请选择栏目模型')) + arr::hashmap($models, 'id', 'name'), 'label' => zotop::t('栏目模型'), 'name' => 'modelid', 'class' => 'box', 'valid' => 'required:true', 'value' => $data['modelid']));
box::footer();
box::header('模板设置');
form::field(array('type' => 'template', 'label' => zotop::t('首页模板'), 'name' => 'settings[template_index]', 'id' => 'template_index', 'value' => $data['settings']['template_index'], 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'template', 'label' => zotop::t('列表页面模板'), 'name' => 'settings[template_list]', 'value' => $data['settings']['template_list'], 'id' => 'template_list', 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'template', 'label' => zotop::t('详细页面模板'), 'name' => 'settings[template_detail]', 'id' => 'template_detail', 'value' => $data['settings']['template_detail'], 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'template', 'label' => zotop::t('打印页面模板'), 'name' => 'settings[template_print]', 'id' => 'template_print', 'value' => $data['settings']['template_print'], 'valid' => 'required:true', 'description' => zotop::t('')));
box::footer();
box::header('搜索优化');