예제 #1
0
 function mc_loader($route, $data)
 {
     $front = optionGet('theme_front');
     $path = locationTheme('path');
     $fullpath = $path . "frontend/" . $front . '/' . $route . ".php";
     if (file_exists($fullpath)) {
         include $fullpath;
     } else {
         mc_404();
     }
 }
예제 #2
0
파일: index.php 프로젝트: uncia/McBlog
                        $post_id = $mc_post_ids[$i];
                        $post = $mc_posts[$post_id];
                        $date_array[] = substr($post['date'], 0, 7);
                        $tags_array = array_merge($tags_array, $post['tags']);
                    }
                    $mc_tags = array_values(array_unique($tags_array));
                    $mc_dates = array_values(array_unique($date_array));
                } else {
                    if ($mc_get_type == 'page') {
                        require 'mc-files/pages/index/publish.php';
                        if (array_key_exists($mc_get_name, $mc_pages)) {
                            $mc_post_id = $mc_get_name;
                            $mc_post = $mc_pages[$mc_post_id];
                            $mc_data = unserialize(file_get_contents('mc-files/pages/data/' . $mc_post['file'] . '.dat'));
                        } else {
                            mc_404();
                        }
                    } else {
                        require 'mc-files/posts/index/publish.php';
                        $mc_post_ids = array_keys($mc_posts);
                        $mc_post_count = count($mc_post_ids);
                    }
                }
            }
        }
    }
}
if ($mc_get_type != 'rss') {
    require "mc-files/theme/" . $mc_config['site_theme'] . "/index.php";
} else {
    require 'mc-files/mc-rss.php';