示例#1
0
 function handleAjaxRequest()
 {
     if (isset($_GET['AjaxServiceCall'])) {
         $this->checkServiceCall();
         //get object / method from variables
         $object = $_GET['ServiceObject'];
         if ($object == '') {
             $object = null;
         }
         $method = $_GET['ServiceMethod'];
         $params = array();
         foreach ($_GET as $k => $v) {
             if (preg_match("/^params_\\d{1,2}\$/", $k)) {
                 array_push($params, KT_getRealValue("GET", $k));
             }
         }
         foreach ($_POST as $k => $v) {
             array_push($params, KT_getRealValue("POST", $k));
         }
         $params = array_values($params);
         $m = $this->findServiceCall($object, $method);
         if ($m['object']) {
             $toret = call_user_func_array(array(&$GLOBALS[$m['object']], $m['method']), $params);
         } else {
             $toret = call_user_func_array($m['method'], $params);
         }
         // do not cache AJAX Requests
         $seconds_expire = -86400;
         //one day ago
         KT_sendExpireHeader($seconds_expire);
         $isOpera = false;
         if (isset($_SERVER) && isset($_SERVER['HTTP_USER_AGENT'])) {
             if (stristr($_SERVER['HTTP_USER_AGENT'], 'opera/9.')) {
                 $isOpera = true;
             }
         }
         if (isset($_SERVER['HTTP_KT_CHARSET'])) {
             header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '; charset=' . $_SERVER['HTTP_KT_CHARSET']);
         } else {
             header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '');
         }
         echo KT_json($toret);
         die;
     }
 }
示例#2
0
            $panelObj->renderEnd();
            $content = ob_get_contents();
            ob_end_clean();
            $content_js = $ctrl->renderJsBindings(false);
            $contents .= $content . $content_js;
            $strlen_content = strlen($content);
            $strlen_content_js = strlen($content_js);
            $strlen_all = $strlen_content + $strlen_content_js;
            $strlens[$panelId] = array('start' => $start_index, 'current_state' => $panelObj->currentState, 'end' => $start_index + $strlen_all, 'content' => $strlen_content, 'content_js' => $strlen_content_js);
            $start_index += $strlen_all;
        }
    }
    $tmp_arr = array('panels' => $strlens, 'title' => $ctrl->title);
    // do not cache AJAX Requests
    $seconds_expire = -86400;
    KT_sendExpireHeader($seconds_expire);
    $isOpera = false;
    if (isset($_SERVER) && isset($_SERVER['HTTP_USER_AGENT'])) {
        if (stristr($_SERVER['HTTP_USER_AGENT'], 'opera/9.')) {
            $isOpera = true;
        }
    }
    if (isset($_SERVER['HTTP_KT_CHARSET'])) {
        header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '; charset=' . $_SERVER['HTTP_KT_CHARSET']);
    } else {
        header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '');
    }
    header('Kt_json: ' . KT_json($tmp_arr));
    echo $contents;
    die;
}
示例#3
0
/*
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2007 Adobe Systems Incorporated
 * All Rights Reserved
 * 
 * NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the 
 * terms of the Adobe license agreement accompanying it. If you have received this file from a 
 * source other than Adobe, then your use, modification, or distribution of it requires the prior 
 * written permission of Adobe.
 */
/*
	Copyright (c) InterAKT Online 2000-2006. All rights reserved.
*/
include_once dirname(realpath(__FILE__)) . '/../../common/lib/resources/KT_Resources.php';
$d = 'NXT';
KT_sendExpireHeader(60 * 60 * 24);
header("Content-Type: application/JavaScript");
?>
//Javascript UniVAL Resources
if (typeof(NXT_Messages) == 'undefined') {
	NXT_Messages = {};
}
NXT_Messages['are_you_sure_move'] = '<?php 
echo KT_escapeJS(KT_getResource('ARE_YOU_SURE_MOVE', $d));
?>
';
NXT_Messages['Record_FH'] = '<?php 
echo KT_escapeJS(KT_getResource('Record_FH', $d));
?>
';
示例#4
0
 function endList()
 {
     if (isset($_GET['KT_data_request']) && $_GET['KT_data_request'] == $this->listName) {
         $seconds_expire = -86400;
         //one day ago
         KT_sendExpireHeader($seconds_expire);
         $isOpera = false;
         if (isset($_SERVER) && isset($_SERVER['HTTP_USER_AGENT'])) {
             if (stristr($_SERVER['HTTP_USER_AGENT'], 'opera/9.')) {
                 $isOpera = true;
             }
         }
         if (isset($_SERVER['HTTP_KT_CHARSET'])) {
             header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '; charset=' . $_SERVER['HTTP_KT_CHARSET']);
         } else {
             header('Content-Type: text/' . (!$isOpera ? 'jaxon' : 'plain') . '');
         }
         ob_end_flush();
         die;
     }
 }