Spáchanie #216fdsaf
This commit is contained in:
parent
9fdd7d72dc
commit
09c32d1be2
@ -50,7 +50,6 @@ $page_data = include_ob($page_file);
|
|||||||
|
|
||||||
$output = file_get_contents("$template_dir/skeleton.html");
|
$output = file_get_contents("$template_dir/skeleton.html");
|
||||||
$output = str_replace('<template name="navigation">', $nav, $output);
|
$output = str_replace('<template name="navigation">', $nav, $output);
|
||||||
$output = str_replace('<template name="page content">', $page_data, $output);
|
|
||||||
|
|
||||||
if (isset($_SESSION['user_id'])) {
|
if (isset($_SESSION['user_id'])) {
|
||||||
$hash = md5(strtolower(trim($_SESSION['user_email'])));
|
$hash = md5(strtolower(trim($_SESSION['user_email'])));
|
||||||
@ -61,6 +60,7 @@ if (isset($_SESSION['user_id'])) {
|
|||||||
$page_data = str_replace('<template name="username">', $_SESSION['user_username'], $page_data);
|
$page_data = str_replace('<template name="username">', $_SESSION['user_username'], $page_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$page_regex = '/<!--PAGENAME=(.*?)-->/s';
|
$page_regex = '/<!--PAGENAME=(.*?)-->/s';
|
||||||
|
|
||||||
if(preg_match($page_regex, $page_data, $matches)){
|
if(preg_match($page_regex, $page_data, $matches)){
|
||||||
@ -72,6 +72,7 @@ else{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$output = str_replace('<template name="page name">', $page_name, $output);
|
$output = str_replace('<template name="page name">', $page_name, $output);
|
||||||
|
$output = str_replace('<template name="page content">', $page_data, $output);
|
||||||
|
|
||||||
echo $output;
|
echo $output;
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user