function construct(&$path) { if ($path == '/index' or $path == '/home' or $path == '/') { homeView(); } else { if ($path == '/about') { aboutView(); } else { if ($path == '/create') { createView(); } else { if (strpos($path, '/posts/') !== false) { postView($path); } else { if ($path == '/login') { loginView(); } else { if ($path == '/search') { searchView(); } else { if ($path == '/admin/settings') { adminView(); } else { if ($path == '/admin/dashboard') { adminDashboardView(); } else { if ($path == '/logout') { logout(); } else { errorView('404 Not Found', errorMessage); } } } } } } } } } }
<div id="title"> <a href="<?php echo linkToSite(); ?> "><?php echo siteTitle(); ?> </a> </div> <div id="menu"> <?php echo pageList(); ?> </div> </div> <div id="main"> <div id="content"> <div class="pageText"> <?php echo pageText(); ?> </div> <div class="projectView"> <?php echo postView(); ?> </div> </div> </div> </body> </html>