Example #1
0
        if (!wpro_class_exists('xajaxResponse')) {
            require_once WPRO_PATH_XAJAX . "xajaxResponse.inc.php";
        }
    }
    if (wpro_class_exists('wpro_xajaxResponse')) {
        $response = new wpro_xajaxResponse();
    } else {
        $response = new xajaxResponse();
    }
    $response->addAlert(WPRO_STR_JS_UNAUTHORIZED);
    return $response;
}
// restore editor session
require_once WPRO_DIR . 'conf/customSessHandlers.inc.php';
$EDITOR = NULL;
$WPRO_SESS = new wproSession();
if (!($EDITOR = $WPRO_SESS->load())) {
    // invalid or expired session
    if (isset($_REQUEST[$WPRO_SESS->sessionName]) && !WPRO_ANONYMOUS_ACCESS) {
        if (isset($_POST['xajax'])) {
            if (WPRO_PATH_XAJAX == WPRO_DIR . 'core/libs/xajax/') {
                require_once WPRO_PATH_XAJAX . "xajax.inc.php";
            } else {
                if (!wpro_class_exists('xajax')) {
                    require_once WPRO_PATH_XAJAX . "xajax.inc.php";
                }
            }
            if (wpro_class_exists('wpro_xajax')) {
                $xajax = new wpro_xajax();
            } else {
                $xajax = new xajax();
Example #2
0
        error_reporting(E_ALL);
    }
}
if (ini_get('display_errors') == true) {
    ini_set('display_errors', false);
}
if (!isset($_GET['name'])) {
    return;
}
define('WPRO_CONTENT_TYPE_HEADER_SENT', true);
require_once dirname(dirname(__FILE__)) . '/config.inc.php';
header("Content-type: text/javascript");
require_once WPRO_DIR . 'core/libs/wproSession.class.php';
require_once WPRO_DIR . 'wysiwygPro.class.php';
require_once WPRO_DIR . 'conf/customSessHandlers.inc.php';
$WPRO_SESS = new wproSession();
if ($EDITOR = $WPRO_SESS->load()) {
    $EDITOR->sendCacheHeaders();
    $name = $EDITOR->getJSName($_GET['name']);
    if (!empty($name)) {
        $action = isset($_GET['action']) ? $_GET['action'] : 'touch';
        if ($action == 'touch') {
            $url = addslashes($EDITOR->editorURL);
            $sid = $WPRO_SESS->sessionName . '=' . addslashes($WPRO_SESS->sessionId);
            $phpsid = addslashes($EDITOR->appendSid ? strip_tags(defined('SID') ? SID : '') : '');
            $append = addslashes(!empty($EDITOR->appendToQueryStrings) ? $EDITOR->appendToQueryStrings : '');
            $route = addslashes($EDITOR->route);
            echo '
			var wpro_sess_refresh_success = false;
			/*try{*/
			wpro_sessTimeout ("' . addslashes($name) . '", "' . $sid . '", \'' . $phpsid . '\',  \'' . $url . '\',  \'' . $append . '\', ' . intval(WPRO_SESS_REFRESH) . ', \'' . $route . '\');