Exemple #1
0
    <p class="copyright pull-right">
		<?php 
echo sprintf(lang('footer'), date('Y'), site_url(), config('STORE_NAME'));
?>
    
    </p>
</div>
<!--  END: Page Footer -->

<!--  BEGIN: Run Service -->
<?php 
run_service('google_analytics');
?>

<?php 
run_service('debug');
?>
<!--  END: Run Service -->
  
<script type="text/javascript" src="<?php 
echo base_url();
?>
templates/base/web/javascript/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php 
echo base_url();
?>
templates/base/web/javascript/bootstrap/select2.js"></script>

<script type="text/javascript">
	$('.popup-cart').popover({
	    animation: true,
Exemple #2
0
    log_msg('warn', 'json: ' . $err['#data']);
    die;
}
// check authentication
if (isset($m['auth']) && $m['auth']) {
    if (!is_auth()) {
        prompt_auth(true);
    }
}
if (isset($m['cross-origin']) && $m['cross-origin']) {
    // output cross-origin header if requested
    header('Access-Controll-Allow-Origin: *');
} else {
    // otherwise check the referer to make xsrf harder
    if (!empty($_SERVER['HTTP_REFERER'])) {
        $bu = base_url();
        if (substr($_SERVER['HTTP_REFERER'], 0, strlen($bu)) != $bu) {
            echo json_encode(response('Cross-origin requests not supported for this method', 400));
            log_msg('warn', 'json: possible xsrf detected, referer is ' . quot($_SERVER['HTTP_REFERER']) . ', arguments ' . var_dump_inl($args));
            die;
        }
    }
}
// run service and output result
$ret = run_service($method, $args);
if (is_array($ret) && isset($ret['#error']) && $ret['#error']) {
    log_msg('warn', 'json: service ' . $method . ' returned error ' . quot($ret['#data']));
} elseif (is_array($ret) && isset($ret['#data'])) {
    log_msg('debug', 'json: service returned ' . var_dump_inl($ret['#data']));
}
echo json_encode($ret);