Exemple #1
0
/**
 * Prints error messages. Used with AJAX calls
 */
function e()
{
    $bCliOrAjax = PHP_SAPI == 'cli' || defined('PHPFOX_IS_AJAX') && PHPFOX_IS_AJAX;
    ob_clean();
    if (!$bCliOrAjax) {
        echo '<link rel="stylesheet" type="text/css" href="theme/adminpanel/default/style/default/css/debug.css?v=' . PHPFOX_TIME . '" />';
    }
    define('PHPFOX_MEM_END', memory_get_usage());
    echo Phpfox_Debug::getDetails();
    exit;
}
 /**
  * Controller
  */
 public function process()
 {
     define('PHPFOX_MEM_END', memory_get_usage());
     $this->template()->assign(array('sDebugInfo' => PHPFOX_DEBUG ? Phpfox_Debug::getDetails() : ''));
 }
Exemple #3
0
    			$sJs .= '\'' . $aAd['location'] . '\': \'' . str_replace("'", "\'", $aAd['html_code']) . '\',';
    		}
    		$sJs = rtrim($sJs, ',');
    		$sJs .= '}';
    	}
    * 
    */
    if (isset($_GET['js_mobile_version']) && $_GET['js_mobile_version']) {
        if (isset($_GET['req1']) && empty($_GET['req2'])) {
            Phpfox::getLib('ajax')->call('$(\'#mobile_search\').show();');
        } else {
            Phpfox::getLib('ajax')->call('$(\'#mobile_search\').hide();');
        }
    }
    Phpfox::getLib('ajax')->call('$Core.page({' . $sJs . '});');
    if (PHPFOX_DEBUG) {
        Phpfox::getLib('ajax')->call('$(\'#js_main_debug_holder\').html(\'' . Phpfox_Debug::getDetails() . '\');');
    }
    echo Phpfox::getLib('ajax')->getData();
} else {
    $oAjax = Phpfox::getLib('ajax');
    $oAjax->process();
    echo $oAjax->getData();
    if ($oAjax->bIsModeration == true) {
        echo '$(window).trigger("moderation_ended");';
    }
    if (!isset($_REQUEST['height']) && !isset($_REQUEST['width']) && !isset($_REQUEST['no_page_update'])) {
        // echo '$Core.updatePageHistory();';
    }
}
ob_end_flush();