本文整理汇总了PHP中zotop::get方法的典型用法代码示例。如果您正苦于以下问题:PHP zotop::get方法的具体用法?PHP zotop::get怎么用?PHP zotop::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zotop
的用法示例。
在下文中一共展示了zotop::get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionShortcut
public function actionShortcut()
{
$title = zotop::get('title');
$url = zotop::get('url');
$shortcut = "[InternetShortcut]\nURL=" . $url . "\nIDList= [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . $title . ".url;");
echo $shortcut;
}
示例2: actionAdd
public function actionAdd()
{
$category = zotop::model('blog.category');
$referer = zotop::get('referer');
$referer = empty($referer) ? zotop::url('blog/category/index') : $referer;
if (form::isPostBack()) {
$post = form::post();
$category->insert($post);
if (!$category->error()) {
msg::success('保存成功', $referer);
}
msg::error($category->msg());
}
$data['id'] = $category->max('id') + 1;
$data['order'] = $data['id'];
$page = new dialog();
$page->set('title', '添加分类');
$page->set('referer', $referer);
$page->set('data', $data);
$page->display();
}
示例3: actionEdit
public function actionEdit($file = '')
{
$file = empty($file) ? zotop::get('file') : $file;
$file = trim(url::decode($file), '/');
$filepath = ZOTOP_PATH_ROOT . DS . str_replace('/', DS, $file);
if (form::isPostBack()) {
$content = request::post('source');
$content = trim($content);
if (empty($content)) {
msg::error('内容为空,无法保存!');
}
file::write($filepath, trim($content));
msg::success('内容保存成功!');
}
$filecontent = file::read($filepath);
$page = new dialog();
$page->title = '文件编辑器';
$page->set('file', $file);
$page->set('filepath', $filepath);
$page->set('filecontent', $filecontent);
$page->display();
}
示例4: actionIndex
public function actionIndex($dir = '')
{
$dir = empty($dir) ? zotop::get('dir') : $dir;
$dir = url::decode($dir);
$path = ZOTOP_PATH_ROOT . DS . trim($dir, DS);
$path = path::clean($path);
//获取当前目录的子目录及子文件
$folders = (array) folder::folders($path);
$files = (array) folder::files($path);
$position = '<a href="' . zotop::url('webftp/index/index') . '">root</a>';
$dirs = arr::dirpath($dir, '/');
foreach ($dirs as $d) {
$position .= ' <em>/</em> <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();
}
示例5: actionDelete
public function actionDelete($file)
{
$file = empty($file) ? zotop::get('file') : $file;
$file = trim(url::decode($file), '/');
$filepath = site::template($file);
if (file::delete($filepath)) {
msg::success('删除成功', url::referer());
}
msg::error('删除失败');
}
示例6:
?>
" target="mainIframe">待审核</a></li>
<li><span class="zotop-icon zotop-icon-draft"></span><a href="<?php
echo zotop::url('content/content/draft');
?>
" target="mainIframe">草稿箱</a></li>
<li><span class="zotop-icon zotop-icon-recycle"></span><a href="<?php
echo zotop::url('content/content/recycle');
?>
" target="mainIframe">回收站</a></li>
</ul>
</div>
<?php
box::footer();
box::header();
?>
<form class="smallsearch" target="mainIframe" method="get" action="<?php
echo zotop::url('content/content/index');
?>
">
<input type="text" name="keywords" class="text" value="<?php
echo zotop::get('keywords');
?>
" title="请输入关键词进行搜索"/>
<button type="submit"><span class="zotop-icon zotop-icon-search button-icon"></span></button>
</form>
<?php
box::footer();
$this->bottom();
$this->footer();
示例7: actionSave
public function actionSave()
{
$content = zotop::model('content.content');
if (form::isPostBack()) {
$post = form::post();
$return = zotop::get('return');
$status = zotop::get('status');
if (is_numeric($status)) {
$post['status'] = $status;
}
$content->save($post);
if (!$content->error()) {
msg::success('保存成功', $return);
}
msg::error($content->msg());
}
return true;
}