Update footer.php
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//set a default template
|
//set a default template
|
||||||
if (strlen($_SESSION["template_content"]) == 0) { //build template if session template has no length
|
if (strlen($_SESSION["template_full_path"]) == 0) { //build template if session template has no length
|
||||||
$template_base_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
$template_base_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
||||||
if (strlen($template_rss_sub_category) > 0) {
|
if (strlen($template_rss_sub_category) > 0) {
|
||||||
//this template was assigned by the content manager
|
//this template was assigned by the content manager
|
||||||
@@ -55,8 +55,7 @@
|
|||||||
$_SESSION['domain']['template']['name'] = 'default';
|
$_SESSION['domain']['template']['name'] = 'default';
|
||||||
$template_full_path = $template_base_path.'/default/template.php';
|
$template_full_path = $template_base_path.'/default/template.php';
|
||||||
}
|
}
|
||||||
$template = file_get_contents($template_full_path);
|
$_SESSION["template_full_path"] = $template_full_path;
|
||||||
$_SESSION["template_content"] = $template;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//get the contents of the template and save it to the template variable
|
//get the contents of the template and save it to the template variable
|
||||||
@@ -65,17 +64,17 @@
|
|||||||
$_SESSION['domain']['template']['name'] = 'default';
|
$_SESSION['domain']['template']['name'] = 'default';
|
||||||
$template_full_path = $template_base_path.'/default/template.php';
|
$template_full_path = $template_base_path.'/default/template.php';
|
||||||
}
|
}
|
||||||
$template = file_get_contents($template_full_path);
|
$_SESSION["template_full_path"] = $template_full_path;
|
||||||
$_SESSION["template_content"] = $template;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the template
|
//get the template
|
||||||
|
$template_full_path = $_SESSION["template_full_path"];
|
||||||
ob_start();
|
ob_start();
|
||||||
$template = $_SESSION["template_content"];
|
include($template_full_path);
|
||||||
eval('?>' . $template . '<?php ');
|
|
||||||
$template = ob_get_contents(); //get the output from the buffer
|
$template = ob_get_contents(); //get the output from the buffer
|
||||||
ob_end_clean(); //clean the buffer
|
ob_end_clean(); //clean the buffer
|
||||||
|
$_SESSION["template_content"] = $template;
|
||||||
|
|
||||||
//prepare the template to display the output
|
//prepare the template to display the output
|
||||||
$custom_head = '';
|
$custom_head = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user