4 * @file view/theme/frio/php/frio_boot.php
6 * @brief This file contains functions for page contstruction
12 * @brief Load page template in dependence of the template mode
14 * @todo Check if this is really needed.
16 function load_page(&$a) {
17 if(isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) {
18 require "view/theme/frio/minimal.php";
19 } elseif((isset($_GET["mode"]) AND ($_GET["mode"] == "none"))) {
20 require "view/theme/frio/none.php";
22 $template = 'view/theme/' . current_theme() . '/'
23 . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
24 if(file_exists($template))
25 require_once($template);
27 require_once(str_replace('theme/' . current_theme() . '/', '', $template));
35 * @brief Check if page is a modal page
37 * This function checks if $_REQUEST['pagename'] is
38 * a defined in a $modalpages
44 $modalpages = get_modalpage_list();
46 foreach ($modalpages as $r => $value) {
47 if(strpos($_REQUEST['pagename'],$value) !== false) {
56 * @brief Array with modalpages
58 * The array contains the page names of the pages
59 * which should displayed as modals
61 * @return array Pagenames as path
63 function get_modalpage_list() {
64 //Arry of pages wich getting bootstrap modal dialogs
65 $modalpages = array('poke/',
76 * @brief Array with standard pages
78 * The array contains the page names of the pages
79 * which should displayed as standard-page
81 * @return array Pagenames as path
83 function get_standard_page_list() {
84 //Arry of pages wich getting the standard page template
85 $standardpages = array(//'profile',
89 return $standardpages;
93 * @brief Check if page is standard page
95 * This function checks if $_REQUEST['pagename'] is
96 * a defined $standardpages
98 * @param string $pagetitle Title of the actual page
101 function is_standard_page($pagetitle) {
102 $is_standard_page = false;
103 $standardpages = get_standard_page_list();
105 foreach ($standardpages as $r => $value) {
106 if(strpos($pagetitle,$value) !== false) {
107 $is_standard_page = true;
111 return $is_standard_page;
114 * @brief Get the typ of the page
116 * @param type $pagetitle
119 function get_page_type($pagetitle) {
123 $page_type = "modal";
125 if(is_standard_page($pagetitle))
126 $page_type = "standard_page";