upsystem.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:4k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <%
  4. if(session.getAttribute("admin_name")==null){
  5. response.sendRedirect("bomb.htm");}else{
  6. %>
  7. <head>
  8. <link href=../css.css rel=STYLESHEET type=text/css>
  9. </head>
  10. <%
  11. String action=request.getParameter("action");
  12. if(action==null)
  13. action="notchange";
  14. if(action.equals("change")){
  15. sql="update system set name='"+getStr(request.getParameter("name"))+"',tel='"+getStr(request.getParameter("tel"))+"',fax='"+getStr(request.getParameter("fax"))+"',mail='"+getStr(request.getParameter("mail"))+"',oicq='"+getStr(request.getParameter("oicq"))+"',web='"+getStr(request.getParameter("web"))+"',sitename='"+getStr(request.getParameter("sitename"))+"',code='"+getStr(request.getParameter("code"))+"',maddr='"+getStr(request.getParameter("maddr"))+"',msn='"+getStr(request.getParameter("msn"))+"',mname='"+getStr(request.getParameter("mname"))+"',ymaddr='"+getStr(request.getParameter("ymaddr"))+"',ymname='"+getStr(request.getParameter("ymname"))+"'";
  16. mdb.executeUpdate(sql);
  17. out.print("系统更新完毕");
  18. }else{
  19. %>
  20. <table border="0" width="100%" cellspacing="1">
  21.   <tr>
  22.     <td width="100%">
  23.       <form method="POST" action="upsystem.jsp?action=change">
  24.         <table border="0" width="100%" cellspacing="0" cellpadding="0">
  25.           <tr> 
  26.             <%sql="select top 1 * from system";
  27.           rs=mdb.executeQuery(sql);
  28.   rs.next();%>
  29.             <td width="11%">联系人</td>
  30.             <td width="89%"><input type="text" name="name" size="20" value="<%=rs.getString("name")%>" class=input></td>
  31.           </tr>
  32.           <tr> 
  33.             <td width="11%">联系电话</td>
  34.             <td width="89%"><input type="text" name="tel" size="20" value="<%=rs.getString("tel")%>" class=input></td>
  35.           </tr>
  36.           <tr>
  37.             <td>联系传真</td>
  38.             <td><input type="text" name="fax" size="20" value="<%=rs.getString("fax")%>" class=input></td>
  39.           </tr>
  40.           <tr>
  41.             <td>电子邮件</td>
  42.             <td><input type="text" name="mail" size="20" value="<%=rs.getString("mail")%>" class=input></td>
  43.           </tr>
  44.           <tr>
  45.             <td>OICQ</td>
  46.             <td><input type="text" name="oicq" size="20" value="<%=rs.getString("oicq")%>" class=input></td>
  47.           </tr>
  48.           <tr>
  49.             <td>网站名称</td>
  50.             <td><input type="text" name="sitename" size="20" value="<%=rs.getString("sitename")%>" class=input></td>
  51.           </tr>
  52.           <tr>
  53.             <td>网址</td>
  54.             <td><input type="text" name="web" size="20" value="<%=rs.getString("web")%>" class=input>
  55.               <font color="#FF0000">例如:www.jspshop.cn</font></td>
  56.           </tr>
  57.           <tr>
  58.             <td>银行汇款地址</td>
  59.             <td><input type="text" name="maddr" size="60
  60. " value="<%=rs.getString("maddr")%>" class=input></td>
  61.           </tr>
  62.           <tr>
  63.             <td>银行汇款帐号</td>
  64.             <td><input type="text" name="msn" size="60
  65. " value="<%=rs.getString("msn")%>" class=input></td>
  66.           </tr>
  67.           <tr>
  68.             <td>收款人姓名</td>
  69.             <td><input type="text" name="mname" size="20" value="<%=rs.getString("mname")%>" class=input></td>
  70.           </tr>
  71.           <tr>
  72.             <td>邮局汇款地址</td>
  73.             <td><input type="text" name="ymaddr" size="60
  74. " value="<%=rs.getString("ymaddr")%>" class=input></td>
  75.           </tr>
  76.           <tr>
  77.             <td>邮递接收人</td>
  78.             <td><input type="text" name="ymname" size="20" value="<%=rs.getString("ymname")%>" class=input></td>
  79.           </tr>
  80.           <tr>
  81.             <td>邮政编码</td>
  82.             <td><input type="text" name="code" size="20" value="<%=rs.getString("code")%>" class=input></td>
  83.           </tr>
  84.         </table>
  85.         <p><input type="submit" value="提交" name="B1" class=input></p>
  86.       </form>
  87.       <p> </td>
  88.   </tr>
  89. </table>
  90. <%}
  91. mdb.Close();
  92. }
  93. %>