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


PHP xajax::registerExternalFunction方法代码示例

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


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

示例1: xajax

<?php

require_once "../xajax.inc.php";
$xajax = new xajax();
//$xajax->debugOn();
$xajax->registerExternalFunction("myExternalFunction", "tests/myExternalFunction.php");
$xajax->registerExternalFunction(array("myFunction", "myExternalClass", "myMethod"), "tests/myExternalFunction.php");
$xajax->processRequests();
?>
<!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>registerExternalFunction Test | xajax Tests</title>
<?php 
$xajax->printJavascript("../");
?>
</head>
<body>

<h2><a href="index.php">xajax Tests</a></h2>
<h1>registerExternalFunction Test</h1>

<form id="testForm1" onsubmit="return false;">
<p><input type="submit" value="Call External Function" onclick="xajax_myExternalFunction(); return false;" /></p>
<p><input type="submit" value="Call External Class Method" onclick="xajax_myFunction(); return false;" /></p>
</form>

<div id="submittedDiv"></div>

</body>
开发者ID:hostinger,项目名称:revive-adserver,代码行数:31,代码来源:registerExternalFunctionTest.php

示例2: basename

if (!isset($includeSmartyAssign) || $includeSmartyAssign === true) {
    require_once R3_WEB_ADMIN_DIR . 'smarty_assign.php';
}
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'domains_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
/** Authentications methods */
$authMethods = $auth->getAuthenticationMethods(array('DB', 'POP3', 'LDAP'));
$smarty->assign('do_auth_type_list', $authMethods);
/** Applications list */
try {
    $appList = $auth->getApplicationsList();
} catch (EPermissionDenied $e) {
}
$smarty->assign('applications_list', $auth->mkAssociativeArray($appList, 'APPLICATION'));
if ($_REQUEST['act'] == 'add') {
    $data['do_auth_type'] = 'DB';
    $data['do_auth_data'] = '';
    $data['do_name'] = '';
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:domains_edit.php

示例3: basename

$dbini->setDomainName($dn_name, true);
$dbini->setApplicationCode($app_code, true);
$dbini->setUserLogin($dn_name, $us_login2, true);
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'config_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
/** parameter type */
$smarty->assign('se_type_list', array('STRING' => 'STRING', 'TEXT' => 'TEXT', 'NUMBER' => 'NUMBER', 'ENUM' => 'ENUM', 'ARRAY' => 'ARRAY', 'JSON' => 'JSON'));
if ($_REQUEST['act'] == 'add') {
    $data['dn_name'] = $dn_name;
    $data['app_code'] = $app_code;
    $data['us_login'] = $us_login;
    $data['se_section'] = $fltsection;
    $data['se_type'] = 'STRING';
    $data['se_private'] = true;
} else {
    if ($_REQUEST['act'] == 'mod') {
        if (($p = strpos($us_login, '|')) !== false) {
            $us_login_only = substr($us_login, $p + 1);
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:config_edit.php

示例4: basename

header('Pragma: no-cache');
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
    $url = str_replace($_SERVER['HTTP_HOST'], $_SERVER['HTTP_X_FORWARDED_HOST'], $url);
}
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'personal_settings_ajax.php');
$objAjax->processRequests();
if (file_exists(R3_APP_ROOT . 'lib/custom.um.php')) {
    require_once R3_APP_ROOT . 'lib/custom.um.php';
    $umDependenciesObj = getUmDependenciesObject();
} else {
    $umDependenciesObj = new R3UmDependenciesDefault();
}
$smarty->assign('umDependencies', $umDependenciesObj->get());
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
if (file_exists(R3_APP_ROOT . 'lib/custom.um.php')) {
    require_once R3_APP_ROOT . 'lib/custom.um.php';
    $umDependenciesObj = getUmDependenciesObject();
} else {
    $umDependenciesObj = new R3UmDependenciesDefault();
}
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:personal_settings.php

示例5: basename

if (!isset($includeSmartyAssign) || $includeSmartyAssign === true) {
    require_once R3_WEB_ADMIN_DIR . 'smarty_assign.php';
}
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'acnames_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
/** Restore old variabled */
$fltapp_code = pageVar('fltapp_code', null, isset($_REQUEST['reset']), false, 'general');
$fltac_verb = pageVar('fltac_verb', null, isset($_REQUEST['reset']), false, 'general');
$fltac_name = pageVar('fltac_name', null, isset($_REQUEST['reset']), false, 'general');
$fltac_type = pageVar('fltac_type', null, isset($_REQUEST['reset']), false, 'general');
$order = pageVar('order', '1A', isset($_REQUEST['reset']));
/** filters */
$filter_where = '1 = 1';
/** Application filter */
if ($fltapp_code != '') {
    $smarty->assign('fltapp_code', $fltapp_code);
}
//$smarty->assign('app_code_list', $auth->mkAssociativeArray($auth->getApplicationsList(array('order'=>'app_name')), 'APPLICATION'));
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:acnames_list.php

示例6: basename

if (!isset($includeSmartyAssign) || $includeSmartyAssign === true) {
    require_once R3_WEB_ADMIN_DIR . 'smarty_assign.php';
}
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'applications_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
if ($_REQUEST['act'] == 'add') {
    $data['app_code'] = '';
    $data['app_name'] = '';
} else {
    $data = $auth->getApplicationData($_REQUEST['cod'], true);
    $smarty->assign('app_ip_addr', $auth->arrayIPToString($data['ip']));
}
if ($_REQUEST['act'] == 'show') {
    $smarty->assign('view_style', 'class="input_readonly" readonly');
}
$smarty->assign('act', $_REQUEST['act']);
$smarty->assign('vlu', $data);
$smarty->display('users/applications_edit.tpl');
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:applications_edit.php

示例7: strpos

    $objResponse->addScript("document.location='connected_users.php'");
    return $objResponse->getXML();
}
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = 'applications_edit.php';
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('disconnectUser', 'applications_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
$order = pageVar('order', '1A', isset($_REQUEST['reset']));
$limit = max(10, $auth->getConfigValue('SETTINGS', 'ROW_COUNT', 10));
$pg = max(1, PageVar('pg', 1, isset($_REQUEST['reset'])));
$st = ($pg - 1) * $limit;
/** filters */
$filter_where = '';
$canShowDomains = $auth->hasPerm('SHOW', 'DOMAIN') || $auth->hasPerm('SHOW', 'ALL_DOMAINS');
/** List table */
$table = new pSimpleTable("100%", 'grid');
$table->checkImage(false);
if ($auth->getConfigValue('USER_MANAGER', 'SHOW_UID') != 'F') {
    $table->addSimpleField('UID', 'us_id', 'INTEGER', 60, array('visible' => true, 'align' => 'right', 'sortable' => true));
}
开发者ID:r3-gis,项目名称:EcoGIS,代码行数:31,代码来源:connected_users.php


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