本文整理汇总了PHP中xajax::setFlag方法的典型用法代码示例。如果您正苦于以下问题:PHP xajax::setFlag方法的具体用法?PHP xajax::setFlag怎么用?PHP xajax::setFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajax
的用法示例。
在下文中一共展示了xajax::setFlag方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: router
public static function router($app, $module, $event, $params, $ajax_conf = array(), $name_utility = '')
{
$security = APP_PATH . $app . DS . 'security.php';
include $security;
# Es una utilidad?
if ($name_utility) {
$pathScript = ROOT_PATH . DS . 'resources' . DS . 'utility' . DS . $name_utility . '.php';
include $pathScript;
} else {
$pathModel = APP_PATH . $app . DS . $module . DS . 'dataModel.php';
$pathHandler = APP_PATH . $app . DS . $module . DS . 'handlerEvent.php';
$pathIndex = APP_PATH . $app . DS . $module . DS . 'index.php';
if (file_exists($pathIndex)) {
include $pathModel;
include $pathHandler;
if (class_exists('controller')) {
global $objAjax;
switch (AJAX_ENGINE) {
case 'xajax':
require PLUGINS_PATH . 'xajax/xajax_core/xajax.inc.php';
# Agilizar el rendimiento
$objxAjax = new xajax();
$objxAjax->setFlag("debug", $ajax_conf[AJAX_ENGINE]['debug']);
$objxAjax->setFlag('decodeUTF8Input', $ajax_conf[AJAX_ENGINE]['decodeUTF8Input']);
$objxAjax->setWrapperPrefix($ajax_conf[AJAX_ENGINE]['wrapper_prefix']);
$GLOBALS['objAjax'] = $objxAjax;
define('PATH_XAJAX_JS', 'plugin/xajax/');
break;
}
$controller = new controller();
$controller->processRequest();
if (method_exists($controller, $event)) {
$reflectionMethod = new ReflectionMethod('controller', $event);
$reflectionMethod->invokeArgs($controller, $params);
} else {
if ($event != 'default_event') {
$msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b> ' . OPF_myLang::getPhrase('ROUTER_METHOD_NOT_FOUND') . ' "' . $event . '"</div>';
die($msgError);
}
}
include $pathIndex;
} else {
$msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b> ' . OPF_myLang::getPhrase('ROUTER_CLASS_NOT_FOUND') . ' "' . 'controller' . '"</div>';
die($msgError);
}
} else {
die('Error: 404 / The module "' . $app . '/' . $module . '" does not exist.');
}
}
}
示例2: xajax
------------------------------------------------------------------------------
-->
*/
/*==========================================================
ARQUIVO : cursos/aplic/forum/forum.php
========================================================== */
$bibliotecas = "../bibliotecas/";
include $bibliotecas . "geral.inc";
include "forum.inc";
include "avaliacoes_forum.inc";
require_once "../xajax_0.5/xajax_core/xajax.inc.php";
//Estancia o objeto XAJAX
$objAjax = new xajax();
$objAjax->configure("characterEncoding", 'ISO-8859-1');
$objAjax->setFlag("decodeUTF8Input", true);
$objAjax->configure('javascript URI', "../xajax_0.5");
$objAjax->configure('errorHandler', true);
//Registre os nomes das funções em PHP que você quer chamar através do xajax
$objAjax->register(XAJAX_FUNCTION, "MudarConfiguracaoDinamic");
$objAjax->register(XAJAX_FUNCTION, "EditarTituloDinamic");
$objAjax->register(XAJAX_FUNCTION, "DecodificaString");
// Registra fun��es para uso de menu_principal.php
$objAjax->register(XAJAX_FUNCTION, "DeslogaUsuarioCursoDinamic");
// Manda o xajax executar os pedidos acima.
$objAjax->processRequest();
$cod_ferramenta = 9;
$cod_ferramenta_ajuda = $cod_ferramenta;
if (isset($status) && $status == 'D') {
$cod_pagina_ajuda = 2;
} else {
示例3: testForm
{
$objArgumentManager =& xajaxArgumentManager::getInstance();
$aArgs = $objArgumentManager->process();
$objResponse = new xajaxResponse();
$objResponse->alert("This is from the invalid request handler");
return test2ndFunction($aArgs[0], $objResponse);
}
function testForm($formData)
{
$objResponse = new xajaxResponse();
$objResponse->alert("This is from the regular function");
return test2ndFunction($formData, $objResponse);
}
$xajax = new xajax();
$xajax->configure('javascript URI', '../');
$xajax->setFlag("errorHandler", true);
$xajax->registerEvent(XAJAX_PROCESSING_EVENT_INVALID, "onInvalidRequest");
if (isset($_GET['registerFunction'])) {
if (1 == $_GET['registerFunction']) {
$xajax->registerFunction("testForm");
}
}
$xajax->processRequest();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>onMissingFunction Event (used to be catch-all) Function Test | xajax Tests</title>
<?php
$xajax->printJavascript();
示例4: returnStatus
require_once "../xajax_core/xajax.inc.php";
function returnStatus($number)
{
if ($number == 500) {
header("HTTP/1.1 500 Internal Server Error");
echo "Testing a server error...";
}
if ($number == 404) {
header("HTTP/1.1 404 Not Found");
echo "Testing an unknown URL...";
}
exit;
}
$xajax = new xajax();
$xajax->setFlag("debug", true);
$xajax->registerFunction("returnStatus");
$xajax->processRequest();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>HTTP Status Test | xajax Tests</title>
<?php
$xajax->printJavascript("../");
?>
</head>
示例5: xajax
<?php
define("XAJAX_DEFAULT_CHAR_ENCODING", "windows-1251");
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/xajax_core/xajax.inc.php";
global $xajax;
if (!$xajax) {
$xajax = new xajax("/xajax/hh.server.php?rnd=" . mt_rand());
$xajax->setFlag('decodeUTF8Input', true);
//$xajax->setFlag('debug',true);
$xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT);
$xajax->register(XAJAX_FUNCTION, 'addHHSpecProf');
$xajax->register(XAJAX_FUNCTION, 'delProf');
$xajax->register(XAJAX_FUNCTION, 'delHHSpec');
}
示例6: xajax
<?php
/**
* @package tikiwiki
*/
// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: x_maps.php 44444 2013-01-05 21:24:24Z changi67 $
require_once 'tiki-setup.php';
//setting up xajax
include_once 'lib/map/map_query.php';
require_once 'lib/ajax/xajax/xajax_core/xajaxAIO.inc.php';
$xajax = new xajax('x_maps.php');
$xajax->setFlag('debug', true);
$xajax->configure('statusMessages', true);
if ($prefs['feature_maps'] != 'y' || $prefs['ajax_xajax'] != 'y') {
$objResponse = new xajaxResponse();
$objResponse->alert(tra('Feature disabled'));
return $objResponse;
}
if ($tiki_p_map_view != 'y') {
$objResponse = new xajaxResponse();
$objResponse->alert(tra('You do not have permissions to view the maps'));
return $objResponse;
}
/**
* @param $mapfile
* @param $corx
* @param $cory
示例7: header
header("location: charEncodingTest.php");
exit;
}
if (isset($_SESSION['useEncoding'])) {
$useEncoding = $_SESSION['useEncoding'];
}
if (isset($_SESSION['htmlEntities'])) {
$htmlEntities = $_SESSION['htmlEntities'];
}
if (isset($_SESSION['decodeUTF8'])) {
$decodeUTF8 = $_SESSION['decodeUTF8'];
}
$xajax = new xajax();
$xajax->setCharEncoding($useEncoding);
if ($htmlEntities) {
$xajax->setFlag("outputEntities", true);
}
if ($decodeUTF8) {
$xajax->setFlag("decodeUTF8Input", true);
}
$xajax->setFlag("debug", true);
$xajax->registerFunction("setOptions");
$xajax->registerFunction("testForm");
$xajax->processRequest();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Character Encoding Test | xajax Tests</title>
<?php
示例8: loadXajax
function loadXajax()
{
// Prevents xajax from loading twice if already loaded by jReviews or BlueFlame Platform
if (!class_exists('xajax') && !defined('XAJAX_LOADED') && !defined('XAJAX_VER')) {
define('XAJAX_LOADED', 1);
App::import('Vendor', 'xajax_05final' . DS . 'xajax_core' . DS . 'xajax.inc');
if (defined('MVC_FRAMEWORK_ADMIN')) {
$xajax = new xajax('index2.php?option=' . S2Paths::get('jreviews', 'S2_CMSCOMP') . '&task=xajax&no_html=1');
} else {
$xajax = new xajax();
}
$xajax->setCharEncoding(strtoupper(cmsFramework::getCharset()));
if (strtolower(cmsFramework::getCharset()) == 'utf-8') {
$decodeUTF8 = false;
} else {
$decodeUTF8 = true;
}
/* Set defaults from params */
$this->xajax_statusMessage ? $xajax->setFlag('statusMessages', true) : $xajax->setFlag('statusMessages', false);
$this->xajax_waitCursor ? $xajax->setFlag('waitCursor', true) : $xajax->setFlag('waitCursor', false);
$this->xajax_debug ? $xajax->setFlag('debug', true) : $xajax->setFlag('debug', false);
$decodeUTF8 ? $xajax->setFlag('decodeUTF8Input', true) : $xajax->setFlag('decodeUTF8Input', false);
$xajax->registerFunction('xajaxDispatch');
// ob_start('ob_gzhandler'); // Results in wrong encoding error ni certain servers
$xajax->processRequest();
$js = $xajax->getJavascript(S2_VENDORS_URL . 'xajax_05final' . _DS);
cmsFramework::addScript($js);
}
}