more php because it no work
This commit is contained in:
		@@ -80,7 +80,6 @@ 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';
 | 
				
			||||||
$page_style_regex = '/<!--PAGESTYLE=(.*?)-->/s';
 | 
					$page_style_regex = '/<!--PAGESTYLE=(.*?)-->/s';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -93,14 +92,15 @@ if (preg_match($page_regex, $page_data, $matches)) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if (preg_match($page_style_regex, $page_data, $style_matches)) {
 | 
					if (preg_match($page_style_regex, $page_data, $style_matches)) {
 | 
				
			||||||
    $page_style = $style_matches[1];
 | 
					    $page_style = $style_matches[1];
 | 
				
			||||||
    $page_data = str_replace('<template name="page styling">', $page_style, $page_data);
 | 
					    $page_data = str_replace('<!--PAGESTYLE=' . $page_style . '-->', '', $page_data);
 | 
				
			||||||
} else {
 | 
					} else {
 | 
				
			||||||
    $page_style = "/styles/pages/$page_name.css";
 | 
					    $page_style = "/styles/pages/$page_name.css";
 | 
				
			||||||
    $page_data = str_replace('<template name="page styling">', $page_style, $page_data);
 | 
					    $page_data = str_replace('<template name="page styling">', $page_style, $page_data);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$output = str_replace('<template name="page name">', $page_style, $output);
 | 
					$output = str_replace('<template name="page name">', $page_name, $output);
 | 
				
			||||||
 | 
					$output = str_replace('<template name="page styling">', $page_style, $output);
 | 
				
			||||||
$output = str_replace('<template name="page content">', $page_data, $output);
 | 
					$output = str_replace('<template name="page content">', $page_data, $output);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo $output;
 | 
					echo $output;
 | 
				
			||||||
?>
 | 
					?>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user