Hacked By AnonymousFox

Current Path : C:/AppServ/www/new_msd2/webengine/system-01/
Upload File :
Current File : C:/AppServ/www/new_msd2/webengine/system-01/user_information.php

<? 
include("../lib/session.php"); 
include("../lib/config.php");
include("../lib/connect.php");
include("../lib/function.php");
?>
<html><!-- InstanceBegin template="/Templates/WebEngine-Adminpanel1.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title><?=$System_Variable_Title?></title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> 
<script language="JavaScript" 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/mystyle.css" rel="stylesheet" type="text/css">  
</head> 
<body bgcolor="#E9E6DF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../../images/thai.gif','../../images/eng.gif','../../images/chaina.gif','../../images/object/topbar-thai-over.gif','../../images/object/topbar-english-over.gif','../images/bullet/lang_over_02_1.gif','../images/bullet/lang_over_01_1.gif','../images/bullet/lang_over_03.gif')">

<table width="95%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td background="../../images/main/main-t-bg.gif" bgcolor="#831B0E"><table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="867" valign="top"><img src="../../images/main/logo.gif" width="273" height="70" alt="กระทรวงศึกษาธิการ" />&nbsp;</td>
            <td width="115" align="right" valign="top"><a href="../system/setlanguage.php?setlang=Thai&&action=setlanguage" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('TopBarTh','','../images/bullet/lang_over_04.gif',1)"><? if($System_Session_Language=="Thai"){$Use = "_over";} else { $Use = "_nor";}?><img src="../images/bullet/lang<?=$Use?>_04.gif" alt="Thai Language" name="TopBarTh" border="0"></a><a href="../system/setlanguage.php?setlang=Eng&&action=setlanguage" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('TopBarEn','','../images/bullet/lang_over_03.gif',1)"><? if($System_Session_Language=="Eng"){$Use = "_over";} else { $Use = "_nor";}?>
                <img src="../images/bullet/lang<?=$Use?>_03.gif" alt="English Language" name="TopBarEn"border="0"></a> </td>
          </tr>
    </table></td><td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
  </tr>
</table>
<table width="95%" height="6" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td width="587" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td align="center" valign="top"><table width="100%" height="480" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="215" align="center" valign="top" bgcolor="#9C9994" style="background-repeat:repeat-x; "><br>
            <!--Start Menu ----------------------------------------------------------------------------------->
        	<? if(strlen($System_Session_User_ID)==0) { ?>
            <? if($alert=="yes") { ?>
            <table width="90%" border="0" cellpadding="1" cellspacing="0" class="messagebox_alert">
              <form name="myLoginForm" method="post" action="../../system/login.php" onSubmit="
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}">
                <tr align="center"> 
                  <td height="40" colspan="2">Incorrect your<br>
                    UserName or Password.</td>
                </tr>
              </form>
            </table>
            <br>
            <? } ?>            
            <table width="97%" height="18" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="8"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td ><strong><font color="#FFFFFF">&nbsp;<img src="../../images/object/bar-icon.gif" width="9" height="5" align="absmiddle">&nbsp;เข้าสู่ระบบ</font></strong></td>
              </tr>
            </table> 
            <table width="100%" height="3" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td><img src="../../images/blank.gif" width="1" height="1"></td>
              </tr>
            </table>
            <table width="97%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DFDFDF">
              <tr> 
                <td width="6" height="6"><img src="../../images/object/dot-border-1.gif" width="6" height="6"></td>
                <td height="6" background="../../images/object/dot-border-2.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td width="6" height="6"><img src="../../images/object/dot-border-3.gif" width="6" height="6"></td>
              </tr>
              <tr> 
                <td width="6" background="../../images/object/dot-border-4.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td align="center" valign="top">
<table width="100%" height="120" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="80" align="center" valign="middle"> 
                        <form name="myLoginForm" method="post" action="../system/login.php" onSubmit=" 
with(document.myLoginForm) {
	if(inputUserName.value=='') {
		inputUserName.focus();
		return false;
	}
	if(inputPassword.value=='') {
		inputPassword.focus();
		return false;
	}
}
				">
                          <table border="0" cellspacing="0" cellpadding="1">
                            <tr> 
                              <td height="18" colspan="2" valign="bottom"><font color="#990000"><strong>Username</strong></font><font color="#990000">&nbsp;</font></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td> <input name="inputUserName" type="text" class="input_left" id="inputUserName" size="20" maxlength="50"></td>
                            </tr>
                            <tr> 
                              <td height="18" colspan="2" valign="bottom"><font color="#990000"><strong>Password</strong></font><font color="#990000">&nbsp;</font></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td><input name="inputPassword" type="password" class="input_left" id="inputPassword" size="20" maxlength="50"></td>
                            </tr>
                            <tr> 
                              <td width="10">&nbsp;</td>
                              <td align="right"><input name="Submit" type="submit" class="button_60" value="LogIn"></td>
                            </tr>
                          </table>
                        </form></td>
                    </tr>
                  </table></td>
                <td width="6" background="../../images/object/dot-border-5.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
              </tr>
              <tr> 
                <td width="6" height="6"><img src="../../images/object/dot-border-6.gif" width="6" height="6"></td>
                <td height="6" background="../../images/object/dot-border-7.gif"><img src="../../images/blank.gif" width="1" height="1"></td>
                <td width="6" height="6"><img src="../../images/object/dot-border-8.gif" width="6" height="6"></td>
              </tr>
            </table>
            <br>
            <? } else { ?>
            <? if($SystemMenuID=="") { $SystemMenuID=-1; } ?>
            <table width="205" height="21" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/bg-search.gif" style="background-repeat:repeat-x; ">
              <tr>
                <td width="5%" >&nbsp;</td> 
                <td width="95%" height="43" ><strong><font color="#FFFFFF">&nbsp;<img src="../../images/object/bar-icon.gif" width="9" height="5" align="absmiddle">&nbsp;เมนูหลัก</font></strong></td>
              </tr>
            </table> 
            <table width="205" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td bgcolor="#F3F3F3"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <form action="../../Templates/" method="get" name="myMenuForm" id="myMenuForm">
                      <input type="hidden" name="SystemMenuID">
                      <input type="hidden" name="SystemModuleKey">
                      <input type="hidden" name="System_EXID" value="<?=$System_EXID?>">
                    </form>
                    <? if($System_Session_User_ID>0) { ?> 
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr>
                      <td height="1" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../home/index.php'; document.myMenuForm.submit();">
					  <table width="100%" height="24" border="0" cellpadding="2" cellspacing="0" class="menu_table_text">
        <tr>
          <td width="22" align="center"><img src="../images/icon/ico516.gif" width="16" height="14"></td>
          <td>Home</td>
        </tr>
    </table></td>
                    </tr>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../system/user_information.php'; 
document.myMenuForm.SystemMenuID.value=-3;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico559.gif" width="15" height="16"></td>
                            <td> 
                              <? if($SystemMenuID==-3) { ?>
                              <b><font color="#990000">User Information</font></b> 
                              <? } else { ?>
                              User Information 
                              <? } ?>
                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <!---------------------------------------------------------------------------->
                    <? if($System_Session_Level=="Admin") { ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../system/user_management.php'; 
document.myMenuForm.SystemMenuID.value=-4;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico051.gif" width="13" height="19"></td>
                            <td> 
                              <? if($SystemMenuID==-4) { ?>
                              <b><font color="#990000">Manage User Admin</font></b> 
                              <? } else { ?>
                              Manage User Admin 
                              <? } ?>
                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <!---------------------------------------------------------------------------->
                    <? if($System_Session_User_ID==0) { ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
document.myMenuForm.action='../mod_dmenu/index.php'; 
document.myMenuForm.SystemMenuID.value=-2;
document.myMenuForm.submit();
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico509.gif" width="16" height="13"></td>
                            <td> 
                              <? if($SystemMenuID==-2) { ?>
                              <b><font color="#990000">Menu Bulider</font></b> 
                              <? } else { ?>
                              Menu Bulider 
                              <? } ?>
                            </td>
                          </tr>
                        </table></td>
                    </tr>
                    <? } ?>
                    <? if($System_Session_User_ID>0) { ?>
                    <?
$sql = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID=0 AND ".$System_TableName_Menu."_Language = '$System_Session_Language' ORDER BY ".$System_TableName_Menu."_Order ASC ";
$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
$MenuRecordCount=MYSQL_NUMROWS($Query);

$index=1;
if($MenuRecordCount>0) {
	while($index<$MenuRecordCount+1) {
		$Row=MYSQL_FETCH_ARRAY($Query);
		
		// checking for User Permission
		
		$myUserID = $System_Session_User_ID;
		$myMenuID = $Row[$System_TableName_Menu."_ID"];
		$myMenuPermission = getUserPermissionOnMenu($myUserID,$myMenuID);

		if($Row[$System_TableName_Menu."_Type"]=="Group") {
			$isUserOnGroup=isUserOnGroup($myUserID,$myMenuID);
		} else {
			$isUserOnGroup=1;
		}
		if( strlen($myMenuPermission)>0 && $myMenuPermission!="NA" && $isUserOnGroup>0) {
		?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="
<? if($Row[$System_TableName_Menu."_ModuleType"]=="Group") { ?>
	menuHideSubShow('idMenuSub<?=$Row[$System_TableName_Menu."_ID"]?>');
<? } else { ?>
with(document.myMenuForm) {
	SystemMenuID.value=<?=$Row[$System_TableName_Menu."_ID"]?>; 
	SystemModuleKey.value='<?=$Row[$System_TableName_Menu."_ModuleKey"]?>'; 
	action='<?=$Row[$System_TableName_Menu."_LinkPath"]?>'; 
	submit();
}
<? } ?>
"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><? if($Row[$System_TableName_Menu."_Icon"]==""){ ?>
                              <img src="../images/icon/145.gif">							<? }else{ ?>
							<img src="<?=$Row[$System_TableName_Menu."_Icon"]?>"><? } ?></td>
                            <td> 
                              <? if($SystemMenuID==$Row[$System_TableName_Menu."_ID"]) { ?>
                              <b><font color="#990000"> 
                              <?=$Row[$System_TableName_Menu."_Name".$System_Session_Language]?>
                              </font></b> 
                              <? } else { ?>
                              <?=$Row[$System_TableName_Menu."_Name".$System_Session_Language]?>
                              <? } ?>
                            </td>
                            <? if($Row[$System_TableName_Menu."_ModuleType"]=="Group") { ?>
                            <td width="14" align="left"><img src="../images/arrow1.gif" width="13" height="10"></td>
                            <? } ?>
                          </tr>
                        </table></td>
                    </tr>
                    <?
		$ParentID=$Row[$System_TableName_Menu."_ID"];
		
		$sql1 = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ParentID='$ParentID' ORDER BY ".$System_TableName_Menu."_Order ASC ";
		$Query1=MYSQL_DB_QUERY($System_DataBase_Name,$sql1) OR DIE("Error: เกิดความผิดพลาด <br>$sql1<br>\n");
		$RecordCount1=MYSQL_NUMROWS($Query1);
	
		// checking for this sub menu active
		$sql2 = "SELECT * FROM ".$System_TableName_Menu." WHERE ".$System_TableName_Menu."_ID='$SystemMenuID' AND ".$System_TableName_Menu."_ParentID='$ParentID' ";
		
		$Query2=MYSQL_DB_QUERY($System_DataBase_Name,$sql2) OR DIE("Error: เกิดความผิดพลาด <br>$sql2<br>\n");
		$isActiveMenu=MYSQL_NUMROWS($Query2);

		if($RecordCount1>0) {
		?>
                    <tr id="idMenuSub<?=$ParentID?>" <? if($isActiveMenu==0) { ?> style="display:none" <? } ?>> 
                      <td height="22" align="left" class="menu_table_bg_sub" > 
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr height="8" >
                            <td height="8" background="../images/rare1.gif" bgcolor="#EACFD3" style="background-position:top; background-repeat:repeat-x; "><img src="../images/spacer.gif" width="24" height="8" /></td>
</tr>
</table><?
		$index1=1;
		
		while($index1<$RecordCount1+1) {
			$Row1=MYSQL_FETCH_ARRAY($Query1);
			$myID=$Row1[$System_TableName_Menu."_ID"];

			// checking for User Permission
			$myUserID = $System_Session_User_ID;
			$myMenuID = $myID;
			$myMenuPermission = getUserPermissionOnMenu($myUserID,$myMenuID);
			if( strlen($myMenuPermission)>0 && $myMenuPermission!="NA") {

				?>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="menu_table_bg_sub" onMouseOver="this.className='menu_table_bg_oversub'; " onMouseOut="this.className='menu_table_bg_sub'; " >
                          <tr> 
                            <td width="4">&nbsp;</td>
                            <td width="171" align="left"><table width="100%" height="25" border="0" cellpadding="1" cellspacing="0"  
 onClick="
with(document.myMenuForm) {
	SystemMenuID.value=<?=$Row1[$System_TableName_Menu."_ID"]?>; 
	SystemModuleKey.value='<?=$Row1[$System_TableName_Menu."_ModuleKey"]?>'; 
	action='<?=$Row1[$System_TableName_Menu."_LinkPath"]?>'; 
	submit();
}
">
                                <tr> 
                                  <td width="22" align="left"><? if($Row1[$System_TableName_Menu."_Icon"]==""){ ?>-<? }else{ ?><img src="<?=$Row1[$System_TableName_Menu."_Icon"]?>"><? }?></td>
                                  <td align="left"> 
                                    <? if($SystemMenuID==$Row1[$System_TableName_Menu."_ID"]) { ?>
                                    <b><font color="#990000"> 
                                    <?=$Row1[$System_TableName_Menu."_Name".$System_Session_Language]?>
                                    </font></b> 
                                    <? } else { ?>
							  <font color="#6666AA"><?=$Row1[$System_TableName_Menu."_Name".$System_Session_Language]?></font>
                                    <? } ?>                                  </td>
                                </tr>
                            </table></td>
                          </tr>
                          <tr align="left">
                            <td colspan="2"><img src="../images/line3.gif" width="195"></td>
                          </tr>
                        </table>
                      <? 
					} // if Permission
					$index1++;
				} // while
			 } // if RecordCount1
			 ?>                      </td>
                    </tr>
                    <?
		} // if myMenuPermission
		$index++;
	} // while
} // if RecordCount
?>
                    <? } ?>
                    <tr> 
                      <td height="1" class="menu_table_bg_hilight"><img src="../../images/blank.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td height="22" class="menu_table_bg_normal" onMouseOver="this.className='menu_table_bg_over'; " onMouseOut="this.className='menu_table_bg_normal'; " onClick="document.myMenuForm.action='../system/logout.php'; document.myMenuForm.submit();"><table width="100%" height="25" border="0" cellpadding="2" cellspacing="0">
                          <tr> 
                            <td width="22" align="center"><img src="../images/icon/ico569.gif" width="13" height="13"></td>
                            <td>Logout</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
            </table></td>
              </tr>
            </table>
            
            <table width="205" height="30" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/bg-search2.gif">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
            <? } ?>
            <script language="JavaScript" type="text/JavaScript">
function menuHideSubShow(myIdName) {
	if(document.getElementById(myIdName).style.display=='none') { 
		document.getElementById(myIdName).style.display=''
	} else {
		document.getElementById(myIdName).style.display='none';
	}
}
			  </script>
          <!--End Menu ----------------------------------------------------------------------------------->          </td>
          <td align="center" valign="top" bgcolor="#E9E6DF"> 
            <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="16" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td align="center" valign="top" bgcolor="#C4BDB1">&nbsp;</td>
        <td valign="top" bgcolor="#C4BDB1">&nbsp;</td>
      </tr>
      <tr>
        <td width="20" valign="top" background="../images/object/border_03.gif"><img src="../images/object/border_16.gif" width="20" height="83"></td>
        <td align="center" valign="top" bgcolor="#FFFFFF">
		   <? if(strlen($System_Session_User_ID)>0) { ?>
            <!-- InstanceBeginEditable name="Programmable Region" --><br>
            <table width="98%" height="22" border="0" cellpadding="2" cellspacing="0" class="table_header">
              <tr> 
                <td width="30" align="center"><img src="../images/icon/ico559.gif" width="15" height="16"></td>
                <td>User Information</td>
              </tr>
            </table>
            <br>
            <? 
//# Assign Database Table ###################################
$SystemModule_dbName = $System_TableName_Staff ;

//# Default Value ############################################
$SystemModule_defaultPageSize = 10;
$SystemModule_defaultPageShow = 1;
$SystemModule_MaxPage = 20;
$SystemModule_ReduceRange = 10; 		// +,- from current page show
$SystemModule_ASCDESC = "ASC";
$SystemModule_OrderBy = $SystemModule_dbName."_ID";

//########################################################
?>
            <? 
//########################################################
if ($action=="edit") { 
	$sql="SELECT * FROM ".$SystemModule_dbName." WHERE ".$SystemModule_dbName."_ID=".$System_Session_User_ID;
	$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
	$Row=MYSQL_FETCH_ARRAY($Query);
?>
            <script language="JavaScript" src="../lib/checkemail.js" type="text/JavaScript"></script>
            <table width="90%" border="0" cellpadding="0" cellspacing="1" class="table_border">
              <form action="?" method="post" name="myReturnForm" id="myReturnForm">
                <input name="action" type="hidden" id="action">
              </form>
              <form action="?" method="post" name="myForm" id="myForm" onSubmit=" if(!verifySubmit()) { return false; } ">
                <input name="action" type="hidden" id="action" value="update">
                <tr> 
                  <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1" >
                      <tr align="center"> 
                        <td height="24" colspan="2" align="center" class="table_header">Edit 
                          User Information</td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Personal 
                          Information</td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">FristName&nbsp;</td>
                        <td height="22" class="table_col2"> <input name="inputFName" type="text" class="input_left" id="inputFName" value="<?=$Row[$SystemModule_dbName."_FName".$System_Session_Language]?>" size="25" maxlength="100"></td>
                      </tr>
                      <tr>
                        <td width="140" height="22" align="right" class="table_col1">LastName&nbsp;</td>
                        <td height="22" class="table_col2"><input name="inputLName" type="text" class="input_left" id="inputLName" value="<?=$Row[$SystemModule_dbName."_LName".$System_Session_Language]?>" size="25" maxlength="100">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">E-Mail&nbsp; 
                        </td>
                        <td height="22" class="table_col2"><input name="inputEmail" type="text" class="input_left" id="inputEmail" value="<?=$Row[$SystemModule_dbName."_Email"]?>" size="25" maxlength="100"></td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Account 
                          Information</td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">User 
                          Name&nbsp; </td>
                        <td height="22" class="table_col2"> <span class="text_hilight"> 
                          <?=$Row[$SystemModule_dbName."_UserName"]?>
                          </span></td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">Password&nbsp;</td>
                        <td height="22" class="table_col2"> <input name="inputPassword" type="password" class="input_left" id="inputPassword" size="20" maxlength="50"> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" class="table_col1">Confirm 
                          Password&nbsp;</td>
                        <td height="22" class="table_col2"><input name="inputPasswordConfirm" type="password" class="input_left" id="inputPasswordConfirm" size="20" maxlength="50"></td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Access 
                          Level</td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" class="table_col1">Level&nbsp;</td>
                        <td height="22" class="table_col2"> 
                          <?=$Row[$SystemModule_dbName."_Level"]?>
                        </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_footer"> 
                          <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 isEqual(myObj1,myObj2) {
		if(myObj1.value==myObj2.value) { return true; }
		return false;
}
function verifySubmit() {
	with(document.myForm) {
		if(isBlank(inputName)) {	inputName.focus(); return false; }
		if(!isBlank(inputEmail)) {
			if(!isEmail(inputEmail.value) ) {	
				alert("Incorrect e-mail address format.");
				inputEmail.focus(); 
				return false; 
			}
		}
		if(!isBlank(inputPassword) || !isBlank(inputPasswordConfirm)) {	
			if(!isEqual(inputPassword,inputPasswordConfirm)) { alert("Your password and comfirmation is not matched!"); inputPassword.focus(); return false; }
		}
	}
	return true;
}
						</script> <input name="btSave" type="submit" class="button_80" id="btSave" value="Save"> 
                              </td>
                              <td> <input name="btCalcel" type="button" class="button_80" id="btCalcel" onClick="
document.myReturnForm.submit();
						" value="Cancel"> </td>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
              </form>
            </table>
            <? 
//########################################################
} else if ($action=="update") { 
		
		$myDateNow = getDateNow() . " " . getTimeNow();

		$sql = "UPDATE ".$SystemModule_dbName." SET 
		".$SystemModule_dbName."_FName".$System_Session_Language."='$inputFName', 
		".$SystemModule_dbName."_LName".$System_Session_Language."='$inputLName', 
		".$SystemModule_dbName."_Email='$inputEmail', ";
		if(strlen($inputPassword)>0) {
			$sql .= $SystemModule_dbName."_Password='$inputPassword',";
		}
		$sql .= $SystemModule_dbName."_CreateByID=$System_Session_User_ID ,
		".$SystemModule_dbName."_CreateDate='$myDateNow' WHERE ".$SystemModule_dbName."_ID=".$System_Session_User_ID;
		$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">
            </form>
            <script language="JavaScript" type="text/JavaScript"> document.myForm.submit(); </script>
            <? 
//########################################################
} else { 
	$sql="SELECT * FROM ".$SystemModule_dbName." WHERE ".$SystemModule_dbName."_ID=".$System_Session_User_ID;
	$Query=MYSQL_DB_QUERY($System_DataBase_Name,$sql) OR DIE("Error: เกิดความผิดพลาด <br>$sql<br>\n");
	$Row=MYSQL_FETCH_ARRAY($Query);
?>
            <table width="90%" border="0" cellpadding="0" cellspacing="1" class="table_border">
              <form action="?" method="post" name="myForm" id="myForm">
                <input name="action" type="hidden" id="action">
                <tr> 
                  <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1" >
                      <tr align="center"> 
                        <td height="24" colspan="2" align="center" class="table_header">User 
                          Information</td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Personal 
                          Information</td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">Name&nbsp;</td>
                        <td height="22" class="table_col2"> 
                          <?=$Row[$SystemModule_dbName."_FName".$System_Session_Language]?>&nbsp;&nbsp;<?=$Row[$SystemModule_dbName."_LName".$System_Session_Language]?>
                        </td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">E-Mail&nbsp; 
                        </td>
                        <td height="22" class="table_col2"> 
                          <?=$Row[$SystemModule_dbName."_Email"]?>
                        </td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Account 
                          Information</td>
                      </tr>
                      <tr> 
                        <td width="140" height="22" align="right" class="table_col1">User 
                          Name&nbsp; </td>
                        <td height="22" class="table_col2"> 
                          <?=$Row[$SystemModule_dbName."_UserName"]?>
                        </td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" class="table_col1">Password&nbsp;</td>
                        <td height="22" class="table_col2"><? if($System_Session_User_ID==$Row[$SystemModule_dbName."_ID"])echo $Row[$SystemModule_dbName."_Password"]; else echo "&lt;&lt;Don't Show &gt;&gt;"; ?>
                          </td>
                      </tr>
                      <tr> 
                        <td height="26" colspan="2" class="table_col3">&nbsp;&nbsp;<img src="../images/bullet/box21.gif" width="11" height="11">&nbsp;Access 
                          Level</td>
                      </tr>
                      <tr> 
                        <td height="22" align="right" class="table_col1">Level&nbsp;</td>
                        <td height="22" class="table_col2"> 
                          <?=$Row[$SystemModule_dbName."_Level"]?>
                        </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_footer"> 
                          <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>
                            </tr>
                          </table></td>
                      </tr>
                    </table></td>
                </tr>
              </form>
            </table>
            <? 
}
//########################################################
?>
            <br>
            <!-- InstanceEndEditable --> 
            <? }  else { echo "&nbsp;&nbsp;&nbsp;"; } ?>		</td>
        <td width="17" valign="top" background="../images/object/border_07.gif"><img src="../images/object/border_17.gif" width="17" height="119"></td>
      </tr>
      <tr>
        <td height="16"><img src="../images/object/border_09.gif" width="20" height="16"></td>
        <td height="16" background="../images/object/border_11.gif"><img src="../images/object/border_11.gif" width="1" height="16"></td>
        <td><img src="../images/object/border_13.gif" width="17" height="16"></td>
      </tr>
    </table></td>
        </tr>
      </table></td>
    <td width="1" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td> 
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="4" height="3" align="center" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td height="3" align="center" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
    <td width="4" height="3" align="center" bgcolor="#A13626"><img src="../../images/blank.gif" width="1" height="1"></td>
  </tr>
  <tr> 
    <td width="4" height="30" align="left" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td height="30" align="center" background="../../images/main/main-t-bg.gif">&nbsp;</td>
    <td width="4" height="30" align="right" valign="bottom" background="../../images/main/main-t-bg.gif">&nbsp;</td>
  </tr>
</table>
<table width="95%" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="left"><font color="#666666">Copyrights <img src="../../images/web/copyright.gif" width="8" height="9"> 
      2008  MOE. All rights are reserved.</font></td>
    <td align="right"><font color="#666666">Powered by <strong><a href="http://www.net-com.co.th">Net-Com</a></strong></font></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
<? 
include("../lib/disconnect.php");
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox