예제 #1
0
<?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');
}
예제 #2
0
function fecha($var)
{
    $final = date("Y/m/d", strtotime($var));
    return $final;
}
function limpiar($String)
{
    $String = str_replace(' ', ' ', $String);
    /////###########importantisimo!! no borrar!!
    //$String = str_replace('&quot','\"',$String);
    $String = str_replace('"', '\\"', $String);
    return $String;
}
$xajax = new xajax();
// Crea un nuevo objeto xajax
$xajax->setCharEncoding("utf-8");
// le indica la codificación que debe utilizar
$xajax->decodeUTF8InputOn();
// decodifica los caracteres extraños
$xajax->registerFunction("agregarFila");
//Registramos la función para indicar que se utilizará con xajax.
$xajax->registerFunction("cancelar");
$xajax->registerFunction("eliminarFila");
$xajax->registerFunction("guardar");
$xajax->registerFunction("fecha");
$xajax->registerFunction("asigna");
$xajax->registerFunction("limpiar");
$xajax->processRequests();
?>

<html>
예제 #3
0
<?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/presscenter.server.php");
    //$xajax->setFlag('debug',true);
    $xajax->configure('decodeUTF8Input', true);
    $xajax->configure('scriptLoadTimeout', XAJAX_LOAD_TIMEOUT);
    $xajax->setCharEncoding("windows-1251");
    $xajax->register(XAJAX_FUNCTION, "GetPeopleTeamInfo");
    $xajax->register(XAJAX_FUNCTION, "DeletePhoto");
    $xajax->register(XAJAX_FUNCTION, "ReorderTeam");
}
예제 #4
0
    /////###########importantisimo!! no borrar!!
    $String = str_replace(' ', "&nbsp", $String);
    // $String = str_replace(' ','',$String);
    $String = str_replace('"', '&quot', $String);
    return $String;
}
function limpiar2($String)
{
    //$String = str_replace(' ',' ',$String);   /////###########importantisimo!! no borrar!!
    //$String = str_replace(' ',"&nbsp",$String);
    $String = str_replace("&nbsp", ' ', $String);
    // $String = str_replace(' ','',$String);
    //$String = str_replace('&quot','"',$String);
    return $String;
}
$xajax->setCharEncoding("iso-8859-1");
// le indica la codificación que debe utilizar
$xajax->decodeUTF8InputOn();
// decodifica los caracteres extraños
$xajax->registerFunction("eliminar");
//Registramos la función para indicar que se utilizará con xajax.
$xajax->registerFunction("eliminarprofesor");
$xajax->registerFunction("fecha");
$xajax->registerFunction("ordenar");
$xajax->registerFunction("guardar");
$xajax->registerFunction("buscar");
$xajax->processRequests();
?>

<html>
<head>
예제 #5
0
 function admin_xajax_live()
 {
     if (!$this->admin_xajax_live_flag) {
         $this->admin_xajax_live_flag = true;
         include_once dirname(__FILE__) . '/xajax.inc.php';
         include_once dirname(__FILE__) . '/xajax.class.php';
         global $admin_xajax_live;
         $admin_xajax_live = new xajax();
         $admin_xajax_live->setCharEncoding('utf-8');
         $admin_xajax_live->decodeUTF8InputOn();
         $admin_xajax_live->registerFunction('ChangeStatus');
         $admin_xajax_live->registerFunction('AdminResponse');
         $admin_xajax_live->registerFunction('AdminSound');
         $admin_xajax_live->registerFunction('AdminDecline');
         $admin_xajax_live->registerFunction('AdminChatHistory');
         $admin_xajax_live->registerFunction('AdminPostdata');
         $admin_xajax_live->registerFunction('EndChats');
         $admin_xajax_live->registerFunction('GetEndChat');
         $admin_xajax_live->registerFunction('AdminExit');
         $admin_xajax_live->processRequests();
     }
 }
예제 #6
0
if (@$_GET['refresh'] == "yes") {
    session_destroy();
    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>
예제 #7
0
 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);
     }
 }
예제 #8
0
$xajax->setRequestURI($BL->conf['path_url'] . "/");
if (ALP_DEBUG) {
    $xajax->debugOn();
} else {
    $xajax->debugOff();
}
if (ini_get('output_buffering') == NULL || ini_get('output_buffering') == 'Off') {
    $xajax->cleanBufferOn();
} else {
    $xajax->cleanBufferOff();
}
$xajax->errorHandlerOff();
$xajax->statusMessagesOn();
$xajax->waitCursorOn();
$xajax->exitAllowedOn();
$xajax->setCharEncoding(CHARSET);
$xajax->decodeUTF8InputOn();
$xajax->outputEntitiesOn();
$xajax->registerFunction("reload");
$xajax->registerFunction("updateBasket");
$xajax->registerFunction("toggleButtons");
$xajax->registerFunction("step1");
$xajax->registerFunction("step1_buyNow");
$xajax->registerFunction("step1_selectGroup");
$xajax->registerFunction("step1_selectProduct");
$xajax->registerFunction("step1_selectCycle");
$xajax->registerFunction("step1_addAddon");
$xajax->registerFunction("step1_removeAddon");
$xajax->registerFunction("step1_ShowGroups");
$xajax->registerFunction("step1_HideGroups");
$xajax->registerFunction("step1_ShowProducts");