Viewing file: showDocNews2.php (1.56 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include_once "../class/clsdocNews.php"; $odN = new docNews($oC); $odN2 = new docNews($oC);
$countall=$odN2->SearchCountNews(); if($countall>=1){ ?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td><fieldset><legend><b><font color="<?php echo $GLOBALS["COLOR_FONT_2"];?>" size="4">ข่าวประชาสัมพันธ์</font></b></legend> <table width="90%" align=center> <? $countnews=0; $odN->SearchByNewsDate(getNowDateTh()); while($odN->GetRecord()){ ?> <tr><td><? echo a2th($odN->newsSubject); ?></td></tr> <tr><td align=right><table width=95%><tr><td><? echo a2th($odN->newsDetail); ?></td></tr></table></td></tr> <tr><td align="right"><b>ประกาศโดย :: </b><? echo a2th($odN->postName); ?></td></tr> <tr><td align="right"><? list($DocD,$DocT) = split(' ',$odN->postDate); echo abbreDate2($DocD,'/')." ".a2th($DocT);?></td></tr> <? $countnews++; } ?> <? if($countnews==0){?> <tr><td align="center"> </td></tr> <? } ?> </table> <? if($countall>4){ ?> <br><table align=center width="100%"> <tr><td align=right><font color="<?php echo $GLOBALS["COLOR_FONT_7"];?>"><a onClick = "showDocNewsAll()" style="cursor:pointer;">|อ่านข่าวประชาสัมพันธ์ย้อนหลัง|</a></font></td></tr> </table> <? }?> </label></fieldset></td></tr></table> <? } ?> <script> function showDocNewsAll(){ FileName = "showAllDocNews.php"; var w=900; var h=600; strOption = "scrollbars=yes,left=275,top=100,menubar=1,status=1, width=" + w + ",height=" + h; window.open(FileName,"",strOption); } </script>
|