Block("RelateTitle"); $strSql = "SELECT * FROM $strCfgDbTableNews WHERE (Title$strCurrentLangauge NOT LIKE '' AND Active = 'Y' AND ContentId != $ContentId) AND ($strTagSql)"; #echo "$strSqlChangeMe"; $objResult = mysql_query($strSql); #if (!$objResult) { echo "$strSqlChangeMe"; die("Invalid query: " . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $ContentIdRelate = $row[ContentId]; $TitleRelate = $row["Title$strCurrentLangauge"]; #$ContentDateShow = formatDateTimeString($ContentDate,$strCurrentLangauge); $tp->Apply(); } mysql_free_result($objResult); } if ($File2Name) { $File2NameShow = << Data; } //-- แสดงดาวน์โหลด $strSql = "SELECT * FROM $strCfgDbTableNewsFile WHERE Active = 'Y' AND ContentId = $ContentId AND File1Name <>'' AND Language ='$strCurrentLangauge' "; $objResult = mysql_query($strSql); //if (!$objResult && 0) { echo "$strSqlChangeMe"; die('Invalid query: ' . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $FileTitle = $row["Title"]; $FileName = $row["File1Name"]; } mysql_free_result($objResult); if($FileTitle && $FileName){ $DownloadPdfFile="
$FileTitle"; } //-- แสดงลิงค์ url ภายนอก $strSql = "SELECT * FROM $strCfgDbTableNewsFile WHERE Active = 'Y' AND ContentId = $ContentId AND Url <>'' AND Language ='$strCurrentLangauge' "; $objResult = mysql_query($strSql); #if (!$objResult) { echo "$strSqlChangeMe"; die("Invalid query: " . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $UrlTitle = $row["Title"]; $UrlName = $row["Url"]; $LinkExternalUrl .="
$UrlTitle"; } mysql_free_result($objResult); mysql_close($objDb); $tp->Display(); exit; /*------------------------------------------------------------------*/ ?>