6.X/EMPS.php
/**
     * Pre-display handler
     *
     * Called immediately before a module view Smarty template is displayed.
     */
Pre-display handler
Called immediately before a module view Smarty template is displayed.
Pre - display handler Called immediately before a module view Smarty template is displayed .
public function pre_display()
    {
        global $smarty;
        if (!$this->page_properties['title']) {
            $this->page_properties['title'] = "";
            foreach ($this->spath as $v) {
                if ($this->page_properties['title'] != "") {
                    $this->page_properties['title'] = strip_tags($v['dname']) . " - " . $this->page_properties['title'];
                } else {
                    $this->page_properties['title'] = strip_tags($v['dname']);
                }
            }
        }
        $this->page_property("year", date("Y", time()));
        $smarty->assign("enum", $this->enum);
        $fn = $this->common_module('config/predisplay.php');
        if ($fn) {
            require_once $fn;
        }
        header("Referrer-Policy: unsafe-url");
        $smarty->assign("spath", $this->spath);
        $smarty->assign('page', $this->page_properties);
        $smarty->assign('lang', $this->lang);
        $html_lang = $this->lang;
        if ($html_lang == 'nn') {
            $html_lang = 'ru';
        }
        $smarty->assign("html_lang", $html_lang);
        $smarty->assign("df_format", EMPS_DT_FORMAT);
        $smarty->assign("current_host", $_SERVER['HTTP_HOST']);
        $smarty->assign("current_uri", $_SERVER['REQUEST_URI']);
    }
public function pre_display ( ) { global $ smarty ; if ( ! $ this -> page_properties [ 'title' ] ) { $ this -> page_properties [ 'title' ] = " " ; foreach ( $ this -> spath as $ v ) { if ( $ this -> page_properties [ 'title' ] != " " ) { $ this -> page_properties [ 'title' ] = strip_tags ( $ v [ 'dname' ] ) . "  -  " . $ this -> page_properties [ 'title' ] ; } else { $ this -> page_properties [ 'title' ] = strip_tags ( $ v [ 'dname' ] ) ; } } } $ this -> page_property ( " year " , date ( " Y " , time ( ) ) ) ; $ smarty -> assign ( " enum " , $ this -> enum ) ; $ fn = $ this -> common_module ( 'config/predisplay.php' ) ; if ( $ fn ) { require_once $ fn ; } header ( " Referrer-Policy: unsafe-url " ) ; $ smarty -> assign ( " spath " , $ this -> spath ) ; $ smarty -> assign ( 'page' , $ this -> page_properties ) ; $ smarty -> assign ( 'lang' , $ this -> lang ) ; $ html_lang = $ this -> lang ; if ( $ html_lang == 'nn' ) { $ html_lang = 'ru' ; } $ smarty -> assign ( " html_lang " , $ html_lang ) ; $ smarty -> assign ( " df_format " , EMPS_DT_FORMAT ) ; $ smarty -> assign ( " current_host " , $ _SERVER [ 'HTTP_HOST' ] ) ; $ smarty -> assign ( " current_uri " , $ _SERVER [ 'REQUEST_URI' ] ) ; }
Pre-display handler
 Called immediately before a module view Smarty template is displayed.
Pre - display handler Called immediately before a module view Smarty template is displayed .