⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adm_addcd.jsp

📁 这是一个网上产品销售系统
💻 JSP
字号:
<!--<meta http-equiv="musiclist-Type" musiclist="text/html; charset=gb2312">-->
<%@ page contentType="text/html;charset=gb2312" %> 
<%@ page session="true" %>
<%
if (session.getAttribute("admin")==null || session.getAttribute("admin")==""){
	response.sendRedirect("error.htm");
} %>
<%@ page import="cdshop.cd.*"%>
<%@ page import="cdshop.util.dataFormat"%>
<jsp:useBean id="classlist" scope="page" class="cdshop.run.op_cdclass" />
<jsp:useBean id="cd" scope="page" class="cdshop.run.op_cd" />
<%
	String mesg = "";
	String submit = request.getParameter("Submit");
	if (submit!=null && !submit.equals("")){
		if(cd.getRequest(request)){
			if(cd.insert()){
				mesg = "新产品资料提交成功!";
			} else {
				mesg = "数据库操作失败";
			}
		}else {
			mesg = "对不起,你提交的参数有错误";
		}
	}
%>
<script language="javascript">
  function checkform() {
	if (document.form1.cdname.value=="") {
		document.form1.cdname.focus();
		alert("产品名为空!");
		return false;
	}
	if (document.form1.Singer.value=="") {
		alert("代销店为空!");
		document.form1.Singer.focus();
		return false;
	}

	return true;

  }
</script>
<%@include file="../inc/adm_head.inc"%><body bgcolor="#99CC66">
<tr>
<td width="77%" align="center" bgcolor="#99CC66">
        <p><br>
          <font size="3"><b>添加新的相机资料</b></font></p>
		  <% if(!mesg.equals("")){
			out.println(mesg);
		  }%>
        <form name="form1" method="post" action="adm_addcd.jsp">
          <table width="90%" border="0" cellspacing="1" cellpadding="1">
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">相机名称:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="cdname" maxlength="40" size="30">
              </td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">代销店:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="Singer" maxlength="25" size="20">
              </td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">相机介绍:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="publish" size="40" maxlength="150">
              </td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">相机类别:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <select name="cdclass">
		<% if (classlist.seachcdClass()){
				for (int i=0;i<classlist.getClasslist().size();i++){
					cdclass bc = (cdclass) classlist.getClasslist().elementAt(i); %>
			      <option value="<%= bc.getId()%>"><%= dataFormat.toString(bc.getClassName()) %></option>
		<%		}
		}%>

                </select>
              </td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">相机编号:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="cdno" size="20" maxlength="30">
              </td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">售价:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="price" size="8" maxlength="10">
              元</td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">总数量:</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="text" name="amount" size="8" maxlength="10">
              本</td>
            </tr>
            <tr>
              <td width="35%" align="right" bgcolor="#CCCCCC">相机宣传画面:</td>
              <td width="65%" bgcolor="#CCCCCC">
              <input type="File" name="picture" class=box>              </td>
            </tr>
            <tr>
              <td width="35%" height="124" align="right" valign="top" bgcolor="#CCCCCC">相机特点:</td>
              <td width="65%" bgcolor="#CCCCCC">
              <textarea name="musiclist" cols="40" rows="6"></textarea></td>
            </tr>
            <tr>
              <td width="35%" height="40" align="right" bgcolor="#CCCCCC">&nbsp;</td>
              <td width="65%" bgcolor="#CCCCCC">
                <input type="submit" name="Submit" value="提交" onClick="return(checkform());">
                <input type="reset" name="reset" value="重置">
              </td>
            </tr>
          </table>
        </form>
        <p>&nbsp;</p>
  </td>
</tr>
<%@include file="../inc/adm_tail.inc"%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -