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

📄 addsn.asp

📁 网络商店源码 实现商品浏览 购物车 后台管理等
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登录!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script  language="JavaScript">
<!-- Hide from older browsers...

//Function to format text in the text box
function FormatText(command, option){
	
  	frames.message.document.execCommand(command, true, option);
  	frames.message.focus();
}

//Function to add image
function AddImage(){	
	imagePath = prompt('请输入图片地址', 'http://');				
	
	if ((imagePath != null) && (imagePath != "")){					
		frames.message.document.execCommand('InsertImage', false, imagePath);
  		frames.message.focus();
	}
	frames.message.focus();			
}

//Function to clear form
function ResetForm(){

	if (window.confirm('确认要清空对话框内容?')){
	 	frames.message.document.body.innerHTML = ''; 
	 	return true;
	 } 
	 return false;		
}

//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function setMode(newMode)
{
  bTextMode = newMode;
  var cont;
  if (bTextMode) {
    cleanHtml();
    cleanHtml();

    cont=message.document.body.innerHTML;
    message.document.body.innerText=cont;
  } else {
    cont=message.document.body.innerText;
    message.document.body.innerHTML=cont;
  }
  message.focus();
}

function cleanHtml()
{
  var fonts = message.document.body.all.tags("FONT");
  var curr;
  for (var i = fonts.length - 1; i >= 0; i--) {
    curr = fonts[i];
    if (curr.style.backgroundColor == "#ffffff") curr.outerHTML	= curr.innerHTML;
  }

}

// -->
</script>
<script language="JavaScript">

function help()
{
    var helpmess;
    helpmess="---------------填写帮助---------------\r\n\r\n"+
         "1.请不要发表有危险性的脚本。\r\n\r\n"+
         "2.如果要书写源代码,请选中\r\n\r\n"+
         " 查看HTML源代码书写.\r\n\r\n"+
         "3.需要你自己运行,才能看效果.\r\n\r\n"+
         "4.如果书写js,尽量不要在这儿书写.\r\n\r\n";
    alert(helpmess);
}
</script>
<script src="edit.js" type="text/javascript"></script>
<link href="../css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{
	font-size:9pt;
	line-height:120%;
	margin-top: 0px;
} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

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

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<body>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td height="25" bgcolor="#F1F1F1"> 
      <div align="center"><font color="#000000">添加新商品</font></div>
    </td>
  </tr>
  <tr> 
    
      <td height="126" bgcolor="#FFFFFF"> <form name="myform" method="post" action="saveaddsn.asp?action=add" onSubmit="return checkkk()" >
        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="5">
          <tr> 
            <td width="8%">&nbsp;</td>
            <td width="13%">选择分类: </td>
            <td colspan="2"> 
              <%
        rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
              大类 
              <select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)" class="wenbenkuang">
                <option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%      dim selclass
         selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof
%>
                <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%
        rs.movenext
        loop
	end if
        rs.close
%>
              </select>
               小类 
              <select name="Nclassid" class="wenbenkuang">
                <%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
                <option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
do while not rs.eof%>
                <option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
loop
end if
        rs.close
        set rs = nothing
%>
              </select> <font color="#FF0000">&nbsp;</font></td>
          </tr>
          <tr> 
            <td rowspan="7" width="8%">&nbsp;</td>
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_ziduan where ziduanorder=1 ",conn,1,1
%>
              <input type="text" name="mch" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang"> 
              <%
rs_s.close
set rs_s=nothing
%>            </td>
            <td colspan="2"> <input name="shopname" class="wenbenkuang" type="text" id="shopname" size="30">
               浮动价 
              <select name="fudongjia" size=1 class="wenbenkuang">
                <%set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_fudong order by id ",conn,1,1
if rs_s.recordcount=0 then
response.write "请先添加浮动价"
else
while not rs_s.eof
%>
                <option value=<%=rs_s("id")%> ><%=rs_s("shuoming")%></option>
                <%
rs_s.movenext
wend
end if%>
              </select> </td>
          </tr>
          <tr> 
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_ziduan where ziduanorder=2 ",conn,1,1
%>
              <input type="text" name="pp" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang"> 
              <%
rs_s.close
set rs_s=nothing
%>            </td>
            <td colspan="2"> <input name="pingpai" type="text" id="pingpai" size="20" class="wenbenkuang"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_pingpai order by pingpaiorder ",conn,1,1
%>
              <select name="select" class="wenbenkuang" onChange="(document.myform.pingpai.value=this.options[this.selectedIndex].value)">
                <option selected>请选择品牌</option>
                <%
while not rs_s.eof
%>
                <option value="<%=rs_s("pingpainame")%>"><%=rs_s("pingpainame")%></option>
                <%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
              </select> </td>
          </tr>
          <tr> 
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_ziduan where ziduanorder=3 ",conn,1,1
%>
              <input type="text" name="isbn1" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang"> 
              <%
rs_s.close
set rs_s=nothing
%>            </td>
            <td colspan="2"> <input name="isbn" type="text" id="isbn" size="30" class="wenbenkuang">            </td>
          </tr>
          <tr> 
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_ziduan where ziduanorder=4 ",conn,1,1
%>
              <input type="text" name="jj" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang"> 
              <%
rs_s.close
set rs_s=nothing
%>            </td>
            <td colspan="2"> <input name="shopchuban" type="text" id="shopchuban" size="10"  class="wenbenkuang"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * From shop_danwei order by danweiorder ",conn,1,1

⌨️ 快捷键说明

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