本文整理匯總了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();
}