Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("config.php");
- // set the appropriate action
- $action = (isset($_GET["action"])) ? $_GET["action"] : "";
- switch($action) {
- case 'article':
- article();
- break;
- default:
- break;
- }
- function article() {
- //if articleid is not set
- if (!isset($_GET['articleId']) || !($_GET['articleId'])) {
- //homepage();
- return;
- }
- else {
- $articleId = (int)($_GET['articleId']);
- $article = Article::getArticleById($articleId);
- $pageTitle = $article->title . "Hieu CMS";
- require(TEMPLATE_PATH . "/article.php");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement