Hacked By AnonymousFox
<?
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 เก็บสถิติข้อมูลบุคลากร</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> </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 staff";
} else {
$sql = "SELECT * FROM staff WHERE 1 AND (Name LIKE '%$PageSearch%' OR
Lname 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"> </td>
<td valign="bottom"> </td>
<td align="right" valign="bottom"></td>
<td align="right" valign="top"> </td>
<div align="right"><input name="btPageSearch2" type="button" class="inputlogin" id="btPageSearch2" value="เพิ่มข้อมูลใหม่" onclick="window.location='1.php'" />         </div>
</tr>
<tr>
<td width="5" align="left" valign="top"> </td>
<td valign="bottom"> <table border="0" cellpadding="2" cellspacing="0" class="toolbar">
<tr>
<td width="10"> </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"> </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"> </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"> </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="130" align="center" bgcolor="#C6ECD9"><strong>คำนำหน้า</strong></td>
<td width="128" bgcolor="#C6ECD9"><strong>ชื่อ</strong></td>
<td width="133" bgcolor="#C6ECD9"><strong>นามสกุล</strong></td>
<td width="110" bgcolor="#C6ECD9"><strong><font class="TableHead">ตำแหน่ง</font></strong></td>
<td width="217" bgcolor="#C6ECD9"><div align="center"><strong>ระดับ</strong></div></td>
<td width="109" bgcolor="#C6ECD9"><strong>กลุ่มงาน</strong></td>
<td width="86" bgcolor="#C6ECD9"><strong>ฝ่าย</strong></td>
<td width="110" bgcolor="#C6ECD9"><strong>ส่วนราชการ</strong></td>
<td width="71" 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="130" height="46" align="center"><span class="text_bold">
<? if($Row[Prefix]=="1"){ echo"นาย"; } if($Row[Prefix]=="2"){ echo"นางสาว"; }if($Row[Prefix]=="3"){ echo"นาง"; }?>
</span></td>
<td width="128" height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Name]?>
</span></td>
<td width="133" height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Lname]?>
</span></td>
<td height="46" > <span class="text_bold">
<?=$Row[Position]?>
</span><br></td>
<td height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Level]?>
</span></td>
<td height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Gwork]?>
</span></td>
<td height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Dept]?>
</span></td>
<td width="110" height="46" align="center" valign="middle"><span class="text_bold">
<?=$Row[Part]?>
</span></td>
<td height="46" align="center">
<table border="0" cellspacing="0" cellpadding="1">
<tr align="center" valign="bottom">
<td><a href="1edit.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="9" align="center"> Data not found!</td>
</tr>
<? } ?>
<input name="TotalCheckBoxID" type="hidden" id="TotalCheckBoxID" value="<?=$index-1?>">
</form>
</table> </td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
<br /></td>
</tr>
</table>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox