Hacked By AnonymousFox

Current Path : C:/AppServ/www/stat1/
Upload File :
Current File : C:/AppServ/www/stat1/5.php

<?
include"connect.php";
include("function.php");
include("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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>:: Application เก็บสถิติข้อมูลบุคลากร ::</title>
<link href="../register_thaimed/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
}
-->
</style>

 	                <!-- import the calendar script -->
	                <link rel="stylesheet" type="text/css" href="../register_thaimed/myCalendarStyle.css">
	                <script type="text/javascript" src="../register_thaimed/calendar/lib/calendar.js"></script>
	                <script type="text/javascript" src="../register_thaimed/calendar/lib/lang/calendar-th.js"></script>
	                <script type="text/javascript" src="../register_thaimed/calendar/lib/loadcalendar.js"></script>
                    <style type="text/css">
<!--
.style31 {	font-size: 16px;
	font-weight: bold;
}
.style31 {	font-size: 16px;
	font-weight: bold;
}
.inputlogin {
background:#056839;

font-family:Tahoma, Geneva, sans-serif;

font-size:16px;  

padding: 5px 10px 5px 10px;

color: #fff;

font-weight: bold;

-moz-border-radius: 6px;

-webkit-border-radius: 6px;

-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);

-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);

text-shadow: 0 -1px 1px rgba(0,0,0,0.25);

border-bottom: 1px solid rgba(0,0,0,0.25);

cursor: pointer;

border-left:none;

border-top:none;

margin:10px 0 10px 0;
}
-->
                    </style>
<script language="javascript">
function show_table(id) {
if(id == 1) { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2 
document.getElementById("table1").style.display = "";
document.getElementById("table2").style.display = "none";

} else if(id == 2) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("table1").style.display = "none";
document.getElementById("table2").style.display = "";
}else if(id == 3) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("table1").style.display = "none";
document.getElementById("table2").style.display = "";
}else if(id == 4) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("table1").style.display = "none";
document.getElementById("table2").style.display = "";
}
}

function show_table1(id) {
if(id == 1) { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2 
document.getElementById("tableo").style.display = "none";
} else if(id == 2) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("tableo").style.display = "none";
}else if(id == 3) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("tableo").style.display = "none";
}else if(id == 4) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("tableo").style.display = "";
document.getElementById('inputOther').focus();
}
}
function show_table3(id) {
if(id == 1) { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2 
document.getElementById("tableo1").style.display = "none";
} else if(id == 2) { // ถ้าเลือก radio button 2 ให้โชว์ table 2 และ ซ่อน table 1 
document.getElementById("tableo1").style.display = "none";
}
}

function show_tableadd(id) {
if(id == 1) { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2 
document.getElementById("tableadd1").style.display = "none";

} 
if(id == 2) { // ถ้าเลือก radio button 1 ให้โชว์ table 1 และ ซ่อน table 2 
document.getElementById("tableadd1").style.display = "";

} 

}
function CheckNum(){
		if (event.keyCode < 48 || event.keyCode > 57){
		      event.returnValue = false;
	    	}
	}
</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="49%" height="100" align="right" bgcolor="#C6ECD9"><img src="logo.png" width="120" height="120" onclick="window.location='datalist.php'" style="cursor:pointer"  /></td>
    <td width="51%" align="left" bgcolor="#C6ECD9"><span class="style31"><strong>Application  &#3648;&#3585;&#3655;&#3610;&#3626;&#3606;&#3636;&#3605;&#3636;&#3586;&#3657;&#3629;&#3617;&#3641;&#3621;&#3610;&#3640;&#3588;&#3621;&#3634;&#3585;&#3619;</strong></span></td>
  </tr>
  <tr>
    <td colspan="2" align="center" valign="top" bgcolor="#B9CADA"><br />
      <table width="98%" border="1" align="center" style="border-collapse:collapse" bordercolor="#8EADBF" cellpadding="10">
        
          <tr>
            <td width="83%" valign="top" bgcolor="#FFFFFF"><div align="center">
              <input type="submit" name="button22" id="button22" class="inputlogin" value="กลับหน้าหลัก" onclick="window.location='menu.php'" />
            </div>
            <table width="95%" border="1" cellpadding="10" cellspacing="1" style="border-collapse:collapse" bordercolor="#CCCCCC" align="center">
              <tr>
                <td bgcolor="#C6ECD9"><strong>แก้ไขข้อมูลการศึกษา  / ฝึกอบรม /ประชุม / สัมมนา / ดูงาน</strong></td>
              </tr>
            </table>
              <p></a></p>
            <p>&nbsp;</p>
<?
## Default Value ############################################
$SystemModule_defaultPageSize = 30;
$SystemModule_defaultPageShow = 1;
$SystemModule_MaxPage = 20;
$SystemModule_ReduceRange = 10; 		// +,- from current page show
$SystemModule_ASCDESC = "DESC";
$SystemModule_OrderBy = $myModule_Table."_Order";

#########################################################

# Check to set default value #########################
if($PageSize=="") { $PageSize = $SystemModule_defaultPageSize; }
if($PageShow=="") { $PageShow = $SystemModule_defaultPageShow; }
//if($ASCDESC=="") { $ASCDESC = "DESC"; } 
$ASCDESC = "DESC";
if($OrderBy=="") { $OrderBy = $myModule_Table."_Order"; } 
//$O	Lname LIKE '%$PageSearch%' ) ";
if($PageSearch!="") { $PageSearch=trim($PageSearch); }

# Count total record size #########################
if($PageSearch=="") { //debug($System_Session_Language);
	$sql = "SELECT * FROM stat";
} else {
	$sql = "SELECT * FROM stat WHERE 1 AND (Name LIKE '%$PageSearch%' OR 
	Surname LIKE '%$PageSearch%' ) ";
}

$Query=mysql_query($sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\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=$sql." ORDER BY ID DESC LIMIT $RecordStart , $PageSize";
$Query=mysql_query($sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$RecordCount=MYSQL_NUMROWS($Query);
?>
<table width="95%" height="26" border="0" align="center" cellpadding="0" cellspacing="0" class="table_toolbar">
  <form action="../register_thaimed/?" method="post" name="myToolbarForm" id="myToolbarForm" onSubmit="return false;">
		<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$inputGroupID?>">
		<input type="hidden" id="GroupID" name="GroupID" value="<?=$GroupID?>">
		<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
		<tr>
		  <td align="left" valign="top">&nbsp;</td>
		  <td valign="bottom">&nbsp;</td>
		  <td align="right" valign="bottom">&nbsp;</td>
		  <td align="right" valign="top">&nbsp;</td>
		  </tr>
		<tr> 
		<td width="5" align="left" valign="top">&nbsp;</td>
		<td valign="bottom"> <table border="0" cellpadding="2" cellspacing="0" class="toolbar">
		<tr> 
		<td width="10">&nbsp;</td>
		<td>Page</td>
		<td> 
		<? 
		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";
		}
		?>		</td>
		<td>of 
		<?=$NoOfPage?>		</td>
		<td width="10">&nbsp;</td>
		<td>Page size</td>
		<td> <input name="toolbarPageSize" type="text" class="input_center" id="toolbarPageSize" value="<?=$PageSize?>" size="3" maxlength="3"></td>
		<td> <input name="btChangePageSize" type="button" class="button_normal" id="btChangePageSize" value=" Go " onClick="

		if(isNaN(document.myToolbarForm.toolbarPageSize.value*1)) {
		document.myToolbarForm.toolbarPageSize.value='<?=$PageSize?>';
		document.myToolbarForm.toolbarPageSize.focus();
		return false;
		}
		if(document.myToolbarForm.toolbarPageSize.value<=0) {
		document.myToolbarForm.toolbarPageSize.value='<?=$PageSize?>';
		document.myToolbarForm.toolbarPageSize.focus();
		return false;
		}
		document.myForm.PageSize.value=document.myToolbarForm.toolbarPageSize.value; 
		document.myForm.submit(); 
		"> </td>
		</tr>
		</table></td>
		<td align="right" valign="bottom"> <table border="0" cellpadding="0" cellspacing="0">
		<tr> 
		<td>Found 
		<?=$TotalRecordCount?>
		record(s)</td>
		<td width="10">&nbsp;</td>
		<? if($PageShow>1) { ?>
		<? } else { ?>
		<? } ?>
		<? if($PageShow>1) { ?>
		<? } else { ?>
		<? } ?>
		<? if($PageShow<$NoOfPage) { ?>
		<? } else { ?>
		<? } ?>
		<? if($PageShow<$NoOfPage) { ?>
		<? } else { ?>
		<? } ?>
		</tr>
		</table></td>
		<td width="5" align="right" valign="top">&nbsp;</td>
		</tr>
		</form>
		</table><table width="95%" border="0" align="center" cellpadding="0" cellspacing="1">
		<tr> 
		<td bgcolor="#FFFFFF"> <table width="100%" height="24" border="0" cellpadding="3" cellspacing="0" class="table_button_bottom2">
          <form action="?" method="post" name="mySearchForm" id="mySearchForm" onsubmit="return false;">
            <input name="SystemModuleKey2" type="hidden" id="SystemModuleKey2" value="<?=$inputGroupID?>" />
            <input name="SystemMenuID2" type="hidden" id="SystemMenuID2" value="<?=$SystemMenuID?>" />
            <input type="hidden" id="GroupID2" name="GroupID2" value="<?=$GroupID?>" />
            <tr align="right">
              <td colspan="4" align="right" bgcolor="#FFFFFF" class="table_footer"><table border="0" cellpadding="2" cellspacing="0" class="table_footer">
                  <tr>
                    <td>ค้นหาชื่อหรือนามสกุล
                      <input name="toolbarPageSearch" type="text" class="input_left" id="toolbarPageSearch" value="<?=$PageSearch?>" size="20" maxlength="50" /></td>
                    <td><input name="btPageSearch" type="button" class="inputlogin" id="btPageSearch" value="ค้นหาข้อมูล" onclick="
		document.myForm.PageSearch.value=document.mySearchForm.toolbarPageSearch.value;
		document.myForm.submit();
		" /></td>
                  </tr>
              </table></td>
            </tr>
          </form>
		  </table>
		  <table width="100%" border="1" cellpadding="10" cellspacing="1" style="border-collapse:collapse" bordercolor="#CCCCCC">
		<form action="?" method="post" name="myForm" id="myForm">
		<input name="SystemModuleKey" type="hidden" id="SystemModuleKey" value="<?=$inputGroupID?>">
		<input name="SystemMenuID" type="hidden" id="SystemMenuID" value="<?=$SystemMenuID?>">
		<input name="action" type="hidden" id="action">
		<input type="hidden" id="GroupID" name="GroupID" value="<?=$GroupID?>">
		<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="inputStartDateSearch" type="hidden" id="inputStartDateSearch" value="<?=$inputStartDateSearch?>">
		<input name="inputExpireDateSearch" type="hidden" id="inputExpireDateSearch" value="<?=$inputExpireDateSearch?>">
		<input name="SelectStatus" type="hidden" id="SelectStatus">
		<input name="SelectMarquee" type="hidden" id="SelectMarquee">
		<input name="SelectMove" type="hidden" id="SelectMove">
		<tr align="center" bgcolor="#083d69">
		  <td width="146" bgcolor="#C6ECD9"><strong>ปีงบประมาณ</strong></td>
		  <td width="161"  bgcolor="#C6ECD9"><strong>ชื่อ-สกุล</strong></td>
		  <td width="165" bgcolor="#C6ECD9"><strong>ชื่อโครงการ/หลักสูตร</strong></td>
		  <td width="185" bgcolor="#C6ECD9"><strong><font class="TableHead">วัน - เวลา </font></strong></td>
		  <td width="155" bgcolor="#C6ECD9"><div align="center"><strong>ประเทศ</strong></div></td>
		  <td width="135" bgcolor="#C6ECD9"><strong>ประเภทโครงการ</strong></td> 
		<td width="155"  bgcolor="#C6ECD9"><strong>แก้ไขข้อมูลการศึกษา  / ฝึกอบรม /ประชุม / สัมมนา / ดูงาน</strong></td>
		</tr>
		<?
		$RecordCount=mysql_num_rows($Query);
		$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?>" onMouseOver="this.className='table_rowover'" onMouseOut="this.className='<?=$myClassRow?>'">
		  <td width="146" height="46" align="center"><span class="text_bold">
            <?=$Row[Year]?>
          </span></td>
		  <td width="161" height="46" align="center" valign="middle"><span class="text_bold">
            <?
			 $sqls="select * from staff where Id='$Row[Idrefer]'";
$querys=mysql_query($sqls);
$rows=mysql_fetch_array($querys);
?>
			<?=$rows[Prefix]?><?=$rows[Name]?>    <?=$rows[Lname]?>
          </span></td>
		  <td width="165" height="46" align="center" valign="middle"><span class="text_bold">
            <?=$Row[Depart]?>
          </span></td>
		  <td height="46"  align="center"><span class="text_bold">
		    <?=$Row[Place]?> -  <?=$Row[Type]?>
		  </span></td>
		  <td height="46" align="center" valign="middle"><span class="text_bold">
            <?=$Row[Project]?>
          </span></td>
		  <td height="46" align="center" valign="middle"><span class="text_bold">
            <?=$Row[Surname]?>
          </span></td>
		  <td height="46" align="center">
		  <table border="0" cellspacing="0" cellpadding="1">
		    <tr align="center" valign="bottom"> 
		      <td><a href="register-edit.php?Id=<?=$Row[Id]?>">
		        <img src="ico425.gif" alt="Edit" width="16" height="16" border="0" onMouseOver="this.style.cursor='hand'"></a></td>
		      </tr>
		    </table></td>
		</tr>
		<?
		$index++;
		}
		} else {  ?>
		<tr class="table_row1"> 
		<td height="80" colspan="7" align="center"> Data not found!</td>
		</tr>
		<? } ?>
		<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="<?=$index-1?>">
		</form>
		</table>		</td>
		</tr>
		</table>
		<p>&nbsp;</p></td>
          </tr>
      </table>
      <br /></td>
  </tr>
</table>
</body>
</html>

Hacked By AnonymousFox1.0, Coded By AnonymousFox