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


PHP xajax::setFlag方法代码示例

本文整理汇总了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>&nbsp;' . OPF_myLang::getPhrase('ROUTER_METHOD_NOT_FOUND') . '&nbsp;&quot;' . $event . '&quot;</div>';
                         die($msgError);
                     }
                 }
                 include $pathIndex;
             } else {
                 $msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b>&nbsp;' . OPF_myLang::getPhrase('ROUTER_CLASS_NOT_FOUND') . '&nbsp;&quot;' . 'controller' . '&quot;</div>';
                 die($msgError);
             }
         } else {
             die('Error: 404 / The module "' . $app . '/' . $module . '" does not exist.');
         }
     }
 }
开发者ID:nextbook438,项目名称:osezno-php-framework,代码行数:50,代码来源:router.php

示例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 {
开发者ID:andisantos,项目名称:TelEduc,代码行数:30,代码来源:forum.php

示例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();
开发者ID:johnfelipe,项目名称:orfeo,代码行数:31,代码来源:catchAllFunctionTest.php

示例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>
开发者ID:asad345100,项目名称:mis-pos,代码行数:29,代码来源:HTTPStatusTest.php

示例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');
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:14,代码来源:hh.common.php

示例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
开发者ID:jkimdon,项目名称:cohomeals,代码行数:31,代码来源:x_maps.php

示例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 
开发者ID:beakid,项目名称:md,代码行数:31,代码来源:charEncodingTest.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);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:29,代码来源:dispatcher.php


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