Advertisement
Guest User

Untitled

a guest
Feb 27th, 2012
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. require("config.php");
  3. // set the appropriate action
  4. $action = (isset($_GET["action"])) ? $_GET["action"] : "";
  5.  
  6. switch($action) {
  7.     case 'article':
  8.         article();
  9.         break;
  10.     default:
  11.         break;
  12. }
  13.  
  14. function article() {
  15.     //if articleid is not set  
  16.     if (!isset($_GET['articleId']) || !($_GET['articleId'])) {
  17.         //homepage();
  18.         return;
  19.     }
  20.     else {
  21.         $articleId = (int)($_GET['articleId']);
  22.         $article = Article::getArticleById($articleId);
  23.         $pageTitle = $article->title . "Hieu CMS";
  24.         require(TEMPLATE_PATH . "/article.php");
  25.     }
  26. }
  27.  
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement