<?php

class default_page extends SYSTEM\PAGE\Page {
    
    private function js(){        
        return  '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PJQUERY(),'jquery-1.9.1.min.js').'"></script>'.
                '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PBOOTSTRAP(),'js/bootstrap.min.js').'"></script>'.                
                '<script type="text/javascript" language="JavaScript" src="http://www.openlayers.org/api/OpenLayers.js"></script>'.
                '<script type="text/javascript" language="JavaScript" src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>'.
                '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/loadtexts.js').'"></script>'.
                '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PPAGE(),'osm/osm.js').'"></script>'.
                '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PPAGE(),'js/lang_switcher.js').'"></script>'.
                '<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_certificates/galleria/galleria-1.2.9.min.js').'"></script>';
    }
    
    private function css(){
        return '<link href="'.SYSTEM\WEBPATH(new PBOOTSTRAP(),'css/bootstrap.min.css').'" rel="stylesheet" media="screen">';}
    
    public function html(){
        $vars = array();  
        $vars['css'] = $this->css();
        $vars['js'] = $this->js();        
                
        $vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::VALUE_CATEGORY_DASENSE));  
        $arr = array_merge($_GET, $_POST);
        
        if(isset($arr['lang'])){
            SYSTEM\locale::set($arr['lang']); }
            
        return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/danube.tpl'), $vars);
        
    }
}