<?php
include("CheckSession.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=utf-8" />
<meta name="description" content="馬戲團" />
<title>馬戲團</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<SCRIPT language="JavaScript">
function validateForm(objThisUi) 
{
	if(objThisUi.AOldPass.value.length == 0)
	{
		alert("請輸入舊密碼!!");
		objThisUi.AOldPass.focus();		
		return false;                              
	}
	
	if(objThisUi.APass.value.length == 0)
	{
		alert("請輸入新密碼!!");
		objThisUi.AOldPass.focus();		
		return false;                              
	}
	
	if(objThisUi.APassConfirm.value.length == 0)
	{
		alert("請輸入確認新密碼!!");
		objThisUi.APassConfirm.focus();		
		return false;                              
	}
	
	if(objThisUi.APass.value != objThisUi.APassConfirm.value)
	{
		alert("請確認密碼和確認密碼相同!!");
		objThisUi.APassConfirm.focus();		
		return false;                              
	}
	if(confirm("確定要變更密碼嗎????"))
	{
     return true;
	}
	else
	{
		return false;
	}
}
</SCRIPT>
<body>
<form name="ChangePassForm" method="post" action="ChangePassUpdateDeal.php" id="ChangePassForm"
 onSubmit="return validateForm(this);">
<input type="hidden" name="action" id="action" value="<?php echo $action ?>"/>
<input type="hidden" name="id" id="id" value="<?php echo $id ?>"/>
<table border="0" cellspacing="0" cellspadding="0" width="90%">
<!--
<tr>
<td align="center" colspan="2">
<span class="title"><b>變更密碼</b></span>
</td>
</tr>
-->
<tr>
<td align="left" colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td align="left" colspan="2">
<table border="3" cellspacing="2" cellspadding="2" width="100%">
<tr>
<td align="left" width="20%">
<span class="t12">舊密碼</span>
</td>
<td align="left" width="80%">
<input type="password" name="AOldPass" id="AOldPass" size="20" maxlength="20" style="font-size: 12.0pt;font-family: 微軟正黑體;"/>
</td>
</tr>
<tr>
<td align="left" width="20%">
<span class="t12">新密碼</span>
</td>
<td align="left" width="80%">
<input type="password" name="APass" id="APass" size="20" maxlength="20" style="font-size: 12.0pt;font-family: 微軟正黑體;"/>
</td>
</tr>
<tr>
<td align="left" width="20%">
<span class="t12">確認新密碼</span>
</td>
<td align="left" width="80%">
<input type="password" name="APassConfirm" id="APassConfirm" size="20" maxlength="20" style="font-size: 12.0pt;font-family: 微軟正黑體;"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="btnSub" id="btnSub" value="確認變更" class="t12" />
</td>
</tr>
</table>

</td>
</tr>
</table>
</form>
</body>
</html>
