function __construct() { $GLOBALS['phpgw_info']['flags']['noframework'] = true; require_once PHPGW_SERVER_ROOT . '/felamimail/inc/xajax.inc.php'; $xajax = new xajax($GLOBALS['phpgw']->link('/felamimail/xajax.php', false, true), 'xajax_', 'utf-8'); $xajax->waitCursorOff(); $xajax->registerFunction("doXMLHTTP"); $GLOBALS['phpgw_info']['flags']['java_script'] .= $xajax->getJavascript($GLOBALS['phpgw_info']['server']['webserver_url'] . '/felamimail/js/'); $GLOBALS['phpgw']->js->validate_file('jsapi', 'jsapi', 'felamimail'); $this->displayCharset = 'utf-8'; if (!isset($_POST['composeid']) && !isset($_GET['composeid'])) { // create new compose session $this->bocompose = CreateObject('felamimail.bocompose', '', $this->displayCharset); $this->composeID = $this->bocompose->getComposeID(); } else { // reuse existing compose session if (isset($_POST['composeid'])) { $this->composeID = $_POST['composeid']; } else { $this->composeID = $_GET['composeid']; } $this->bocompose = CreateObject('felamimail.bocompose', $this->composeID, $this->displayCharset); } $this->t = CreateObject('phpgwapi.Template', PHPGW_APP_TPL); $this->bofelamimail = CreateObject('felamimail.bofelamimail', $this->displayCharset); $this->mailPreferences = ExecMethod('felamimail.bopreferences.getPreferences'); $this->t->set_unknowns('remove'); $this->rowColor[0] = $GLOBALS['phpgw_info']["theme"]["bg01"]; $this->rowColor[1] = $GLOBALS['phpgw_info']["theme"]["bg02"]; if (!isset($GLOBALS['phpgw']->css) || !is_object($GLOBALS['phpgw']->css)) { $GLOBALS['phpgw']->css = createObject('phpgwapi.css'); } $GLOBALS['phpgw']->css->validate_file('app', 'felamimail'); }
function _moduleContent(&$smarty, $module_name) { //include elastix framework include_once "libs/paloSantoGrid.class.php"; include_once "libs/paloSantoValidar.class.php"; include_once "libs/paloSantoConfig.class.php"; include_once "libs/misc.lib.php"; include_once "libs/paloSantoForm.class.php"; include_once "libs/xajax/xajax.inc.php"; //include module files include_once "modules/{$module_name}/configs/default.conf.php"; include_once "modules/{$module_name}/libs/paloSantoDeleteModule.class.php"; global $arrConf; //include lang local module global $arrLangModule; $lang = get_language(); $lang_file = "modules/{$module_name}/lang/{$lang}.lang"; $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); if (file_exists("{$base_dir}/{$lang_file}")) { include_once $lang_file; } else { include_once "modules/{$module_name}/lang/en.lang"; } //folder path for custom templates $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $templates_dir = isset($arrConfig['templates_dir']) ? $arrConfig['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; require_once 'libs/paloSantoDB.class.php'; $pDB_acl = new paloDB($arrConf['elastix_dsn']['acl']); if (!empty($pDB_acl->errMsg)) { echo "ERROR DE DB: {$pDB_acl->errMsg} <br>"; } $pDB_menu = new paloDB($arrConf['elastix_dsn']['menu']); if (!empty($pDB_menu->errMsg)) { echo "ERROR DE DB: {$pDB_menu->errMsg} <br>"; } $xajax = new xajax(); $xajax->registerFunction("mostrar_menu"); $xajax->processRequests(); $content = $xajax->printJavascript("libs/xajax/"); $delete = isset($_POST['delete']) ? $_POST['delete'] : ''; if ($delete != '') { $accion = 'delete_module'; } else { $accion = "report_delete_module"; } switch ($accion) { case 'delete_module': $content .= delete_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl, $pDB_menu); break; default: $content .= report_delete_module($smarty, $module_name, $local_templates_dir, $arrLangModule, $pDB_acl); break; } return $content; }
public function createXajax(array $config) { $xajax = new \xajax(); $xajax->configureMany($config); return $xajax; // $xajax->configure('debug', isset($this->config['xajax']['debug']) ? $this->config['xajax']['debug'] : FALSE); // $xajax->configure("characterEncoding", isset($this->config['xajax']['characterEncoding']) ? $this->config['xajax']['characterEncoding'] : "utf-8"); // $xajax->configure('javascript URI', isset($this->config['xajax']['javascript URI']) ? $this->config['xajax']['javascript URI'] : ''); // $xajax->configure('responseType', isset($this->config['xajax']['responseType']) ? $this->config['xajax']['responseType'] : 'JSON'); // return $xajax; }
public function isAjaxCall() { static $bIsAjaxCall; // rest of code can be executed only one time if (!is_null($bIsAjaxCall)) { return $bIsAjaxCall; } if (!self::$oXajax->canProcessRequest()) { return $bIsAjaxCall = false; } self::$oXajax->processRequest(); return $bIsAjaxCall = true; }
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.'); } } }
function _moduleContent(&$smarty, $module_name) { //include module files include_once "modules/{$module_name}/configs/default.conf.php"; include_once "modules/{$module_name}/libs/paloSantoIncomingcallsmonitoring.class.php"; // incluci� del xajax $xajax = new xajax(); $xajax->waitCursorOff(); $xajax->registerFunction("create_report"); $xajax->processRequests(); $content = $xajax->printJavascript("libs/xajax/"); //include file language agree to elastix configuration //if file language not exists, then include language by default (en) $lang = get_language(); $base_dir = dirname($_SERVER['SCRIPT_FILENAME']); $lang_file = "modules/{$module_name}/lang/{$lang}.lang"; if (file_exists("{$base_dir}/{$lang_file}")) { include_once "{$lang_file}"; } else { include_once "modules/{$module_name}/lang/en.lang"; } //global variables global $arrConf; global $arrConfModule; global $arrLang; global $arrLangModule; $arrConf = array_merge($arrConf, $arrConfModule); $arrLang = array_merge($arrLang, $arrLangModule); //folder path for custom templates $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes'; $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme']; //conexion resource $pDB = new paloDB($arrConf['dsn_conn_database']); // $pDB = ""; //actions $accion = getAction(); switch ($accion) { default: $content .= '<div id="body_report">' . reportIncomingcallsmonitoring($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrLang) . '</div>'; break; } return $content; }
<?php /* File: theFrame.php Test script that runs in an iframe and communicates with the parent frame. */ require '../../xajax_core/xajax.inc.php'; $xajax = new xajax(); $xajax->configure('requestURI', basename(__FILE__)); $xajax->configure('javascript URI', '../../'); class clsFunctions { function clsFunctions() { } function confirm($seconds) { sleep($seconds); $objResponse = new xajaxResponse(); $objResponse->append('outputDIV', 'innerHTML', '<br />confirmation from theFrame.php call'); return $objResponse; } } $xajax->register(XAJAX_CALLABLE_OBJECT, new clsFunctions()); $xajax->processRequest(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>xajax Test iFrame</title>
<? define("XAJAX_DEFAULT_CHAR_ENCODING","windows-1251"); require_once($_SERVER['DOCUMENT_ROOT'] . "/xajax/xajax_core/xajax.inc.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/config.php"); $xajax = new xajax("/xajax/employers.server.php"); //$xajax->debugOn(); //$xajax->waitCursorOff(); // Для Fp нужен... $xajax->configure('decodeUTF8Input',true); $xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT); $xajax->register(XAJAX_FUNCTION, "ChangeCity"); $xajax->register(XAJAX_FUNCTION, "AddFav"); ?>
<?php define('XAJAX_DEFAULT_CHAR_ENCODING', 'windows-1251'); require_once $_SERVER['DOCUMENT_ROOT'] . '/xajax/xajax_core/xajax.inc.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php'; global $xajax; if (!$xajax) { $xajax = new xajax('/xajax/verify.server.php'); $xajax->configure('decodeUTF8Input', true); $xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT); $xajax->register(XAJAX_FUNCTION, 'addSubscribe'); }
<?php /* For licensing terms, see /license.txt */ /** * @package chamilo.admin * @todo use formvalidator */ // name of the language file that needs to be included $language_file = 'admin'; // resetting the course id $cidReset = true; require_once '../inc/global.inc.php'; $id_session = isset($_GET['id_session']) ? intval($_GET['id_session']) : null; SessionManager::protect_session_edit($id_session); $xajax = new xajax(); $xajax->registerFunction(array('search_courses', 'AddCourseToSession', 'search_courses')); // Setting the section (for the tabs) $this_section = SECTION_PLATFORM_ADMIN; // setting breadcrumbs $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Sessions')); $interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); $interbreadcrumb[] = array('url' => "resume_session.php?id_session=" . $id_session, "name" => get_lang('SessionOverview')); // Database Table Definitions $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); // setting the name of the tool $tool_name = get_lang('SubscribeCoursesToSession'); $add_type = 'multiple';
********************************************************************************/ header('Content-Type: text/html; charset=utf-8'); header('Expires: Sat, 01 Jan 2000 00:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); require_once 'include/localization.class.php'; if ($_SESSION['curuser']['usertype'] == 'clid' || $_SESSION['curuser']['usertype'] == '') { header("Location: index.php"); } elseif ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'reseller' && $_SESSION['curuser']['usertype'] != 'groupadmin') { header("Location: systemstatus.php"); } require_once "include/xajax.inc.php"; $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'import'); $xajax = new xajax("import.server.php"); $xajax->registerFunction("selectTable"); $xajax->registerFunction("init"); $xajax->registerFunction("submitForm"); $xajax->registerFunction("showDivMainRight"); $xajax->registerFunction("setGroup"); $xajax->registerFunction("deleteFile"); define("ROWSXPAGE", 5); // Number of rows show it per page. define("MAXROWSXPAGE", 25); // Total number of rows show it when click on "Show All" button.
$provlist = $view_controller->xajaxObjCall($value, 'LOC', 'province'); $objResponse = new xajaxResponse(); $xajaxFiller = new xajaxElementFiller(); $xajaxFiller->setDefaultOptionName($GLOBALS['lang_Common_Select']); if ($provlist) { $objResponse->addAssign('lrState', 'innerHTML', '<select name="txtState" id="txtState"><option value="0">--- ' . $GLOBALS['lang_Common_Select'] . ' ---</option></select>'); $objResponse = $xajaxFiller->cmbFillerById($objResponse, $provlist, 1, 'lrState', 'txtState'); } else { $objResponse->addAssign('lrState', 'innerHTML', '<input type="text" name="txtState" id="txtState" value="">'); } $objResponse->addScript('document.getElementById("txtState").Focus();'); $objResponse->addScript("document.frmLocation.txtDistrict.options.length = 1;"); $objResponse->addAssign('status', 'innerHTML', ''); return $objResponse->getXML(); } $objAjax = new xajax(); $objAjax->registerFunction('populateStates'); $objAjax->processRequests(); $sysConst = new sysConf(); $locRights = $_SESSION['localRights']; if (isset($this->getArr['capturemode']) && $this->getArr['capturemode'] == 'addmode') { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php $objAjax->printJavascript(); ?>
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'groupadmin' && !is_array($_SESSION['curuser']['privileges']['note_leads'])) { header("Location: portal.php"); } require_once "include/xajax.inc.php"; require_once 'include/localization.class.php'; $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'astercrm'); $xajax = new xajax("note_leads.server.php"); $xajax->registerFunction("init"); $xajax->registerFunction("showGrid"); $xajax->registerFunction("export"); $xajax->registerFunction("delete"); $xajax->registerFunction("edit"); $xajax->registerFunction("save"); $xajax->registerFunction("showCustomer"); $xajax->registerFunction("showContact"); $xajax->registerFunction("update"); $xajax->registerFunction("add"); $xajax->registerFunction("searchFormSubmit"); $xajax->registerFunction("deleteByButton"); define("ROWSXPAGE", 10); // Number of rows show it per page. define("MAXROWSXPAGE", 25);
<?php define("XAJAX_DEFAULT_CHAR_ENCODING", "windows-1251"); require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/xajax_core/xajax.inc.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/config.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php"; global $xajax; if (!$xajax) { $xajax = new xajax("/xajax/masssending.server.php"); $xajax->configure('decodeUTF8Input', TRUE); $xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT); $xajax->register(XAJAX_FUNCTION, 'GetCities'); $xajax->register(XAJAX_FUNCTION, 'DelFile'); $xajax->register(XAJAX_FUNCTION, 'Calculate'); $xajax->register(XAJAX_FUNCTION, 'CalculateFromSearch'); $xajax->register(XAJAX_FUNCTION, 'MasssendingEdit'); $xajax->register(XAJAX_FUNCTION, 'MasssendingSave'); }
<? include_once "init.php"; antiIE(); $_url = new URL_Reader(); $_url->setParts('module', 'page'); $_part = $_url->part; $_arr_module_accepted = $_SESSION[module][nama]; $_xajax = new xajax(); if(!$_part[module]) { header("LOCATION:".URL."index.html"); } else { //if() { if(is_file(MODULES_DIR.$_part[module]."/index.php") && @in_array($_part[module], $_arr_module_accepted)) { //modules/setting include_once MODULES_DIR . $_part[module] . "/index.php"; if(is_file(MODULES_DIR.$_part[module]."/".$_part[page].".php")) { //modules/setting/dokter.php include_once "chat.php"; include_once MODULES_DIR.$_part[module]."/".$_part[page].".php"; $_xajax->processRequests(); if(is_file(HTML_DIR.$_part[module]."/html.".$_part[page].".php")) { //html/setting/html.dokter.php include_once HTML_DIR.$_part[module]."/html.".$_part[page].".php"; } } else { include_once HTML_DIR.$_part[module]."/html.index.php";
* such as xajax_init() init init html page * Revision 0.01 2007/11/21 15:25:00 modified by solo * Desc: page created ********************************************************************************/ header('Content-Type: text/html; charset=utf-8'); header('Expires: Sat, 01 Jan 2000 00:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); error_reporting($_SESSION['error_report']); require_once 'include/localization.class.php'; if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'groupadmin' && !is_array($_SESSION['curuser']['privileges']['user_online'])) { header("Location: portal.php"); } $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'user_online'); require_once "include/xajax.inc.php"; $xajax = new xajax("user_online.server.php"); $xajax->registerFunction("init"); $xajax->registerFunction("listReport"); $xajax->registerFunction("speedDate"); $xajax->registerFunction("getAgent");
<?php /* For licensing terms, see /license.txt */ /** * @package chamilo.admin */ // name of the language file that needs to be included $language_file = array('admin', 'registration'); // resetting the course id $cidReset = true; // including some necessary files ////require_once '../inc/global.inc.php'; require_once '../inc/lib/xajax/xajax.inc.php'; $xajax = new xajax(); $xajax->registerFunction('search_users'); // setting the section (for the tabs) $this_section = SECTION_PLATFORM_ADMIN; $id_session = intval($_GET['id_session']); $addProcess = isset($_GET['add']) ? Security::remove_XSS($_GET['add']) : null; SessionManager::protect_session_edit($id_session); // setting breadcrumbs $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); $interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); $interbreadcrumb[] = array('url' => "resume_session.php?id_session=" . $id_session, "name" => get_lang('SessionOverview')); // Database Table Definitions $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); $tbl_user = Database::get_main_table(TABLE_MAIN_USER); $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); // setting the name of the tool $tool_name = get_lang('SubscribeUsersToSession');
* Revision 0.01 2007/11/21 15:25:00 modified by solo * Desc: page created ********************************************************************************/ header('Content-Type: text/html; charset=utf-8'); header('Expires: Sat, 01 Jan 2000 00:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); error_reporting($_SESSION['error_report']); require_once 'include/localization.class.php'; if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'groupadmin' && !is_array($_SESSION['curuser']['privileges']['report'])) { header("Location: portal.php"); } $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'report'); require_once "include/xajax.inc.php"; $xajax = new xajax("report.server.php"); $xajax->waitCursorOff(); $xajax->registerFunction("init"); $xajax->registerFunction("listReport"); $xajax->registerFunction("checkOut"); $xajax->registerFunction("setAccount"); $xajax->registerFunction("setClid"); $xajax->registerFunction("speedDate");
and license information. */ /* @package xajax @version $Id: helloworld.php 362 2007-05-29 15:32:24Z calltoconstruct $ @copyright Copyright (c) 2005-2006 by Jared White & J. Max Wilson @license http://www.xajaxproject.org/bsd_license.txt BSD License */ /* Section: Standard xajax startup - include <xajax.inc.php> - instantiate main <xajax> object */ require '../xajax_core/xajax.inc.php'; $xajax = new xajax(); /* - enable deubgging if desired - set the javascript uri (location of xajax js files) */ //$xajax->configure('debug', true); $xajax->configure('javascript URI', '../'); /* Function: helloWorld Modify the innerHTML of div1. */ function helloWorld($isCaps) { if ($isCaps) { $text = 'HELLO WORLD!';
$smarty->assign('umDependencies', $umDependenciesObj->get()); 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'] = '';
* ============================================================================= * AJAX Callback handler * * @author SteamFriends Development Team * @version 1.0.0 * @copyright SourceBans (C)2007 SteamFriends.com. All rights reserved. * @package SourceBans * @link http://www.sourcebans.net * * @version $Id: sb-callback.php 140 2008-08-31 15:30:35Z peace-maker * ============================================================================= */ require_once 'xajax.inc.php'; include_once 'system-functions.php'; include_once 'user-functions.php'; $xajax = new xajax(); //$xajax->debugOn(); $xajax->setRequestURI(XAJAX_REQUEST_URI); global $userbank; if (isset($_COOKIE['aid'], $_COOKIE['password']) && $userbank->CheckLogin($_COOKIE['password'], $_COOKIE['aid'])) { $xajax->registerFunction("AddMod"); $xajax->registerFunction("RemoveMod"); $xajax->registerFunction("AddGroup"); $xajax->registerFunction("RemoveGroup"); $xajax->registerFunction("RemoveAdmin"); $xajax->registerFunction("RemoveSubmission"); $xajax->registerFunction("RemoveServer"); $xajax->registerFunction("UpdateGroupPermissions"); $xajax->registerFunction("UpdateAdminPermissions"); $xajax->registerFunction("AddAdmin"); $xajax->registerFunction("SetupEditServer");
and license information. */ /* @package xajax @version $Id: helloworld.php 362 2007-05-29 15:32:24Z calltoconstruct $ @copyright Copyright (c) 2005-2006 by Jared White & J. Max Wilson @license http://www.xajaxproject.org/bsd_license.txt BSD License */ /* Section: Standard xajax startup - include <xajax.inc.php> - instantiate main <xajax> object */ require './xajax_core/xajax.inc.php'; $xajax = new xajax(); /* - enable deubgging if desired - set the javascript uri (location of xajax js files) */ //$xajax->configure('debug', true); $xajax->configure('javascript URI', './'); //comma를 보여주는 함수 function comma($number) { $nl = strlen($number); if ($nl > 6) { $no = substr($number, 0, $nl - 6) . "," . substr($number, $nl - 6, 3) . "," . substr($number, -3); } else { if ($nl > 3) { $no = substr($number, 0, $nl - 3) . "," . substr($number, -3);
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/Source/serviciotecnico/utilidades/xajax/xajax.inc.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/Source/eventos/consultasHome.php'; $xajax = new xajax(); $xajax->registerFunction("mostrarCompras"); $xajax->registerFunction("mostrarVentas"); $xajax->processRequests(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Sistema EDUGER</title> <?php $xajax->printJavascript("../serviciotecnico/utilidades/xajax/"); ?> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style8 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; } --> </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<?php /** * ajax :: inits xajax & registers the functions * * @package ajax * @copyright Copyright 2007 rainer@langheiter.comn // http://edv.langheiter.com * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: ajax.common.php 72 2008-11-25 03:44:18Z yellow1912 $ */ // pi_1.php, pi_1.common.php, pi_1.server.php // demonstrate a very basic xajax implementation // using xajax version 0.5 // http://xajaxproject.org require_once DIR_FS_CATALOG . "ajax/xajax5/xajax_core/xajax.inc.php"; #require_once ("ajax/xajax.inc.php"); $xajax = new xajax(); //$xajax->configure('debug', true); $xajax->configure("javascript URI", '../ajax/xajax5'); if (isset($ajax_func)) { foreach ($ajax_func as $key => $value) { if (true == $value) { $xajax->registerFunction($key); } } } $xajax->processRequest();
<?php define('XAJAX_DEFAULT_CHAR_ENCODING', 'windows-1251'); require_once $_SERVER['DOCUMENT_ROOT'] . '/xajax/xajax_core/xajax.inc.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php'; global $xajax; if (!$xajax) { $xajax = new xajax('/xajax/promo_codes.server.php'); $xajax->configure('decodeUTF8Input', TRUE); $xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT); $xajax->setCharEncoding('windows-1251'); $xajax->register(XAJAX_FUNCTION, 'checkPromoCode'); }
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # #$Id: addcontent.php 8510 2012-11-24 17:04:05Z calguy1000 $ $CMS_ADMIN_PAGE = 1; require_once "../include.php"; $urlext = '?' . CMS_SECURE_PARAM_NAME . '=' . $_SESSION[CMS_USER_KEY]; check_login(); $userid = get_userid(); define('XAJAX_DEFAULT_CHAR_ENCODING', $config['admin_encoding']); require_once dirname(dirname(__FILE__)) . '/lib/xajax/xajax_core/xajax.inc.php'; require_once dirname(__FILE__) . '/editcontent_extra.php'; $xajax = new xajax(); $xajax->register(XAJAX_FUNCTION, 'ajaxpreview'); $headtext = $xajax->getJavascript('../lib/xajax') . "\n"; if (isset($_POST["cancel"])) { redirect("listcontent.php" . $urlext); } require_once "header.php"; $tmpfname = ''; $error = FALSE; $submit = false; if (isset($_POST["submitbutton"])) { $submit = true; } $apply = false; if (isset($_POST["applybutton"])) { $apply = true;
header('Content-Type: text/html; charset=utf-8'); header('Expires: Sat, 01 Jan 2000 00:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'groupadmin') { header("Location: portal.php"); } require_once "include/xajax.inc.php"; require_once 'include/localization.class.php'; $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'remindercalls'); $xajax = new xajax("remindercalls.server.php"); $xajax->registerFunction("showGrid"); $xajax->registerFunction("add"); $xajax->registerFunction("save"); $xajax->registerFunction("edit"); $xajax->registerFunction("update"); $xajax->registerFunction("delete"); $xajax->registerFunction("init"); $xajax->registerFunction("searchFormSubmit"); $xajax->registerFunction("setAsteriskcalls"); define("ROWSXPAGE", 10); // Number of rows show it per page. define("MAXROWSXPAGE", 25); // Total number of rows show it when click on "Show All" button.
$objResponse = new xajaxResponse(); $objResponse->addAlert("My object number is: {$this->myNumber}"); $objResponse->addAlert("formData: " . print_r($formData, true)); $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true))); return $objResponse->getXML(); } function testClassMethod($formData) { $objResponse = new xajaxResponse(); $objResponse->addAlert("This is a class method."); $objResponse->addAlert("formData: " . print_r($formData, true)); $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true))); return $objResponse->getXML(); } } $xajax = new xajax(); //$xajax->debugOn(); $myObj = new myObjectTest(); $myObj->myNumber = 50; $xajax->registerFunction(array("testForm", &$myObj, "testInstanceMethod")); $xajax->registerFunction(array("testForm2", "myObjectTest", "testClassMethod")); $myObj->myNumber = 56; $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>Register Object Test | xajax Tests</title> <?php $xajax->printJavascript("../");
********************************************************************************/ header('Content-Type: text/html; charset=utf-8'); header('Expires: Sat, 01 Jan 2000 00:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); session_cache_limiter('public, no-store'); session_set_cookie_params(0); if (!session_id()) { session_start(); } setcookie('PHPSESSID', session_id()); if ($_SESSION['curuser']['usertype'] != 'admin') { header("Location: portal.php"); } require_once "include/xajax.inc.php"; require_once 'include/localization.class.php'; $GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'group'); $xajax = new xajax("group.server.php"); $xajax->registerFunction("showGrid"); $xajax->registerFunction("add"); $xajax->registerFunction("save"); $xajax->registerFunction("edit"); $xajax->registerFunction("update"); $xajax->registerFunction("init"); $xajax->registerFunction("showDetail"); $xajax->registerFunction("searchFormSubmit"); define("ROWSXPAGE", 10); // Number of rows show it per page. define("MAXROWSXPAGE", 25); // Total number of rows show it when click on "Show All" button.
<?php require_once '../../lib/xajax_core/xajax.inc.php'; require_once "mod.php"; $xajax = new xajax(); $xajax->configure("debug", false); session_start(); $n_url = "../solicitud_detalles/solicitud_detalles.php"; ///////////////configuraciones mensajes validaciones//////////////// $n_nro_solicitud = '<div class="alert alert-danger alert-dismissable"> <i class="fa fa-ban"></i> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <b>Error!</b> Debe indicar numero de solicitud </div>'; $n_fecha = '<div class="alert alert-danger alert-dismissable"> <i class="fa fa-ban"></i> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <b>Error!</b> Debe indicar fecha </div>'; $n_user_id = '<div class="alert alert-danger alert-dismissable"> <i class="fa fa-ban"></i> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <b>Error!</b> Debe indicar usuario </div>'; /////////////encabezado resultado busqueda grid///////////////// $ng_nro_solicitud = 'nro_solicitud'; $ng_fecha = 'fecha'; $ng_user_id = 'user_id'; /////////////encabezado resultado busqueda grid///////////////// class ctrl {