include '.' . DIRECTORY_SEPARATOR . 'Include' . DIRECTORY_SEPARATOR . 'system.inc';
$aMeta[desc] = 'Information on treatments of different kinds of addictions';
$aMeta[keywords] = 'addiction, treatment, habit';
if(isset($strType) && strlen($strType) > 0)
{
$result = mysql_query("SELECT * FROM treatments WHERE strArticleType = '$strType' 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 = substr($strArticleHeader, 0, 39);
$strTitle = "$strTitle";
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[strArticleType]) > 0)
{
$result2 = mysql_query("SELECT * FROM related WHERE strArticleType LIKE '%$strType%' ORDER BY strArticleType, strArticleTitle");
$result3 = mysql_query("SELECT strTypeFull FROM types WHERE strType = '$strType' LIMIT 1");
if(mysql_num_rows($result2) > 0)
{
if($item = mysql_fetch_assoc($result3))
$strSideBarHeader = $item[strTypeFull];
$aSideBarContent = array();
}
while($item = mysql_fetch_assoc($result2))
array_push($aSideBarContent, "$item[strArticleTitle]");
if(isset($aSideBarContent))
array_reverse($aSideBarContent);
}
}
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'; ?>