Viewing file: FrmFormA.php (23.38 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include("../include/Function.php");
include("admin_menu.php");
ConnectDB();
$Username = $valid_user;
$sql = "SELECT * FROM personal_tb WHERE Teacher_code='$Teacher_code' ";
$res = mysql_query($sql);
$rs = mysql_fetch_array($res);
$sql = "Select * From FormAoffice Where codeId='$codeId' and Teacher_code='$Teacher_code' and Training_code='$Training_code' ";
$result = mysql_query($sql) or die(" Error").mysql_error();
$rss = mysql_fetch_array($result);
$sql1 = "Select * From project_tb Where Teacher_code='$Teacher_code' and Training_code='$Training_code' ";
$result1= mysql_query($sql1) or die(" Error").mysql_error();
$rs1= mysql_fetch_array($result1);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link rel="stylesheet" href="../css/cart4.css" type="text/css">
<script language="JavaScript" src="../calendar/ew.js"></script>
<script language="JavaScript" src="../calendar/popcalendar.js"></script>
<script language="JavaScript" type="text/JavaScript">
function MM_reloadPage(init) { //reloads the window if Na v4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
}
var highlightcolor="lightyellow"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}
</script>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
font-size: 14px;
font-family: Tahoma;
}
.style2 {
font-size: 14px;
font-weight: bold;
font-family: Tahoma;
}
.style5 {font-size: 14px; font-family: Tahoma; color: #FF0000; }
.style7 {font-size: 14px}
.style11 {font-size: 14px; color: #000000; }
.style12 {color: #000000}
-->
</style>
<table width="807" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="807"><br>
<fieldset>
<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><a href="menu_From.php?Teacher_code=<? echo $rss[Teacher_code] ?>">หน้าหลัก </a></span></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="FormAList.php?Teacher_code=<? echo $rss[Teacher_code] ?>">ข้อมูลการขออนุมัติเดินทางไปราชการ </a></font><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /></span></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>">ใบขออนุมัติไปราชการ</font></legend>
<label>
<div align="center">
<form id="pc" name="pc" method="post" action="EditFormA.php">
<div align="left"><font size="2" face="Tahoma"><img src="../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font> </div>
<table width="709" cellpadding="0" cellspacing="0">
<col width="88" />
<col width="79" />
<col width="85" />
<col width="56" />
<col width="64" />
<col width="185" />
<tr height="31">
<td height="31" width="118"></td>
<td width="54"></td>
<td colspan="3"><div align="center" class="style2">
<div align="left">
<p align="center"><strong>บันทึกข้อความ</strong></p>
</div>
</div></td>
<td width="182"></td>
</tr>
<tr height="29">
<td height="29" colspan="6" l> ส่วนราชการ วิทยาลัยการสาธารณสุขสิรินธร จังหวัดชลบุร ี</td>
</tr>
<td height="29" colspan="2" align="left"> ที่ สธ.0203.081/พิเศษ......... </td>
<td width="139" height="29" align="left"> </td>
<td height="29" align="left"> </td>
<td height="29" colspan="2" align="left">วันที<font color="#003366" size="2" face="Tahoma"> </font><font color="#000000" size="2" face="Tahoma">
<select name="mDate" class="select" id="mDate" >
<?php
$Date = $rss[Date];
$yearthai = explode("-",$Date);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
for($i=0;$i<=31;$i++)
{
if( $i == 0)
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
</font><font color="#000000" face="Tahoma"> <span class="style7">เดือน</span></font><font color="#000000" size="2" face="Tahoma">
<select name="mMonth" class="select" id="mMonth" >
<?php
$Date= $rss[Date];
$yearthai = explode("-",$Date);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
</font><font color="#000000" face="Tahoma"><span class="style7">ปี พ.ศ.</span></font><font color="#000000" size="2" face="Tahoma">
<input name="mYear" type="text" class="style1" id="mYear" value="<? echo $mYear ?>" size="3" maxlength="4" />
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left">เรื่อง <font color="#0000FF" size="2" face="Tahoma">
<input name="Detail" type="text" id="Detail" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="ขออนุมัติเดินทางไปราชการ" size="20" />
</font></td>
<td width="32"></td>
<td width="182"></td>
<td></td>
</tr>
<tr height="29">
<td height="29" colspan="5" align="left">เรียน ผู้อำนวยการวิทยาลัยการสาธารณสุขสิรินธรจังหวัดชลบุรี</td>
<td></td>
</tr>
<tr height="29">
<td height="26"></td>
<td colspan="5" align="left">ข้าพเจ้า....<font size="2" face="Tahoma">
<?php
$Teacher_code = $rss["Teacher_code"];
$sql = "Select * From personal_tb Where Teacher_code ='$Teacher_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[First_name]$rs2[Teacher_name] $rs2[Teacher_lastname]";
?>
</font>.................................. ตำแหน่ง.......<font size="2" face="Tahoma"><? echo $rs2[Gover_pos]?>.....</font></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">สังกัด....<font size="2" face="Tahoma">
<?php
$Faculty_code = $rs["Faculty_code"];
$sql = "Select * From faculty_tb Where Faculty_code='$Faculty_code'";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Faculty_name] ";
?>
</font>........<span class="style1">วิทยาลัยการสาธารณสุขสิรินธร จังหวัดชลบุรี</span>.....<span class="style1">สถาบันพระบรมราชชนก</span></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">ขออนุมัติเดินทางไปราชการ เรื่อง <font color="#0000FF" size="2" face="Tahoma"> ...
<input name="Training_name" type="text" id="Training_name" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rss[Training_name] ?>" size="60" />
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left"><font face="Tahoma"><span class="style7">เพื่อ...</span></font><font size="2" face="Tahoma">
<input type="radio" name="Training_type" <?php if (!(strcmp("$rss[Training_type]","1"))) {echo "checked";} ?> value="1" />
</font><font face="Tahoma"><span class="style7"> การอบรม</span></font><font size="2" face="Tahoma">
<input type="radio" name="Training_type"<?php if (!(strcmp("$rss[Training_type]","2"))) {echo "checked";} ?> value="2" />
</font><font face="Tahoma"><span class="style7"> การศึกษาดูงาน</span></font><font size="2" face="Tahoma">
<input type="radio" name="Training_type" <?php if (!(strcmp("$rss[Training_type]","3"))) {echo "checked";} ?> value="3" />
</font><font face="Tahoma"><span class="style7">ประชุม</span></font><font size="2" face="Tahoma">
<input type="radio" name="Training_type" <?php if (!(strcmp("$rss[Training_type]","4"))) {echo "checked";} ?> value="4" />
</font><font face="Tahoma"><span class="style7">สัมมนา</span> </font><font size="2" face="Tahoma">
<input type="radio" name="Training_type" <?php if (!(strcmp("$rss[Training_type]","6"))) {echo "checked";} ?> value="6" />
</font><font face="Tahoma"><span class="style7">นิเทศงาน </span></font><font size="2" face="Tahoma">
<input type="radio" name="Training_type" <?php if (!(strcmp("$rss[Training_type]","7"))) {echo "checked";} ?> value="7" />
</font><font face="Tahoma"><span class="style7">การเป็นวิทยากร</span></font></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left"><label>อ้างตามหนังสือราชการเลขที่</label>
<font color="#0000FF" size="2" face="Tahoma">...
<input name="No_in" type="text" id="No_in" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rss[No_in] ?>" size="40" />
... </font> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" onclick="MM_openBrWindow('bookCode.php?Faculty_code=<? echo $rs["Faculty_code"]?>Teacher_code=<? echo $rss["Teacher_code"]?>','Detail','scrollbars=yes,width=820,height=280')"><a href="#" ><img src="../picture/search.gif" width="15" height="19" border="0" align="absmiddle" /></a></font>
<input name="code" type="hidden" id="code" <? echo $rss['code']?> /></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">างตามแผนดำเนินการ ข้อที่ <span class="style5">*</span><font color="#0000FF" size="2" face="Tahoma">
<input name="Orderlist" type="text" id="Orderlist" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?
$ProjectId = $rss["ProjectId"];
$sql = "Select * From project_tb Where ProjectId ='$ProjectId' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Orderlist]";
?>" size="3" />
..
<input name="Project_plan" type="text" id="Project_plan" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<?
$ProjectId = $rss["ProjectId"];
$sql = "Select * From project_tb Where ProjectId ='$ProjectId' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[Project_plan]";
?>" size="40" />
</font><font face="Tahoma"><span class="style11">ปี พ.ศ</span></font><font color="#0000FF" size="2" face="Tahoma">
<input name="Year_std" type="text" id="Year_std" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rs2[Budget_Year] ?>" size="2" />
<input name="Budget_Year" type="hidden" id="Budget_Year" value="<? echo $rs2[Budget_Year] ?>" />
<input name="MoneyS_C" type="hidden" id="MoneyS_C" value="<? echo $rs2[MoneyS_C] ?>" />
<input name="MoneyId" type="hidden" id="MoneyId" value="<? echo $rs2[MoneyId] ?>" />
<input name="Faculty_code" type="hidden" id="Faculty_code" value="<? echo $rs2[Faculty_code] ?>" />
</font><font face="Tahoma"><span class="style11">จำนวนเงิน </span></font><font color="#0000FF" size="2" face="Tahoma"><span class="style5">*</span>
<input name="Budget_use" type="text" id="Budget_use" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo "$rs1[Budget_use]"; ?>" size="6" />
</font><span class="style12"><font face="Tahoma"><span class="style7">บาท</span></font></span>..<font color="#0000FF" size="2" face="Tahoma"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>" onclick="MM_openBrWindow('PlanCode.php?Faculty_code=10&Budget_Year=2552','Detail','scrollbars=yes,width=820,height=280')"><a href="#" ><img src="../picture/search.gif" width="15" height="19" border="0" align="absmiddle" /></a></font>
<input name="ProjectId" type="hidden" id="ProjectId" value="<? echo $rss['ProjectId']?>" />
<? echo $rss[ProjectId] ?>
</font></td>
</tr>
<tr height="29">
<td height="29" colspan="6" align="left">ตั้งแต่วันที่<font color="#000000" size="2" face="Tahoma">
<select name="mDate1" class="select" id="mDate1" >
<?php
$Date_start = $rss[Date_start];
$yearthai = explode("-",$Date_start);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
for($i=0;$i<=31;$i++)
{
if( $i == 0)
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
</font><font color="#000000" face="Tahoma"> <span class="style7">เดือน</span></font><font color="#000000" size="2" face="Tahoma">
<select name="mMonth1" class="select" id="mMonth1" >
<?php
$Date_start= $rss[Date_start];
$yearthai = explode("-",$Date_start);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
</font><font color="#000000" face="Tahoma"><span class="style7">ปี พ.ศ.</span></font><font color="#000000" size="2" face="Tahoma">
<input name="mYear1" type="text" class="style1" id="mYear1" value="<? echo $mYear ?>" size="3" maxlength="4" />
</font>...ถึงวันที่<font color="#000000"> </font>..<font color="#000000" size="2" face="Tahoma">
<select name="mDate2" class="select" id="mDate2" >
<?php
$Date_finish = $rss[Date_finish];
$yearthai = explode("-",$Date_finish);
$mDate = intval($yearthai[2]);
$mMonth = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
for($i=0;$i<=31;$i++)
{
if( $i == 0)
echo"\n\t<option value=\"$mDate\" selected>$mDate</option>\n ";
else
echo"\n\t<option value=\"$i\">$i</option>\n ";
}
?>
</select>
</font><font color="#000000" face="Tahoma"> <span class="style7">เดือน</span></font><font color="#000000" size="2" face="Tahoma">
<select name="mMonth2" class="select" id="mMonth2" >
<?php
$Date_finish= $rss[Date_finish];
$yearthai = explode("-",$Date_finish);
$mDate= intval($yearthai[2]);
$Month = intval($yearthai[1]);
$mYear = intval($yearthai[0]);
$mMonth = $Month;
$CMonth = TxtThaiMonth($Month);
for($i=-1;$i<=11;$i++)
{
$a = $i+1;
if( $a == 0)
echo"\n\t<option value=\"$mMonth\" selected>$CMonth</option>\n ";
else
echo"\n\t<option value=\"$a\">$ThaiMonth[$i]</option>\n ";
}
// getThaiMonth();
?>
</select>
</font><font color="#000000" face="Tahoma"><span class="style7">ปี พ.ศ.</span></font><font color="#000000" size="2" face="Tahoma">
<input name="mYear2" type="text" class="style1" id="mYear2" value="<? echo $mYear ?>" size="3" maxlength="4" />
</font><font color="#003366" size="2" face="Tahoma"> </font><font color="#003366" face="Tahoma"> <span class="style7">.. </span></font> <span class="style7"><font color="#000000" face="Tahoma"> </font></span>มีกำหนด<font color="#0000FF" size="2" face="Tahoma">
<input name="Day" type="text" id="Day" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: black 1px dashed" value="<? echo $rss[Day] ?>" size="2" maxlength="2" />
</font>.วัน</td>
</tr>
<tr height="31">
<td height="31" colspan="2"><span class="style1">ปีงบประมาณ<span class="style5">*
<select name="Year_std-1" id="Year_std-1">
<option value="2551" <?php if($rss['Year_std']=="2551"){ echo "selected" ; } ?> >2551</option>
<option value="2552"<?php if($rss['Year_std']=="2552"){ echo "selected" ; } ?> >2552</option>
<option value="2553"<?php if($rss['Year_std']=="2553"){ echo "selected" ; } ?> >2553</option>
<option value="2554"<?php if($rss['Year_std']=="2554"){ echo "selected" ; } ?> >2554</option>
</select>
</span></span></td>
<td> </td>
<td colspan="3" align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left"> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left"> </td>
<td></td>
<td></td>
<td></td>
</tr>
<tr height="31">
<td height="31" colspan="2" align="left"> </td>
<td> </td>
<td colspan="2">ลงชื่อ .................................................</td>
<td></td>
</tr>
<tr height="29">
<td height="29"> </td>
<td> </td>
<td> </td>
<td colspan="2"><div align="center">(<font color="#003366" size="2" face="Tahoma">..</font><font size="2" face="Tahoma">
<?php
$Teacher_code = $rss["Teacher_code"];
$sql = "Select * From personal_tb Where Teacher_code ='$Teacher_code' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[First_name]$rs2[Teacher_name] $rs2[Teacher_lastname]";
?>
</font>..) </div></td>
<td></td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left"> </td>
<td colspan="2"><div align="left"><font face="Tahoma"><span class="style7">ตำแหน่ง</span></font><font size="2" face="Tahoma"> <? echo $rs2[Gover_pos]?></font></div></td>
<td></td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"><label>
<input name="Flag1" type="checkbox" id="Flag1" <?php if (!(strcmp("$rss[Flag1]","1"))) {echo "checked";} ?> value="1" />
อนุญาต
<input name="Flag1" type="checkbox" id="Flag1" <?php if (!(strcmp("$rss[Flag1]","2"))) {echo "checked";} ?> value="2" />
ไม่อนุญาต</label></td>
<td align="left"> </td>
<td colspan="3" align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="3" align="left">ลงชื่อ.............................................หัวหน้าภาค/ฝ่าย.</td>
<td colspan="3" align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"><div align="center">(<font color="#003366" size="2" face="Tahoma">..</font><font size="2" face="Tahoma">
<?php
$TeacherId = $rss["TeacherId"];
$sql = "Select * From personal_tb Where TeacherId='1' ";
$result1 = mysql_query($sql) or die("Error".mysql_error());
$rs2 = mysql_fetch_array($result1);
echo "$rs2[First_name]$rs2[Teacher_name] $rs2[Teacher_lastname]";
?>
</font>..) </div></td>
<td align="left"> </td>
<td align="left"><div align="center">คำสั่ง</div></td>
<td align="left"> </td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"><div align="left"><font face="Tahoma"><span class="style7">ตำแหน่ง</span></font><font size="2" face="Tahoma"> <? echo $rs2[Gover_pos]?></font></div></td>
<td align="left"> </td>
<td align="left"> </td>
<td align="left"><label>
<input name="Flag2" type="checkbox" id="Flag2" <?php if (!(strcmp("$rss[Flag2]","1"))) {echo "checked";} ?> value="1" />
</label>
อนมัติ
<input name="Flag2" type="checkbox" id="Flag2" <?php if (!(strcmp("$rss[Flag2]","2"))) {echo "checked";} ?> value="2" />
ไม่อนุมัติ</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="left"> ลงชื่อ.........................................
..</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="28" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="left">ตำแหน่ง. .....................................</td>
<td align="left"> </td>
</tr>
<tr height="29">
<td height="29" colspan="2" align="left"> </td>
<td align="left"> </td>
<td colspan="2" align="left"> วันที่..........เดือน......................พ.ศ..........
</td>
<td align="left"> </td>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value=" แก้ไขข้อมูล" />
</label>
<label></label>
<input name="Training_code" type="hidden" id="Training_code" value="<? echo $rss["Training_code"]?>" />
<input name="Teacher_code" type="hidden" id="Teacher_code" value="<? echo $rss["Teacher_code"]?>" />
</p>
</form>
</div>
</label>
</fieldset><br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
</font></td>
</tr>
</table>
|