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

📄 cp_edit.asp

📁 购物网站源码有需要的赶快下载机不可失
💻 ASP
字号:
<!--#include file="top.asp"--><%usertopview%>
<%if userflag1=0 then
response.redirect"ok.asp?action=flag"
end if%>
<script language = "JavaScript" src = "../inc/user_admin.js" type="text/javascript"></script>
<%sql = "select *  from SMT_ypxxtwo order by SMT_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,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("SMT_ypxxtwo"))%>","<%= trim(rs("SMT_ypxxone_id"))%>","<%= trim(rs("SMT_ypxxtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount=<%=count%>;

function changelocation(ypxxone)
    {
    document.addform.ypxxtwo_id.length = 0; 

    var ypxxone_id=ypxxone_id;
    var i;
    document.addform.ypxxtwo_id.options[0] = new Option('请选择小类','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == ypxxone)
            { 
                document.addform.ypxxtwo_id.options[document.addform.ypxxtwo_id.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<script language="JavaScript">
<!--
function checkdata() {
if( addform.cpname.value =="") {
alert("\添加产品出错,下面是产生错误的可能原因:\n\n·请输入产品名称")
return false;
}
if( addform.sortid.value =="") {
alert("\添加产品出错,下面是产生错误的可能原因:\n\n·请选择产品分类")
return false;
}
if( addform.cpjg.value =="") {
alert("\添加产品出错,下面是产生错误的可能原因:\n\n·请输入产品价格")
return false;
}
if( addform.cpjl.value =="") {
alert("\添加产品出错,下面是产生错误的可能原因:\n\n·请输入产品计量单位")
return false;
}
if( addform.ypxxone_id.value !="") {
if( addform.ypxxtwo_id.value =="") {
alert("\发布商机出错,下面是产生错误的可能原因:\n\n·如果您选择了行业大类,那么其小类必须选择")
return false;
}
}
if( addform.cpjm.value =="" || addform.cpjm.value.length>100) {
alert("\添加产品出错,下面是产生错误的可能原因:\n\n·请输入不多于100字符的产品简介")
return false;
}
return true;
}
// -->
</script>
<script LANGUAGE=JavaScript>
  function textLimitCheck(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值,当前填写文字的数量*/
    messageCount.innerText = thisArea.value.length;
  }
</script>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="600" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:管理中心 > 产品管理</td></tr>
  <tr>
    <td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr>
    <td height=25 bgcolor=#6C94D1>  <font color=white>产品修改</font></td>
  </tr>
  <tr>
    <td bgcolor=#ffffff height=25>
<!--======-->
<table width="85%" border="0" cellspacing="0" cellpadding="0" align=center>
<%sql3="select * from SMT_cp where SMT_id="&request("id")
set rs3=server.createobject("ADODB.Recordset")
rs3.open sql3,conn,1,1%>
<form name="addform" method="post" action="cp_edit_save.asp" onSubmit="return checkdata()">
<input name="did" type="hidden" value="<%=request("id")%>">

  <tr>
    <td height=30 align="center" colspan="2"><font color=#666666>带 * 为必填项</font></td>
  </tr>
  <tr>
    <td width="21%" align=right height=30><font color=red>*</font>产品名称: &nbsp;</td>
	<td width="79%"><input name="cpname" type="text" size="20" maxlength="40" value="<%=rs3("SMT_cpname")%>"></td>
  </tr>
  <tr>
    <td align=right height=30><font color=red>*</font>产品分类: &nbsp;</td>
	<td><select name="sortid">
<%sql="select * from SMT_cp_sort where SMT_yp_id="&session("id")&" order by SMT_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("SMT_id")%>"<%if rs3("SMT_sortid")=rs("SMT_id") then%> selected<%end if%>><%=rs("SMT_cpsort")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select> <font color=#666666>如没有请先<a href=cp_sort.asp><font color=#666666>添加分类</font></a></font></td>
  </tr>
  <tr>
    <td align=right height=30><font color=red>*</font>参考价格: &nbsp;</td>
	<td><input name="cpjg" type="text" size="10" maxlength="10" value="<%=rs3("SMT_cpjg")%>">
<select name="jgdw">
<option value="美元"<%if rs3("SMT_cpjgdw")="美元" then%> selected<%end if%>>美元</option>
<option value="欧元"<%if rs3("SMT_cpjgdw")="欧元" then%> selected<%end if%>>欧元</option>
<option value="英镑"<%if rs3("SMT_cpjgdw")="英镑" then%> selected<%end if%>>英镑</option>
<option value="港币"<%if rs3("SMT_cpjgdw")="港币" then%> selected<%end if%>>港币</option>
<option value="日元"<%if rs3("SMT_cpjgdw")="日元" then%> selected<%end if%>>日元</option>
<option value="人民币"<%if rs3("SMT_cpjgdw")="人民币" then%> selected<%end if%>>人民币</option>
<option value="澳门元"<%if rs3("SMT_cpjgdw")="澳门元" then%> selected<%end if%>>澳门元</option>
<option value="泰国铢"<%if rs3("SMT_cpjgdw")="泰国铢" then%> selected<%end if%>>泰国铢</option>
<option value="加拿大元"<%if rs3("SMT_cpjgdw")="加拿大元" then%> selected<%end if%>>加拿大元</option>
<option value="瑞士法郎"<%if rs3("SMT_cpjgdw")="瑞士法郎" then%> selected<%end if%>>瑞士法郎</option>
<option value="新加坡元"<%if rs3("SMT_cpjgdw")="新加坡元" then%> selected<%end if%>>新加坡元</option>
<option value="瑞典克朗"<%if rs3("SMT_cpjgdw")="瑞典克朗" then%> selected<%end if%>>瑞典克朗</option>
<option value="丹麦克朗"<%if rs3("SMT_cpjgdw")="丹麦克朗" then%> selected<%end if%>>丹麦克朗</option>
<option value="挪威克朗"<%if rs3("SMT_cpjgdw")="挪威克朗" then%> selected<%end if%>>挪威克朗</option>
<option value="新西兰元"<%if rs3("SMT_cpjgdw")="新西兰元" then%> selected<%end if%>>新西兰元</option>
<option value="澳大利亚元"<%if rs3("SMT_cpjgdw")="澳大利亚元" then%> selected<%end if%>>澳大利亚元</option>
<option value="菲律宾比索"<%if rs3("SMT_cpjgdw")="菲律宾比索" then%> selected<%end if%>>菲律宾比索</option>
</select></td>
  </tr>
  <tr>
    <td align=right height=30><font color=red>*</font>计量单位: &nbsp;</td>
	<td><input name="cpjl" type="text" size="10" maxlength="10" value="<%=rs3("SMT_cpjl")%>"></td>
  </tr>
  <tr>
    <td align=right height=30>产品编号: &nbsp;</td>
	<td><input name="cpbh" type="text" size="30" maxlength="48" value="<%=rs3("SMT_cpbh")%>"></td>
  </tr>
  <tr>
    <td align=right height=30>产地: &nbsp;</td>
	<td><input name="cpcd" type="text" size="30" maxlength="48" value="<%=rs3("SMT_cpcd")%>"></td>
  </tr>
  <tr>
    <td align=right height=30>规格: &nbsp;</td>
	<td><input name="cpgg" type="text" size="30" maxlength="48" value="<%=rs3("SMT_cpgg")%>"></td>
  </tr>
  <tr>
  <td align=right height=40>主营行业: &nbsp;</td>
  <td><p style="line-height:180%"><select name="ypxxone_id" onChange="changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value)">
<option value="" selected>请选择大类</option>
<%sql="select *  from SMT_ypxxone order by SMT_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("SMT_ypxxone_id")%>"><%=rs("SMT_ypxxone")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select>
<select name="ypxxtwo_id">
<option selected value="">请选择小类</option>
</select><br><font color=#666666>如不改则请不要动</font></td>
  </tr>
  <tr>
    <td align=right height=30>产品图片: &nbsp;</td>
	<td><input name="magicfacepic(1)" type="text" size="40" maxlength="48" value="<%=rs3("SMT_pic")%>" onclick="lookmagic(1)" ID="magicfacepic(1)" readonly> <font onclick="lookmagic(1)" style="CURSOR:hand">选择图片</font> <font onclick="endmagic(1)" style="CURSOR:hand" color=red>取消</font>
	<div id="magicframe(1)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="my_picture_view.asp?action=1" width="350" height="170" frameborder="1" scrolling="no"></iframe></div></td>
  </tr>
  <tr>
    <td align=right height=30><font color=red>*</font>产品简介: &nbsp;</td>
	<td><p style="line-height:180%"><textarea name="cpjm" cols=45 rows=4><%=rs3("SMT_cpjm")%></textarea><br><font color=#666666>限 100 个字符</font></td>
  </tr>
  <tr>
    <td align=right height=30>详细说明: &nbsp;</td>
	<td><p style="line-height:180%"><textarea name="cpsm" cols=45 rows=10 onkeyUp="textLimitCheck(this, 1000);"><%=rs3("SMT_cpsm")%></textarea><br><font color=#666666>限 1000 个字符  已输入 <font color="#CC0000"><span id="messageCount">0</span></font> 个字</font></td>
  </tr>
  <tr>
    <td height=30 align="center" colspan="2"><input type="submit" name="Submit" value="提 交" class="input1"></td>
  </tr>
</form>
<%rs3.Close
set rs3=nothing%> 
</table>
<!--======-->
	</td>
  </tr>
</table>
<!--####################################-->
	</td>
  </tr>
<tr><td height=25></td></tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor=#ffffff>
<tr><td height=2 bgcolor=#6C94D1></td></tr>
  <tr>
    <td align="center" height=80><%=citybottom%></td>
  </tr>
</table>
<script language="javascript"> 
    changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value); 
</script>

⌨️ 快捷键说明

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