• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Respond类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: TestSuite_upgrade_repos_via_user

function TestSuite_upgrade_repos_via_user()
{
    if (doesHaveOwnership()) {
        $result = TestSuite_upgrade_repos(null, null);
        if ($result) {
            Respond::ResultPage(0);
        }
    }
    Respond::Resultpage(-1);
}
开发者ID:Avantians,项目名称:Textcube,代码行数:10,代码来源:index.php


示例2: process

 public function process()
 {
     $context = \CADB\Model\Context::instance();
     if ($this->params['request_URI']) {
         $redirect_uri .= "?requestURI=" . rawurldecode($this->params['request_URI']);
     }
     if ($this->params['output'] != "json" && $this->params['output'] != "xml") {
         \CADB\Lib\importResource('app-login', true);
     }
     if (\CADB\Lib\doesHaveMembership()) {
         if ($this->params['output'] == "xml") {
             Respond::ResultPage(array(2, "이미 로그인하셨습니다"));
         } else {
             if ($this->params['output'] == "json") {
                 RespondJson::ResultPage(array(2, "이미 로그인하셨습니다"));
             } else {
                 Respond::ResultPage(array(-3, "이미 로그인하셨습니다."));
             }
         }
     }
     $this->title = $context->getProperty('service.title') . " 로그인";
 }
开发者ID:jinbonetwork,项目名称:collective-agreement-database,代码行数:22,代码来源:index.php


示例3: array

<?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)
$IV = array('POST' => array('names' => array('string', 'default' => null)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.attachment");
requireStrictRoute();
if (!empty($_POST['names']) && deleteAttachmentMulti($blogid, $suri['id'], $_POST['names'])) {
    Respond::ResultPage(0);
} else {
    Respond::ResultPage(-1);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:14,代码来源:index.php


示例4: array

<?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)
$IV = array('POST' => array('group' => array('int', 0, 'default' => 0), 'starred' => array(array('0', '1'), 'default' => '0'), 'keyword' => array('string', 'default' => '')));
require ROOT . '/library/preprocessor.php';
$result = array('error' => '0');
ob_start();
printFeedGroups($blogid, $_POST['group'], $_POST['starred'] == '1', $_POST['keyword'] == '' ? null : $_POST['keyword']);
$result['view'] = escapeCData(ob_get_contents());
ob_end_clean();
Respond::PrintResult($result);
开发者ID:ragi79,项目名称:Textcube,代码行数:13,代码来源: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: array

<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('GET' => array('owner' => array('id'), 'blogid' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
requirePrivilege('group.creators');
if (changeBlogOwner($_GET['blogid'], $_GET['owner'])) {
    return Respond::ResultPage(true);
}
Respond::ResultPage(false);
开发者ID:Avantians,项目名称:Textcube,代码行数:13,代码来源:index.php


示例7: deleteEntry

    if (!Acl::check("group.editors")) {
        if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
            Respond::ResultPage(-1);
            exit;
        }
    }
    if ($isAjaxRequest) {
        if (deleteEntry($blogid, $suri['id']) === true) {
            Respond::ResultPage(0);
        } else {
            Respond::ResultPage(-1);
        }
    } else {
        deleteEntry($blogid, $suri['id']);
        header("Location: " . $_SERVER['HTTP_REFERER']);
    }
} else {
    foreach (explode(',', $_POST['targets']) as $target) {
        // TeamBlog check
        if (!Acl::check('group.writers', 'entry.delete.' . $target)) {
            if (getUserIdOfEntry(getBlogId(), $suri['id']) != getUserId()) {
                Respond::ResultPage(-1);
                exit;
            }
        }
        if (!deleteEntry($blogid, $target)) {
            Respond::ResultPage(-1);
        }
    }
    Respond::ResultPage(0);
}
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php


示例8: array

<?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)
$IV = array('GET' => array('url' => array('url', 'default' => null)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.remoteresponse");
requireStrictRoute();
Respond::ResultPage(!empty($_GET['url']) && sendTrackback($blogid, $suri['id'], trim($_GET['url'])));
开发者ID:webhacking,项目名称:Textcube,代码行数:10,代码来源:index.php


示例9: mysqli

<?php

require_once 'config.php';
require_once 'inc/respond.php';
$db = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// connect to the DB
$respond = new Respond();
// Send out JSON responses
$table = 'fv_data';
if ($db->connect_errno) {
    $respond->fail("Failed to connect to MySQL: " . $db->connect_error);
}
// All setup - let's get started with handling any data.
$res = $db->query("SELECT *,DATE_FORMAT(dob,'%D %M %Y') as dob_formatted FROM {$table} ORDER BY id DESC");
while ($row = $res->fetch_assoc()) {
    $data['results'][] = $row;
}
$respond->success("results", $data);
开发者ID:nathanedwards,项目名称:fvtest,代码行数:18,代码来源:results.php


示例10: getBlogId

<?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';
$password = POD::queryCell("SELECT password\n\t\tFROM {$database['prefix']}Entries\n\t\tWHERE blogid = " . getBlogId() . " AND id = {$suri['id']} AND draft = 0");
if (is_null($password)) {
    $password = '';
}
Respond::PrintResult(array('error' => 0, 'password' => $password));
开发者ID:webhacking,项目名称:Textcube,代码行数:11,代码来源:index.php


示例11: array

<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('adminSkin' => array('directory', 'default' => 'default')));
require ROOT . '/library/preprocessor.php';
if (empty($_POST['adminSkin']) || !file_exists(ROOT . "/skin/admin/{$_POST['adminSkin']}/index.xml") || !Setting::setBlogSettingGlobal("adminSkin", $_POST['adminSkin'])) {
    Respond::ResultPage(false);
} else {
    Respond::ResultPage(true);
}
开发者ID:Avantians,项目名称:Textcube,代码行数:12,代码来源:index.php


示例12: array

<?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)
$IV = array('POST' => array('entriesOnPage' => array('int'), 'entriesOnList' => array('int'), 'entriesOnRecent' => array('int'), 'noticesOnRecent' => array('int'), 'commentsOnRecent' => array('int'), 'commentsOnGuestbook' => array('int'), 'archivesOnPage' => array('int'), 'tagboxAlign' => array('int'), 'tagsOnTagbox' => array('int'), 'trackbacksOnRecent' => array('int'), 'showListOnCategory' => array('int'), 'showListOnArchive' => array('int'), 'showListOnTag' => array('int'), 'showListOnAuthor' => array('int'), 'showListOnSearch' => array('int'), 'expandComment' => array('int'), 'expandTrackback' => array('int'), 'sortCommentsBy' => array('string'), 'recentNoticeLength' => array('int'), 'recentPageLength' => array('int'), 'recentEntryLength' => array('int'), 'recentCommentLength' => array('int'), 'recentTrackbackLength' => array('int'), 'linkLength' => array('int'), 'useAjaxComment' => array('int'), 'useMicroformat' => array('int'), 'useFOAF' => array('int')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if (setSkinSetting($blogid, $_POST)) {
    Respond::PrintResult(array('error' => 0));
} else {
    Respond::PrintResult(array('error' => 1, 'msg' => POD::error()));
}
开发者ID:ragi79,项目名称:Textcube,代码行数:13,代码来源:index.php


示例13: array

/// 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';
$IV = array('GET' => array('user' => array('email'), 'blogid' => array('id')));
requireStrictRoute();
requirePrivilege('group.creators');
$userid = User::getUserIdByEmail($_GET['user']);
$bid = $_GET['blogid'];
if (empty($userid)) {
    Respond::ResultPage(array(-1, "존재하지 않는 사용자"));
}
$pool = DBModel::getInstance();
$pool->init("Privileges");
$pool->setQualifier("blogid", "eq", $bid);
$pool->setQualifier("userid", "eq", $userid);
$acl = $pool->getCell("acl");
if ($acl === null) {
    // If there is no ACL, add user into the blog.
    $pool->init("Privileges");
    $pool->setAttribute("blogid", $bid);
    $pool->setAttribute("userid", $userid);
    $pool->setAttribute("acl", 0);
    $pool->setAttribute("created", Timestamp::getUNIXtime());
    $pool->setAttribute("lastlogin", 0);
    $pool->insert();
    Respond::ResultPage(0);
} else {
    Respond::ResultPage(array(-2, "이미 참여중인 사용자"));
}
开发者ID:webhacking,项目名称:Textcube,代码行数:30,代码来源:index.php


示例14: array

<?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)
$IV = array('POST' => array('id' => array('id')));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
Respond::ResultPage(markAsStar($blogid, $_POST['id'], true));
开发者ID:webhacking,项目名称:Textcube,代码行数:9,代码来源:index.php


示例15: __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


示例16: 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


示例17: fireEvent

<?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';
fireEvent($suri['directive'] . '/' . $suri['value']);
if (!headers_sent()) {
    Respond::NotFoundPage();
}
开发者ID:webhacking,项目名称:Textcube,代码行数:10,代码来源:pluginForOwner.php


示例18: array

<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('name' => array('string'), 'rss' => array('string', 'default' => ''), 'url' => array('string'), 'category' => array('int', 'mandatory' => false), 'newCategory' => array('string', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
importlib("model.blog.link");
requireStrictRoute();
if (strpos($_POST['rss'], 'http://') !== 0) {
    $_POST['rss'] = 'http://' . $_POST['rss'];
}
if (strpos($_POST['url'], 'http://') !== 0) {
    $_POST['url'] = 'http://' . $_POST['url'];
}
Respond::ResultPage(addLink($blogid, $_POST));
开发者ID:Avantians,项目名称:Textcube,代码行数:16,代码来源:index.php


示例19:

<?php

/// Copyright (c) 2004-2015, 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';
Respond::ResultPage(Setting::setBlogSettingGlobal($_POST['name'], $_POST['value']));
开发者ID:Avantians,项目名称:Textcube,代码行数:7,代码来源:index.php


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Response类代码示例发布时间:2022-05-23
下一篇:
PHP Resources类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap