Hacked By AnonymousFox

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

<?
include("../config.php");
include("../connect.php");
include("../function.php");
$Language="Thai";
?>
<!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"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />

<title>:::กระทรวงศึกษาธิการ:::</title>
 

<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="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="210">
<? 
$SystemModuleKey="calendar";
include("../mod_calendar/config.php");
include("config.php");
include("function.php");
	$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="93%" height="187"  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 valign="top"><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>
<!-- 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="5" 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="120" 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"]?>" <?=$strOption?> <? if($i==6 || $mCount==7){ echo $bg; }?>  align="center"><span style="color:#FFFFFF "><?=$mCount?></span></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"]?>" <?=$strOption?> <? if($i==6 || $mCount==7){ echo $bg; }?> align="center"><span style="color:#FFFFFF "><?=$mCount?></span></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"><span style="color:#FFFFFF "><?=$mCount?></span></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"><span style="color:#FFFFFF "><?=$mCount?></span></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 -->						
                        <table width="198" align="center"  border="0" cellspacing="0" cellpadding="0" style="display:none " id="ShowClick">
                          <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="6" height="1" /></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><table width="100"  border="0" align="right" cellpadding="0" cellspacing="0">
                          <tr>
                            <td colspan="3"><img src="../../images/calendar/bg-detail_03.gif" /></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>
<?
$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 {calendar-selectedMonth01} value="01">&#3617;&#3585;&#3619;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth02} value="02">&#3585;&#3640;&#3617;&#3616;&#3634;&#3614;&#3633;&#3609;&#3608;&#3660;</option>
								  <option {calendar-selectedMonth03} value="03">&#3617;&#3637;&#3609;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth04} value="04">&#3648;&#3617;&#3625;&#3634;&#3618;&#3609;</option>
								  <option {calendar-selectedMonth05} value="05">&#3614;&#3620;&#3625;&#3616;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth06} value="06">&#3617;&#3636;&#3606;&#3640;&#3609;&#3634;&#3618;&#3609;</option>
								  <option {calendar-selectedMonth07} value="07">&#3585;&#3619;&#3585;&#3598;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth08} value="08">&#3626;&#3636;&#3591;&#3627;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth09} value="09">&#3585;&#3633;&#3609;&#3618;&#3634;&#3618;&#3609;</option>
								  <option {calendar-selectedMonth10} value="10">&#3605;&#3640;&#3621;&#3634;&#3588;&#3617;</option>
								  <option {calendar-selectedMonth11} value="11">&#3614;&#3620;&#3624;&#3592;&#3636;&#3585;&#3634;&#3618;&#3609;</option>
								  <option {calendar-selectedMonth12} 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>
							<br />							<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; ">
<?
$myModule_Table = $myModule_Table1;
	if($cid>0) {
		$sql="SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$cid;
		$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
		$RecordCount=MYSQL_NUMROWS($Query);
		if($RecordCount>0) {
			$Row=MYSQL_FETCH_ARRAY($Query);
			$filename = $System_RelativePath_Upload."/".$SystemModuleKey."/htmlfiles/".$Row[$myModule_Table."_HtmlFile"];
			if(file_exists($filename) && is_file($filename) && filesize ($filename)>0){
					$fd = fopen ($filename, "r");
					$contents = fread ($fd, filesize ($filename));
					fclose ($fd);
			}
		} 
	}
?>								
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
	<td width="30" height="22" align="center" valign="top"><img src="../../images/bullet/reddot.gif" width="6" height="6" vspace="8" /></td>
	<td align="left"> <b>
	  <?=$Row[$myModule_Table."_Subject"]?>  
		
</b> </td>
	</tr>
  <tr>
	<td colspan="2"><table width="100%"  border="0" align="right" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>
		  <td><img src="../../images/main/spacer.gif" width="1" height="1" /></td>
		</tr>
	</table></td>
  </tr>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
<tr>
  <td width="30" height="20" align="center" valign="top">&nbsp;</td>
  <td align="left"><strong>Date : </strong> <?=ShowDateLong($Row[$myModule_Table."_DateFrom"])?> เวลา <?=substr($Row[$myModule_Table."_TimeFrom"],0,5)?> น. 
<?
if($Row[$myModule_Table."_TimeTo"]=="00:00:00") { 
			}else{ 
					echo "ถึง ".substr($Row[$myModule_Table."_TimeTo"],0,5)." น.";
			}
			?>
			</td>
</tr>
<tr>
  <td colspan="2"><table width="100%"  border="0" align="right" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
	  <tr>
		<td><img src="../../images/main/spacer.gif" width="1" height="1" /></td>
	  </tr>
  </table></td>
</tr>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
<tr>
  <td width="30" height="20" align="center" valign="top">&nbsp;</td>
  <td align="left"><strong>Detail : </strong>
  <?
print $contents;
?>
</td>
</tr>
<? if($Row[$myModule_Table."_Location"] <> ""){ ?>
<tr>
  <td width="30" height="20" align="center" valign="top">&nbsp;</td>
  <td align="left"><strong>Location : </strong><?=$Row[$myModule_Table."_Location"]?></td>
</tr>
<? } ?>
<? if($Row[$myModule_Table."_Url"] <> ""){ ?>
<tr>
  <td width="30" height="20" align="center" valign="top">&nbsp;</td>
  <td align="left"><strong>Link : </strong><a href="<?=$Row[$myModule_Table."_Url"]?>"><?=$Row[$myModule_Table."_Url"]?></a></td>
</tr>
<? } ?>
<? 
$sqlFile = "SELECT * FROM ".$myModule_Table1_FileUpload." WHERE ".$myModule_Table1_FileUpload."_CalID = '".$Row[$myModule_Table."_ID"]."'";
$QueryFile=MYSQL_DB_QUERY($System_DataBase_Name,$sqlFile) or die(mysql_error());	
$Numrow = mysql_num_rows($QueryFile);
if($Numrow <> 0){ ?>
<tr>
  <td width="30" height="20" align="center" valign="top">&nbsp;</td>
  <td align="left"><strong>File : </strong>
  <?
		while ($RowFile=MYSQL_FETCH_ARRAY($QueryFile)){
						$LinkRelativePath = $myModule_Path_UploadFiles."/".$RowFile[$myModule_Table1_FileUpload."_FileUpload"];
						$DownloadFile = $RowFile[$myModule_Table1_FileUpload."_FileUpload"];
						$ImageType = strstr($DownloadFile,'.');							
						if($ImageType==".pdf"){
							$TypeImgFile="../../images/bullet/pdf.gif";
						}elseif($ImageType==".txt"){
							$TypeImgFile="../../images/bullet/file.gif";
						}elseif($ImageType==".xls"){
							$TypeImgFile="../../images/bullet/excel.gif";
						}elseif($ImageType==".ppt"){
							$TypeImgFile="../../images/bullet/pp.gif";
						}elseif($ImageType==".rtf"){
							$TypeImgFile="../../images/bullet/word.gif";
						}elseif($ImageType==".rar"){
							$TypeImgFile="../../images/bullet/rar.gif";
						}else{
							$TypeImgFile="../../images/bullet/application.gif";
						}
		?><a href="<?=$LinkRelativePath?>" target="_blank"><img src="<?=$TypeImgFile?>" border="0" alt="<?=$ImageType?>">&nbsp;<?=$RowFile[$myModule_Table1_FileUpload."_FileUploadName"];?>,</a>&nbsp;&nbsp;
		<? }?>
  </td>
</tr>
<? } ?>
<tr>
  <td colspan="2"><table width="100%"  border="0" align="right" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
	  <tr>
		<td><img src="../../images/main/spacer.gif" width="1" height="1" /></td>
	  </tr>
  </table></td>
</tr>
</table>
								</div>
                                </td>
							  </tr>
							</table>
                              <br />                            </td>
                            <td width="15" align="right" valign="top" style=" background-image:url(../../images/calendar/bg-detail_05_07.gif); background-repeat:repeat-y; background-position:right ">&nbsp;</td>
                          </tr>
                          <tr>
                            <td colspan="3"><img src="../../images/calendar/bg-detail_06_10.gif" /></td>
                          </tr>
                      </table>
                      </td>
                    </tr>
                  </table>
</span>
<script language="JavaScript" src="../XMLHttpObject.js"></script>
<script language="JavaScript" src="big-calenda.js"></script>			
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox