0) {
$mstPrefix = 'news';
foreach ($aryMstnlList as $aryItem) { //
$showID = $aryItem[$mstPrefix . '_id'];
$showPID = $aryItem[$mstPrefix . '_nc_id'];
$showIntro = $aryItem[$mstPrefix . '_intro'];
// $showIsDate = $aryItem[$mstPrefix . '_show_date'];
$showDate = $aryItem[$mstPrefix . '_dt'];
$showDay = date("d", strtotime($aryItem[$mstPrefix . '_dt']));
$showMonth = date("m", strtotime($aryItem[$mstPrefix . '_dt']));
switch ($showMonth) {
case 1:
$showMonth = "Jan";
break;
case 2:
$showMonth = "Feb";
break;
case 3:
$showMonth = "Mar";
break;
case 4:
$showMonth = "Apr";
break;
case 5:
$showMonth = "May";
break;
case 6:
$showMonth = "Jun";
break;
case 7:
$showMonth = "Jul";
break;
case 8:
$showMonth = "Aug";
break;
case 9:
$showMonth = "Sep";
break;
case 10:
$showMonth = "Oct";
break;
case 11:
$showMonth = "Nov";
break;
case 12:
$showMonth = "Dec";
break;
default:
}
$showYear = date("Y", strtotime($aryItem[$mstPrefix . '_dt']));
$showName = htmlspecialchars($aryItem[$mstPrefix . '_name']);
$showIntro = nl2br(htmlspecialchars($aryItem[$mstPrefix . '_intro']));
$showDtlUrl = 'news_details.php?wid=' . $wid . '&cid=' . $showPID . '&id=' . $showID;
if (isset($year) && is_numeric($year) && $year > 1900 && $year < 3000) {
$showDtlUrl .= '&year=' . $year;
}
if (isset($scid) && is_numeric($scid) && $scid > 0) {
$showDtlUrl .= '&scid=' . $scid;
}
if (isset($yr) && is_numeric($yr) && $yr > 0) {
$showDtlUrl .= '&yr=' . $yr;
}
if (isset($page) && is_numeric($page) && $page > 0) {
$showDtlUrl .= '&page=' . $page;
}
$showCover = '';
$coverPath = '';
$aryImg = explode('|', $aryItem[$mstPrefix . '_cover']);
if (sizeof($aryImg) > 1) {
if ($aryImg[1] != '') {
if (file_exists('../' . $aryImg[1])) {
$showCover = '../' . $aryImg[1];
$coverPath = img_path($showCover, 'cover');
if (file_exists($coverPath)) {
$showCover = $coverPath;
}
}
}
}
$showPdf = '';
$aryPdf = explode('|', $aryItem[$mstPrefix . '_pdf']);
if (sizeof($aryPdf) > 1) {
if ($aryPdf[1] != '') {
if (file_exists('../' . $aryPdf[1])) {
$showPdf = '../' . $aryPdf[1];
}
}
}
$showCateName = '';
$sql = "SELECT * FROM news_cate WHERE nc_id = {$aryItem['news_nc_id']} LIMIT 1";
if ($clsMySQL->execQuery($sql)) {
while ($ary = $clsMySQL->fetchArray()) {
$showCateName = $ary['nc_name'];
}
}
if ($showCover != '') {
?>