本文整理汇总了PHP中system::display方法的典型用法代码示例。如果您正苦于以下问题:PHP system::display方法的具体用法?PHP system::display怎么用?PHP system::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system
的用法示例。
在下文中一共展示了system::display方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start
public static function start()
{
system::$display = false;
header("Content-Type: text/xml, charset=utf-8");
// IE cache fix
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
}
示例2: rss
function rss()
{
system::$display = false;
rss::setHTTPHeaders();
$this->smarty->setCacheID("RSS|ARTICLES");
if (!$this->smarty->isCached()) {
$sqlData = rss::getLastPostsWithType("article");
$items = $sqlData->fetchAll();
$this->smarty->assign("items", $items);
}
echo $this->smarty->fetch(TPL_PATH . "/rss/rssMain.tpl", "RSS|ARTICLES");
}
示例3: editPageAjax
function editPageAjax()
{
$id = intval($_GET["contentID"]);
$fill = $_POST;
if ($_POST) {
// echo '<pre>'.print_r($_POST,1).'</pre>';
if (isset($_POST['x1']) && isset($_POST['y1']) && isset($_POST['w1']) && isset($_POST['h1']) && $_POST['x1'] != '' && $_POST['y1'] != '' && $_POST['w1'] != '' && $_POST['h1'] != '') {
$data = array('x1' => $_POST['x1'], 'y1' => $_POST['y1'], 'w1' => $_POST['w1'], 'h1' => $_POST['h1'], 'width' => 200, 'height' => 200);
unset($_POST['x1'], $_POST['y1'], $_POST['w1'], $_POST['h1']);
photo::cropImage($_POST['picture'], $data, '200x200');
}
if (isset($_POST['x2']) && isset($_POST['y2']) && isset($_POST['w2']) && isset($_POST['h2']) && $_POST['x2'] != '' && $_POST['y2'] != '' && $_POST['w2'] != '' && $_POST['h2'] != '') {
$data = array('x1' => $_POST['x2'], 'y1' => $_POST['y2'], 'w1' => $_POST['w2'], 'h1' => $_POST['h2'], 'width' => 200, 'height' => 140);
unset($_POST['x2'], $_POST['y2'], $_POST['w2'], $_POST['h2']);
photo::cropImage($_POST['picture'], $data, '200x140');
}
$_POST['type'] = 'news';
photo::updatePost($_POST, $id);
system::$display = false;
return true;
}
$fill = photo::getPost($id);
$this->smarty->setCaching(false);
$this->smarty->assign("fill", $fill);
system::$display = false;
$cache_id = 'PHOTO_AJAX_ADD';
$file = MODULES_PATH . "/photo/backend/tpl/editAjax.tpl";
echo $this->smarty->fetch($file, $cache_id);
}
示例4: addNewCat
public static function addNewCat($type = "news")
{
system::$display = false;
if (isset($_POST["catName"])) {
$catName = htmlspecialchars($_POST["catName"]);
if (isset($_POST["catSlug"]) && $_POST["catSlug"]) {
$catSlug = core::generateSlug($_POST["catSlug"]);
} else {
$catSlug = core::generateSlug($_POST["catName"]);
}
self::$db->query("INSERT INTO `categories` SET `catName`='?', catSlug='?', catType='?'", $catName, $catSlug, $type);
return self::$db->insert_id();
}
return false;
}
示例5: resize
function resize()
{
if (!system::HTTPArg(1) && !system::HTTPArg(2) && !system::HTTPArg(3)) {
return system::redirect("/");
}
system::$display = false;
$req = preg_replace("/[^0-9x]/", '', system::HTTPArg(3));
$userID = intval(system::HTTPArg(1));
if (!$req || !$userID) {
return system::redirect("/");
}
$file = preg_replace(self::image_filter, '', system::HTTPArg(2));
$fp = CONTENT_PATH . "/screenshots/{$userID}/{$file}";
if (!file_exists($fp)) {
return system::redirect("/");
}
$data = explode("x", trim($req));
$data = array_map("trim", $data);
$image = screenshot::scaleImage($fp, $data[0], $data[1]);
echo $image;
}
示例6: start
function start()
{
system::$display = false;
}