/*==================================================================*\ ###################################################################### # # # Copyright 2005 Arca Solutions, Inc. All Rights Reserved. # # # # This file may not be redistributed in whole or part. # # eDirectory is licensed on a per-domain basis. # # # # ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- # # # # http://www.edirectory.com | http://www.edirectory.com/license.html # ###################################################################### \*==================================================================*/ # ---------------------------------------------------------------------------------------------------- # * FILE: /article/detail.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # LOAD CONFIG # ---------------------------------------------------------------------------------------------------- include("../conf/loadconfig.inc.php"); # ---------------------------------------------------------------------------------------------------- # VALIDATE FEATURE # ---------------------------------------------------------------------------------------------------- if (ARTICLE_FEATURE != "on") { exit; } # ---------------------------------------------------------------------------------------------------- # MOD-REWRITE # ---------------------------------------------------------------------------------------------------- include(ARTICLE_EDIRECTORY_ROOT."/mod_rewrite.php"); # ---------------------------------------------------------------------------------------------------- # VALIDATION # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/includes/code/validate_querystring.php"); # ---------------------------------------------------------------------------------------------------- # ARTICLE # ---------------------------------------------------------------------------------------------------- if (($_GET["id"]) || ($_POST["id"])) { $id = $_GET["id"] ? $_GET["id"] : $_POST["id"]; $article = new Article($id); $level = new ArticleLevel(); unset($articleMsg); if ((!$article->getNumber("id")) || ($article->getNumber("id") <= 0)) { $articleMsg = ucwords(ARTICLE_FEATURE_NAME)." not found!"; } elseif ($article->getString("status") != "A") { $articleMsg = ucwords(ARTICLE_FEATURE_NAME)." not available!"; } elseif ($article->getString("publication_date") > date("Y-m-d")) { $articleMsg = ucwords(ARTICLE_FEATURE_NAME)." not available!"; } elseif ($level->getDetail($article->getNumber("level")) != "y") { $articleMsg = ucwords(ARTICLE_FEATURE_NAME)." not available!"; } else { report_newRecord("article", $id, ARTICLE_REPORT_DETAIL_VIEW); } } else { header("Location: ".ARTICLE_DEFAULT_URL."/"); exit; } # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- if (($article->getNumber("id")) && ($article->getNumber("id") > 0)) { $artCategs = $article->getCategories(); if ($artCategs) { foreach ($artCategs as $artCateg) { $category_id[] = $artCateg->getNumber("id"); $category_name[] = $artCateg->getString("title"); } } } $_POST["category_id"] = $category_id; $extrastyle = array(DEFAULT_URL."/layout/article_detail.css", DEFAULT_URL."/layout/article_color.css"); $banner_section = "article"; $headertag_title = $article->getString("title"); $headertag_description = $article->getString("abstract"); $headertag_keywords = str_replace(" || ", ", ", $article->getString("keywords")); include(EDIRECTORY_ROOT."/layout/header.php"); ?>
include(ARTICLE_EDIRECTORY_ROOT."/search.php"); ?>