Hacked By AnonymousFox
<?
include("../../lib/session.php");
include("../../lib/config.php");
include("../../lib/connect.php");
include("../../lib/function.php");
include("../../lib/register_global.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/main_pm.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Curriculum Map</title>
<script type="text/javascript">
<!--
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>
<link href="../../css/menu.css" rel="stylesheet" type="text/css" />
<link href="../../css/font.css" rel="stylesheet" type="text/css" />
<link href="../../css/piya_style.css" rel="stylesheet" type="text/css" />
<link href="../../css/table.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {
color: #30707C;
font-weight: bold;
font-size: 14px;
}
-->
</style>
</head>
<body onload="MM_preloadImages('../../images/menu/menu_03.png','../../images/menu/menu_01_over.png','../../images/menu/menu_05_over.png')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100" align="center" background="../../images/head/sky.jpg"><img src="../../images/head/Sirirajlogo.gif" width="126" height="120" /></td>
</tr>
<tr>
<td height="22" background="../../images/head/bar.jpg"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="30%" border="0" align="right" cellpadding="0" cellspacing="0" class="login">
<tr>
<td align="right"><img src="../../images/icon/people_1.png" width="13" height="14" />Hi !
<?=$System_Session_UserName?>|<img src="../../images/icon/door.png" width="16" height="15" /><a href="../logout.php">Logout</a></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="747" valign="top"><table width="747" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="24" rowspan="2" valign="top" background="../../images/l/left_menu_02.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../images/l/left_menu_01_l.jpg" width="24" height="27" /></td>
</tr>
<tr>
<td><img src="../../images/l/left_menu_02.jpg" width="24" height="1" /></td>
</tr>
</table></td>
<td width="24" colspan="2" rowspan="2" valign="top" background="../../images/l/left_menu_02_bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../images/l/left_menu_01_r.jpg" width="197" height="27" /></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td align="left"><span class="style2">ระบบข้อมูลรายวิชา</span></td>
</tr>
<tr>
<td align="left" class="menu_one">
<ul class="menu_one">
<li><a href="../../home/home.php">ข้อมูลรายวิชา</a></li>
</ul> </td>
</tr>
<tr>
<td align="left"><span class="style2">ระบบผู้ใช้งาน</span></td>
</tr>
<tr>
<td align="left"><ul class="menu_one">
<? if($System_Session_Level=="Administrator") { ?>
<li><a href="../user_management.php">ข้อมูลผู้ใช้งานในระบบ</a></li>
<? } ?>
<? if($System_Session_Level=="Staff") { ?>
<li><a href="../user_managementperson.php">ข้อมูลผู้ใช้งานในระบบ</a></li>
<? } ?>
<? if($System_Session_Level=="Admin") { ?>
<li><a href="../user_managementperson.php">ข้อมูลผู้ใช้งานในระบบ</a></li>
<? } ?>
</ul></td>
</tr>
<? if($System_Session_Level=="Administrator") { ?>
<tr>
<td align="left"><span class="style2">ระบบข้อมูลที่เกี่ยวข้อง</span></td>
</tr>
<tr>
<td align="left"><ul class="menu_one">
<li><a href="../mod_other/standard.php">เพิ่มข้อมูลมาตรฐานการเรียนรู้</a></li>
<li><a href="../mod_other/council.php">เพิ่มข้อมูลแพทยสภา</a></li>
<li><a href="../mod_other/report.php">ระบบรายงานผล</a></li>
</ul></td>
</tr> <? } ?>
<tr>
<td align="left"> </td>
</tr>
<tr>
<td align="left"> </td>
</tr>
<tr>
<td align="left"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','file:///C|/AppServ/www/images/menu/menu_05_over.png',1)"></a></td>
</tr>
</table></td>
</tr>
</table></td>
<td background="../../images/content_border/content_border_02.jpg"><img src="../../images/content_border/content_border_01.jpg" width="747" height="11" /></td>
<td background="../../images/content_border/content_border_right.jpg"></td>
</tr>
<tr>
<td valign="top" background="../../images/content_border/content_border_02.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" height="300"> </td>
<td align="left" valign="top"><!-- InstanceBeginEditable name="content" -->
<div id="box">
<h3>เพิ่มข้อมูลการสอน</h3>
<br>
<script language="JavaScript" src="../lib/popup.js" type="text/JavaScript"></script>
<?
## Load Module Configuration Variable ############################################
include("config.php");
## Default Value ############################################
$SystemModule_defaultPageSize = 10;
$SystemModule_defaultPageShow = 1;
$SystemModule_MaxPage = 20;
$SystemModule_ReduceRange = 10; // +,- from current page show
$SystemModule_ASCDESC = "DESC";
$SystemModule_OrderBy = $myModule_Table."_ID";
#########################################################
?>
<? if($action=="add") {
$CheckBoxID1=$_GET["CheckBoxID1"];
$myCheckBoxID1=0;
for($i=1;$i<=$TotalCheckBoxID1;$i++) {
$myVar="CheckBoxID1".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID1=$$myVar;
}
}
?>
<!-- import the calendar script -->
<link rel="stylesheet" type="text/css" href="../../css/myCalendarStyle.css">
<script type="text/javascript" src="../mod_calendar/lib/calendar.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/lang/calendar-en.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/loadcalendar.js"></script>
<!-- end the calendar script -->
<table style="border-collapse: collapse" border="1" width="95%" align="center" cellpadding="0" cellspacing="1" class="table_border" bordercolor="#E8E7E1">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<form action="?" method="post" name="myForm" id="myForm" enctype="multipart/form-data" onSubmit=" if(!verifySubmit()) { return false; } ">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="addnew">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
<input name="myCheckBoxID1" type="hidden" id="PageSearch" value="<?=$myCheckBoxID1?>">
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="mytable_inner">
<tr align="center">
<td height="24" colspan="2" align="center" bgcolor="#F7F6F0" class="table_title1" style="font-weight: bold"><div align="center"><b>เพิ่มข้อมูล</b></div></td>
</tr>
<tr>
<td width="155" height="22" align="right" bgcolor="#F7F6F0" class="style3">รายวิชา</td>
<td width="509" height="22" class="style3"><select name="Subject" id="select">
<option value="กลุ่มวิชาภาษา">กลุ่มวิชาภาษา</option>
<option value="กลุ่มวิชาสังคมศาสตร์ มนุษยศาสตร์">กลุ่มวิชาสังคมศาสตร์ มนุษยศาสตร์</option>
</select>
</td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">ภาควิชา</td>
<td height="22" class="style3"><select name="Faculty" id="select2">
<option value="คณะแพทยศาสตร์ศิริราชพยาบาล ">คณะแพทยศาสตร์ศิริราชพยาบาล </option>
</select></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">นักศึกษาชั้นปีที่เรียน</td>
<td height="22" class="style3"><select name="Studentyear" id="select3">
<option value="ปี 1">ปี 1</option>
<option value="ปี 2">ปี 2</option>
<option value="ปี 3">ปี 3</option>
<option value="ปี 4">ปี 4</option>
<option value="ปี 5">ปี 5</option>
<option value="ปี 6">ปี 6</option>
</select></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">เรื่องที่เรียน</td>
<td height="22" class="style3"><input type="text" name="Course" id="textfield" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3"><div align="right">วันที่ </div></td>
<td height="22" class="style3"><table border="0" cellspacing="0" cellpadding="1">
<tr>
<td nowrap="nowrap">จากวันที่ </td>
<td><input name="inputMod_Calendar_DateFrom" type="text" class="input_center" id="inputMod_Calendar_DateFrom" value="<?=$myDate?>" size="10" maxlength="10" /></td>
<td><input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateFrom', 'y-mm-dd');" value=" ... " /> </td>
<td width="25" align="right"><input name="inputIsDateTo" type="checkbox" id="inputIsDateTo" value="Yes" onclick="if(document.getElementById('idDateTo1').style.display=='') { document.getElementById('idDateTo1').style.display='none'; document.getElementById('idDateTo2').style.display='none'; } else { document.getElementById('idDateTo1').style.display=''; document.getElementById('idDateTo2').style.display=''; } " /></td>
<td nowrap="nowrap">ถึงวันที่ </td>
<td id="idDateTo1" style="display:none"><input name="inputMod_Calendar_DateTo" type="text" class="input_center" id="inputMod_Calendar_DateTo" value="<?=$myDate?>" size="10" maxlength="10" /></td>
<td id="idDateTo2" style="display:none"><input type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateTo', 'y-mm-dd');" value=" ... " /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3"><div align="right">เวลา </div></td>
<td height="22" class="style3"><table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="30">จาก</td>
<td><select name="inputTimeFromHH" class="select" id="inputTimeFromHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td><b>:</b></td>
<td><select name="inputTimeFromMM" class="select" id="inputTimeFromMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td width="37" align="right"><input name="inputIsTimeTo" type="checkbox" id="inputIsTimeTo" value="Yes" onclick="if(document.getElementById('idTimeTo1').style.display=='') { document.getElementById('idTimeTo1').style.display='none'; document.getElementById('idTimeTo2').style.display='none'; document.getElementById('idTimeTo3').style.display='none'; } else { document.getElementById('idTimeTo1').style.display=''; document.getElementById('idTimeTo2').style.display=''; document.getElementById('idTimeTo3').style.display=''; } " /></td>
<td nowrap="nowrap">ถึง </td>
<td id="idTimeTo1" style="display:none"><select name="inputTimeToHH" class="select" id="inputTimeToHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td id="idTimeTo2" style="display:none"><b>:</b></td>
<td id="idTimeTo3" style="display:none"><select name="inputTimeToMM" class="select" id="inputTimeToMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">รูปแบบ</td>
<td height="22" class="style3"><select name="Type" id="select4">
<option value="Lecture" selected="selected">Lecture</option>
<option value="Small/Group">Small/Group</option>
<option value="OPD">OPD</option>
</select></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">มศว</td>
<td height="22" class="style3"><input type="text" name="Fill1" id="textfield2" /></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">แพทยสภา</td>
<td height="22" class="style3">
<?
$sqlGroup = "SELECT cm_council_Name FROM cm_council";
$QueryGroup =MYSQL_DB_QUERY($System_DataBase_Name,$sqlGroup) OR DIE("Error: เกิดความผิดพลาด <br>$sqlGroup<br>\n");
$recordGroup=MYSQL_NUMROWS($QueryGroup);
?>
<select name="Fill2" id="Fill2">
<?
$index=1;
while ($index<=$recordGroup){ $RowGroup=MYSQL_FETCH_ARRAY($QueryGroup);?>
<option value="<?=$RowGroup[cm_council_Name]?>">
<?=$RowGroup[cm_council_Name]?>
</option>
<? $index++;}?>
</select>
</td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#F7F6F0" class="style3">วัตถุประสงค์การสอน</td>
<td height="22" class="style3"><textarea name="Objective" id="Objective" cols="45" rows="5"></textarea>
<script language="JavaScript" type="text/JavaScript">
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function funcMultipleAddNew(myListObj,myText) {
if(myText!='') myListObj.options[myListObj.options.length] = new Option(myText,myText,0,false);
}
</script>
<span class="mytable_col2">
<script language="JavaScript" type="text/JavaScript">
restoreContentData();
function restoreContentData() {
//alert($inputFile[0]);
<?
for ($index=0;$index<count($inputFile)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFile);$index++) {
$array_visible = "";
if (count($inputFile)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFile".$array_visible.".value = '".$inputFile[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function AddList(fromList,toList) {
var array_insert_value = new Array();
var array_insert_name = new Array();
var mysize = 0;
for (i=0;i<fromList.options.length;i++) {
if (fromList.options[i].selected) {
found = false;
for (j=0;j<toList.options.length;j++) {
if (toList.options[j].value==fromList.options[i].value) found = true;
}
if (!found) {
array_insert_name[mysize] = fromList.options[i].text;
array_insert_value[mysize] = fromList.options[i].value;
mysize++;
}
}
}
for (i=0;i<array_insert_value.length;i++) toList.options[toList.options.length] = new Option(array_insert_name[i],array_insert_value[i]);
}
function funcMultipleRemoveOnly(myListObj) {
var Len = myListObj.options.length;
if(Len>0) {
for(var i=0;i<Len;i++) {
if (myListObj.options[i]!=null && myListObj.options[i].selected) {
myListObj.options[i--] = null;
}
}
}
}
</script></td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_row2">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td>
<script language="JavaScript" type="text/JavaScript">
function isBlank(myObj) { if(myObj.value=='') { return true; } return false; }
function verifySubmit() {
with(document.myForm) {
if(Course.value=='') {
alert('กรุณากรอกเรื่องที่เรียน');
Course.focus();
return false;
}
}
return true;
}
</script> <input name="btAdd" type="submit" class="button_60" id="btAdd" value="Add">
<input name="btCalcel" type="button" class="button_60" id="btCalcel" onClick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<?
//########################################################
} else if ($action=="addnew") {
if(strlen($inputMod_Calendar_DateFrom)!=10) { $inputMod_Calendar_DateFrom="0000-00-00"; }
if(strlen($inputMod_Calendar_DateTo)!=10) { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsDateTo=="") { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsTimeTo=="") { $inputMod_Calendar_TimeTo="00:00:00"; }
if( strlen($inputMod_Calendar_DateFrom)>0 && strlen($inputMod_Calendar_DateTo)>0 && $inputMod_Calendar_DateFrom!="0000-00-00" && $inputMod_Calendar_DateTo!="0000-00-00" ) {
if(strcmp($inputMod_Calendar_DateFrom,$inputMod_Calendar_DateTo)<1) {
// Do nothing.
} else {
// Switch Date
$myTmp = $inputMod_Calendar_DateFrom;
$inputMod_Calendar_DateFrom = $inputMod_Calendar_DateTo;
$inputMod_Calendar_DateTo = $myTmp;
}
}
if($inputMod_Calendar_DateTo=="0000-00-00") { $inputMod_Calendar_DateTo=$inputMod_Calendar_DateFrom; }
$doublezero="00";
$inputMod_Calendar_TimeFrom=$inputTimeFromHH.":".$inputTimeFromMM.":".$doublezero;
$inputMod_Calendar_TimeTo=$inputTimeToHH.":".$inputTimeToMM.":".$doublezero;
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
<?
$sql = "INSERT INTO ".$myModule_Table1."(".$myModule_Table1."_Subject, ".$myModule_Table1."_Faculty, ".$myModule_Table1."_Studentyear,".$myModule_Table1."_Course,".$myModule_Table1."_Teacher,".$myModule_Table1."_DateFrom,".$myModule_Table1."_DateTo,".$myModule_Table1."_TimeFrom,".$myModule_Table1."_TimeTo,".$myModule_Table1."_Type,".$myModule_Table1."_Fill1,".$myModule_Table1."_Fill2,".$myModule_Table1."_Objective,".$myModule_Table1."_Createbyid,".$myModule_Table1."_Createby,".$myModule_Table1."_Createdate) VALUES('$Subject','$Faculty','$Studentyear','$Course','$Teacher','$inputMod_Calendar_DateFrom','$inputMod_Calendar_DateTo','$inputMod_Calendar_TimeFrom','$inputMod_Calendar_TimeTo','$Type','$Fill1','$Fill2','$Objective','$System_Session_User_ID','$System_Session_UserName',Now())";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$sql="select max(cm_mod_detailoverall_ID) from cm_mod_detailoverall";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=mysql_fetch_row($Query);
$MaxID=$Row[0];
//Insert Calendar
$sql = "INSERT INTO ".$myModule_Table2."(".$myModule_Table2."_DateFrom, ".$myModule_Table2."_DateTo, ".$myModule_Table2."_TimeFrom,".$myModule_Table2."_TimeTo,".$myModule_Table2."_CreateByID,".$myModule_Table2."_CreateBy,".$myModule_Table2."_CreateDate,".$myModule_Table2."_LastUpdate,".$myModule_Table2."_Status,".$myModule_Table2."_Language,".$myModule_Table2."_DetailID) VALUES('$inputMod_Calendar_DateFrom','$inputMod_Calendar_DateTo','$inputMod_Calendar_TimeFrom','$inputMod_Calendar_TimeTo','$System_Session_User_ID','$System_Session_UserName',Now(),Now(),'Enable','Thai','$MaxID')";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
<? } else if($action=="addproject") {
?>
<!-- import the calendar script -->
<link rel="stylesheet" type="text/css" href="../../css/myCalendarStyle.css">
<script type="text/javascript" src="../mod_calendar/lib/calendar.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/lang/calendar-en.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/loadcalendar.js"></script>
<!-- end the calendar script -->
<?
//########################################################
} elseif($action=="edit") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="SELECT * FROM ".$myModule_Table1." WHERE ".$myModule_Table1."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<link rel="stylesheet" type="text/css" href="../../css/myCalendarStyle.css">
<script type="text/javascript" src="../mod_calendar/lib/calendar.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/lang/calendar-en.js"></script>
<script type="text/javascript" src="../mod_calendar/lib/loadcalendar.js"></script>
<table style="border-collapse: collapse" border="1" width="95%" align="center" cellpadding="0" cellspacing="1" class="table_border" bordercolor="#E8E7E1">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<form action="?" method="post" name="myForm" id="myForm" enctype="multipart/form-data" onSubmit=" if(!verifySubmit()) { return false; } ">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="update">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
<input name="CheckBoxID1" type="hidden" id="CheckBoxID1" value="<?=$myCheckBoxID?>">
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="1">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="2" cellspacing="1" class="mytable_inner">
<tr align="center">
<td height="24" colspan="2" align="center" class="table_title1" style="font-weight: bold"><div align="left">ข้อมูลการสอน</div></td>
</tr>
<tr align="center">
<td height="24" colspan="2" align="center" class="table_title2" style="font-weight: bold">แก้ไขข้อมูล</td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">รายวิชา : </td>
<td width="509" class="style3"><select name="Subject" id="select">
<option value="กลุ่มวิชาภาษา">กลุ่มวิชาภาษา</option>
<option value="กลุ่มวิชาสังคมศาสตร์ มนุษยศาสตร์">กลุ่มวิชาสังคมศาสตร์ มนุษยศาสตร์</option>
</select> </td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">ภาควิชา : </td>
<td class="style3"><select name="Faculty" id="select2">
<option value="คณะแพทยศาสตร์ศิริราชพยาบาล ">คณะแพทยศาสตร์ศิริราชพยาบาล </option>
</select></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">นักศึกษาที่เรียน : </td>
<td class="style3"><select name="Studentyear" id="select3">
<option value="ปี 1">ปี 1</option>
<option value="ปี 2">ปี 2</option>
<option value="ปี 3">ปี 3</option>
<option value="ปี 4">ปี 4</option>
<option value="ปี 5">ปี 5</option>
<option value="ปี 6">ปี 6</option>
</select></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">เรื่องที่เรียน :</td>
<td class="style3"><input type="text" name="Course" id="textfield" value="<?=$Row[cm_mod_detailoverall_Course]?>" /></td>
</tr>
<tr>
<td height="22" align="right" class="table_row2">วันที่ </td>
<td height="22" class="style3"><table border="0" align="left" cellpadding="1" cellspacing="0">
<tr>
<td nowrap="nowrap"><? $myTmpDate = substr($Row[cm_mod_detailoverall_DateFrom],0,10); ?>
<? $myTmpDateTo = substr($Row[cm_mod_detailoverall_DateTo],0,10); ?>จาก </td>
<td><input name="inputMod_Calendar_DateFrom" type="text" class="input_center" id="inputMod_Calendar_DateFrom" value="<? if($myTmpDate!="0000-00-00") { echo $myTmpDate; } ?>" size="10" maxlength="10" />
<? $myTmpDate = substr($Row[cm_mod_detailoverall_DateTo],0,10); ?> </td>
<td><input name="button2" type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateFrom', 'y-mm-dd');" value=" ... " /> </td>
<td width="25" align="right"><input name="inputIsDateTo" type="checkbox" id="inputIsDateTo" value="Yes" onclick="if(document.getElementById('idDateTo1').style.display=='') { document.getElementById('idDateTo1').style.display='none'; document.getElementById('idDateTo2').style.display='none'; } else { document.getElementById('idDateTo1').style.display=''; document.getElementById('idDateTo2').style.display=''; } " <? if($myTmpDate!="0000-00-00") { echo " checked"; } ?> /></td>
<td nowrap="nowrap">ถึง </td>
<td id="idDateTo1" <? if($myTmpDate=="0000-00-00") { ?>style="display:none"<? } ?>><input name="inputMod_Calendar_DateTo" type="text" class="input_center" id="inputMod_Calendar_DateTo" value="<?=$Row[cm_mod_detailoverall_DateTo]?>" size="10" maxlength="10" /></td>
<td id="idDateTo2" <? if($myTmpDate=="0000-00-00") { ?>style="display:none"<? } ?>><input name="button2" type="button" class="button_th_normal" onclick="return showCalendar('inputMod_Calendar_DateTo', 'y-mm-dd');" value=" ... " /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="22" align="right" class="table_row2">
<?
$myTime = explode(":",$Row[cm_mod_detailoverall_TimeFrom]);
$myTimeHH = $myTime[0]*1;
$myTimeMM = $myTime[1]*1;
?>
เวลา </td>
<td height="22" class="style3"><table border="0" align="left" cellpadding="1" cellspacing="0">
<tr>
<td width="30">จาก</td>
<td><select name="inputTimeFromHH" class="select" id="inputTimeFromHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td><b>:</b></td>
<td><select name="inputTimeFromMM" class="select" id="inputTimeFromMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td width="37" align="right">
<?
$myTime = explode(":",$Row[cm_mod_detailoverall_TimeTo]);
$myTimeHH = $myTime[0]*1;
$myTimeMM = $myTime[1]*1;
?>
<input name="inputIsTimeTo" type="checkbox" id="inputIsTimeTo" value="Yes" onClick="if(document.getElementById('idTimeTo1').style.display=='') { document.getElementById('idTimeTo1').style.display='none'; document.getElementById('idTimeTo2').style.display='none'; document.getElementById('idTimeTo3').style.display='none'; } else { document.getElementById('idTimeTo1').style.display=''; document.getElementById('idTimeTo2').style.display=''; document.getElementById('idTimeTo3').style.display=''; } " <? if($Row[cm_mod_detailoverall_TimeTo]!="00:00:00") { echo " checked"; } ?>></td>
<td nowrap>ถึง </td>
<td id="idTimeTo1" <? if($Row[cm_mod_detailoverall_TimeTo]=="00:00:00") { ?>style="display:none"<? } ?>><select name="inputTimeToHH" class="select" id="inputTimeToHH">
<? for($i=0;$i<=23;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeHH==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
<td id="idTimeTo2" <? if($Row[cm_mod_detailoverall_TimeTo]=="00:00:00") { ?>style="display:none"<? } ?>><b>:</b></td>
<td id="idTimeTo3" <? if($Row[cm_mod_detailoverall_TimeTo]=="00:00:00") { ?>style="display:none"<? } ?>><select name="inputTimeToMM" class="select" id="inputTimeToMM">
<? for($i=0;$i<=59;$i++) { if($i<10) { $myi= "0".$i; } else { $myi=$i; } ?>
<option value="<?=$myi?>"<? if($myTimeMM==$i) { echo " selected"; } ?>>
<?=$myi?>
</option>
<? } ?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">รูปแบบ : </td>
<td class="style3"><select name="Type" id="select4">
<option value="Lecture" selected="selected">Lecture</option>
<option value="Small/Group">Small/Group</option>
<option value="OPD">OPD</option>
</select></td>
</tr>
<tr>
<td align="right" class="table_row2">มาตรฐานการเรียนรู้ : </td>
<td class="style3"><input type="text" name="Fill1" id="textfield2" value="<?=$Row[cm_mod_detailoverall_Fill1]?>" /></td>
</tr>
<tr>
<td align="right" class="table_row2">แพทยสภา : </td>
<td class="style3"><?
$sqlGroup = "SELECT cm_council_Name FROM cm_council";
$QueryGroup =MYSQL_DB_QUERY($System_DataBase_Name,$sqlGroup) OR DIE("Error: เกิดความผิดพลาด <br>$sqlGroup<br>\n");
$recordGroup=MYSQL_NUMROWS($QueryGroup);
?>
<select name="Fill2" id="Fill2">
<?
$index=1;
while ($index<=$recordGroup){ $RowGroup=MYSQL_FETCH_ARRAY($QueryGroup);?>
<option value="<?=$RowGroup[cm_council_Name]?>" <?php if (!(strcmp($RowGroup[cm_council_Name], $Row[cm_mod_detailoverall_Fill2]))) {echo "selected=\"selected\"";} ?>>
<?=$RowGroup[cm_council_Name]?>
</option>
<? $index++;}?>
</select> </td>
</tr>
<tr>
<td align="right" class="table_row2">วัตถุประสงค์การสอน : </td>
<td class="style3"><textarea name="Objective" id="Objective" cols="45" rows="5"> <?=$Row[cm_mod_detailoverall_Objective]?></textarea>
<script language="JavaScript" type="text/javascript">
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function funcMultipleAddNew(myListObj,myText) {
if(myText!='') myListObj.options[myListObj.options.length] = new Option(myText,myText,0,false);
}
</script>
<span class="mytable_col2">
<script language="JavaScript" type="text/javascript">
restoreContentData();
function restoreContentData() {
//alert($inputFile[0]);
<?
for ($index=0;$index<count($inputFile)-1;$index++) {
echo "insertRow('contentTable');";
}
for ($index=0;$index<count($inputFile);$index++) {
$array_visible = "";
if (count($inputFile)>1) $array_visible = "[".$index."]";
echo "document.myForm.inputFile".$array_visible.".value = '".$inputFile[$index]."';";
}
?>
}
function insertRow(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
myObj.insertRow(myNumRow-1);
for(i=0;i<myNumCol;i++) {
myObj.rows[myNumRow-1].insertCell();
}
myObj.rows[myNumRow-1].cells[0].innerHTML = '<input name="inputFile[]" type="file" class="input_left" id="inputFile" size="35">';
myObj.rows[myNumRow-1].cells[1].align = "center";
myObj.rows[myNumRow-1].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'ContentTable\','+(myNumRow-1)+')">';
formatTable(tableName);
}
function deleteRow(tableName,myRowDelete) {
var myObj=document.getElementById(tableName);
myObj.deleteRow(myRowDelete);
formatTable(tableName);
}
function formatTable(tableName) {
var myObj=document.getElementById(tableName);
var myNumRow = myObj.rows.length;
var myNumCol = myObj.rows[0].cells.length;
if(myNumRow>2) {
for(i=0;i<myNumRow-1;i++) {
myObj.rows[i].cells[1].innerHTML = '<img src="../system/images/bullet/minus.gif" width="11" height="11" onMouseOver="this.style.cursor=\'hand\'" onClick="deleteRow(\'contentTable\','+i+')" alt="delete">';
}
} else {
myObj.rows[0].cells[1].innerHTML = '<img src="../system/images/bullet/minus_disable.gif" width="11" height="11">';
}
}
function AddList(fromList,toList) {
var array_insert_value = new Array();
var array_insert_name = new Array();
var mysize = 0;
for (i=0;i<fromList.options.length;i++) {
if (fromList.options[i].selected) {
found = false;
for (j=0;j<toList.options.length;j++) {
if (toList.options[j].value==fromList.options[i].value) found = true;
}
if (!found) {
array_insert_name[mysize] = fromList.options[i].text;
array_insert_value[mysize] = fromList.options[i].value;
mysize++;
}
}
}
for (i=0;i<array_insert_value.length;i++) toList.options[toList.options.length] = new Option(array_insert_name[i],array_insert_value[i]);
}
function funcMultipleRemoveOnly(myListObj) {
var Len = myListObj.options.length;
if(Len>0) {
for(var i=0;i<Len;i++) {
if (myListObj.options[i]!=null && myListObj.options[i].selected) {
myListObj.options[i--] = null;
}
}
}
}
</script></td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_row2">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td width="148">
<script language="JavaScript" type="text/JavaScript">
function isBlank(myObj) { if(myObj.value=='') { return true; } return false; }
function verifySubmit() {
with(document.myForm) {
if(inputdate.value=='') {
alert('กรุณากรอกวันที่ใช้งาน');
inputdate.focus();
return false;
}
if(inputarrivetime.value=='') {
alert('กรุณากรอกเวลาออกจากบริษัท');
inputarrivetime.focus();
return false;
}
if(inputtime.value=='') {
alert('กรุณากรอกเวลาอปฏิบัติงาน');
inputtime.focus();
return false;
}
if(inputfinishtime.value=='') {
alert('กรุณากรอกเวลาเสร็จ');
inputfinishtime.focus();
return false;
}
if(inputdateto.value=='') {
alert('กรุณากรอกวันที่เสร็จ');
inputdateto.focus();
return false;
}
if(inputname.value=='') {
alert('กรุณากรอกชื่อ');
inputname.focus();
return false;
}
if(inputtel.value=='') {
alert('กรุณากรอกเบอร์โทร');
inputtel.focus();
return false;
}
if(inputq.value=='') {
alert('กรุณากรอกคิว');
inputq.focus();
return false;
}
if(inputamountcar.value=='') {
alert('กรุณากรอกจำนวน');
inputamountcar.focus();
return false;
}
}
return true;
} </script> <input name="btSave" type="submit" class="button_60" id="btSave" value="Save">
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("คุณต้องการยืนยันจริงหรือไม่?")
if (answer){
document.myForm.action.value='setstatus';
document.myForm.submit();
}
else{
}
}
//-->
</script></td>
<td width="144"> <input name="btCalcel" type="button" class="button_60" id="btCalcel" onClick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<?
##############################################
}elseif($action=="view") {
$CheckBoxID=$_GET["CheckBoxID"];
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="SELECT * FROM cm_mod_detailoverall WHERE cm_mod_detailoverall_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<br>
<br>
<br />
<table style="border-collapse: collapse" border="1" bordercolor="#E8E7E1" width="95%" align="center" cellpadding="0" cellspacing="1" class="table_border">
<form action="?" method="post" name="myReturnForm" id="myReturnForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<form action="?" method="post" name="myForm" id="myForm" >
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action" value="update">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
<input name="CheckBoxID1" type="hidden" id="CheckBoxID1" value="<?=$myCheckBoxID?>">
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="1">
<tr>
<td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="mytable_inner">
<tr align="center">
<td height="24" colspan="3" align="center" class="table_title1" style="font-weight: bold"><div align="left">ข้อมูลการสอน</div></td>
</tr>
<tr align="center">
<td height="24" colspan="3" align="center" class="table_title2" style="font-weight: bold">ดูข้อมูล</td>
</tr>
<tr>
<td width="228" height="31" align="right" class="table_row2">รายวิชา : </td>
<td width="460" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Subject]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">ภาควิชา : </td>
<td height="22" colspan="2" class="table_row2">
<?=$Row[cm_mod_detailoverall_Faculty]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">นักศึกษาที่เรียน : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Studentyear]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">เรื่องที่เรียน :</td>
<td height="22" colspan="2" valign="top" class="table_row2"><?=$Row[cm_mod_detailoverall_Course]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">ผู้สอน : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Createby]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">วันที่สอน : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_DateFrom]?></td>
</tr>
<tr>
<td align="right" class="table_row2">เวลาที่สอน : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_TimeFrom]?>-<?=$Row[cm_mod_detailoverall_TimeTo]?></td>
</tr>
<tr>
<td width="228" align="right" class="table_row2">รูปแบบ : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Type]?></td>
</tr>
<tr>
<td align="right" class="table_row2">มาตรฐานการเรียนรู้ : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Fill1]?></td>
</tr>
<tr>
<td align="right" class="table_row2">แพทยสภา : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Fill2]?></td>
</tr>
<tr>
<td align="right" class="table_row2">วัตถุประสงค์การสอน : </td>
<td height="22" colspan="2" class="table_row2"><?=$Row[cm_mod_detailoverall_Objective]?></td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<tr align="right">
<td height="30" colspan="4" align="center" class="table_row2">
<table width="300" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td>
<input name="btEdit" type="submit" class="button_80" id="btEdit" value="Edit" onClick="
document.myForm.action.value='edit';
document.myForm.submit();
"> </td>
<td> <input name="btCalcel" type="button" class="button_80" id="btCalcel" onClick="
if(confirm('Are you sure to return to list?')) {
document.myReturnForm.submit();
}
" value="Cancel"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
<br />
<? } else if ($action=="viewpro") {
$CheckBoxID1=$_GET["CheckBoxID1"];
$myCheckBoxID1=0;
for($i=1;$i<=$TotalCheckBoxID1;$i++) {
$myVar="CheckBoxID1".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID1=$$myVar;
}
}
$sql="SELECT * FROM roadpump_mod_request a,roadpump_mod_booking b WHERE a.roadpump_mod_request_ID=b.roadpump_mod_booking_IDRequest and a.roadpump_mod_request_ID='$myCheckBoxID1'";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$record=mysql_num_rows($Query);
?>
<br>
<br>
<br /><? if($record>0){?>
<? } else { echo"<div align=center>ท่านยังไม่มีข้อมูลการจองรถ</div>"; } ?>
<br />
<?
//########################################################
} else if ($action=="update") {
$MaxID = $CheckBoxID1;
if(strlen($inputMod_Calendar_DateFrom)!=10) { $inputMod_Calendar_DateFrom="0000-00-00"; }
if(strlen($inputMod_Calendar_DateTo)!=10) { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsDateTo=="") { $inputMod_Calendar_DateTo="0000-00-00"; }
if($inputIsTimeTo=="") { $inputMod_Calendar_TimeTo="00:00:00"; }
if( strlen($inputMod_Calendar_DateFrom)>0 && strlen($inputMod_Calendar_DateTo)>0 && $inputMod_Calendar_DateFrom!="0000-00-00" && $inputMod_Calendar_DateTo!="0000-00-00" ) {
if(strcmp($inputMod_Calendar_DateFrom,$inputMod_Calendar_DateTo)<1) {
// Do nothing.
} else {
// Switch Date
$myTmp = $inputMod_Calendar_DateFrom;
$inputMod_Calendar_DateFrom = $inputMod_Calendar_DateTo;
$inputMod_Calendar_DateTo = $myTmp;
}
}
if($inputMod_Calendar_DateTo=="0000-00-00") { $inputMod_Calendar_DateTo=$inputMod_Calendar_DateFrom; }
$doublezero="00";
$inputMod_Calendar_TimeFrom=$inputTimeFromHH.":".$inputTimeFromMM.":".$doublezero;
$inputMod_Calendar_TimeTo=$inputTimeToHH.":".$inputTimeToMM.":".$doublezero;
//if($inputLinkType=="Group") $inputURL="";
$sql = "UPDATE ".$myModule_Table1." SET ".
$myModule_Table1."_Subject='$Subject' ,".
$myModule_Table1."_Faculty='$Faculty' ,".
$myModule_Table1."_Studentyear='$Studentyear' ,".
$myModule_Table1."_Course='$Course' ,".
$myModule_Table1."_DateFrom='$inputMod_Calendar_DateFrom' ,".
$myModule_Table1."_DateTo='$inputMod_Calendar_DateTo' ,".
$myModule_Table1."_TimeFrom='$inputMod_Calendar_TimeFrom' ,".
$myModule_Table1."_Timeto='$inputMod_Calendar_TimeTo' ,".
$myModule_Table1."_Type='$Type' ,".
$myModule_Table1."_Fill1='$Fill1' ,".
$myModule_Table1."_Fill2='$Fill2' ,".
$myModule_Table1."_Objective='$Objective' ,".
$myModule_Table1."_Createbyid='$System_Session_User_ID' ,".
$myModule_Table1."_Createby='$System_Session_UserName' ,".
$myModule_Table1."_Lastupdate=Now() ".
" WHERE ".$myModule_Table1."_ID=".$CheckBoxID1;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$sql = "UPDATE ".$myModule_Table2." SET ".
$myModule_Table2."_DateFrom='$inputMod_Calendar_DateFrom' ,".
$myModule_Table2."_DateTo='$inputMod_Calendar_DateTo' ,".
$myModule_Table2."_TimeFrom='$inputMod_Calendar_TimeFrom' ,".
$myModule_Table2."_TimeTo='$inputMod_Calendar_TimeTo' ,".
$myModule_Table2."_CreateByID='$System_Session_User_ID' ,".
$myModule_Table2."_CreateBy='$System_Session_UserName' ,".
$myModule_Table2."_LastUpdate=Now()".
" WHERE ".$myModule_Table2."_DetailID=".$CheckBoxID1;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="admin" type="hidden" id="admin" value="<?=$admin?>">
<input name="action" type="hidden" id="action">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
<?
#########################################################
}elseif ($action=="cancel") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<?
#########################################################
}elseif ($action=="delete") {
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$sql = "SELECT * FROM ".$myModule_Table1." WHERE ".$myModule_Table1."_ID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$Row=MYSQL_FETCH_ARRAY($Query);
$sql = "DELETE FROM ".$myModule_Table1." WHERE ".$myModule_Table1."_ID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$sql = "DELETE FROM ".$myModule_Table2." WHERE ".$myModule_Table2."_DetailID=".$$myVar;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
}
}
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="action" type="hidden" id="action">
<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
<?
#########################################################
} else if ($action=="setstatus") {
$myCheckBoxID=0;
for($i=1;$i<=$TotalCheckBoxID;$i++) {
$myVar="CheckBoxID".$i;
if(strlen($$myVar)>0) {
$myCheckBoxID=$$myVar;
}
}
$sql="UPDATE ".$myModule_Table1." SET ".$myModule_Table1."_Status='1' WHERE ".$myModule_Table1."_ID=".$myCheckBoxID;
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
?>
<form action="?" method="post" name="myForm" id="myForm">
<input name="action" type="hidden" id="action">
<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
</form>
<script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
<?
#########################################################
} else { ?>
<?
# Check to set default value #########################
if($PageSize=="") { $PageSize = $SystemModule_defaultPageSize; }
if($PageShow=="") { $PageShow = $SystemModule_defaultPageShow; }
if($ASCDESC=="") { $ASCDESC = $SystemModule_ASCDESC; }
if($OrderBy=="") { $OrderBy = $SystemModule_OrderBy; }
if($action=="switchorder") {
if($ASCDESC=="ASC") { $ASCDESC = "DESC"; } else { $ASCDESC="ASC"; }
}
if($PageSearch!="") { $PageSearch=trim($PageSearch); }
if($GroupID=="") { $GroupID=0; }
# Count total record size #########################
$sql="SELECT * FROM cm_mod_detailoverall";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("<br><br><b><font color=#FF0000>ไม่สามารถใช้งานระบบได้<br>หากคุณเข้าใช้งานเป็นครั้งแรก<br><a href=\"#\" onClick=\"Popup('popupCreateDatabaseWindow','createdatabase.php',220,180,1);\">กรุณาคลิ๊กที่นี่</a><br>เพื่อทำการสร้างฐานข้อมูลใหม่</font></b>\n");
if($PageSearch=="") {
$sql="SELECT * FROM cm_mod_detailoverall";
//$sql = "SELECT * FROM ".$myModule_Table." WHERE ".$myModule_Table."_Name='$System_Session_FullName'";
} else {
$sql = $sql." AND ( a.roadpump_mod_request_Name LIKE '%$PageSearch%' OR
a.roadpump_mod_request_Department LIKE '%$PageSearch%' OR
b.roadpump_mod_booking_Typepump LIKE '%$PageSearch%' ) ";
}
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("<br><br><b><font color=#FF0000>ไม่สามารถใช้งานระบบได้<br>หากคุณเข้าใช้งานเป็นครั้งแรก<br><a href=\"#\" onClick=\"Popup('popupCreateDatabaseWindow','createdatabase.php',220,180,1);\">กรุณาคลิ๊กที่นี่</a><br>เพื่อทำการสร้างฐานข้อมูลใหม่</font></b>\n");
$TotalRecordCount=MYSQL_NUMROWS($Query);
# Find max page size #########################
if($TotalRecordCount>$PageSize) {
$NoOfPage= ceil($TotalRecordCount/$PageSize);
} else {
$NoOfPage=1;
}
# Recover page show into range #########################
if($PageShow>$NoOfPage) { $PageShow=$NoOfPage; }
# Select only paging range #########################
$RecordStart = ($PageShow-1)*$PageSize;
$sql.=" ORDER BY cm_mod_detailoverall_ID $ASCDESC LIMIT $RecordStart , $PageSize";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$RecordCount=MYSQL_NUMROWS($Query);
?>
<script language="JavaScript" type="text/JavaScript">
function Paging_CheckAll(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
document.getElementById(txtCheckBoxFirstName+i).checked = objCheckHeader.checked;
return true;
}
function Paging_CheckAllHandle(objCheckHeader,txtCheckBoxFirstName,intTotalItems) {
var isCheckedAll = true;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(!document.getElementById(txtCheckBoxFirstName+i).checked)
isCheckedAll = false;
objCheckHeader.checked = isCheckedAll;
return true;
}
function Paging_CountChecked(txtCheckBoxFirstName,intTotalItems) {
var intChecked = 0;
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(document.getElementById(txtCheckBoxFirstName+i).checked)
intChecked ++;
return intChecked ;
}
function Paging_CheckedThisItem(objCheckHeader,indexing,txtCheckBoxFirstName,intTotalItems) {
if(intTotalItems>0)
for(i=1;i<=intTotalItems;i++)
if(i==indexing) {
document.getElementById(txtCheckBoxFirstName+i).checked = true;
} else {
document.getElementById(txtCheckBoxFirstName+i).checked = false;
}
objCheckHeader.checked = false;
return true;
}
</script>
<div id="divDataPicker" style="display:none; position:absolute; top:-135px; left:81px; width: 200px; z-index: 1;Filter:Alpha(opacity=95)">
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="table_border">
<form action="?" method="post" name="myStatusForm" id="myStatusForm">
<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<tr>
<td height="22"><table width="100%" height="22" border="0" cellpadding="0" cellspacing="0" class="table_header">
<tr>
<td width="28" align="center"><img src="../images/icon/ico439.gif" width="19" height="15"></td>
<td align="center">Select Status</td>
<td width="22" align="center"><img src="../images/icon/ico215.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onClick="document.getElementById('divDataPicker').style.display='none'; "></td>
</tr>
</table></td>
</tr>
<tr>
<td height="120" align="center" class="table_row1"><br>
<table width="120" border="0" cellpadding="2" cellspacing="0">
<tr>
<td height="22" align="center"><input name="toolbarStatus" type="radio" class="form_checkbox" value="Enable"></td>
<td height="22" class="text_bold">Enable</td>
</tr>
<tr>
<td width="26" height="22" align="center"><input name="toolbarStatus" type="radio" class="form_checkbox" value="Disable"></td>
<td height="22" class="text_bold">Disable</td>
</tr>
</table>
<br> <table border="0" cellspacing="0" cellpadding="6">
<tr>
<td><input name="btSave" type="button" class="button_th_60" id="btSave" value="Save" onClick="
if(document.myStatusForm.toolbarStatus[0].checked) {
document.myForm.SelectStatus.value=document.myStatusForm.toolbarStatus[0].value;
}
if(document.myStatusForm.toolbarStatus[1].checked) {
document.myForm.SelectStatus.value=document.myStatusForm.toolbarStatus[1].value;
}
document.myForm.action.value='setstatus';
Paging_CheckedThisItem(document.myForm.CheckBoxAll, StatusIndex ,'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.submit();
"></td>
<td><input name="btClose" type="button" class="button_th_60" id="btClose" value="Close" onClick="document.getElementById('divDataPicker').style.display='none';"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="6" class="table_footer"><img src="../images/blank.gif" width="1" height="1"></td>
</tr>
</form>
</table>
</div>
<script language="JavaScript" type="text/JavaScript">
var StatusIndex=0;
function ShowDataPicker(myDivName,RefX,RefY) {
document.getElementById(myDivName).style.display='';
document.getElementById(myDivName).style.left = document.body.scrollLeft + window.event.clientX + RefX;
document.getElementById(myDivName).style.top= document.body.scrollTop+ window.event.clientY + RefY;
}
</script>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0" >
<form action="" method="post" name="mySearchForm1" id="mySearchForm1" onsubmit="return false;">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>" />
<input name="SystemMenuID2" type="hidden" id="SystemMenuID2" value="<?=$SystemMenuID?>" />
<tr>
<td>
<div align="right">
<input name="toolbarPageSearch1" type="text" style="height:15px"class="input_left" id="toolbarPageSearch1" value="<?=$PageSearch?>" size="20" maxlength="50" />
<input name="btPageSearch" type="button" class="button_60" id="btPageSearch" value="Search" onclick="
document.myForm.PageSearch.value=document.mySearchForm1.toolbarPageSearch1.value;
document.myForm.submit();
" />
<input name="btAdd2" type="button" class="button_80" id="btAdd2" value="Add New" onclick="
document.myForm.action.value='add';
document.myForm.submit();
" />
</div></td></tr>
</form>
</table>
<br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table_border">
<tr>
<td bgcolor="#FFFFFF"><table style="border-collapse: collapse" border="1" width="97%" align="center" cellpadding="0" cellspacing="1" class="table_border" bordercolor="#E8E7E1">
<form action="?" method="post" name="myForm" id="myForm">
<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<input name="action" type="hidden" id="action">
<input name="PageSize" type="hidden" id="PageSize" value="<?=$PageSize?>">
<input name="PageShow" type="hidden" id="PageShow" value="<?=$PageShow?>">
<input name="ASCDESC" type="hidden" id="ASCDESC" value="<?=$ASCDESC?>">
<input name="OrderBy" type="hidden" id="OrderBy" value="<?=$OrderBy?>">
<input name="PageSearch" type="hidden" id="PageSearch" value="<?=$PageSearch?>">
<input name="SelectStatus" type="hidden" id="SelectStatus">
<tr align="center" class="menu_table_header">
<td height="24" colspan="9" bgcolor="#F7F6F0" class="table_title1"><div align="center">รายละเอียดการสอน<br />
</div></td>
</tr>
<tr align="center" class="menu_table_header">
<td width="20" height="24" bgcolor="#F7F6F0" class="table_title2"><input name="CheckBoxAll" type="checkbox" class="form_checkbox" id="CheckBoxAll" value="Yes" onclick="Paging_CheckAll(this,'CheckBoxID',document.myForm.TotalCheckBoxID.value)" /></td>
<? if($DisplayStyle!="Link"){?>
<? }?>
<td width="82" height="24" bgcolor="#F7F6F0" class="table_title2">การเรียน</td>
<td width="123" bgcolor="#F7F6F0" class="table_title2">ผู้สอน</td>
<td width="86" bgcolor="#F7F6F0" class="table_title2">วันที่สอน</td>
<td width="100" bgcolor="#F7F6F0" class="table_title2">เวลาที่สอน</td>
<td width="64" bgcolor="#F7F6F0" class="table_title2">รูปแบบ</td>
<td width="60" bgcolor="#F7F6F0" class="table_title2">มคว</td>
<td width="65" bgcolor="#F7F6F0" class="table_title2">แพทยสภา</td>
<td width="64" bgcolor="#F7F6F0" class="table_title2">Action</td>
</tr>
<?
$index=1;
if($RecordCount>0) {
while($index<$RecordCount+1) {
if($myClassRow=="table_row1") { $myClassRow="table_row2"; } else { $myClassRow="table_row1"; }
$Row=MYSQL_FETCH_ARRAY($Query);
?>
<tr class="<?=$myClassRow?>">
<td width="20" height="30" align="center"><input name="CheckBoxID<?=$index?>" type="checkbox" class="form_checkbox" id="CheckBoxID<?=$index?>" onclick="Paging_CheckAllHandle(document.myForm.CheckBoxAll,'CheckBoxID',document.myForm.TotalCheckBoxID.value)" value="<?=$Row[$myModule_Table1."_ID"]?>" /></td>
<td height="30" align="center"><div align="center">
<?=$Row[cm_mod_detailoverall_Course]?>
<br />
</div></td>
<td height="30" align="center"><?=substr($Row[cm_mod_detailoverall_Createby],0,40)?></td>
<td height="30" align="center"><?=ShowDateShort($Row[cm_mod_detailoverall_DateFrom])?></td>
<td height="30" align="center"><div align="center">
<?=$Row[cm_mod_detailoverall_TimeFrom]?>-<?=$Row[cm_mod_detailoverall_TimeTo]?>
</div></td>
<td height="30" align="center"><?=$Row[cm_mod_detailoverall_Type]?></td>
<td height="30" align="center"><?=$Row[cm_mod_detailoverall_Fill1]?></td>
<td height="30" align="center"><?=$Row[cm_mod_detailoverall_Fill2]?></td>
<td width="64" height="30" align="center" valign="middle"><div align="center">
<table border="0" cellspacing="0" cellpadding="1">
<tr align="center" valign="bottom">
<td><img src="../../img/icons/view.png" alt="View" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='view';
document.myForm.submit();
" /></td>
<td><img src="../../img/icons/edit.png" alt="Edit" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
if(confirm('Are you sure to edit this record?')) {
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='edit';
document.myForm.submit();
}
" /></td>
<td><img src="../../img/icons/delete.png" alt="Delete" width="16" height="16" border="0" onmouseover="this.style.cursor='hand'" onclick="
if(confirm('Are you sure to delete this record?')) {
Paging_CheckedThisItem( document.myForm.CheckBoxAll, <?=$index?>, 'CheckBoxID', document.myForm.TotalCheckBoxID.value );
document.myForm.action.value='delete';
document.myForm.submit();
}
" /></td>
</tr>
</table>
</div></td>
</tr>
<?
$index++;
}
} else { ?>
<tr class="table_row1">
<td height="80" colspan="11" align="center"> Data
not found!</td>
</tr>
<? } ?>
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="<?=$index-1?>" />
</form>
</table>
<table width="100%" height="24" border="0" cellpadding="3" cellspacing="0">
<form action="?" method="post" name="mySearchForm" id="mySearchForm" onSubmit="return false;">
<input name="GroupID" type="hidden" id="GroupID" value="<?=$GroupID?>">
<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$SystemModuleKey?>">
<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
<tr align="right">
<td colspan="4" align="right" class="table_footer"><div class="menu_one">
<div align="left">Page
<?
if($NoOfPage>1) {
?>
<select name="toolbarPageShow" class="select" onchange="document.myForm.PageShow.value=this.value; document.myForm.submit(); ">
<?
if($NoOfPage<$SystemModule_MaxPage) {
// Show page list #########################
for($i=1;$i<=$NoOfPage;$i++) {
echo "<option value=\"$i\"";
if($i==$PageShow) { echo " selected"; }
echo ">$i</option>";
}
} else {
// # If total page count greater than default max page value then reduce page select size #########################
$starti = $PageShow-$SystemModule_ReduceRange;
if($starti<1) { $starti=1; }
$endi = $PageShow+$SystemModule_ReduceRange;
if($endi>$NoOfPage) { $endi=$NoOfPage; }
//#####################
for($i=$starti ;$i<=$endi;$i++) {
echo "<option value=\"$i\"";
if($i==$PageShow) { echo " selected"; }
echo ">$i</option>";
}
}
?>
</select>
<?
} else {
echo "1";
}
?>
of
<?=$NoOfPage?>
| Total
<?=$TotalRecordCount?>
records found </div>
</div></td>
</tr>
</form>
</table></td>
</tr>
</table>
<br>
<?
}
#########################################################
?>
<br>
</div>
<!-- InstanceEndEditable --> </td>
<td width="15"> </td>
</tr>
</table></td>
<td background="../../images/content_border/content_border_right.jpg"> </td>
</tr>
<tr>
<td><img src="../../images/l/left_menu_03_l.jpg" width="24" height="29" /></td>
<td colspan="2"><img src="../../images/l/left_menu_03_r.jpg" width="197" height="29" /></td>
<td><img src="../../images/content_border/content_border_03.jpg" width="747" height="29" /></td>
<td><img src="../../images/content_border/content_border_right2.jpg" width="17" height="29" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox