<!--#include file="conn.asp" -->
<% adm_power_page=5 '分配本页的用户访问权限 %>
<!--#include file="admin_dn.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="2" topmargin="0">
<p>用户入账管理：</p>
<p>&nbsp;</p>
<form name="form1" method="post" action="adm_9.asp?w=us">
  <div align="center">
    <p>请输入查询的用户名： 
      <input name="userid" type="text" id="userid" size="20">
      <input type="submit" name="Submit" value="查询">
      <font color="#FF0000">入账者的用户名</font></p>
    </div>
</form>

<p align="center">&nbsp;</p>

<% 
if Trim(Request("i"))="save" then
sql="update user set je=je"&request("select")&request("je")&"  where userid='"&request("userid")&"'"
conn.execute (sql)
rs.open "select * from user where userid='"&request("userid")&"'"
  if not rs.eof then
  zje1=rs("je")
  else
  zje1=0
  end if
  rs.close
sql="insert into memo(userid,je,body,log,zje,bak) values  ('"&request("userid")&"',"&request("select")&request("je")&",'管理员手工操作','入账',"&zje1&",'"&request.form("bak")&"')"
conn.execute(sql)
%>
<script language="VBScript" type="text/VBScript">
msgbox "账务操作成功....."
</script>

<%

end if 

if Trim(Request("w"))="us" then
 rs.open "select * from user where userid='"&Trim(Request("userid"))&"'",conn,1,1
  
 if not rs.eof then
 %>
<form name="form2" method="post" action="adm_9.asp?i=save">
  <table width="80%" height="249" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr> 
      <td height="16" colspan="2" bgcolor="#000066"><font color="#FFFFFF">用户财务手工入账</font></td>
    </tr>
    <tr bgcolor="#F2F7FB"> 
      <td width="23%" height="24">用户名：</td>
      <td width="77%"><%= rs("userid") %>&nbsp; <input name="w" type="hidden" id="w" value="us"> <input name="userid" type="hidden" id="userid" value="<%=rs("userid")%>"> 
        <font color="#FF0000"><a href="adm_14.asp?w=search&select=userid&search=<%=rs("userid")%>">-查看该用户的财务计录-</a></font></td>
    </tr>
    <tr bgcolor="#F2F7FB"> 
      <td height="25">当前金额：</td>
      <td><font color="#FF0000"><%= rs("je") %>&nbsp;元 </font></td>
    </tr>
    <tr bgcolor="#F2F7FB"> 
      <td height="32">入账类型：</td>
      <td> 
        <select name="select">
          <option value="+" selected>增加款项</option>
          <option value="-">减少款项</option>
        </select>
      </td>
    </tr>
    <tr bgcolor="#F2F7FB"> 
      <td height="22">金 额：</td>
      <td> 
        <input name="je" type="text" id="je" value="0" size="15"> <font color="#FF0000">只能为数字</font></td>
    </tr>
    <tr bgcolor="#F2F7FB"> 
      <td height="100">备 注：</td>
      <td> 
        <textarea name="bak" cols="30" rows="5" id="bak"></textarea></td>
    </tr>
    <tr> 
      <td height="22" bgcolor="#000066">&nbsp;</td>
      <td bgcolor="#000066"> <input type="submit" name="Submit2" value="-确认-"></td>
    </tr>
  </table>
</form>
<% 
else
Response.Write("没有找到相应的记录")
end if
rs.close 
end if
%>
<p align="center">入账成功后请不要重复刷新本页</p>
</body>
</html>
