6.X/EMPS.php
/**
     * Called after parsing the URL
     *
     * This function, among other things, starts the PHP session.
     */
Called after parsing the URL
This function, among other things, starts the PHP session.
Called after parsing the URL This function among other things starts the PHP session .
public function post_parse()
    {
        global $pp;
        $fn = $this->common_module('config/postparse.php');
        if ($fn) {
            require_once $fn;
        }
        $this->text_headers();
        $skip = false;
        if (defined("EMPS_NO_SESSION")){
            $x = explode(',', EMPS_NO_SESSION);
            foreach($x as $v){
                if ($v == $pp) {
                    $skip = true;
                }
            }
        }
        if (!$skip) {
            $skip = $this->should_prevent_session();
        }
        if (!$skip) {
            if (!$this->is_localhost_request() || $GLOBALS['emps_localhost_mode']) {
                session_start();
                if ($_SESSION['lsu'] < (EMPS_SESSION_COOKIE_LIFETIME / 30)) {
                    $_sess_name = session_name();
                    $_sess_id = session_id();
                    setcookie($_sess_name, $_sess_id, time() + EMPS_SESSION_COOKIE_LIFETIME, "/");
                    $_SESSION['lsu'] = time();
                }
                if (count($_GET) > 0) {
                    foreach ($_GET as $n => $v) {
                        $n = strtolower($n);
                        if (substr($n, 0, 4) == "utm_") {
                            $_SESSION['utm'][$n] = $v;
                        }
                    }
                    $this->copy_values($_SESSION['utm'], $_GET,
                        "gclid,gclsrc,dclid,fbclid,yclid,ymclid,zanpid");
                }
            }
        }
    }
public function post_parse ( ) { global $ pp ; $ fn = $ this -> common_module ( 'config/postparse.php' ) ; if ( $ fn ) { require_once $ fn ; } $ this -> text_headers ( ) ; $ skip = false ; if ( defined ( " EMPS_NO_SESSION " ) ) { $ x = explode ( ',' , EMPS_NO_SESSION ) ; foreach ( $ x as $ v ) { if ( $ v == $ pp ) { $ skip = true ; } } } if ( ! $ skip ) { $ skip = $ this -> should_prevent_session ( ) ; } if ( ! $ skip ) { if ( ! $ this -> is_localhost_request ( ) || $ GLOBALS [ 'emps_localhost_mode' ] ) { session_start ( ) ; if ( $ _SESSION [ 'lsu' ] < ( EMPS_SESSION_COOKIE_LIFETIME / 30 ) ) { $ _sess_name = session_name ( ) ; $ _sess_id = session_id ( ) ; setcookie ( $ _sess_name , $ _sess_id , time ( ) + EMPS_SESSION_COOKIE_LIFETIME , " / " ) ; $ _SESSION [ 'lsu' ] = time ( ) ; } if ( count ( $ _GET ) > 0 ) { foreach ( $ _GET as $ n => $ v ) { $ n = strtolower ( $ n ) ; if ( substr ( $ n , 0 , 4 ) == " utm_ " ) { $ _SESSION [ 'utm' ] [ $ n ] = $ v ; } } $ this -> copy_values ( $ _SESSION [ 'utm' ] , $ _GET , " gclid,gclsrc,dclid,fbclid,yclid,ymclid,zanpid " ) ; } } } }
Called after parsing the URL
 This function, among other things, starts the PHP session.
Called after parsing the URL This function among other things starts the PHP session .
// this website's default content-type is utf-8 HTML // these pages should not set the session cookie, they don't need it