include '.' . DIRECTORY_SEPARATOR . 'Include' . DIRECTORY_SEPARATOR . 'system.inc';
$strArticle = $_GET[strArticle];
if(isset($strArticle) && strlen($strArticle) > 0)
{
$result = mysql_query("SELECT * FROM articles WHERE LOWER(REPLACE(strArticleUrl, ' ', '')) = LOWER(REPLACE('$strArticle', ' ', '')) LIMIT 1");
if($item = mysql_fetch_assoc($result))
{
if(strlen($item[strArticleTitle]) > 0)
$strArticleHeader = $item[strArticleTitle];
if(strlen($item[strPageTitle]) > 0)
$strTitle = $item[strPageTitle];
else
$strTitle = $strArticleHeader;
if(strlen($item[strArticleContent]) > 0)
$strArticleContent = str_replace("\r\n", '
', $item[strArticleContent]);
if(strlen($item[strArticleDescription]) > 0)
$aMeta[desc] = $item[strArticleDescription];
if(strlen($item[strArticleKeywords]) > 0)
$aMeta[keywords] = $item[strArticleKeywords];
if(strlen($item[lstRelatedArticleID]) > 0)
{
$related = explode(",", $item[lstRelatedArticleID]);
$condition = array();
foreach($related as $id)
{
array_push($condition, "iArticleID = '$id'");
}
$condition = implode(" OR ", $condition);
$result1 = mysql_query("SELECT * FROM articles WHERE $condition");
if(mysql_num_rows($result1) > 0)
{
$strSideBarHeader = "Related Information"; //$item[strArticleTitle];
$aSideBarContent = array();
while($item1 = mysql_fetch_assoc($result1))
array_push($aSideBarContent, "$item1[strArticleName]");
}
}
}
else header("Location: " . PATH_CLIENT_MAIN);
}
else header("Location: " . PATH_CLIENT_MAIN);
?>
include '.' . DIRECTORY_SEPARATOR . 'Include' . DIRECTORY_SEPARATOR . 'header.inc'; ?>
include '.' . DIRECTORY_SEPARATOR . 'Include' . DIRECTORY_SEPARATOR . 'footer.inc'; ?>