Hacked By AnonymousFox

Current Path : C:/AppServ/www/th/lib/calendar/
Upload File :
Current File : C:/AppServ/www/th/lib/calendar/index-detail.php

<?
include("../../webengine/lib/session.php"); 
include("../../webengine/lib/config.php");
include("../../webengine/lib/connect.php");
include("../../webengine/lib/function.php");
$Language="Thai";
$SystemModuleKey="calendar";
include("../../webengine/mod_calendar/config.php");
include("../calendar/config.php");
include("../calendar/function.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/inside01.dwt.php" codeOutsideHTMLIsLocked="false" --> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>:::กระทรวงศึกษาธิการ:::</title>
<!-- InstanceEndEditable --> 
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
<link href="../../css/font-1.css" rel="stylesheet" type="text/css">
<link href="../../css/font-2.css" rel="stylesheet" type="text/css">
<link href="../../css/font-3.css" rel="stylesheet" type="text/css"> 
<? 
if($font){$System_Session_Theme=$font;}
if($System_Session_Theme) { echo "<link href=\"../css/font-".$System_Session_Theme.".css\" rel=\"stylesheet\" type=\"text/css\">";  }else{ ?>
<link href="../../css/style.css" rel="stylesheet" type="text/css" /><? } ?>
<style type=text/css>
.div_slider {
	padding-right: 10px; 
	padding-left: 10px; 
	background: #bbb; 
	padding-bottom: 10px; 
	width: 200px; 
	color: #111; 
	padding-top: 10px;
}
.style1 {color: #deddd9}
</style>
<script language="javascript" type="text/javascript" src="../../webengine/lib/mootools.release.83.js"></script>
<script language="javascript" type="text/javascript" src="../../webengine/lib/mootools.mooprompt.js"></script>
<script language="javascript" type="text/javascript" src="../../webengine/lib/moo.extend.js"></script>
<script language="javascript" type="text/javascript" src="../../webengine/lib/js3-handlers.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
var doAlerts=true;
function changeSheets(whichSheet){
 
  if(document.styleSheets){
  
	var c = document.styleSheets.length;
	
	for(var i=1;i<c;i++){
	  if(i!=whichSheet){
		document.styleSheets[i].disabled=true;
	  }else{
		document.styleSheets[i].disabled=false;
	  }
	}
  }
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="MM_preloadImages('../../images/head_new/moe_over_06.gif','../../images/head_new/moe_over_07.gif','../../images/head_new/moe_over_08.gif','../../images/head_new/moe_over_09.gif','../../images/head_new/moe_over_10.gif','../../images/head_new/moe_over_11.gif')" >
<table width="1003" height="70"  border="0" align="center" cellpadding="0" cellspacing="0" background="../../images/main/main-t-bg.gif" bgcolor="#3A0300" style="background-repeat:repeat-x; background-position:top; ">
      <tr>
        <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><a href="../../en/home" onmouseover="MM_swapImage('Image151','','../../images/img_lang/lang_over_03.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/img_lang/lang_nor_03.gif" name="Image151" width="25" height="24" border="0" id="Image15" /></a><img src="../../images/img_lang/lang_over_04.gif" width="26" height="24" /><a href="../../th/link/index.php" onmouseover="MM_swapImage('Image161','','../../images/img_lang/lang_over_05.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/img_lang/lang_nor_05.gif" name="Image161" width="109" height="24" border="0" id="Image16" /></a><a href="../../th/sitemap/index.php" onmouseover="MM_swapImage('Image17','','../../images/img_lang/lang_over_06.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/img_lang/lang_nor_06.gif" name="Image17" width="66" height="24" border="0" id="Image17" /></a></td>
            <td width="275" rowspan="2" align="right" valign="top"><img src="../../images/main/logo.gif" width="273" height="70" alt="กระทรวงศึกษาธิการ" /></td>
          </tr>
          <tr>
            <td valign="bottom"><table width="0%"  border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td><a href="../../th/home/index.php"><img src="../../images/head_new/menu_03.gif" name="Image82" width="65" height="30" border="0" id="Image8" style="cursor:pointer; " onmouseover="MM_swapImage('Image82','','../../images/head_new/menu_sel_03.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>
                <td><? if($Page=="Profile") {?><a href="../../th/profile/index.php" ><img src="../../images/head_new/menu_sel_04.gif" name="Image71" width="101" height="30" border="0" id="Image7" /></a><? }else{ ?><a href="../../th/profile/index.php" onmouseover="MM_swapImage('Image71','','../../images/head_new/menu_sel_04.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_04.gif" name="Image71" width="101" height="30" border="0" id="Image7" /></a><? } ?></td>
                <td><? if($Page=="Ministor") {?><a href="../../th/minister/index.php" ><img src="../../images/head_new/menu_sel_05.gif" name="Image18" width="128" height="30" border="0" id="Image1" /></a><? }else{ ?><a href="../../th/minister/index.php" onmouseover="MM_swapImage('Image18','','../../images/head_new/menu_sel_05.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_05.gif" name="Image18" width="128" height="30" border="0" id="Image1" /></a><? } ?></td>
                <td><a href="http://www.moe.go.th/webld/" target="_blank" onmouseover="MM_swapImage('Image911','','../../images/head_new/menu_sel_06.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_06.gif" name="Image911" width="107" height="30" border="0" id="Image9" /></a></td>
                <td><? if($Page=="PR") {?><a href="../../th/newspr/index.php" ><img src="../../images/head_new/menu_sel_07.gif" name="Image101" width="117" height="30" border="0" id="Image101" /></a><? }else{ ?><a href="../../th/newspr/index.php" onmouseover="MM_swapImage('Image101','','../../images/head_new/menu_sel_07.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_07.gif" name="Image101" width="117" height="30" border="0" id="Image101" /></a><? } ?></td>
                <td><? if($Page=="Board") {?><a href="../../th/webboard" ><img src="../../images/head_new/menu_sel_08.gif" name="Image111" width="99" height="30" border="0" id="Image11" /></a><? } else{ ?><a href="../../th/webboard" onmouseover="MM_swapImage('Image111','','../../images/head_new/menu_sel_08.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_08.gif" name="Image111" width="99" height="30" border="0" id="Image11" /></a><? } ?></td>
                <td><? if($Page=="Contact") {?><a href="../../th/contact" ><img src="../../images/head_new/menu_sel_09.gif" name="Image121" width="101" height="30" border="0" id="Image12" /></a><? }else{ ?><a href="../../th/contact" onmouseover="MM_swapImage('Image121','','../../images/head_new/menu_sel_09.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/menu_09.gif" name="Image121" width="101" height="30" border="0" id="Image12" /></a> <? } ?></td>
              </tr>
            </table>
             </td>
          </tr>
        </table></td>
      </tr>
</table>
<table width="1003"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr valign="top">
                <td rowspan="2" bgcolor="#FFFFFF" background="../../images/main/bg-r-2.gif" style="background-repeat:repeat-y; "><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#9d9a95">
                <tr>
                  <td align="center" bgcolor="#9D9A95"><table width="689" height="24" border="0">
                    <tr>
                      <td width="571"><div align="left"><span class="style1">www.moe.go.th - Official website of the Ministry of Education of Thailand</span></div></td>
                    </tr>
                  </table>
                    <table width="700"  border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td colspan="3" align="center" bgcolor="#9D9A95"><table width="648"  border="0" align="right" cellpadding="0" cellspacing="0">
                            <tr>
                              <td valign="top"><? $SystemModuleKey = "topgraphic";

		 	include("../../webengine/mod_topgraphic/config.php");
			$sql = "SELECT * FROM ".$myModule_Table." WHERE (" . $myModule_Table."_Status='Home' OR ". $myModule_Table."_Status='Enable')".
					" AND " . $myModule_Table . "_ModuleKey='$SystemModuleKey'" . 
					" AND ((".$myModule_Table."_StartDate='0000-00-00 00:00:00' AND ".  $myModule_Table."_ExpireDate='0000-00-00 00:00:00') " .
					" OR (".$myModule_Table."_StartDate='0000-00-00 00:00:00' AND TO_DAYS(".$myModule_Table."_ExpireDate) >= TO_DAYS(NOW()))" .
					" OR (TO_DAYS(".$myModule_Table."_StartDate) <= TO_DAYS(NOW()) AND ".  $myModule_Table."_ExpireDate='0000-00-00 00:00:00' )" .
					" OR (TO_DAYS(".$myModule_Table."_StartDate) <= TO_DAYS(NOW()) AND TO_DAYS(".$myModule_Table."_ExpireDate)>=TO_DAYS(NOW()))) ORDER BY rand()";
				$Query_Banner=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดข้อผิดพลาด <br>$sql<br>\n");				
				$Row_Banner = MYSQL_FETCH_ARRAY($Query_Banner);
						if($Row_Banner[$myModule_Table."_PictureFileType"]=="swf") {
							?>
                                  <div style="z-index:0;">
                                    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
                                      <param name="movie" value="<?=$myModule_Path_ThumbnailPicture?>/<?=$Row_Banner[$myModule_Table."_PictureFile"]?>" />
                                      <param name="quality" value="high" />
                                      <param name="WMODE" value="transparent" />
                                      <embed src="<?=$myModule_Path_ThumbnailPicture?>/<?=$Row_Banner[$myModule_Table."_PictureFile"]?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
                                    </object>
                                  </div>
                                  <?
						}else if($Row_Banner[$myModule_Table."_PictureFileType"]=="gif" || $Row_Banner[$myModule_Table."_PictureFileType"]=="jpg"){ 
						?>
                                  <img src="<?=$myModule_Path_ThumbnailPicture?>/<?=$Row_Banner[$myModule_Table."_PictureFile"]?>" border="0" />
                                  <?
						}else if($Row_Banner[$myModule_Table."_PictureFileType"]=="HTML" ){ 
							echo "<table width=100%  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ><tr><td>";
							if($Row_Banner[$myModule_Table."_HTMLCode"]!="") {
								echo $Row_Banner[$myModule_Table."_HTMLCode"];
							} else {
								echo "&nbsp;";
							}
							echo "</td></tr></table>";
					}?></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td colspan="3" height="3"></td>
                      </tr>
                      <tr>
                        <td width="239"><div align="right"><a href="http://www.moe.go.th/websm/news-online.htm" target="_blank" onmouseover="MM_swapImage('Image88','','../../images/head_new/moe_over_06.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_06.gif" alt="" name="Image88" width="233" height="23" border="0" id="Image88" /></a><a href="javascript:;" onmouseover="MM_swapImage('Image88','','moe_over_06.gif',1)" onmouseout="MM_swapImgRestore()"></a></div></td>
                        <td width="234"><a href="http://www.moe.go.th/OPS_Page/" target="_blank" onmouseover="MM_swapImage('Image21','','../../images/head_new/moe_over_07.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_07.gif" alt="" name="Image21" width="234" height="23" border="0" id="Image21" /></a></td>
                        <td width="233"><a href="http://www.onec.go.th/" target="_blank" onmouseover="MM_swapImage('Image33','','../../images/head_new/moe_over_08.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_08.gif" alt="" name="Image33" width="233" height="23" border="0" id="Image33" /></a></td>
                      </tr>
                      <tr>
                        <td><div align="right"><a href="http://www.obec.go.th/" target="_blank" onmouseover="MM_swapImage('Image41','','../../images/head_new/moe_over_09.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_09.gif" alt="" name="Image41" width="233" height="22" border="0" id="Image41" /></a><a href="javascript:;" onmouseover="MM_swapImage('Image4','','moe_over_09.gif',1)" onmouseout="MM_swapImgRestore()"></a></div></td>
                        <td><a href="http://www.vec.go.th/" target="_blank" onmouseover="MM_swapImage('Image511','','../../images/head_new/moe_over_10.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_10.gif" alt="" name="Image511" width="234" height="22" border="0" id="Image511" /></a></td>
                        <td><a href="http://www.mua.go.th/" target="_blank" onmouseover="MM_swapImage('Image611','','../../images/head_new/moe_over_11.gif',1)" onmouseout="MM_swapImgRestore()"><img src="../../images/head_new/moe_11.gif" alt="" name="Image611" width="233" height="22" border="0" id="Image611" /></a></td>
                      </tr>
                    </table></td>
                </tr>
                <tr>
                  <td valign="middle"><br /><table width="100%"  border="0" cellpadding="3" cellspacing="0" bgcolor="#9D9A95">
				  <FORM name=loginForm 
                                action=http://emisc.moe.go.th/zimbra/h/login
                                method=post target="_blank">
								<INPUT type=hidden  
                                value=login name=loginOp>
                  <tr>
                    <td width="75" align="right" bgcolor="#7e0c00"><img src="../../images/head_new/moe-mail.gif" width="90" height="18" vspace="2" /></td>
                    <td width="20" bgcolor="#7e0c00"><input name="username" type="text" class="form" style=" background:#EACFD3; color:#CC9999; BORDER-BOTTOM: #CC9999 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-RIGHT: #CC9999 1px solid; BORDER-TOP: #CCCCCC 1px solid;" onfocus="this.value='';"  value=" Username :" size="22" />
                    </td>
                    <td width="20" bgcolor="#7e0c00"><input name="password" type="password" class="form" style="background:#EACFD3;  color:#CC9999; BORDER-BOTTOM: #CC9999 1px solid; BORDER-LEFT: #CCCCCC 1px solid; BORDER-RIGHT: #CC9999 1px solid; BORDER-TOP: #CCCCCC 1px solid; " onfocus="this.value='';"  value=" Password :" size="22" maxlength="12" /></td>
                    <td align="left" bgcolor="#7e0c00">&nbsp;<input type="image" src="../../images/head_new/h-btn-go.gif"></td>
                  </tr></form>
              </table>                    </td>
                </tr>
              </table><table width="100%"  border="0" cellspacing="0" cellpadding="0" >
                        <tr>
                          <td width="10" background="../../images/main/bg-r-2.gif" bgcolor="#FFFFFF" style="background-repeat:repeat-y; ">&nbsp;</td>
                          <td width="50%" background="../../images/main/main-ctn-bg1.gif" bgcolor="#FFFFFF"  style="background-repeat:repeat-x; ">&nbsp;</td>
                          <td width="49%" background="../../images/main/main-ctn-bg1.gif" bgcolor="#FFFFFF"  style="background-repeat:repeat-x; ">&nbsp;</td>
                        </tr>
                        <tr >
                          <td width="10" background="../../images/main/bg-r-2.gif" style="background-repeat:repeat-y; ">&nbsp;</td>
                          <td colspan="2" ><!-- InstanceBeginEditable name="content" -->
					  <br />
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td colspan="2"><img src="../../images/calendar/cal_03.gif" /></td>
                        </tr>
                        <tr>
                          <td width="97%" style="background-image:url(../../images/calendar/cal_05.gif); background-repeat:repeat-x ">&nbsp;</td>
                          <td width="3%">&nbsp;</td>
                        </tr>
                        <tr>
                          <td colspan="2">&nbsp;</td>
                        </tr>
                      </table>
<script src="../../webengine/lib/picker.js"></script>
<span id="CalendarDetail">
				  <table width="94%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr valign="top">
                      <td width="250" align="right">
<? 
	$myModule_Table=$myModule_Table1;
	if($myCalendarDate=="") { $myCalendarDate=getDateNow(); }
	$myCalendarDateArray = explode("-",$myCalendarDate);

	// Find Start Week Day ##############################################
	$today=getdate(mktime(0,0,0,$myCalendarDateArray[1],1,$myCalendarDateArray[0]));

	$NextMonthArray=getdate(mktime(0,0,0,$myCalendarDateArray[1]+1,1,$myCalendarDateArray[0]));
	$Day=$NextMonthArray[mday]; $Month=$NextMonthArray[mon]; $Year=$NextMonthArray[year];
	$NextMonth=sprintf("%04d-%02d-%02d",$Year,$Month,$Day);

	$PrevMonthArray=getdate(mktime(0,0,0,$myCalendarDateArray[1]-1,1,$myCalendarDateArray[0]));
	$Day=$PrevMonthArray[mday]; $Month=$PrevMonthArray[mon]; $Year=$PrevMonthArray[year];
	$PrevMonth=sprintf("%04d-%02d-%02d",$Year,$Month,$Day);

	$startWeekDay=$today[wday];
	$myCalendarDateYear=$today[year];
	$myCalendarDateMonth=$today[mon];
	$endDayOfMonth=getEndDayOfMonth($myCalendarDate);

	$myStartDateOfMonth = sprintf("%04d-%02d-%02d",$myCalendarDateArray[0],$myCalendarDateArray[1],1);
	$myEndDateOfMonth = sprintf("%04d-%02d-%02d",$myCalendarDateArray[0],$myCalendarDateArray[1],$endDayOfMonth);

	$myCalendarData[0]="";
	$myCalendarEventCounter[0]=0;

	// Load activity data #################################################
	$sql  = "SELECT * FROM ".$myModule_Table." WHERE ";
	$sql .= $myModule_Table."_Language='$Language' AND ";
	$sql .= $myModule_Table."_ModuleKey='$SystemModuleKey' AND ";
	$sql .= $myModule_Table."_Status!='Disable' AND ";
	$sql .= " ( ";
	$sql .= " ( ".$myModule_Table."_DateFrom>='$myStartDateOfMonth' AND ".$myModule_Table."_DateFrom<='$myEndDateOfMonth' ) OR ";
	$sql .= " ( ".$myModule_Table."_DateTo>='$myStartDateOfMonth' AND ".$myModule_Table."_DateTo<='$myEndDateOfMonth' ) OR ";
	$sql .= " ( ".$myModule_Table."_DateFrom<='$myStartDateOfMonth' AND ".$myModule_Table."_DateTo>='$myEndDateOfMonth' ) ";
	$sql .= " ) ORDER BY ".$myModule_Table."_TimeFrom ASC ";
	$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: ??????????????? <br>$sql<br>\n");
	$RecordCount=MYSQL_NUMROWS($Query);
	$index=1;
	if($RecordCount>0) {
		while($index<$RecordCount+1) {
			$Row=MYSQL_FETCH_ARRAY($Query);
			if(strcmp($Row[$myModule_Table."_DateFrom"],$myStartDateOfMonth)<1) { 
				$myCalendarDateStart=$myStartDateOfMonth;
			} else {
				$myCalendarDateStart=$Row[$myModule_Table."_DateFrom"];
			}
			$myStart=substr($myCalendarDateStart,8,2)*1;
			if($Row[$myModule_Table."_DateTo"]!="0000-00-00") {
				if(strcmp($myEndDateOfMonth,$Row[$myModule_Table."_DateTo"])<1) { 
					$myCalendarDateEnd=$myEndDateOfMonth;
				} else {
					$myCalendarDateEnd=$Row[$myModule_Table."_DateTo"];
				}
			} else {
				$myCalendarDateEnd="0000-00-00";
			}

			if($myCalendarDateEnd=="0000-00-00") {
					$myCalendarEventCounter[$myStart]++;

			} else {
				$myEnd=substr($myCalendarDateEnd,8,2)*1;
				for($i=$myStart;$i<=$myEnd;$i++) {
					$myCalendarEventCounter[$i]++;

				}
			}
			$index++;
		}
	} 

	//----------- Add Special Day -----------------------
	$mySpecialDayCounter[0]=0;
	$myCalendarDateArr = explode("-",$myCalendarDate);
	//print_r( $arrySpecialDayOfMonth[$myCalendarDateArr[1]]);
	$maxSpecialDayOfMonth = count($arrySpecialDayOfMonth[$myCalendarDateArr[1]]);
	for($i=0;$i<$maxSpecialDayOfMonth;$i++) {
		
			$arry = explode(";;",$arrySpecialDayOfMonth[$myCalendarDateArr[1]][$i]);
			$mCount = $arry[0];
			$specialDayName = $arry[1];
			
			$myCalendarEventCounter[$mCount]++;
			$mySpecialDayCounter[$mCount]++;

	}
	
	// Load calendar display #############################################
	$Checktoday=date('Y-m-d');
	$mCount=1;
	?>  
	<? 
	$myCalendarDateArr = explode("-",$myCalendarDate);
   if($myCalendarDateArr[1]<1){
  $thisMonth=substr($myCalendarDateArr[1],1,1);
  }else{
  $thisMonth=$myCalendarDateArr[1];
  }
  if($thisMonth==12){
  $NextMonth="01";
  $NextYear=$myCalendarDateArr[0]+1;
  $BackMonth=11;
  $BackYear=$myCalendarDateArr[0];
  }else if($thisMonth==1){
  $NextMonth=format($thisMonth+1,2);
  $NextYear=$myCalendarDateArr[0];
  $BackMonth=12;
  $BackYear=$myCalendarDateArr[0]-1;
  }else{
  $NextMonth=format($thisMonth+1,2);
  $NextYear=$myCalendarDateArr[0];
  $BackMonth=format($thisMonth-1,2);
  $BackYear=$myCalendarDateArr[0];
  }
  ?>
<!-- START BLOCK : CALENDAR1 -->						
<table width="208"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
	  <td align="center" background="../../images/calendar/bg_03.gif" style="background-repeat:repeat-x; ">
		<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="5" height="5" align="left" valign="top">&nbsp;</td>
                      <td><img src="../../images/main/spacer.gif" width="5" height="5" /></td>
                      <td width="5" align="right" valign="top">&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="5" height="5"><img src="../../images/main/spacer.gif" width="5" height="5" /></td>
                      <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
		
			<form action="" method="get" name="myCalendarGoForm" id="myCalendarGoForm">
			<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
			<input name="myCalendarDate" type="hidden" id="myCalendarDate" value="<?=$myCalendarDate?>">
			</form>
			<form action="../calendar/detail.php" method="get" name="myCalendarForm" id="myCalendarForm">
			<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
			<input name="action" type="hidden" id="action">
			<input name="myCalendarDate" type="hidden" id="myCalendarDate" value="<?=$myCalendarDate?>">
			<input name="myCalendarDate_Day" type="hidden" id="myCalendarDate_Day" value="<?=$myCalendarDate_Day?>">
			<input name="myCalendarDate_Month" type="hidden" id="myCalendarDate_Month" value="<?=$myCalendarDateArr[1]?>">
			<input name="myCalendarDate_Year" type="hidden" id="myCalendarDate_Year" value="<?=$myCalendarDateArr[0]?>">
			<input name="cid" type="hidden" id="cid" value="0">
			<td height="1" >
<!-- START BLOCK : CALENDAR_DATA_HEADER -->						
			  <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999" style="display:none ">
				<tr>
				  <td width="30" height="1" align="left" valign="top"><img src="../../images/images/arrow-c_01.gif" width="3" height="3"></td>
				  <td rowspan="3" align="center" id="NameMonth"><b style="color:#FFFFFF "><?=ShowMonthYear(sprintf("%04d-%02d-%02d",$myCalendarDateArr[0],$myCalendarDateArr[1],$myCalendarDateArr[2]))?></b></td>
				  <td width="30" align="right" valign="top"><img src="../../images/images/arrow-c_03.gif" width="3" height="3"></td>
				</tr>
				<tr>
				  <td height="5" align="center"><span style="cursor:pointer;color:#FFFFFF " onClick="document.myCalendarForm.myCalendarDate.value = '<?=$BackYear."-".$BackMonth."-".$myCalendarDateArr[2]?>';GetCalendar();" >&lt;&lt;</span></td>
				  <td width="30" align="center"><span style="cursor:pointer;color:#FFFFFF " onClick="document.myCalendarForm.myCalendarDate.value = '<?=$NextYear."-".$NextMonth."-".$myCalendarDateArr[2]?>';GetCalendar();" >&gt;&gt;</span></td>
				</tr>
				  <td height="5" align="left" valign="bottom"><img src="../../images/images/arrow-c_06.gif" width="3" height="3"></td>
				  <td width="30" align="right" valign="bottom"><img src="../../images/images/arrow-c_07.gif" width="3" height="3"></td>
				</tr>
			  </table>
<!-- END BLOCK : CALENDAR_DATA_HEADER -->
			<script language='JavaScript'> document.myCalendarForm.myCalendarDate_Month.value='<?=$myCalendarDateArr[1]?>'; </script>
			<script language='JavaScript'> document.myCalendarForm.myCalendarDate_Year.value='<?=$myCalendarDateArr[0]?>'; </script>			</td>
			</form>
		  </tr>
		  <tr>
			<td height="100" valign="top" style="background-repeat:no-repeat; background-position:bottom">
			  <table  width="<?=$mod_calendar_config["calendar-width"]?>" height="<?=$mod_calendar_config["calendar-height"]?>"  align="center" border="1" cellpadding="1" cellspacing="0" bordercolor="#F6E5CB" background="../../images/bullet/bg-day-calendar.gif" >

										<tr bgcolor="#FFFFFF">
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="18" align="center" bgcolor="#EB0136"><font color="<?=_ColorFont_NormalDay_?>"><strong>&nbsp;อา</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>&nbsp;จ</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>&nbsp;อ</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>พ</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>พฤ</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>ศ</strong></font></td>
										  <td width="<?=$mod_calendar_config["cell-width"]?>" height="-1" align="center" bgcolor="#00274F"><font color="<?=_ColorFont_NormalDay_?>"><strong>ส</strong></font></td>
			    </tr>
									<!-- START BLOCK : CALENDAR_DATA -->
<? 
#################################
$numrow=0;
if($startWeekDay>0) {  ?>										  
	<? for($i=0;$i<$startWeekDay;$i++) { ?>
				<td  width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>" <? if($i==0){?>background="../../images/normal-left-t.gif"<? }else{ ?>bgcolor="<?=_ColorNormalDay_?>" <? }?> ><span>&nbsp;</span></td>
	<? } ?>
<?
if($myCalendarEventCounter[$mCount-1]==0 || $myCalendarEventCounter[$mCount-1]=="") {
										//----------  Set  Right-Top  Border - Normal Day
										$bg = "background=../../images/normal-right-t.gif"; 
								}else{
										//----------  Set  Right-Top  Border - Event Day
										$bg = "background=../../images/event-right-t.gif"; 
								}
?>									
<? for($i;$i<7;$i++) { ?>
				
					<? if($myCalendarEventCounter[$mCount]==0 || $myCalendarEventCounter[$mCount]=="") { ?>
								<? 
									if($Checktoday==$myCalendarDateArr[0]."-".$myCalendarDateArr[1]."-".formatNum($mCount)) { 
										$strOption = "bgcolor=\""._ColorToday_."\" title=\"".$mod_calendar_text["Today"]."\" ";
									} else { 
										$strOption = "bgcolor=\""._ColorNormalDay_."\" ";
									} 
								?>
								<td width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>"  align="center" <?=$strOption?> <? if($i==6 || $mCount==7){ echo $bg; }?>><font color="<?=_ColorFont_NormalDay_?>"><?=$mCount?></font></td>
				<? } else { ?>
								<?
									/*
									$strOption = "onClick=\"document.myCalendarForm.myCalendarDate.value=' ".sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)."'
									document.getElementById('idInformationDataHeader').innerHTML = '<font color=#B3AB80><b>".ShowDateLongTh(sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)) ."</b></font>';
									ShowInformationWindow('divInformationWindow','".addslashes($myCalendarData[$mCount])."',10-200,10);
									\" onMouseOver=\"myMouseOver(this)\" onMouseOut=\"myMouseOut(this)\" ";
									*/

									$strOption = "onClick=\"document.myCalendarForm.myCalendarDate.value='".sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)."'
									document.myCalendarForm.myCalendarDate_Day.value='".$mCount."';
									vars='?myCalendarDate=".sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)."';
									vars+='&action=ShowOneDay';
									vars+='&clickshow=ShowDay';
									submitXMLHttp('../calendar/big-calendardetail.php'+vars,getXMLHttpData3);
									\" onMouseOver=\"myMouseOver(this)\" onMouseOut=\"myMouseOut(this)\" 
									";

									if($Checktoday==$myCalendarDateArr[0]."-".$myCalendarDateArr[1]."-".formatNum($mCount)) { 
											$strOption .= "bgcolor=\""._ColorToday_."\" title=\"".$mod_calendar_text["Today"]."\" ";
									} else if($mySpecialDayCounter[$mCount]==0 || $mySpecialDayCounter[$mCount]=="") { 
											$strOption .= "bgcolor=\""._ColorEventDay_."\" ";
									} else {
											$strOption .= "bgcolor=\""._ColorSpecialDay_."\" ";
									}
								?>
								<td width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>" align="center" <?=$strOption?> <? if($i==6 || $mCount==7){ echo $bg; }?>><font color="<?=_ColorFont_NormalDay_?>"><?=$mCount?></font></td>
				<? } ?>
				<?
				$mCount++;
		} // for

} // end startWeekDay
?>										  
										  </tr>
<?
$colcount=0;
for($mCount;$mCount<=$endDayOfMonth;$mCount++) {
	if($colcount==0) {
		?>
                              <tr> 
                                <?
				if($mCount==1){ 
						if($myCalendarEventCounter[$mCount]==0 || $myCalendarEventCounter[$mCount]=="") {
								//----------  Set  Left-Top  Border - Normal Day
								$bg = "background=../../images/normal-left-t.gif"; 
						}else{
								//----------  Set  Left-Top  Border - Event Day
								$bg = "background=../../images/event-left-t.gif"; 
						}
			    }
	}
	$colcount++;
	?>
                                <?
	if($myCalendarEventCounter[$mCount]==0 || $myCalendarEventCounter[$mCount]=="") { ?>
	<? 
					if($Checktoday==$myCalendarDateArr[0]."-".$myCalendarDateArr[1]."-".formatNum($mCount)) { 
						$strOption = "bgcolor=\""._ColorToday_."\" title=\"".$mod_calendar_text["Today"]."\" ";
					} else { 
						$strOption = "bgcolor=\""._ColorNormalDay_."\" ";
					} 
				?>
                                <td width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>" <?=$strOption?> <? if($mCount==1){ echo $bg; }?> align="center"><font color="<?=_ColorFont_NormalDay_?>"><?=$mCount?></font></td>
                                <? } else { ?>
					<?
					$strOption = "onClick=\"document.myCalendarForm.myCalendarDate.value='".sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)."'
									document.myCalendarForm.myCalendarDate_Day.value='".$mCount."';
									vars='?myCalendarDate=".sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$mCount)."';
									vars+='&action=ShowOneDay';
									vars+='&clickshow=ShowDay';
									submitXMLHttp('../calendar/big-calendardetail.php'+vars,getXMLHttpData3);
									\" onMouseOver=\"myMouseOver(this)\" onMouseOut=\"myMouseOut(this)\" 
									";

					if($Checktoday==$myCalendarDateArr[0]."-".$myCalendarDateArr[1]."-".formatNum($mCount)) { 
							$strOption .= "bgcolor=\""._ColorToday_."\" title=\"".$mod_calendar_text["Today"]."\" ";
					} else if($mySpecialDayCounter[$mCount]==0 || $mySpecialDayCounter[$mCount]=="") { 
							$strOption .= "bgcolor=\""._ColorEventDay_."\" ";
					} else {
							$strOption .= "bgcolor=\""._ColorSpecialDay_."\" ";
					}
					?>
                                <td width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>" <?=$strOption?> <? if($mCount==1){ echo $bg; }?>  align="center"><font color="<?=_ColorFont_NormalDay_?>"><?=$mCount?></font></td>
                                <? } ?>
	<?
	if($colcount==7) {
	?>
                              </tr>
                              <?
		$colcount=0;
	}
}
if($colcount>0) {
	for($colcount;$colcount<7;$colcount++) {
		?>
		<td width="<?=$mod_calendar_config["cell-width"]?>" height="<?=$mod_calendar_config["cell-height"]?>" <? if($colcount == 6){ ?>background="../../images/normal-right-b.gif"<? }else{ ?>bgcolor=<?=_ColorNextMonthDay_?><? } ?>>&nbsp;</td>
		<?
	}
	?>
	</tr>
	<?
}
?>										  
									<!-- END BLOCK : CALENDAR_DATA -->	  
		    </table>		</td>
		  </tr>
</table></td>
                        </tr>
                      </table></td>
                      <td width="5"><img src="../../images/main/spacer.gif" width="5" height="5" /></td>
                    </tr>
                    <tr>
                      <td width="5" height="5" align="left" valign="bottom">&nbsp;</td>
                      <td><img src="../../images/main/spacer.gif" width="5" height="5" /></td>
                      <td width="5" height="5" align="right" valign="bottom">&nbsp;</td>
                    </tr>
</table>		</td>
	</tr>
</table>	
<!-- END BLOCK : CALENDAR1 -->						
					  <br /><br />
                        <table width="198"  border="0" align="center" cellpadding="0" cellspacing="0" id="ShowClick" style="display:none ">
                          <tr>
                            <td width="6"><img src="../../images/block/block_03.gif" width="6" height="6" /></td>
                            <td background="../../images/block/block_04.gif"><img src="../../images/block/block_04.gif" width="1" height="6" /></td>
                            <td width="6"><img src="../../images/block/block_05.gif" width="6" height="6" /></td>
                          </tr>
                          <tr>
                            <td background="../../images/block/block_07.gif"><img src="../../images/block/block_07.gif" width="6" height="1" /></td>
                            <td>
							<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DEDEDE">
							  <tr>
								<td valign="top" align="center"><div id="divInformation_Click" style=" overflow:auto; ">&nbsp;</div></td>
							  </tr>
							</table>
							</td>
                            <td background="../../images/block/block_09.gif"><img src="../../images/block/block_09.gif" width="8" height="8" /></td>
                          </tr>
                          <tr>
                            <td><img src="../../images/block/block_10.gif" width="6" height="6" /></td>
                            <td background="../../images/block/block_11.gif"><img src="../../images/block/block_11.gif" width="1" height="6" /></td>
                            <td><img src="../../images/block/block_12.gif" width="6" height="6" /></td>
                          </tr>
                        </table>
						<img src="../../images/calendar/bg_07.gif" width="126" height="351" />
						</td>
                      <td width="420"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td colspan="3"><img src="../../images/calendar/bg-detail_03.gif" width="430" height="18" /></td>
                          </tr>
                          <tr>
                            <td width="21" valign="top" style="background-image:url(../../images/calendar/bg-detail_05_05.gif); background-repeat:repeat-y "><img src="../../images/calendar/bg-detail_05_05.gif" width="15" height="6" /></td>
                            <td width="394">
<?
$strActionMonth = "if(this.value>0) {
							document.myCalendarForm.myCalendarDate.value = '".$myCalendarDateArr[0]."-'+this.value+'-'+document.myCalendarForm.myCalendarDate_Day.value;
							document.myCalendarFormSearch.myCalendarDate.value = document.myCalendarForm.myCalendarDate.value;
							GetCalendar(); 
						}else{
							document.myCalendarForm.myCalendarDate.value ='';
							document.myCalendarFormSearch.myCalendarDate.value = document.myCalendarForm.myCalendarDate.value;
						}
							";
$strActionYear = "
					document.myCalendarForm.myCalendarDate.value = this.value+'-'+'".$thisMonth."'+'-'+document.myCalendarForm.myCalendarDate_Day.value;
					document.myCalendarFormSearch.myCalendarDate.value = document.myCalendarForm.myCalendarDate.value;
					GetCalendar();							";
?>							
							<table height="24"  border="0" cellpadding="0" cellspacing="3">
							<form action="../calendar/search.php" method="get" name="myCalendarFormSearch" id="myCalendarFormSearch">
													<input name="action" type="hidden" id="action" />
													<input name="myCalendarDate" type="hidden" id="myCalendarDate" value="<?=$myCalendarDate?>" />
													<input name="cid" type="hidden" id="cid" value="0" />
                              <tr>
                                <td><img src="../../images/bullet/application.gif" width="16" height="16" />                                  </td>
                                <td><font color="#BB2211"><b> ปฏิทินกิจกรรมประจำเดือน</b></font></td>
                                <td>
								<select name="inputMonth" id="inputMonth" onChange="<?=$strActionMonth?>">
								  <option <? if("calendar-selectedMonth01" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="01">&#3617;&#3585;&#3619;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth02" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="02">&#3585;&#3640;&#3617;&#3616;&#3634;&#3614;&#3633;&#3609;&#3608;&#3660;</option>
								  <option <? if("calendar-selectedMonth03" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="03">&#3617;&#3637;&#3609;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth04" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="04">&#3648;&#3617;&#3625;&#3634;&#3618;&#3609;</option>
								  <option <? if("calendar-selectedMonth05" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="05">&#3614;&#3620;&#3625;&#3616;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth06" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="06">&#3617;&#3636;&#3606;&#3640;&#3609;&#3634;&#3618;&#3609;</option>
								  <option <? if("calendar-selectedMonth07" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="07">&#3585;&#3619;&#3585;&#3598;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth08" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="08">&#3626;&#3636;&#3591;&#3627;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth09" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="09">&#3585;&#3633;&#3609;&#3618;&#3634;&#3618;&#3609;</option>
								  <option <? if("calendar-selectedMonth10" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="10">&#3605;&#3640;&#3621;&#3634;&#3588;&#3617;</option>
								  <option <? if("calendar-selectedMonth11" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="11">&#3614;&#3620;&#3624;&#3592;&#3636;&#3585;&#3634;&#3618;&#3609;</option>
								  <option <? if("calendar-selectedMonth12" == "calendar-selectedMonth".$thisMonth){ ?> selected<? } ?> value="12">&#3608;&#3633;&#3609;&#3623;&#3634;&#3588;&#3617;</option>
							    </select>
								</td>
                                <td>
								<select name="inputYear" id="inputYear" onChange="<?=$strActionYear?>">
<?
//---------  Set Year Number ------------
$i=2006;
			while($i < 2020) {
?>								
										<option  value="<?=$i?>" <? if($myCalendarDateArr[0] == $i){ ?>selected <? } ?>><?=$i+543?></option>
<?
				$i++;
			}
?>			
							</select>
								</td>
                              </tr>
							  </form>
                            </table>
							<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#DEDEDE">
							  <tr>
								<td valign="top" align="center"><div id="divInformationWindow_Area" style=" overflow:auto; ">....กำลังโหลด รอสักครู่</div></td>
							  </tr>
							</table>
                              <br />                            </td>
                            <td width="15" align="center" valign="top" style=" background-image:url(../../images/calendar/bg-detail_05_07.gif); background-repeat:repeat-y "><img src="../../images/calendar/bg-detail_05_07.gif" width="15" height="6" /></td>
                          </tr>
                          <tr>
                            <td colspan="3"><img src="../../images/calendar/bg-detail_06_10.gif" width="429" height="18" /></td>
                          </tr>
                      </table>
                      </td>
                    </tr>
                  </table>
</span>
<script language="JavaScript" src="../../webengine/lib/XMLHttpObject.js"></script>
<script language="JavaScript" src="big-calenda.js"></script>				
<script language="JavaScript" type="text/javascript">
document.myCalendarForm.myCalendarDate_Day.value='<?=$myCalendarDateArray[2]?>';
vars='?myCalendarDate=<?=sprintf("%04d-%02d-%02d",$myCalendarDateYear,$myCalendarDateMonth,$myCalendarDateArray[2])?>';
//vars+='&action=ShowOneDay';
submitXMLHttp('big-calendardetail.php'+vars,getXMLHttpData2);
</script>  
					  <!-- InstanceEndEditable -->&nbsp; <p>&nbsp;</p>                          </td>
                        </tr>
                        <tr>
                          <td colspan="3" valign="top" bgcolor="#FFFFFF">
                            <div id="showMainReleaseLoading" style="display:none;">
                              <table width="100%" height="150" border="0" cellpadding="1" cellspacing="0">
                                <tr>
                                  <td align="center" valign="middle"><img src="../../images/ajax/ajax-load2.gif" width="16" height="16" /> </td>
                                </tr>
                              </table>
                          </div></td>
                        </tr>
                      </table>
                </td>
              <td width="282" valign="top" background="../../images/main/back1.gif" style="background-repeat:repeat-y; ">
			  <table width="282"  border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="282" height="76" bgcolor="#9C9994" ><table width="250" height="21"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="10" align="left" valign="middle"><a href="../../th/rssreader/index.php"><img src="../../images/bar/rss.gif" alt="RSS" width="12" height="12"  border="0" /></a></td>
                      <td align="right" valign="middle"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="right" valign="bottom">
                            <td valign="middle"><font color="#FFFFFF">ปรับขนาดตัวอักษร</font></td>
                            <td width="18"><a href="?font=1"><img src="../../images/main/style1.gif" alt="ตัวอักษรขนาดเล็ก" width="14" height="14" border="0" onmouseover="changeSheets(1)" /></a></td>
                            <td width="18"><a href="?font=2"><img src="../../images/main/style2.gif" alt="ตัวอักษรขนาดกลาง" width="14" height="14" border="0"  onmouseover="changeSheets(2)"/></a></td>
                            <td width="18"><a href="?font=3"><img src="../../images/main/style3.gif" alt="ตัวอักษรขนาดใหญ่" width="14" height="14" border="0" onmouseover="changeSheets(3)" /></a></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                    <table width="100%" height="57"  border="0" align="center" cellpadding="0" cellspacing="0" background="../../images/main/bg-search.gif">
                      <tr>
                        <td width="12">&nbsp;</td>
                        <td valign="top"><br />
                          <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                            <form action="../../th/search/index.php" method="post" name="SearchForm" id="SearchForm"  onsubmit="
			if(document.SearchForm.TextSearch.value==''){
				alert('กรอกคำที่ต้องการค้นหาด้วยค่ะ'); 
				document.SearchForm.TextSearch.focus(); 
				return false; 
			}
			">
                              <tr>
                                <td width="60" align="center"><img src="../../images/btn/btn__15.gif" width="24" height="24" /></td>
                                <td><input name="TextSearch" type="text" class="form" style="border:1px; padding:1px;border-style: solid ; border-color: #CCCCCC;" size="20" value="<?=$TextSearch?>" /></td>
                                <td width="60" align="center"><input name="image" type="image" src="../../images/btn/btn-search.gif" width="37" height="21" /></td>
                              </tr>
                            </form>
                        </table></td>
                        <td width="16">&nbsp;</td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td width="282" valign="top" bgcolor="#9C9994">				  <table width="100%" height="57"  border="0" align="center" cellpadding="0" cellspacing="0" background="../../images/main/bg_menu.gif">
                      <tr>
                        <td width="12">&nbsp;</td>
                        <td valign="top" ><table width="248" border="0" cellpadding="0" cellspacing="0">
					<?
					include("../../webengine/mod_dmenu/config.php");
					//------------------------------ Menu -------------------------------------------//
					$sql = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID = '0' ";
					$sql .=" AND ".$System_TableName_Menu."_Language = '$System_Session_Language'";
					$sql .=" AND ".$System_TableName_Menu."_ShowMain  = 'Yes'";
					$sql .=" AND ".$System_TableName_Menu."_Status = 'Enable' ORDER By ".$System_TableName_Menu."_Order ASC";
					$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: ระบบเมนูผิดพลาด <br>$sql<br>\n");
					$recordCount=MYSQL_NUM_ROWS($Query);
					
					for($a=0; $a<$recordCount; $a++){
					$Row = MYSQL_FETCH_ARRAY($Query);
					$ParentID = $Row[$System_TableName_Menu."_ID"];
					if($Row[$System_TableName_Menu."_isModule"]==0){
						$Link=$Row[$System_TableName_Menu."_LinkPath"];
					}else if($Row[$System_TableName_Menu."_isModule"]==1){
						$Link=str_replace("mod_","",$Row[$System_TableName_Menu."_LinkPath"]);
					}
					if($Row[$System_TableName_Menu."_Target"]=='_blank'){
						$target=$Row[$System_TableName_Menu."_Target"];
					}else if($Row[$System_TableName_Menu."_Target"]==""){
						$target="";
					}
?>
				   <tr height="20">
                      <td height="20" bgcolor="#F3F3F3">
					  <table width="100%" height="25"  border="0" cellpadding="3" cellspacing="0">
                  <? if($a!=0){ ?>      
                  <tr>
						<td height="1" bgcolor="#CCCCCC" ></td>
						<td  bgcolor="#CCCCCC" ></td>
						</tr>
						<? } ?>
                    
						<?
if($Row[$System_TableName_Menu."_ModuleType"]=="Group"){
	$Class = "toggler_atStart";
	$ClassClick="class='acc' style='cursor:pointer;' ";
	$Menu="<a href='javascript:void(0)' class='mainmenu' id='slider2_toggle'>".$Row[$System_TableName_Menu."_Name".$System_Session_Language]."</a>";
} else if($Row[$System_TableName_Menu."_ModuleType"]=="Link" || $Row[$System_TableName_Menu."_ModuleType"]=="Module"){
	$Class = "toggler_atStartc";
	$ClassClick="";
	$Menu = 	"<a href='".$Link."' target='".$target."' class='mainmenu'>".$Row[$System_TableName_Menu."_Name".$System_Session_Language]."</a>";
} else {
	$Class = "toggler_atStartc";
	$ClassClick="";
	$Menu = 	"<a href='".$Link."' target='".$target."' class='mainmenu'>".$Row[$System_TableName_Menu."_Name".$System_Session_Language]."</a>";
}
?> 
    <tr <?=$ClassClick?>>
	<td width="85%" height="20" >&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../images/bullet/blt.gif" width="4" height="4" />&nbsp;&nbsp; &nbsp;<?=$Menu?></td>
                          <td width="15%" align="right" ><? if($Row[$System_TableName_Menu."_ModuleType"]=="Group"){?><img src="../../images/main/arrow1.gif" border="0"><? } ?></td>
                        </tr>
                      </table> 
					  <? if($Class == "toggler_atStart") { ?>
					  <div class="ac">
					  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr height="8" >
                            <td height="8" background="../../images/main/rare1.gif" bgcolor="#EACFD3" style="background-position:top; background-repeat:repeat-x; "><img src="../../images/main/spacer.gif" width="24" height="8" /></td>
</tr>
</table>
<?
						$sqlSubManu = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID = '$ParentID'";
						$sqlSubManu .= " AND ".$System_TableName_Menu."_Language = '$System_Session_Language'";
						$sqlSubManu .=" AND ".$System_TableName_Menu."_ShowMain  = 'Yes'";
						$QuerySubManu=MYSQL_DB_QUERY($System_DataBase_Name,$sqlSubManu) OR DIE("Error:Sub Menu <br>$sqlSubManu<br>\n");
						$recordCountSubMenu=MYSQL_NUM_ROWS($QuerySubManu);
						$DelLine=$recordCountSubMenu-1;
						for($b=0; $b<$recordCountSubMenu; $b++){
						$RowSubMenu = MYSQL_FETCH_ARRAY($QuerySubManu);
						
									if($RowSubMenu[$System_TableName_Menu."_Target"]=='_blank'){
									$target=$RowSubMenu[$System_TableName_Menu."_Target"];
								}else if($RowSubMenu[$System_TableName_Menu."_Target"]==""){
									$target="";
								}
								if($RowSubMenu[$System_TableName_Menu."_isModule"]==0){
									$LinkSubMenu=$RowSubMenu[$System_TableName_Menu."_LinkPath"];
								}else if($RowSubMenu[$System_TableName_Menu."_isModule"]==1){
									$LinkSubMenu=str_replace("mod_","",$RowSubMenu[$System_TableName_Menu."_LinkPath"])."?SystemModuleKey=".$RowSubMenu[$System_TableName_Menu."_ModuleKey"];
								}
	if($recordCountSubMenu!=""){
	?><table width="100%" height="10"  border="0" cellpadding="0" cellspacing="0">
                          <tr height="25" >
                            <td height="10" bgcolor="#EACFD3" style="background-position:top; background-repeat:repeat-x; "><img src="../../images/main/spacer.gif" width="24" height="8" />  &nbsp;<a href="<?=$LinkSubMenu?>" class="mainmenu" target="<?=$target?>"><? if(strlen($RowSubMenu[$System_TableName_Menu."_NameThai"])>30) { ?> <?=substr($RowSubMenu[$System_TableName_Menu."_NameThai"],0,30)?>..<? } else{ ?> 
                             <?=$RowSubMenu[$System_TableName_Menu."_NameThai"]?> <? } ?></a></td>
                          </tr>
						 <? if($DelLine!=$b){ ?> <tr><td bgcolor="#EACFD3" ><img src="../../images/main/line3.gif" width="245"></td></tr> <? } ?>
						 </table>
	<? }
} ?>
	</div>
<? } ?>					</td>
</tr>
<? } ?></table>
                        </td>
                        <td width="16">&nbsp;</td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="102" valign="top" background="../../images/main/r_menu_2.gif" bgcolor="#9D9A95"  style="background-repeat:no-repeat; "><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td></td>
                      <td width="236"></td>
                      <td></td>
                    </tr>
                    <tr>
                      <td width="12"></td>
                      <td><?
					  $SystemModuleKey="member";
					  include "../../webengine/mod_member/config.php";
					   if($MemberMoeSession_User_ID==""){?>
                          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><img src="../../images/main/spacer.gif" width="1" height="6" /></td>
                            </tr>
                          </table>
                          <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1">
                            <form name="myLoginForm" id="myLoginForm" method="post" action="../../th/member/login.php" onsubmit="verifySubmitLogin();return false;" >
                              <input name="action" id="action" type="hidden" value="login" />
                              <input name="URL" id="URL" type="hidden" value="<?=$URL?>" />
                              <tr>
                                <td width="80" align="right"><img src="../../images/main/blog.gif" width="60" height="72" /></td>
                                <td valign="top"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1">
                                    <tr>
                                      <td width="70" valign="top"><input name="inputUsernameLogin" id="inputUsernameLogin" type="text" class="form" value="อีเมลล์" style="border:1px; padding:1px;border-style: solid ; border-color: #CCCCCC;" size="14" onfocus="this.value='';"/></td>
                                      <td width="81" rowspan="2" align="left" valign="top">
                                        <script language="JavaScript" type="text/javascript">
			function isBlank(myObj) { if(myObj.value=='') { return true; } return false; }
			function verifySubmitLogin() {
				with(document.myLoginForm) {
					if(isBlank(inputUsernameLogin)) {alert("กรุณากรอกE-Mail");  inputUsernameLogin.focus(); return false; }
					if(isBlank(inputPasswordLogin)) {alert("กรุณากรอก Password");  inputPasswordLogin.focus(); return false; }
				}
				 document.myLoginForm.submit();
			}
                                  </script>
                                        <input type="image" src="../../images/btn/btn-ok.gif" name="Image201" width="37" height="37" id="Image201" onmouseover="MM_swapImage('Image201','','../../images/btn/btn-ok2-over.gif',1)" onmouseout="MM_swapImgRestore()" /></td>
                                    </tr>
                                    <tr>
                                      <td valign="top">
                                        <input name="inputPasswordLogin" id="inputPasswordLogin" type="password" class="form" style="border:1px; padding:1px;border-style: solid ; border-color: #CCCCCC;" size="14" onfocus="this.value='';" /></td>
                                    </tr>
                                  </table>
                                    <table  border="0" cellspacing="1" cellpadding="0">
                                      <tr>
                                        <td><font color="#ff7b00">• </font><a href="../../th/member/index.php">สมัครสมาชิก</a></td>
                                        <td><font color="#ff7b00">• </font><a href="../../th/member/forgotpassword.php">ลืมรหัสผ่าน</a></td>
                                      </tr>
                                  </table></td>
                              </tr>
                            </form>
                          </table>
                          <? }else{ ?>
                          <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
						   <?
			$sql = "SELECT * FROM ".$myModule_Member." WHERE ".$myModule_Member."_ID=".$MemberMoeSession_User_ID;
			$Query = mysql_query($sql);
			$RowMem = mysql_fetch_array($Query);
?>
                            <tr>
                              <td width="76" align="center"><? if ($RowMem[$myModule_Member."_ThumbnailPhoto"]<>"" && file_exists($myModule_Path_ThumbnailPicture."/".$RowMem[$myModule_Member."_ThumbnailPhoto"])) { ?><a href="../../th/social/index.php?memberid=<?=$MemberMoeSession_User_ID?>" ><img src="<?=$myModule_FullPath_ThumbnailPicture."/".$RowMem[$myModule_Member."_ThumbnailPhoto"]?>" width="70" border="0" /> <? } else { ?>
                                <font color="#FF0000">ไม่ได้ใส่รูป</font>
                                <? } ?></a></br><strong><a href="../../th/social/index.php?memberid=<?=$MemberMoeSession_User_ID?>" ><?=$RowMem[$myModule_Member."_FName"]."  ".$RowMem[$myModule_Member."_LName"]; ?></a></strong></td>
                              <td width="140" valign="top">
                      CreateDate : <br>
                      <strong><? echo ShowDate($RowMem[$myModule_Member."_CreateDate"]);
				?></strong>
                      <br>
      Last Login : <br>
      <strong><? echo ShowDate($RowMem[$myModule_Member."_LastLogin"]);
				?></strong><br>
      <input name="btAdd2" type="button" class="input_bt_80px"  id="btAdd2" value=" Log Out " onClick="window.location.href='../member/logout.php'"></td>
                            </tr>
                          </table>
                        <? } ?></td>
                      <td width="10">&nbsp;</td>
                    </tr>
                  </table></td>
              
            <tr valign="top">
              <td ><br />
                <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td></td>
                        <td width="236"></td>
                        <td></td>
                      </tr>
                      <tr>
                        <td width="12"></td>
                        <td align="center"><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><img src="../../images/main/menu_new_01.gif" width="237" height="34" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.mis12.moe.go.th/north_flood/" target="_blank"><img src="../../images/main/menu_new_02.gif" width="237" height="54" border="0" /></a></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.mis20.moe.go.th/SchoolSearch47/" target="_blank"><img src="../../images/main/menu_new_03.gif" width="237" height="48" border="0" /></a></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.mis12.moe.go.th/tsunami/" target="_blank"><img src="../../images/main/menu_new_04.gif" width="237" height="44" border="0" /></a></td>
                          </tr>
                          <tr background="file:///C|/AppServ/www/images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.mis12.moe.go.th/eis_report/" target="_blank"><img src="../../images/main/menu_new_06.gif" width="237" height="47" border="0" /></a></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.moe.go.th/data_stat/" target="_blank"><img src="../../images/main/menu_new_07.gif" width="237" height="54" border="0" /></a></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                          <tr>
                            <td><a href="http://www.moe.go.th/inter_school/" target="_blank"><img src="../../images/main/menu_new_08.gif" width="237" height="52" border="0" /></a></td>
                          </tr>
                          <tr background="../../images/main/line-h.gif">
                            <td><img src="../../images/main/line-h.gif" width="1" height="1" /></td>
                          </tr>
                        </table>                          <br /><br /><br />
                        <table cellspacing="0" cellpadding="0" width="100%" border="0">
                          <tr>
                            <td align="middle"><br /><br /><br />    
      ลำดับที่ผู้เข้าชม <br />
      <img src="../../webengine/mod_ctr02/loadcounter.php?SystemModuleKey=counter&key=counter" hspace="2" vspace="2" /> <br />
   <a href="http://usa.nedstatbasic.net/cgi-bin/viewstat?name=moenet">
      <img height="22" alt="" src="http://usa.nedstatbasic.net/cgi-bin/nedstat.gif" width="22" border="0" nosave></a>
      <span lang=en-us>&nbsp;&nbsp;</span>
      <script language="JavaScript" type="text/javascript">var page="Web MOE";</script>
      <script language="JavaScript1.1" src="http://hits.truehits.in.th/data/c0002407.js" type="text/javascript"></script></td>
                          </tr>
                          <tr>
                            <td align="middle">&nbsp;
                                <iframe frameborder="0" height="62" hspace="0" marginheight="0" marginwidth="0" scrolling="No" vspace="0" width="122" src="http://webrank.truehits.net/webrank/c0002407.php"> </iframe>
                            </td>
                          </tr>
                        </table>                        <br /></td>
                      <td width="10">&nbsp;</td>
                      </tr>
                </table>
               </td>
            </tr>
          </table></td>
            </tr>
</table>
<table width="1003" height="149"  border="0" align="center" cellpadding="0" cellspacing="0" >
        <tr>
          <td width="10" background="../../images/main/bg_new.jpg" style="background-repeat:repeat-x; ">&nbsp;</td>
          <td width="592" valign="bottom" background="../../images/main/bg_new2.jpg" style="background-repeat:repeat-x; "><table width="92%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><font color="#F8EA98">โดย <a href="http://www.moe.go.th/webemisc/" class="copy_link"><font color="#F8EA98">ศูนย์เทคโนโลยีสารสนเทศและการสื่อสาร</font> </a> สำนักงานปลัดกระทรวง <br />
      ติดต่อผู้ดูแลระบบ : <a href="mailto:website@emisc.moe.go.th" class="copy_link"><font color="#F8EA98">website@emisc.moe.go.th </font></a><br />
      สายด่วนการศึกษา 1579 <br />
      กระทรวงศึกษาธิการ 319 วังจันทรเกษม ถนนราชดำเนินนอก เขตดุสิต กทม. 10300 </font></td>
            </tr>
          </table></td>
          <td width="400" align="left" valign="bottom" >
		  <img src="../../images/main/bg_new3.jpg" width="400" height="149"></td>
        </tr>
        <tr>
          <td width="11" bgcolor="#A31D1E" style="background-repeat:repeat-x; ">&nbsp;</td>
          <td valign="bottom" bgcolor="#A31D1E" style="background-repeat:repeat-x; ">&nbsp;</td>
          <td width="400" align="right" valign="bottom" bgcolor="#A31D1E">&nbsp;</td>
        </tr>
</table>
<script type="text/javascript">
<!--
var mystretch2 = document.getElementsByClassName('acc');
var mystretcher2 = document.getElementsByClassName('ac');
var myAccordion2 = new fx.Accordion(mystretch2, mystretcher2, {duration: 2000, transition:Fx.Transitions.expoOut, opacity: true, start: true });
//-->
</script>
</body>
<!-- InstanceEnd --></html>
<? include("../../webengine/lib/disconnect.php");  ?> 

Hacked By AnonymousFox1.0, Coded By AnonymousFox