本文整理汇总了PHP中page::set方法的典型用法代码示例。如果您正苦于以下问题:PHP page::set方法的具体用法?PHP page::set怎么用?PHP page::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类page
的用法示例。
在下文中一共展示了page::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDetail
public function actionDetail($id)
{
$content = zotop::model('content.content');
$content->read($id);
$page = new page();
$page->set('content', $content);
$page->set('body', array('class' => 'detail'));
$page->display($content->template);
}
示例2: actionLocation
public function actionLocation($globalid)
{
$file = zotop::model('system.file');
$images = $file->db()->where('type', '=', 'image')->where('globalid', '=', $globalid)->orderby('createtime', 'desc')->getAll();
$page = new page();
$page->set('title', '已上传图片');
$page->set('globalid', $globalid);
$page->set('images', $images);
$page->display();
}
示例3: actionIndex
public function actionIndex($type = '')
{
$file = zotop::model('zotop.file');
if (!empty($type)) {
$where = array('type', '=', $type);
}
$files = $file->db()->where($where)->orderby('createtime', 'desc')->getPage();
$pagination = new pagination();
$pagination->page = $files['page'];
$pagination->pagesize = $files['pagesize'];
$pagination->total = $files['total'];
$p = $pagination->render();
$totalsize = $file->totalsize();
$totalcount = $file->count();
$page = new page();
$page->set('title', zotop::t('文件管理'));
$page->set('navbar', $this->navbar());
$page->set('page', $files['page']);
$page->set('pagesize', $files['pagesize']);
$page->set('total', $files['total']);
$page->set('files', $files['data']);
$page->set('totalsize', $totalsize);
$page->set('totalcount', $totalcount);
$page->set('pagination', $p);
$page->display();
}
示例4: actionUninstalled
public function actionUninstalled()
{
$module = zotop::model('system.module');
$modules = $module->getUnInstalled();
$page = new page();
$page->set('title', '模块安装 ');
$page->set('position', $position);
$page->set('navbar', $this->navbar());
$page->set('modules', $modules);
$page->display();
}
示例5: actionIndex
public function actionIndex()
{
$module = zotop::module('content');
$menus = array(array('id' => 'category', 'icon' => '', 'title' => '内容管理', 'url' => zotop::url('content/content'), 'description' => '内容管理,添加,编辑以及删除等操作'), array('id' => 'category', 'icon' => '', 'title' => '栏目管理', 'url' => zotop::url('content/category'), 'description' => '栏目分类管理,新建栏目及调整栏目顺序'), array('id' => 'category', 'icon' => '', 'title' => '模型管理', 'url' => zotop::url('content/model'), 'description' => '内容模型管理,可以自定义内容模型'), array('id' => 'category', 'icon' => '', 'title' => '模块设置', 'url' => zotop::url('content/setting'), 'description' => '内容模块的相关设置'));
$page = new page();
$page->set('title', $module['title']);
//$page->set('description', $module['description']);
$page->set('navbar', $this->navbar());
$page->set('module', $module);
$page->set('menus', $menus);
$page->display();
}
示例6: actionUninstalled
public function actionUninstalled($path = '')
{
$module = zotop::model('zotop.module');
$modules = $module->getUnInstalled();
if (!empty($path)) {
zotop::redirect('zotop/module/license', array('path' => url::encode($path)));
exit;
}
$page = new page();
$page->set('title', '系统模块管理 ');
$page->set('position', $position);
$page->set('navbar', $this->navbar());
$page->set('modules', $modules);
$page->display();
}
示例7: indexAction
public function indexAction()
{
$db = zotop::db();
$database = $db->config();
$database['version'] = $db->version();
$database['size'] = $db->size();
$tables = zotop::db()->tables(true);
$page = new page();
$page->title = '数据库管理';
$page->set('position', $database['database'] . ' @ ' . $database['hostname']);
$page->set('navbar', $this->navbar());
$page->set('database', $database);
$page->set('tables', $tables);
$page->display();
}
示例8: uninstalledAction
public function uninstalledAction($id = '')
{
$module = zotop::model('zotop.module');
$modules = $module->getUnInstalled();
if (!empty($id) && isset($modules[$id])) {
zotop::redirect('zotop/module/license', array('id' => $id));
exit;
}
$page = new page();
$page->set('title', '系统模块管理 ');
$page->set('position', $position);
$page->set('navbar', $this->navbar());
$page->set('modules', $modules);
$page->display();
}
示例9: actionIndex
public function actionIndex()
{
$page = new page();
$page->title = zotop::t('模板管理');
$page->set('navbar', $this->navbar());
$page->display();
}
示例10: actionBakup
public function actionBakup()
{
$db = zotop::model('database.database');
if (form::isPostBack()) {
msg::error('功能开发中……');
}
$database = $db->db()->config();
$tables = $db->tables();
$page = new page();
$page->title = '数据库备份';
$page->set('position', $database['database'] . ' @ ' . $database['hostname']);
$page->set('navbar', $this->navbar());
$page->set('database', $database);
$page->set('tables', $tables);
$page->display();
}
示例11: show
public static function show(array $msg)
{
$page = new page();
$page->set('msg', $msg);
$message = $page->render('msg');
if ($message !== false) {
echo $message;
} else {
$page->title = $msg['type'];
$page->body = array('class' => 'msg');
$page->header();
$page->add('');
$page->add('<div id="icon"><div class="zotop-icon zotop-icon-' . $msg['type'] . '"></div></div>');
$page->add('<div id="msg" class="' . $msg['type'] . ' clearfix">');
$page->add(' <div id="msg-type">' . $msg['type'] . '</div>');
$page->add(' <div id="msg-life">' . (int) $msg['life'] . '</div>');
$page->add(' <div id="msg-title">' . $msg['title'] . '</div>');
$page->add(' <div id="msg-content">' . $msg['content'] . '</div>');
$page->add(' <div id="msg-detail">' . $msg['detail'] . '</div>');
$page->add(' <div id="msg-action">' . $msg['action'] . '</div>');
$page->add(' <div id="msg-file">' . $msg['file'] . '</div>');
$page->add(' <div id="msg-line">' . $msg['line'] . '</div>');
if (!empty($msg['url'])) {
$page->add(' <div>');
$page->add(' <div><b>如果页面没有自动跳转,请点击以下链接</b></div>');
$page->add(' <a href="' . $msg['url'] . '" id="msg-url">' . $msg['url'] . '</a>');
$page->add(' </div>');
}
$page->add('</div>');
$page->add('<div id="powered">' . zotop::config('zotop.name') . ' ' . zotop::config('zotop.version') . '</div>');
$page->footer();
}
exit;
}
示例12: actionIndex
public function actionIndex()
{
$page = new page();
$page->title = '系统管理中心';
$page->body = array('class' => 'frame');
$page->set('user', $this->user);
$page->display();
}
示例13: actionEdit
public function actionEdit($id)
{
$blog = zotop::model('blog.blog');
$status = $blog->status();
$category = zotop::model('blog.category');
$categorys = $category->getAll();
if (form::isPostBack()) {
$post = form::post();
$blog->edit($post, $id);
if (!$blog->error()) {
msg::success('保存成功', form::referer());
}
msg::error($blog->msg());
}
//读取数据
$data = $blog->read($id);
$categoryid = $data['categoryid'];
//渲染页面
$page = new page();
$page->set('title', '编辑日志');
$page->set('navbar', $this->navbar($categoryid));
$page->set('globalid', $blog->globalid());
$page->set('data', $data);
$page->set('status', $status);
$page->set('categoryid', $categoryid);
$page->set('categorys', $categorys);
$page->display();
}
示例14: actionUpload
public function actionUpload()
{
$config = zotop::model('zotop.config');
if (form::isPostBack()) {
$post = form::post();
$save = $config->save($post);
if ($save) {
msg::success('保存成功,重新加载中,请稍后……');
}
msg::error($save);
}
$fields = $config->fields('upload');
$page = new page();
$page->set('title', '上传设置');
$page->set('navbar', $this->navbar());
$page->set('fields', $fields);
$page->display();
}
示例15: actionTheme
public function actionTheme()
{
$config = zotop::model('system.config');
if (form::isPostBack()) {
$post = form::post();
$config->save($post);
if ($config->error()) {
msg::error($config->msg());
}
msg::success('保存成功');
}
$theme = $config->fields('system.theme');
$page = new page();
$page->set('title', zotop::t('系统设置'));
$page->set('navbar', $this->navbar());
$page->set('theme', $theme);
$page->display();
}