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


PHP Respond类代码示例

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


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


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