本文整理汇总了PHP中zotop::url方法的典型用法代码示例。如果您正苦于以下问题:PHP zotop::url方法的具体用法?PHP zotop::url怎么用?PHP zotop::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zotop
的用法示例。
在下文中一共展示了zotop::url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionUpload
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();
}
示例2: msg_useraction
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
}
示例3: onDefault
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();
}
示例4: actionSelect
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();
}
示例5: editAction
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();
}
示例6: onSide
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();
}
示例7: actionIndex
public function actionIndex()
{
$db = zotop::db();
if ($db->connect()) {
zotop::redirect(zotop::url('database/table'));
}
msg::error('连接数据库失败,请检查数据库配置是否正确');
}
示例8: actionDelete
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'));
}
示例9: actionSide
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();
}
示例10: onDefault
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();
}
示例11: actionDelete
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());
}
示例12: top
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);
}
示例13: system_navabr_content
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
}
示例14: top
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);
}
示例15: sideAction
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();
}