$hdlTpl->setVariable("intYear", $arrNewsResult[$j]["intYear"]); //Assigns left link $hdlTpl->setVariable("mon", $arrNewsResult[$j]["mon"]); //Assigns left link $hdlTpl->setVariable("totcnt", $arrNewsResult[$j]["totcnt"]); //Assigns left link $hdlTpl->parse("MON_LINK"); } } $hdlTpl->parse("YEAR_LINK"); } } if ($_GET["mon"] && $_GET["year"]) { $arrRecordSet = $hldGlobal->fnFetchNewsMonYear($_GET["mon"], $_GET["year"]); } else { $arrRecordSet = $hldGlobal->fnFetchNews(0, $_GET["char"]); } $arrNewsSet = $hldGlobal->fnGetData($arrRecordSet, $_GET["char"], REC_PER_PAGE); if (is_array($arrNewsSet) && count($arrNewsSet) > 0) { for ($i = 0; $i < count($arrNewsSet) - 1; $i++) { $arrKeys = array_keys($arrNewsSet); $strNews = stripslashes(substr(strip_tags($arrNewsSet[$arrKeys[$i]]["content"]), 0, 200)) . "..."; $strnewstitle = stripslashes($arrNewsSet[$i]["newstitle"]); $strurl = ereg_replace(" ", "_", $strnewstitle); $hdlTpl->setVariable("date", $arrNewsSet[$arrKeys[$i]]["datecreated"]); //Assigns date $hdlTpl->setVariable("title", $strnewstitle); //Assigns news title $hdlTpl->setVariable("news_url", $strurl); //Assigns news title $hdlTpl->setVariable("site_url", SITE_NAME);
//Fetches header template $strMetatag = $hldGlobal->fnMetaTag(); //Fetches Metatag template $strFooter = $hldGlobal->fnGetFooter(); //Fetches footer template $strLmenu = $hldGlobal->fnMenu("", $arrMpage); //Fetches left menu $hdlTpl->setVariable("metatag", $strMetatag); //Assigns Metatag $hdlTpl->setVariable("header", $strHeader); //Assigns header $hdlTpl->setVariable("footer", $strFooter); //Assigns footer $hdlTpl->setVariable("menu", $strLmenu); //Assigns left menu $arrNews = $hldGlobal->fnFetchNews(REC_PER_PAGE); if (is_array($arrNews) && count($arrNews) > 0) { foreach ($arrNews as $key => $value) { $hdlTpl->setVariable("date", $value["dcreated"]); //Assigns date $hdlTpl->setVariable("title", substr($value["newstitle"], 0, 20) . "..."); //Assigns title $hdlTpl->setVariable("news_desc", substr(strip_tags($value["content"]), 0, 100) . "..."); //Assigns description $hdlTpl->setVariable("id", $value["id"]); //Assigns id //$strurl = ereg_replace(" ","_",$value["newstitle"]); $strurl = preg_replace('/[^a-z0-9]/i', '_', $value["newstitle"]); $hdlTpl->setVariable("site_name", SITE_NAME); $hdlTpl->setVariable("news_url", $strurl); //Assigns url