Exemple #1
0
                $hdlTpl->setVariable("intMonthId", $arrNewsResult[$j]["intMonthId"]);
                //Assigns left link
                $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);