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

📄 view.asp

📁 西亚电子购物系统
💻 ASP
字号:
<!--#include file="../manage/check-0.asp"-->
<!--#include file="../conn/conn.asp"-->
 <%
page=request("page")
proid=request("proid")
 sql="select * from sia_product where proid="&request("proid")
set rs=server.createobject("adodb.recordset")
set rs = conn.execute(Sql)
proid = rs("proid")
clid = rs("clid")
claid = rs("claid")
code=rs("code")
proname=rs("proname")
proprice=rs("proprice")
disprice=rs("disprice")
info=rs("info")
smallpic=rs("smallpic")
bigpic=rs("bigpic")
company=rs("company")
companyurl=rs("companyurl")
hits=rs("hits")
stock=rs("stock")
hide=rs("hide")
v1=rs("v1")
v2=rs("v2")
v3=rs("v3")
v4=rs("v4")
v5=rs("v5")

if rs.eof and rs.bof then
	response.write "<script>alert(""出现异常错误"");window.close();</script>"
	Response.end
End if
rs.close 


set rs = conn.execute("select * from sia_class order by claid asc")
%> 
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("claname"))%>","<%= trim(rs("clid"))%>","<%= trim(rs("claid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.claid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.claid.options[document.myform.claid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商品查看</title>
<link href="../conn/css.css" rel="stylesheet" type="text/css">
</head>
<body><br>
<form action="edit-end.asp" method="post" name="myform" id="myform">
  <script language="javascript">
	<!--//
	function checksignup() {

		if ( document.myform.clid.value == '' ) {
			window.alert('请选择产品类别!!');
			document.myform.clid.focus();
			
		}
		else if ( document.myform.code.value == '' ) {
			window.alert('请输入产品编号!!');
			document.myform.code.focus();
		}
		else if ( document.myform.proname.value == '' ) {
			window.alert('请输入产品名称!!');
			document.myform.proname.focus();
		}
		else if ( document.myform.proprice.value == '' ) {
			window.alert('请输入产品售价!!');
			document.myform.proprice.focus();
		}
		else if ( document.myform.disprice.value == '' ) {
			window.alert('产品优惠价不能空!!');
			document.myform.disprice.focus();
		}
		else if ( document.myform.company.value == '' ) {
			window.alert('请输入产品产地或厂家!!');
			document.myform.company.focus();
		}
		else if ( document.myform.info.value == '' ) {
			window.alert('请输入产品介绍!!');
			document.myform.info.focus();
		}
                else if (document.myform.info.value.length>5000)
  {
  window.alert("产品介绍不能超过5000字!");
  document.myform.info.focus();
  }
else {
			return true;
			}
		return false;
	}

	//-->
	</script>
  <table width="500" align="center" cellpadding="0" cellspacing="2">
    <tr valign="middle" bgcolor="#CCCCCC"> 
      <td height="25" colspan="4"><font color="#FF3333">&gt;&gt;产品资料查看</font></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="97" height="25" align="center">产品类别</td>
      <td height="25" colspan="3" bgcolor="#f1f1f1"> <%
					set rs = conn.execute("select * from sia_category")
					if rs.eof and rs.bof then
						response.write "请先添加栏目。"
						response.end
					else
					%> <select name="clid" size="1" class="textbox" onChange="changelocation(document.myform.clid.options[document.myform.clid.selectedIndex].value)">
          <%do while not rs.eof%>
          <option value="<%=trim(rs("clid"))%>" <%if rs("clid") = clid then response.write "Selected"%>><%=trim(rs("clname"))%></option>
          <%
        				rs.movenext
       					loop
						end if
       					rs.close
						%>
        </select> <select name="claid" class="textbox">
          <%
			Set rs = conn.execute("Select * from sia_class where clid = " & clid)
			do while not rs.eof
			%>
          <option value="<%=rs("claid")%>" <%if rs("claid") = claid then response.write "Selected"%>><%=rs("claname")%></option>
          <%
			rs.movenext
			loop
			rs.close
			%>
        </select> <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品编号</td>
      <td height="25" colspan="3" bgcolor="#f1f1f1"><input name="code" type="text" class="textbox" id="code" value="<%=code%>" size="15" maxlength="25"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品名称</td>
      <td height="25" colspan="3"> <input name="proname" type="text" class="textbox" id="proname" value="<%=proname%>" size="50" maxlength="50"> 
        <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品价格</td>
      <td width="129" height="25"> <input name="proprice" type="text" class="textbox" id="proprice" value="<%=proprice%>" size="15" maxlength="20"> 
        <font color="#FF3333">*</font> </td>
      <td width="76" height="25" align="center">优惠价格</td>
      <td width="186" height="25"><input name="disprice" type="text" class="textbox" id="disprice5" value="<%=disprice%>" size="15" maxlength="20"></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产地厂家</td>
      <td height="25" colspan="3"> <input name="company" type="text" class="textbox" id="company" value="<%=company%>" size="50" maxlength="50"> 
        <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">厂家网址</td>
      <td height="25" colspan="3"> <input name="companyurl" type="text" class="textbox" id="companyurl" value="<%=companyurl%>" size="50" maxlength="50"> 
      </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品缩图</td>
      <td height="25" colspan="3"> <input name="smallpic" type="text" class="textbox" id="smallpic" value="<%=smallpic%>" size="40" maxlength="50"> 
      </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品全图</td>
      <td height="25" colspan="3"> <input name="bigpic" type="text" class="textbox" id="bigpic" value="<%=bigpic%>" size="40" maxlength="50"> 
      </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center">产品简介</td>
      <td height="25" colspan="3"> <textarea name="info" cols="60" rows="6" class="textbox" id="info"><%=info%></textarea> 
        <font color="#FF3333">*</font> </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25" align="center" bgcolor="#f1f1f1">产品人气</td>
      <td height="25"><input name="hits" type="text" class="textbox" id="hits" value="<%=hits%>" size="15" maxlength="20"></td>
      <td height="25" align="center">库存数量</td>
      <td height="25"><input name="stock" type="text" class="textbox" id="zs2" value="<%=stock%>" size="15" maxlength="20"> 
      </td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1">
      <td height="25" align="center">会员投票</td>
      <td height="25" colspan="3"> 很好: 
        <input name="v1" type="text" class="textbox" id="v1" value="<%=v1%>" size="3" maxlength="10">
        好: 
        <input name="v2" type="text" class="textbox" id="v2" value="<%=v2%>" size="3" maxlength="10">
        一般: 
        <input name="v3" type="text" class="textbox" id="v3" value="<%=v3%>" size="3" maxlength="10">
        差: 
        <input name="v4" type="text" class="textbox" id="v4" value="<%=v4%>" size="3" maxlength="10">
        很差: 
        <input name="v5" type="text" class="textbox" id="v5" value="<%=v5%>" size="3" maxlength="10">
        <input name="Submit223" type="button" class="textbox-1" id="Submit223" onClick="javascript:window.history.go(-1)" value="返回"></td>
    </tr>
  </table>
</form>

</body>
</html>

⌨️ 快捷键说明

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