<!--#include file="top_m.asp" -->
<script LANGUAGE="JavaScript">
function check()
{
  if (document.Form1.d_name.value=="")
     {
      alert("请输入部门名称！")
      document.Form1.d_name.focus()
      document.Form1.d_name.select()
      return
     }
     document.Form1.submit()
}
</SCRIPT>
<!--#include file="checkuserflag.asp"-->
<%call CheckUserFlag("34")

Set ObjDCW = Server.CreateObject("dc_data100_v1_0.C_A_Config") 

If Request.ServerVariables("REQUEST_METHOD")="POST" and request.form("action")="abc" Then
	ObjDCW.editsave_department DataPathFile
else
	call main(DataPathFile)
end if

sub main(DataPathFile)
id=request("id")
department=ObjDCW.department_info(id,d_name,d_manager,d_exp,DataPathFile)
if department=0 then
	response.write "系统错误！"
elseif department=1 then
%>
<table width="700" border=0 align="center" cellPadding=0 cellSpacing=0>
  <tr>
    <td align="center">
      <form action="" method="post" name="Form1" onSubmit="return check();">
      <table cellPadding=0 cellSpacing=0 width=700>
      <tr> 
         <td align="left" height="28" colspan=2 bgcolor=#e8f4ff><b>添加部门--</b></td>
      </tr>
      <tr> 
         <td width="148" height="28" align="right">部门名称：</td>
         <td width="550"><font color="#FFFFFF">
           <input name=d_name type=text id="d_name" value="<%=d_name%>" size="30">
         </font> * </td>
      </tr>
      <tr>
         <td align="right" height="28">负 责 人：</td>
         <td><input name=d_manager type=text id="d_manager" size="30" value="<%=d_manager%>"></td>
      </tr>
      <tr>
        <td height="28" align="right" valign="top">说　　明：</td>
        <td><label>
          <textarea name="d_exp" id="d_exp" cols="80" rows="12"><%=d_exp%></textarea>
        </label></td>
      </tr>
      
      
      
       <tr>
         <td height="28" bgcolor=#e8f4ff>&nbsp;</td>
         <td height="28" align="left" bgcolor=#e8f4ff><input type="button" value=" 修 改 "  class="smallInput" onClick=check()>
           <input name="action" type="hidden" id="action" value="abc">
           <input name="d_id" type="hidden" id="d_id" value="<%=id%>"></td>
       </tr>
     </table>
	 </form>
   </td>
  </tr>
</table>
<%
end if
end sub
%>