public function actionUpload() { $file = zotop::model('system.file'); $file->upload->allowexts = 'jpg|jpeg|png|gif'; $folder = zotop::model('system.folder'); if (form::isPostBack()) { $file->globalid = zotop::post('globalid'); $file->field = zotop::post('field'); $file->description = zotop::post('description'); $files = $file->upload(); if (!$file->error() && isset($files[0]['path'])) { msg::success('图片上传成功', zotop::url('system/image/upload')); } msg::error($file->msg()); } $folders = $folder->getAll(); $tree = new tree($folders, 0); $categorys = $tree->getOptionsArray(); $page = new dialog(); $page->set('title', '本地上传'); $page->set('navbar', $this->navbar()); $page->set('allowexts', $file->upload->allowexts); $page->set('maxsize', $file->upload->maxsize); $page->set('categorys', $categorys); $page->display(); }
function msg_useraction() { ?> <span id="msg"> <a href="<?php echo zotop::url('msg/list'); ?> " target="mainIframe">短消息</a> <span id="msg-unread"> <a href="<?php echo zotop::url('msg/list/unread'); ?> " target="mainIframe"><span id="msg-unread-num">0</span>条未读</a> </span> <b>|</b> </span> <script> //获取未读消息数目 function getUnreadMsg(){ var url = "<?php echo zotop::url('msg/list/unread'); ?> "; $.get(url,'',function(msg){ msg.num = parseInt(msg.num); $('#msg-unread-num').html(msg.num); },'json'); }; //定时获取未读短消息数目 (function(){ setInterval(getUnreadMsg,10000); })(); </script> <?php }
public function onDefault() { $header['title'] = '控制面板'; $header['js'][] = url::module() . '/admin/js/side.js'; $header['body']['class'] = 'side'; page::header($header); block::header(array('title' => '应用列表', 'action' => '<a href="#" title="栏目管理">管理</a>')); echo '<ul id="applications" class="list">'; echo ' <li><a href="' . zotop::url('zotop/main') . '" target="mainIframe">控制中心</a></li>'; echo ' <li><a href="' . zotop::url('zotop/test') . '" target="mainIframe">表单测试</a></li>'; echo ' <li><a href="' . zotop::url('database') . '" target="mainIframe">数据库管理</a></li>'; echo ' <li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>'; echo '</ul>'; block::footer(); block::header(array('title' => '内容管理', 'action' => '<a href="javascript:zotop.frame.side().location.reload();">刷新</a> <a href="#" title="栏目管理">管理</a>')); echo '<ul class="list">'; echo ' <li><a href="' . zotop::url('zotop/main') . '" target="mainIframe">控制中心</a></li>'; echo ' <li><a href="' . zotop::url('zotop/test') . '" target="mainIframe">表单测试</a></li>'; echo ' <li><a href="' . zotop::url('database') . '" target="mainIframe">数据库管理</a></li>'; echo ' <li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>'; echo '</ul>'; block::footer(); //echo '<div style="height:600px;"></div>'; page::footer(); }
public function actionSelect($field = '', $dir = '') { $dir = empty($dir) ? zotop::get('dir') : $dir; $dir = trim(url::decode($dir), '/'); $path = site::template(); $path = $path . DS . str_replace('/', DS, $dir); $path = path::clean($path); $folders = folder::folders($path); $files = folder::files($path); $position = '<a href="' . zotop::url('system/template/select') . '">' . zotop::t('根目录') . '</a><em> : //</em> '; if (!empty($dir)) { $dirs = arr::dirpath($dir, '/'); foreach ($dirs as $d) { $position .= '<a href="' . zotop::url('system/template/select', array('dir' => rawurlencode($d[1]))) . '">' . $d[0] . '</a> <em>/</em>'; } } $page = new dialog(); $page->title = zotop::t('模板管理'); $page->set('field', $field); $page->set('dir', $dir); $page->set('position', $position); $page->set('folders', $folders); $page->set('files', $files); $page->display(); }
public function editAction($tablename) { if (form::isPostBack()) { $tablename = request::post('tablename'); $name = request::post('name'); $comment = request::post('comment'); $primary = request::post('primary'); if (strtolower($tablename) !== strtolower($name)) { $rename = zotop::db()->table($tablename)->rename($name); } if ($comment !== NULL) { $comment = zotop::db()->table($name)->comment($comment); } if ($primary) { $primary = zotop::db()->table($name)->primary($primary); } $this->success('数据表设置成功,正在刷新页面,请稍后……', zotop::url('database/table')); } $db = zotop::db(); $database = $db->config(); $tables = $db->tables(true); $table = $tables[$tablename]; if (!isset($table)) { $this->error(zotop::t('数据表{$tablename}不存在', array('tablename' => $tablename))); } $page = new dialog(); $page->title = '数据库管理:' . $database['database'] . ' @ ' . $database['hostname'] . '<i>></i> 编辑:' . $tablename; $page->set('database', $database); $page->set('table', $table); $page->display(); }
public function onSide() { $header['title'] = '系统管理'; $header['js'][] = url::module() . '/admin/js/side.js'; $header['body']['class'] = 'side'; page::header($header); block::header(array('title' => '系统工具', 'class' => 'show')); echo '<ul id="applications" class="list">'; echo ' <li><a href="' . zotop::url('zotop/system/reboot') . '" target="mainIframe">系统关闭与重启</a></li>'; echo ' <li><a href="' . zotop::url('zotop/system/clearcahce') . '" target="mainIframe">缓存清理</a></li>'; echo ' <li><a href="' . zotop::url('zotop/setting') . '" target="mainIframe">系统设置</a></li>'; echo ' <li><a href="' . zotop::url('zotop/database') . '" target="mainIframe">数据库备份与还原</a></li>'; echo ' <li><a href="' . zotop::url('database') . '" target="mainIframe">数据库管理</a></li>'; echo ' <li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>'; echo '</ul>'; block::footer(); block::header(array('title' => '模块管理', 'class' => 'show')); echo '<ul class="list">'; echo ' <li><a href="' . zotop::url('zotop/module') . '" target="mainIframe">模块管理</a></li>'; echo ' <li><a href="' . zotop::url('zotop/module/add') . '" target="mainIframe">模块添加</a></li>'; echo ' <li><a href="' . zotop::url('zotop/module/install') . '" target="mainIframe">模块安装</a></li>'; echo '</ul>'; block::footer(); block::header(array('title' => '管理员设置', 'class' => 'show')); echo '<ul class="list">'; echo ' <li><a href="' . zotop::url('zotop/user') . '" target="mainIframe">系统用户管理</a></li>'; echo ' <li><a href="' . zotop::url('zotop/usergroup') . '" target="mainIframe">系统用户组管理</a></li>'; echo ' <li><a href="' . zotop::url('zotop/role') . '" target="mainIframe">系统角色管理</a></li>'; echo '</ul>'; block::footer(); //echo '<div style="height:600px;"></div>'; page::footer(); }
public function actionIndex() { $db = zotop::db(); if ($db->connect()) { zotop::redirect(zotop::url('database/table')); } msg::error('连接数据库失败,请检查数据库配置是否正确'); }
public function actionDelete($tablename) { $delete = zotop::db()->table($tablename)->drop(); if (!$delete) { msg::error(zotop::t('删除数据表{$tablename}失败', array('tablename' => $tablename))); } msg::success('删除成功', zotop::url('database/table')); }
public function actionSide() { $category = zotop::model('content.category'); $tree = $category->getTree(0, '<span class="zotop-icon zotop-icon-$icon"></span><a href="' . zotop::url('content/content/index/$id') . '" target="mainIframe">$title</a>'); $page = new side(); $page->set('title', zotop::t('文件管理')); $page->set('tree', $tree); $page->display(); }
public function onDefault() { $site = array(); $site['name'] = zotop::config('zotop.site.name'); $site['totalsize'] = zotop::config('zotop.ftp.size'); $site['totalsize'] = (int) $site['totalsize'] == 0 ? '--' : format::byte($site['totalsize']); $database = array(); $database['size'] = zotop::db()->size(); $database['size'] = format::byte($database['size']); $page['title'] = '控制中心'; $page['css'][] = url::module() . '/admin/css/main.css'; zotop::add('zotop.main.main', array(&$this, 'notepad')); zotop::add('zotop.main.main', array(&$this, 'mylog')); page::header($page); page::top(); page::navbar($this->navbar(), 'main'); page::add(''); page::add('<div id="user" class="clearfix">'); page::add(' <div id="userface"><span class="image">' . html::image(zotop::user('image')) . '</span></div>'); page::add(' <div id="userinfo">'); page::add(' <h2 id="welcome">欢迎您,' . zotop::user('name') . ' <span id="sign">' . zotop::user('sign') . '</span></h2>'); page::add(' <div id="login">登录时间:' . time::format(zotop::user('logintime')) . ' 登录次数:' . zotop::user('loginnum') . ' 登录IP:' . zotop::user('loginip') . '</div>'); //加载hook zotop::run('zotop.main.action'); page::add(''); page::add('</div>'); page::add('<div class="grid-m-s">'); page::add('<div class="col-main">'); page::add('<div class="col-main-inner">'); zotop::run('zotop.main.main'); page::add('</div>'); page::add('</div>'); page::add('<div class="col-sub">'); zotop::run('zotop.main.sub'); block::header(array('title' => '网站信息', 'action' => '<a class="more" href="' . zotop::url('zotop/info/site') . '">详细</a>')); echo '<table class="table">'; echo '<tr><td class="w80">网站名称:</td><td>' . $site['name'] . '</td></tr>'; echo '<tr><td class="w80">空间占用:</td><td>' . $site['totalsize'] . '</td></tr>'; echo '<tr><td class="w80">已上传文件:</td><td></td></tr>'; echo '<tr><td class="w80">数据库大小:</td><td>' . $database['size'] . '</td></tr>'; echo '</table>'; block::footer(); block::header(array('title' => '系统信息', 'action' => '<a class="more" href="' . zotop::url('zotop/main/system') . '">详细</a>')); echo '<table class="table">'; echo '<tr><td class="w80">程序版本:</td><td>' . zotop::config('zotop.version') . '</td></tr>'; echo '<tr><td class="w80">程序设计:</td><td>' . zotop::config('zotop.author') . '</td></tr>'; echo '<tr><td class="w80">程序开发:</td><td>' . zotop::config('zotop.authors') . '</td></tr>'; echo '<tr><td class="w80">官方网站:</td><td><a href="' . zotop::config('zotop.homepage') . '" target="_blank">' . zotop::config('zotop.homepage') . '</a></td></tr>'; echo '<tr><td class="w80">安装时间:</td><td>' . zotop::config('zotop.install') . '</td></tr>'; echo '</table>'; block::footer(); page::add('</div>'); page::add('</div>'); page::bottom('<span class="zotop-tip">上次登录时间:' . time::format(zotop::user('logintime')) . '</span>'); page::footer(); }
public function actionDelete($id) { $category = zotop::model('blog.category'); $category->id = $id; $category->delete(); if (!$category->error()) { msg::success('删除成功', zotop::url('blog/category/index')); } msg::error($category->msg()); }
public static function top() { $html[] = ''; $html[] = '<div id="zotop" class="clearfix">'; $html[] = '<div id="header">'; $html[] = '<h2>' . self::settings('title') . '</h2>'; $html[] = '<h3><a id="favorate" href="' . zotop::url('zotop/favorate/add') . '" class="dialog" title="将该页面加入我的收藏夹">加入收藏</a></h3>'; $html[] = '</div>'; $html[] = '<div id="body" class="clearfix">'; echo implode("\n", $html); }
function system_navabr_content() { ?> <li><a href="javascript:void(0);" onclick="top.go('<?php echo zotop::url('content/index/side'); ?> ','<?php echo zotop::url('content/index/index'); ?> ')"><span>内容管理</span></a></li> <?php }
public function top() { $html[] = ''; $html[] = '<div id="header" class="clearfix">'; $html[] = ' <div id="page-title">' . $this->title . '</div>'; $html[] = ' <div id="page-description">' . $this->position() . '</div>'; $html[] = '</div>'; $html[] = '<div id="topbar">'; $html[] = ' <a id="favorate" href="' . zotop::url('zotop/favorate/add') . '" class="dialog" title="' . zotop::t('将该页面加入我的收藏夹') . '"><span class="zotop-icon zotop-icon-favorate"></span><span>' . zotop::t('加入收藏') . '</span></a>'; $html[] = '</div>'; $html[] = '<div id="body" class="clearfix">'; echo implode("\n", $html); }
public function sideAction() { $tools = array('reboot' => array('id' => 'reboot', 'title' => '系统重启', 'href' => zotop::url('zotop/system/reboot')), 'close' => array('id' => 'close', 'title' => '关闭网站', 'href' => zotop::url('zotop/system/close')), 'config' => array('id' => 'config', 'title' => '注册表管理', 'href' => zotop::url('zotop/config'))); $tools = zotop::filter('zotop.system.tools', $tools); $users = array('user' => array('id' => 'reboot', 'title' => '系统用户管理', 'href' => zotop::url('zotop/user')), 'usergroup' => array('id' => 'close', 'title' => '系统用户组管理', 'href' => zotop::url('zotop/usergroup'))); $modules = array('list' => array('id' => 'list', 'title' => '模块列表', 'href' => zotop::url('zotop/module')), 'install' => array('id' => 'uninstalled', 'title' => '安装新模块', 'href' => zotop::url('zotop/module/uninstalled'))); $page = new side(); $page->title = '系统控制面板'; $page->set('tools', $page->navlist($tools)); $page->set('users', $page->navlist($users)); $page->set('modules', $page->navlist($modules)); $page->display(); }
public function actionSide() { $m = array(); $modules = (array) zotop::module(); foreach ($modules as $module) { if ($module['type'] == 'com') { $module['href'] = zotop::url($module['id']); $m[$module['id']] = $module; } } $page = new side(); $page->set('modules', $page->navlist($m)); $page->display(); }
public function actionSide() { $modules = (array) zotop::modules(); foreach ($modules as $id => $module) { if ($module['type'] != 'com') { unset($modules[$id]); } else { $modules[$id]['href'] = zotop::url($module['id']); } } $page = new side(); $page->title = '系统控制面板'; $page->set('modules', $modules); $page->display(); }
public function top() { $html[] = ''; $html[] = '<div id="zotop" class="clearfix">'; $html[] = '<div id="header">'; $html[] = '<h2>'; $html[] = ' <span id="page-title">' . $this->title . '</span>'; if (!empty($this->data['position'])) { $html[] = ' <span id="page-position"><span>当前位置:</span>' . $this->data['position'] . '</span>'; } $html[] = '</h2>'; $html[] = '<h3><a id="favorate" href="' . zotop::url('zotop/favorate/add') . '" class="button dialog" title="将该页面加入我的收藏夹"><span class="button-icon zotop-icon zotop-icon-favorate"></span><span class="button-text">加入收藏</span></a></h3>'; $html[] = '</div>'; $html[] = '<div id="body" class="clearfix">'; echo implode("\n", $html); }
function xheditor_rc1($attrs) { $attrs['class'] = isset($attrs['class']) ? 'editor ' . $attrs['class'] : 'editor'; $tools = array('image' => '<a href="' . zotop::url('system/image/upload') . '" class="button editor-insert" name="' . $attrs['name'] . '"><span class="zotop-icon zotop-icon-imageuploader button-icon"></span><span class="button-text">插入图片</span></a>', 'file' => '<a href="' . zotop::url('system/file/upload') . '" class="button editor-insert" name="' . $attrs['name'] . '"><span class="zotop-icon zotop-icon-fileuploader button-icon"></span><span class="button-text">插入文件</span></a>', 'template' => '<a href="' . zotop::url('system/file/upload') . '" class="button editor-insert" name="' . $attrs['name'] . '"><span class="zotop-icon zotop-icon-template button-icon"></span><span class="button-text">插入模板</span></a>'); $tools = zotop::filter('editor.tools', $tools); $tools = arr::take('tools', $attrs) === false ? array() : $tools; $url = zotop::module('xheditor', 'url'); $html[] = html::script($url . '/editor/xheditor-zh-cn.min.js'); $html[] = html::script($url . '/common/global.js'); if (is_array($tools) && !empty($tools)) { $html[] = '<div class="field-toolbar">'; foreach ($tools as $tool) { $html[] = ' ' . $tool; } $html[] = '</div>'; } $html[] = ' ' . field::textarea($attrs); return implode("\n", $html); }
public function actionUpload($globalid, $field, $image = '') { $file = zotop::model('zotop.image'); if (form::isPostBack()) { $file->globalid = $globalid; $file->field = $field; $file->description = request::post('description'); $files = $file->upload(); if (!$file->error() && isset($files[0]['path'])) { msg::success('图片上传成功', zotop::url('zotop/image/preview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($files[0]['path'])))); } msg::error($file->msg()); } $page = new dialog(); $page->set('title', '本地上传'); $page->set('navbar', $this->navbar($globalid, $field, $image)); $page->set('alowexts', $file->upload->alowexts); $page->set('maxsize', $file->upload->maxsize); $page->display(); }
public function actionImageFromLocal($globalid, $field, $image) { $upload = zotop::model('zotop.upload'); $upload->alowexts = array('jpg', 'jpeg', 'gif', 'png', 'bmp'); if (form::isPostBack()) { $upload->bind('globalid', request::post('globalid')); $upload->bind('field', request::post('field')); $upload->bind('description', request::post('description')); $files = $upload->save(); $image = $files[0]; if ($upload->error() == 0 && $image) { msg::success($upload->msg(), zotop::url('zotop/upload/imagePreview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($image['path'])))); } msg::error($upload->msg()); } $page = new dialog(); $page->set('title', '本地上传'); $page->set('navbar', $this->navbar($globalid, $field, $image)); $page->set('alowexts', $upload->alowexts); $page->set('maxsize', $upload->maxsize); $page->display(); }
public function actionIndex($type = 'all', $folderid = 0) { $file = zotop::model('system.file'); $folder = zotop::model('system.folder'); if (!empty($type) && $type != 'all') { $where = array('file.type', '=', $type); } $files = $file->db()->select('file.*', 'user.name as user_name', 'user.username as user_username')->join('user', 'user.id', 'file.userid')->where($where)->orderby('file.createtime', 'desc')->getPage(); //zotop::dump($file->db()->Sql()); $types = $file->types(); $pagination = new pagination(); $pagination->page = $files['page']; $pagination->pagesize = $files['pagesize']; $pagination->total = $files['total']; $p = $pagination->render(); $totalsize = $file->totalsize($where); $totalcount = $file->count(); $folders = $folder->getAll(); $tree = new tree($folders, 0); $position = $tree->getPosition($folderid); foreach ($position as $p) { $pos[zotop::url('system/file/index/' . $type . '/' . $p['id'])] = $p['title']; } $page = new page(); $page->set('title', zotop::t('文件管理')); $page->set('position', array(zotop::url('system/file') => zotop::t('文件管理'), zotop::url('system/file/' . $type . '/0') => zotop::t('全部文件')) + (array) $pos + array('列表')); $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->set('types', $types); $page->set('type', $type); $page->set('folderid', $folderid); $page->display(); }
public function actionIndex($dir = '') { $dir = url::clean($dir); $path = ZOTOP_PATH_ROOT . DS . trim($dir, DS); $path = path::clean($path); //获取当前目录的子目录及子文件 $folders = (array) dir::folders($path); $files = (array) dir::files($path); $position = '<a href="' . zotop::url('webftp/index/index') . '">wwwroot</a>'; $dirs = arr::dirpath($dir, '/'); foreach ($dirs as $d) { $position .= ' / <a href="' . zotop::url('webftp/index/index', array('dir' => rawurlencode($d[1]))) . '">' . $d[0] . '</a>'; } $page = new page(); $page->title = '文件管理器'; $page->set('position', $position); $page->set('navbar', $this->navbar($dir)); $page->set('folders', $folders); $page->set('files', $files); $page->set('path', $path); $page->set('dir', $dir); $page->display(); }
public function actionIndex($categoryid = 0, $page = 1) { $blog = zotop::model('blog.blog'); $blog->category = zotop::model('blog.category'); $blogs = $blog->getPage($categoryid, 100, $page, 15); if (!empty($categoryid)) { $blog->category->read($categoryid); } $categorys = $blog->category->getAll(); $pagination = pagination::output($blogs['total'], $blogs['page'], $blogs['pagesize'], zotop::url("blog/list/{$categoryid}/{#page}")); //渲染页面 $page = new page(); $page->set('title', $blog->category->title); $page->set('keywords', $blog->category->keywords); $page->set('description', $blog->category->description); $page->set('body', array('class' => 'list')); $page->set('categoryid', $categoryid); $page->set('blog', $blog); $page->set('blogs', $blogs); $page->set('categorys', $categorys); $page->set('pagination', $pagination); $page->display('blog.list'); }
<div class="column-sub"> <div class="column-sub-inner"> <?php box::header(array('title' => '日志分类')); ?> <div class="navbarlist"> <ul> <?php foreach ($categorys as $c) { ?> <li<?php echo $categoryid == $c['id'] ? ' class="selected"' : ''; ?> ><a class="textflow" href="<?php echo zotop::url('blog/list/' . $c['id']); ?> "><span class="zotop-icon zotop-icon-folder"></span><?php echo $c['title']; ?> </a></li> <?php } ?> </ul> </div> <?php box::footer(); ?> <?php zotop::run('blog.side', $blog);
function mylog() { block::header(array('title' => '日志记录', 'action' => '<a class="more" href="' . zotop::url('zotop/log') . '">更多</a>')); echo '<div style="height:200px;"></div>'; block::footer(); }
arr.push(key + ':' + val); } } $('input[name=valid]').val(arr.join(',')); } $(function(){ //setValid(); }) $(function(){ $('select[name=field]').change(function(){ var type = $(this).val(); var href = "<?php echo zotop::url('content/field/attrs/__type__'); ?> "; href = href.replace(/__type__/i, type); $('#settings').load(href,function(){ setValid(); }); }); }); $(function(){ $('select[name=type]').live('change',function(){ var type = $(this).val(); var $maxlength = $('input[name=maxlength]'); switch(type.toLowerCase())
public function onDefault() { $header['title'] = '控制中心'; $header['js'] = url::module() . '/admin/js/index.js'; $header['body']['class'] = 'frame'; page::header($header); $html[] = ''; $html[] = '<script type="text/javascript">'; $html[] = ' zotop.url.frame.side="' . zotop::url('zotop/side') . '"'; $html[] = ' zotop.url.frame.main="' . zotop::url('zotop/main') . '"'; $html[] = ' zotop.url.msg.unread="' . zotop::url('zotop/msg/unread') . '"'; $html[] = '</script>'; $html[] = ' <div id="header">'; $html[] = ' <div id="top">'; $html[] = ' <div id="logo"><a href="' . zotop::url('zotop/main') . '" target="mainIframe" onfocus="this.blur();" title="首页"></a></div>'; $html[] = ' <div id="action">'; $html[] = ' <div id="topbar">'; $html[] = ' <a href="javascript:notepad()">记事本</a><b>|</b>'; $html[] = ' <a href="' . zotop::url('zotop/setting') . '" target="mainIframe">系统设置</a><b>|</b>'; $html[] = ' <a href="' . zotop::url('zotop/about') . '" target="mainIframe" class="dialog {width:450,height:160}">关于</a>'; $html[] = ' </div>'; $html[] = ' <div id="user">'; $html[] = ' <span id="user-info"><b>' . zotop::user('username') . '</b>(administrator)</span>'; $html[] = ' <span id="user-action">'; $html[] = ' <span id="msg"><a href="' . zotop::url('zotop/msg') . '" target="mainIframe">短消息</a><span id="msg-unread"><a href="' . zotop::url('zotop/msg/default/0') . '" target="mainIframe"><span id="msg-unread-num">0</span>条未读</a></span><b>|</b></span>'; $html[] = ' <a href="' . zotop::url('zotop/user/changepassword') . '" target="mainIframe">修改我的密码</a><b>|</b>'; $html[] = ' <a href="' . zotop::url('zotop/login/logout') . '" id="logout" class="confirm {content:\'<h1>您确定要退出登录?</h1>退出登陆后将默认将返回系统登录页面\',yes:\'安全退出\'}">安全退出</a>'; $html[] = ' </span>'; $html[] = ' </div>'; $html[] = ' <div id="navbar">'; $html[] = ' <ul>'; $html[] = ' <li><a href="' . zotop::url('zotop/main') . '" target="mainIframe"><span>控制中心</span></a></li>'; $html[] = ' <li><a href="' . zotop::url('content') . '" target="mainIframe"><span>内容管理</span></a></li>'; $html[] = ' <li><a href="' . zotop::url('member') . '" target="mainIframe"><span>会员管理</span></a></li>'; $html[] = ' <li><a href="' . zotop::url('zotop/test') . '" target="mainIframe"><span>系统管理</span></a></li>'; $html[] = ' </ul>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="position">'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="body">'; $html[] = ' <div id="side">'; $html[] = ' <div id="side-inner">'; $html[] = ' <div id="side-header">'; $html[] = ' <div class="side-block-header">'; $html[] = ' <div class="side-block-title">应用列表</div>'; $html[] = ' <div class="side-block-action"><a href="#">管理</a></div>'; $html[] = ' </div>'; $html[] = ' <div class="side-block-body">'; $html[] = ' <ul id="applications">'; $html[] = ' <li><a href="' . zotop::url('zotop/main') . '" target="mainIframe">控制中心</a></li>'; $html[] = ' <li><a href="' . zotop::url('zotop/test') . '" target="mainIframe">表单测试</a></li>'; $html[] = ' <li><a href="' . zotop::url('database') . '" target="mainIframe">数据库管理</a></li>'; $html[] = ' <li><a href="' . zotop::url('zotop/io') . '" target="mainIframe">文件管理</a></li>'; $html[] = ' </ul>'; $html[] = ' </div>'; $html[] = ' <div class="side-block-footer">'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="side-body">'; $html[] = ' <div class="side-block-header">'; $html[] = ' <div class="side-block-title">内容管理</div>'; $html[] = ' <div class="side-block-action"><a href="javascript:zotop.frame.side().location.reload();">刷新</a> <a href="#" title="栏目管理">管理</a></div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="side-extra">'; $html[] = ' <div class="inner">'; $html[] = ' ' . html::iframe('sideIframe', 'about:blank', array('frameborder' => 'no', 'scrolling' => 'auto', 'width' => '100%', 'height' => '100%')); $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="side-footer">'; $html[] = ' <div>Powered by <a href="' . zotop::config('zotop.homepage') . '" target="_blank">' . zotop::config('zotop.name') . ' ' . zotop::config('zotop.version') . '</a></div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="main">'; $html[] = ' ' . html::iframe('mainIframe', 'about:blank', array('frameborder' => 'no', 'scrolling' => 'auto', 'width' => '100%', 'height' => '100%')); $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div id="footer">'; $html[] = ' </div>'; echo implode("\n", $html); page::footer(); }
/** * 图片上传输入框 * * @param $attrs array 控件参数 * @return string 控件代码 */ public static function image($attrs) { $attrs['handle'] = empty($attrs['handle']) ? zotop::url('zotop/upload/image') : $attrs['handle']; $html[] = html::script(url::common() . '/js/zotop.upload.js'); $html[] = '<div class="field-inner inline-block">'; $html[] = ' ' . field::text($attrs); $html[] = ' ' . html::input(array('type' => 'button', 'class' => 'upload-image', 'title' => zotop::t('上传图片'))); $html[] = '</div>'; return implode("\n", $html); }
public function actionDelete($id) { $config = zotop::model('system.config'); $config->id = $id; $config->read(); if ($config->childNum($id) > 0) { msg::error('该项下面尚有子项,无法被删除!'); } $delete = $config->delete(); if ($delete) { $config->cache(true); msg::success('删除成功,重新加载中,请稍后……', zotop::url('system/config/index/' . $config->parentid)); } }