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 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(); }
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 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 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(); }
public static function source($attrs) { $html = array(); $html[] = ''; $html[] = '<div style="height:460px;overflow:hidden;">'; $html[] = '<div id="SourceEditorPannel">正在加载编辑器,请稍后……</div>'; $html[] = html::script(url::common() . '/js/swfobject.js'); $html[] = html::script(url::module() . '/admin/js/file.js'); $html[] = field::textarea($attrs); $html[] = '</div>'; return implode("\n", $html); }
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(); }
public static function controller() { $url = url::module(); $url = $url . '/' . APP_NAME; return $url; }
public function onDefault() { $header['title'] = '控制中心'; $header['css'] = url::module() . '/admin/css/index.css'; $header['js'][] = url::module() . '/admin/js/index.js'; $header['body']['class'] = 'frame'; page::header($header); $html[] = ''; $html[] = '<script type="text/javascript">'; $html[] = ' zotop.url.main="' . url::build('system/index/main') . '"'; $html[] = ' zotop.url.msgUnread="' . url::build('system/msg/unread') . '"'; $html[] = '</script>'; $html[] = '<table id="frames" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">'; $html[] = ' <tr id="header">'; $html[] = ' <td colspan="2">'; $html[] = ' <div id="top">'; $html[] = ' <div id="logo"><a href="' . url::build('system') . '" 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="' . url::build('system/setting') . '" target="mainIframe">系统设置</a><b>|</b>'; $html[] = ' <a href="' . url::build('system/about') . '" target="mainIframe" class="dialog {width:450,height:160}">关于</a>'; $html[] = ' </div>'; $html[] = ' <div id="user">'; $html[] = ' <span id="user-info"><b>zotop</b>(administrator)</span>'; $html[] = ' <span id="user-action">'; $html[] = ' <span id="msg"><a href="' . url::build('system/msg') . '" target="mainIframe">短消息</a><span id="msg-unread"><a href="' . url::build('system/msg/default/0') . '" target="mainIframe"><span id="msg-unread-num">0</span>条未读</a></span><b>|</b></span>'; $html[] = ' <a href="' . url::build('system/user/changepassword') . '" target="mainIframe">修改我的密码</a><b>|</b>'; $html[] = ' <a href="' . url::build('system/login/logout') . '" id="logout" class="confirm {content:\'<h1>您确定要退出登录?</h1>退出登陆后将默认将返回系统登录页面\',yes:\'安全退出\'}">安全退出</a>'; $html[] = ' </span>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' </td>'; $html[] = ' </tr>'; $html[] = ' <tr id="body">'; $html[] = ' <td id="side">'; $html[] = ' <div class="sideinner">'; $html[] = ' <div class="header">'; $html[] = ' <div class="top">'; $html[] = ' <a href="' . url::build('system/index/main') . '" target="mainIframe">控制中心</a>'; $html[] = ' <a href="' . url::build('system/login') . '" target="mainIframe">登陆测试</a>'; $html[] = ' <a href="' . url::build('system/test') . '" target="mainIframe">表单测试</a>'; $html[] = ' <a href="' . url::build('system/database') . '" target="mainIframe">数据库管理</a>'; $html[] = ' </div>'; $html[] = ' <div class="body-header">'; $html[] = ' <div class="body-title">栏目列表</div>'; $html[] = ' <div class="body-action">刷新</div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div class="body">'; $html[] = ' <div class="inner">'; $html[] = ' <div style="height:600px;">fffffff</div>'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' <div class="footer">'; $html[] = ' </div>'; $html[] = ' </div>'; $html[] = ' </td>'; $html[] = ' <td id="main">'; $html[] = ' ' . html::iframe('mainIframe', 'about:blank', array('frameborder' => 'no', 'scrolling' => 'auto', 'width' => '100%', 'height' => '100%')); $html[] = ' </td>'; $html[] = ' </tr>'; $html[] = ' <tr id="footer">'; $html[] = ' <td colspan="2"></td>'; $html[] = ' </tr>'; $html[] = '</table>'; echo implode("\n", $html); page::footer(); }
public static function decode($url) { $url = str_replace(array('%root%', '%zotop%', '%theme%', '%module%'), array(url::root(), url::zotop(), url::theme(), url::module()), $url); return $url; }