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

📄 productmodify.asp

📁 官方最新的南方数据v12生成静态商业版。全站生成静态。
💻 ASP
字号:
<%@language="vbscript" codepage="936" %>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/Function.asp"-->
<!--#include file="inc/admin_code_product.asp"-->
<%
dim ID,rsProduct,FoundErr,ErrMsg
ID=trim(request("ID"))
FoundErr=False
if ID="" then 
	response.Redirect("ProductManage.asp")
end if
sql="select * from 0791idc_Product where ID=" & ID & ""
Set rsProduct= Server.CreateObject("ADODB.Recordset")
rsProduct.open sql,conn,1,1
if FoundErr=True then
	call WriteErrMsg()
else
%>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from 0791idc_SmallClass order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
    }  

function CheckForm()
{  

  if (document.myform.Title.value=="")
  {
    alert("产品名称不能为空!");
	document.myform.Title.focus();
	return false;
  }  
  if (document.myform.Content.value=="")
  {
    alert("产品说明不能为空!");
	document.myform.Content.focus();
	return false;
  }
 
}

</script>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="862" align="center" valign="top"><br>
      <b> </b>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="ProductSave.asp?action=Modify">
        <table width="650" border="0" align="center" cellpadding="2" cellspacing="1" class="table_southidc">
          <tr> 
            <td class="back_southidc" height="22" colspan="3" align="right"><div align="center"><b>修 
                改 产 品</b> </div></td>
          </tr>
          <tr> 
            <td width="167" height="22" align="right" bgcolor="#A4B6D7">所属栏目:</td>
            <td colspan="2" bgcolor="#ECF5FF"><%			
			 	response.write "<select name='ClassID'>"	
				call Admin_ShowClass_Option(3,rsProduct("ClassID"))
				response.write "</select>"
				response.write "<font color='#FF0000'><strong>注意:</strong></font><font color='#0000FF'>1、不能指定为含有子栏目的栏目,或者外部栏目"		 
			 %>
            </td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">产品编号:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="Product_Id" type="text"
           id="Product_Id" value="<%=rsProduct("Product_Id")%>" size="16" maxlength="16"> 
              <font color="#FF0000">*</font> </td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">产品名称:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="Title" type="text"
           id="Title" value="<%=rsProduct("Title")%>" size="50" maxlength="80"> 
              <font color="#FF0000">*</font></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">规格:</td>
            <td colspan="2" bgcolor="#ECF5FF"><input name="Spec" type="text"
           id="Spec" value="<%=rsProduct("Spec")%>" size="20" maxlength="80"></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">单位:</td>
            <td colspan="2" bgcolor="#ECF5FF"><input name="Unit" type="text"
           id="spec" value="<%=rsProduct("Unit")%>" size="20" maxlength="80"></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">备注:</td>
            <td colspan="2" bgcolor="#ECF5FF"><input name="Memo" type="text"
           id="unit" value="<%=rsProduct("Memo")%>" size="50" maxlength="80"></td>
          </tr>
          <tr> 
            <td align="right" valign="middle" bgcolor="#A4B6D7"> <div align="right">产品说明: 
              </div></td>
            <td colspan="2" bgcolor="#ECF5FF"><input type="hidden" name="Content" value="<%=Server.HTMLEncode(rsProduct("Content"))%>"> 
              <iframe ID="eWebEditor1" src="../Southidceditor/ewebeditor.htm?id=content&style=southidc" frameborder="0" scrolling="no" width="550" HEIGHT="450"></iframe> 
            </td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">产品图片:</td>
            <td width="221" bgcolor="#ECF5FF"><input name="DefaultPicUrl" type="text" id="DefaultPicUrl2" value="<%=rsProduct("DefaultPicUrl")%>" size="30" maxlength="50"></td>
            <td width="216" bgcolor="#ECF5FF"><iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=6" frameborder=0 scrolling=no width="300" height="25"></iframe> 
            </td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">已通过审核:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="Passed" type="checkbox" id="Passed" value="yes" <% if rsProduct("Passed")=true then response.Write("checked") end if%>>
              是<font color="#0000FF">(如果选中的话将直接发布)</font></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">首页显示:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="FirstPage" type="checkbox" id="FirstPage" value="yes" <% if rsProduct("FirstPage")=true then response.Write("checked") end if%>>
              是<font color="#0000FF">(如选中将在首页<font color="#FF0000">产品列表</font>中显示)</font></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">首页新品显示:</td>
            <td colspan="2" bgcolor="#ECF5FF"><input name="newproduct" type="checkbox" id="newproduct" value="yes" <% if rsProduct("newproduct")=true then response.Write("checked") end if%>>
              是<font color="#0000FF">(如选中将在首页<font color="#FF0000">新品展示</font>中显示)</font></td>
          </tr>
          <tr>
            <td height="22" align="right" bgcolor="#A4B6D7">推荐产品:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="Elite" type="checkbox" id="Elite" value="yes" <% if rsProduct("Elite")=true then response.Write("checked") end if%>>
              是<font color="#0000FF">(如选中将在首页<font color="#FF0000">推荐产品</font>中显示)</font></td>
          </tr>
          <tr> 
            <td height="22" align="right" bgcolor="#A4B6D7">录入时间:</td>
            <td colspan="2" bgcolor="#ECF5FF"> <input name="UpdateTime" type="text" id="UpdateTime" value="<%=rsProduct("UpdateTime")%>" maxlength="50">
              当前时间为:<%=now()%> 注意不要改变格式。</td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td height="22" colspan="3" align="right"> <div align="center"> 
                <input  name="Save" type="submit"  id="Save2" value="保存修改结果">
              </div></td>
          </tr>
        </table>
        <div align="center"> 
          <p> 
            <input name="ID" type="hidden" id="ID" value="<%=rsProduct("ID")%>">
          </p>
        </div>
      </form></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
<%
end if
rsProduct.close
set rsProduct=nothing
call CloseConn()
%>

⌨️ 快捷键说明

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