<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.io.*,java.text.*,java.util.*,java.sql.*,DBstep.iDBManager2000.*" %>
<%@ include file="/sessionInfo.jsp"%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">

<script language=javascript>
function Check(theForm){
	if (webform.MarkName.value == ""){
		alert("请输入印签名.");
		webform.MarkName.focus();
		return false;
	}	
	if (webform.PassWord.value != webform.PassWord2.value) {
		alert("密码不一致");
		webform.PassWord.focus();
		return false;
	}
	webform.submit();
}

function ConfirmDel(FileUrl){
	if (confirm('是否确定删除该印签！')){
		location.href=FileUrl;
	}
}
</Script>
</head>
<%
  String sType = SzConvert.toZeroStr(request.getParameter("type"));
  String mSignatureID=request.getParameter("SignatureID");
%>
<body bgcolor="#ffffff">
<% if (!sType.equals("1")) {%>
<%@ include file="/share/weboffice/title.jsp"%>
<% } else { %>
<%@ include file="title.jsp"%>
<% } %>
<table width="100%">
  <tr>
    <td>
      <%=SzPageHelp.button("保存","javascript:Check();")%>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>
<%

boolean mResult=false;
String sId = "";
String sName = "";


DBstep.iDBManager2000 DbaObj=new DBstep.iDBManager2000();
if (DbaObj.OpenConnection())
{
  String mSql="select * from Signature where SignatureID = " + mSignatureID;
  try
  {
    ResultSet result=DbaObj.ExecuteQuery(mSql) ;
    if (result.next())
    {
        mSignatureID=result.getString("SignatureID");
        sId = result.getString("UserName");    	
        sName = "";
        if (!sId.equals("") && !sId.equals("0")) {
        	sName = SzUserHelp.getLoginName(sId);              	
        }
%>
<form name="webform" method="post" enctype="multipart/form-data"  action="SignatureEdit.jsp?type=<%=sType %>" onsubmit="return Check(this)">
<input type="hidden" name="SignatureID" value="<%=mSignatureID%>">
<input type="hidden" name="UserName" size="50" maxlength="32" class="IptStyle" value="<%=sId%>">
<table width="750" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
<tr>
  <td nowrap align=center class="TDTitleStyle" width=164>用户密码</td>
  <td class="TDStyle" width="90%"><input type="password" name="PassWord" size="50" maxlength="32" class="IptStyle" value=""></td>
</tr>
<tr>
  <td nowrap align=center class="TDTitleStyle" width=164>确认密码</td>
  <td class="TDStyle" width="90%"><input type="password" name="PassWord2" size="50" maxlength="32" class="IptStyle" value=""></td>
</tr>
<tr>
  <td nowrap align=center class="TDTitleStyle" width=164>签章名称</td>
  <td class="TDStyle" width="90%"><input type="text" name="MarkName" size="50" maxlength="32" class="IptStyle" value="<%=result.getString("MarkName")%>"></td>
</tr>


</table>
</form>
<%
  }
      else
      {
         out.write("数据库中不存在该标签。<input type='button' value='返 回' onclick='javascript:history.back();'");
      }
      result.close();
    }
    catch(Exception e)
    {
        System.out.println(e.toString());
    }
    DbaObj.CloseConnection() ;
}
%>
</body>
</html>
