path_r = sliceurl(); $_view -> path = implode("/",$_view -> path_r); $_view -> slug = $_view -> path_r[0]; $_view -> page = "404.phtml"; $_view -> title = "Page not found"; $_view -> description = "Choy Records was founded in 2002 by Sébastièn Choy.Sébastièn was born and raised in Rotterdam,The Netherlands."; $_view -> posture = "default.phtml"; switch ($_view->slug) { case "" : require ("code/home.php"); $_view -> page = "home.phtml"; $_view -> title = "Welcome"; break; case "home2" : require ("code/home.php"); $_view -> page = "home2.phtml"; $_view -> title = "Welcome"; break; case "blog" : if ($_view -> path_r[1] == "post") { require ("code/blog-post.php"); $_view -> page = "blog-post.phtml"; $_view -> title = $post -> post_title; break; } else { require ("code/blog.php"); $_view -> page = "blog.phtml"; $_view -> title = "Blog"; } break; case "test": $_view -> page = "test.phtml"; $_view -> title = "Test"; break; case "artists" : require ("code/artist.php"); if ($_view -> path_r[1]) : $_view -> page = "artist.phtml"; $_view -> title = $post -> post_title; else : $_view -> page = "artists.phtml"; $_view -> title = "Artists"; endif; break; case "store" : $_view -> page = "store.phtml"; $_view -> title = "Store"; break; case "audition" : require ("code/audition.php"); $_view -> page = "audition.phtml"; $_view -> title = "Audition"; break; case "danceshowdvd" : require ("code/danceshowdvd.php"); $_view -> page = "danceshowdvd.phtml"; $_view -> title = "Dance Show DVD"; if(isset($_GET[blank])) { require ("templates/postures/blank.phtml"); exit(); } break; default : if (is_numeric($_view -> path_r[0])) { $postid = $_view -> path_r[0]; } else { $postid = $wpdb -> get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '" . $_view -> path_r[0] . "'"); } $post = wp_get_single_post($postid); if ($post -> post_name == $_view -> path_r[0]) : $_view -> title = $post -> post_title; $_view -> page = "page.phtml"; else : require ("code/home.php"); $_view -> title = "404"; $_view -> page = "404.phtml"; endif; break; } require ("templates/postures/" . $_view -> posture); ?>