当前位置: 首页>>代码示例>>PHP>>正文


PHP Respond::ErrorPage方法代码示例

本文整理汇总了PHP中Respond::ErrorPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Respond::ErrorPage方法的具体用法?PHP Respond::ErrorPage怎么用?PHP Respond::ErrorPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Respond的用法示例。


在下文中一共展示了Respond::ErrorPage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: requireModel

requireModel("blog.tag");
requireModel("blog.locative");
requireModel("blog.attachment");
$context = Model_Context::getInstance();
$isKeyword = false;
define('__TEXTCUBE_EDIT__', true);
if (defined('__TEXTCUBE_POST__')) {
    $suri['id'] = 0;
}
if (isset($_GET['draft'])) {
    $entry = getEntry(getBlogId(), $suri['id'], true);
} else {
    $entry = getEntry(getBlogId(), $suri['id'], false);
}
if (is_null($entry)) {
    Respond::ErrorPage(_t('포스트 정보가 존재하지 않습니다.'));
    $isKeyword = $entry['category'] == -1;
}
if (defined('__TEXTCUBE_POST__') && isset($_GET['category'])) {
    $entry['category'] = $_GET['category'];
}
if (isset($_POST['slogan'])) {
    $_GET['slogan'] = $_POST['slogan'];
}
if (defined('__TEXTCUBE_POST__') && isset($_GET['slogan'])) {
    $entry['slogan'] = $_GET['slogan'];
    $entry['title'] = $_GET['slogan'];
}
// Check whether or not user has permission to edit.
if (Acl::check('group.editors') === false && !empty($suri['id'])) {
    if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例2: __construct

 function __construct($filename)
 {
     $context = Model_Context::getInstance();
     if (!($sval = file_get_contents($filename))) {
         Respond::ErrorPage("KeywordSkin");
     }
     $origPath = $context->getProperty('uri.service') . substr($filename, strlen(ROOT));
     $origPath = substr($origPath, 0, 0 - strlen(Path::getBaseName($origPath)));
     $sval = str_replace('./', $origPath, $sval);
     replaceSkinTag($sval, 'html');
     replaceSkinTag($sval, 'head');
     replaceSkinTag($sval, 'body');
     list($sval, $this->keylogItem) = $this->cutSkinTag($sval, 'blog_rep');
     list($sval, $this->keylog) = $this->cutSkinTag($sval, 'blog');
     $this->outter = $sval;
 }
开发者ID:webhacking,项目名称:Textcube,代码行数:16,代码来源:blogskin.php

示例3: define

<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
define('__TEXTCUBE_KEYLOG__', true);
require ROOT . '/library/preprocessor.php';
if (strlen($suri['value'])) {
    if (!($keylog = getKeylogByTitle($blogid, $suri['value']))) {
        Respond::ErrorPage();
        exit;
    }
    $entries = array();
    $entries = getEntriesByKeyword($blogid, $keylog['title']);
    $skinSetting['keylogSkin'] = fireEvent('setKeylogSkin');
    if (!is_null($skinSetting['keylogSkin'])) {
        require ROOT . '/interface/common/blog/keylog.php';
    } else {
        Respond::ErrorPage(_t('No handling plugin'));
    }
} else {
    $keywords = getKeywordNames($blogid, true);
    $skinSetting['keylogSkin'] = fireEvent('setKeylogSkin');
    require ROOT . '/interface/common/blog/begin.php';
    require ROOT . '/interface/common/blog/keywords.php';
    require ROOT . '/interface/common/blog/end.php';
}
开发者ID:ragi79,项目名称:Textcube,代码行数:27,代码来源:keylog.php

示例4: setcookie

$pool = DBModel::getInstance();
if ((doesHaveMembership() || !empty($_POST['name'])) && !empty($_POST['comment']) && !empty($_POST['mode']) && $_POST['mode'] == 'commit') {
    if (!empty($_POST['name'])) {
        setcookie('guestName', $_POST['name'], time() + 2592000, $context->getProperty('uri.blog') . "/");
    }
    if (!empty($_POST['homepage']) && $_POST['homepage'] != 'http://') {
        if (strpos($_POST['homepage'], 'http://') === 0) {
            setcookie('guestHomepage', $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        } else {
            setcookie('guestHomepage', 'http://' . $_POST['homepage'], time() + 2592000, $context->getProperty('uri.blog') . "/");
        }
    }
    $comment = array();
    list($comment['entry']) = getCommentAttributes($blogid, $suri['id'], 'entry');
    if (count($comment) == 0) {
        Respond::ErrorPage(_text('댓글이 존재하지 않습니다.'));
    }
    $comment['parent'] = $suri['id'];
    $comment['name'] = empty($_POST['name']) ? '' : trim($_POST['name']);
    $comment['password'] = empty($_POST['password']) ? '' : $_POST['password'];
    $comment['homepage'] = empty($_POST['homepage']) || $_POST['homepage'] == 'http://' ? '' : trim($_POST['homepage']);
    $comment['secret'] = empty($_POST['secret']) ? 0 : 1;
    $comment['comment'] = trim($_POST['comment']);
    $comment['ip'] = $_SERVER['REMOTE_ADDR'];
    if (!doesHaveMembership() && !doesHaveOwnership() && $comment['name'] == '') {
        ?>
<script type="text/javascript">
	//<![CDATA[
		alert("<?php 
        echo _text('이름을 입력해 주십시오.');
        ?>
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php

示例5: importlib

<?php

/// Copyright (c) 2004-2016, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
importlib("model.blog.link");
if (!($link = getLink($blogid, $suri['id']))) {
    Respond::ErrorPage(_t('링크 정보가 존재하지 않습니다.'));
}
$method = empty($link['rss']) ? 1 : 0;
require ROOT . '/interface/common/owner/header.php';
$tabsClass['edit'] = true;
?>
						<script type="text/javascript">
							//<![CDATA[
								function getSiteInfo() {
									if(document.getElementById('editForm').rss.value == '') {
										alert("<?php 
echo _t('RSS 주소를 입력해 주십시오.');
?>
\t");
										return false;		
									}
							
									if(document.getElementById('editForm').rss.value.indexOf('http://')==-1) {
										uri = 'http://'+document.getElementById('editForm').rss.value;
									} else {
										uri = document.getElementById('editForm').rss.value;
									}
									var request = new HTTPRequest("GET", "<?php 
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php

示例6: KeylogSkin

 function KeylogSkin($filename)
 {
     global $service, $serviceURL;
     if (!($sval = file_get_contents($filename))) {
         Respond::ErrorPage("KeywordSkin");
     }
     $origPath = $serviceURL . substr($filename, strlen(ROOT));
     $origPath = substr($origPath, 0, 0 - strlen(Path::getBaseName($origPath)));
     $sval = str_replace('./', $origPath, $sval);
     replaceSkinTag($sval, 'html');
     replaceSkinTag($sval, 'head');
     replaceSkinTag($sval, 'body');
     list($sval, $this->keylogItem) = $this->cutSkinTag($sval, 'blog_rep');
     list($sval, $this->keylog) = $this->cutSkinTag($sval, 'blog');
     $this->outter = $sval;
 }
开发者ID:hinablue,项目名称:TextCube,代码行数:16,代码来源:blog.skin.php

示例7: requireStrictRoute

requireStrictRoute();
$ctx = Model_Context::getInstance();
$skin = new Skin($ctx->getProperty('skin.skin'));
$coverpageCount = count($skin->coverpageBasicModules);
$coverpageOrderData = getCoverpageModuleOrderData($coverpageCount);
$coverpageNumber = $_REQUEST['coverpageNumber'];
$modulePos = $_REQUEST['modulePos'];
if ($coverpageNumber < 0 || $coverpageNumber >= $coverpageCount) {
    Respond::ErrorPage();
}
if (!isset($coverpageOrderData[$coverpageNumber]) || !isset($coverpageOrderData[$coverpageNumber][$modulePos])) {
    Respond::ErrorPage();
}
$pluginData = $coverpageOrderData[$coverpageNumber][$modulePos];
if ($pluginData['type'] != 3) {
    Respond::ErrorPage();
}
$plugin = $pluginData['id']['plugin'];
$handler = $pluginData['id']['handler'];
$oldParameters = $pluginData['parameters'];
$title = $plugin . '::' . $handler;
foreach ($coverpageMappings as $sm) {
    if ($sm['plugin'] == $plugin && $sm['handler'] == $handler) {
        $title = $sm['display'] . '::' . $sm['title'];
    }
}
$identifier = $plugin . '/' . $handler;
$parameters = array();
foreach ($coverpageMappings as $item) {
    if ($item['plugin'] == $plugin && $item['handler'] == $handler) {
        $parameters = $item['parameters'];
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php

示例8: requireStrictRoute

requireStrictRoute();
$ctx = Model_Context::getInstance();
$skin = new Skin($ctx->getProperty('skin.skin'));
$sidebarCount = count($skin->sidebarBasicModules);
$sidebarOrderData = getSidebarModuleOrderData($sidebarCount);
$sidebarNumber = $_REQUEST['sidebarNumber'];
$modulePos = $_REQUEST['modulePos'];
if ($sidebarNumber < 0 || $sidebarNumber >= $sidebarCount) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
if (!isset($sidebarOrderData[$sidebarNumber]) || !isset($sidebarOrderData[$sidebarNumber][$modulePos])) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
$pluginData = $sidebarOrderData[$sidebarNumber][$modulePos];
if ($pluginData['type'] != 3) {
    Respond::ErrorPage(null, null, null, $ajaxcall);
}
$plugin = $pluginData['id']['plugin'];
$handler = $pluginData['id']['handler'];
$oldParameters = $pluginData['parameters'];
$title = $plugin . '::' . $handler;
foreach ($sidebarMappings as $sm) {
    if ($sm['plugin'] == $plugin && $sm['handler'] == $handler) {
        $title = $sm['display'] . '::' . $sm['title'];
    }
}
$identifier = $plugin . '/' . $handler;
$parameters = array();
foreach ($sidebarMappings as $item) {
    if ($item['plugin'] == $plugin && $item['handler'] == $handler) {
        $parameters = $item['parameters'];
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:index.php


注:本文中的Respond::ErrorPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。