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

📄 editjiangpin.asp

📁 商业网站开发有源代码可以运行
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>"
response.End
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

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>
<body bgcolor="#D9E6FF">
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td  rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="20"> 
                              <div align="center"><font color="#000000">修改奖品</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <form name="myform" method="post" action="savejiangpin.asp?action=edit&id=<%=request("id")%>" OnSubmit="return checkkk()" >
                              <td height="126"> 
                                <%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from shop_jiangpin where bookid="&request("id"),conn,1,1%>
                                <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
                                  <tr> 
                                    <td width="23%" align="right">奖品名称: </td>
                                    <td colspan="2"> 
                                      <input name="bookname" type="text" id="bookname" size="30" value="<%=trim(rs1("bookname"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="23%" align="right">规格: </td>
                                    <td colspan="2"> 
                                      <input name="guige" type="text" id="guige" size="20" value="<%=trim(rs1("guige"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td width="23%" align="right">&nbsp; </td>
                                    <td colspan="2">市场价 
                                      <input name="shichangjia" type="text" id="shichangjia" size="6" onKeyPress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
		onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))" value="<%=trim(rs1("shichangjia"))%>">
                                      元   所需积分 
                                      <input name="jifen" type="text" id="jifen" size="6" onKeyPress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
		onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))" value="<%=trim(rs1("jifen"))%>">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="18" width="23%" align="right">奖品图片: 
                                    </td>
                                    <td height="18" colspan="2"> 
                                      <input name="bookpic" type="text" id="bookpic" size="30" value="<%=trim(rs1("bookpic"))%>">
                                      &nbsp; 
                                      <input type="button" name="Submit2" value="上传小图片" onClick="window.open('../upload_flash.asp?formname=myform&editname=bookpic&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="18" width="23%" align="right">&nbsp; 
                                    </td>
                                    <td height="18" colspan="2"> 
                                      <input name="bookpic2" type="text" id="bookpic2" size="30" value="<%=trim(rs1("bookpic2"))%>">
                                      &nbsp; 
                                      <input type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_flash.asp?formname=myform&editname=bookpic2&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td valign="top" width="23%" align="right">奖品说明: 
                                    </td>
                                    <td colspan="2"> 
                                      <textarea name="bookcontent" cols="46" rows="8" id="bookcontent"><%=trim(rs1("bookcontent"))%></textarea>
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="32" colspan="2"> 
                                      <div align="center"> 
                                        <input name="xianshi" type="checkbox" id="xianshi" value="1" <%if rs1("xianshi")=1 then%>checked<%end if%>>
                                        显示(指让不让用户在前台看到)</div>
                                    </td>
                                    <td width="25%" align="center"> 
                                      <input type="submit" name="Submit" value="修 改">
                                    </td>
                                  </tr>
                                </table>
                                <%rs1.close
								set rs1=nothing%>
                              </td>
                            </form>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>

<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
     if(checkspace(document.myform.bookname.value)) {
	document.myform.bookname.focus();
    alert("请输入商品名称!");
	return false;
  }
     if(checkspace(document.myform.shichangjia.value)) {
	document.myform.shichangjia.focus();
    alert("请输入市场价格!");
	return false;
  }
     if(checkspace(document.myform.jifen.value)) {
	document.myform.jifen.focus();
    alert("请输入所需积分!");
	return false;
  }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
<script>
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
</script>

⌨️ 快捷键说明

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