<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx5<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<html>
<head>
<title>网软志成在线购物系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 会员管理 &gt;&gt; 修改奖品</font></strong></td>
        <td width="23%" style="font-size:14px;color:#ffffff"><span class="STYLE1">* 为必添项目</span></td>
      </tr>
    </table></td>
  </tr>
</table>
<%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from shop_jiangpin where shopid="&request("id"),conn,1,1%>
<form name="myform" method="post" action="user_jiangpin_save.asp?action=edit&id=<%=request("id")%>" onSubmit="return checkkk()" ><table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
  <tr bgcolor="#F3F3F3">
    <td width="15%" align="right">奖品名称： </td>
    <td colspan="2">
      <input name="shopname" type="text"  class="wenbenkuang" id="shopname" size="40" value="<%=trim(rs1("shopname"))%>">
      <span class="STYLE1">*</span> </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td width="15%" align="right">规格： </td>
    <td colspan="2">
      <input name="guige"  class="wenbenkuang" type="text" id="guige" size="40" value="<%=trim(rs1("guige"))%>">    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td width="15%" align="right">Market price: </td>
    <td colspan="2"><input name="shichangjia"  class="wenbenkuang" type="text" id="shichangjia" size="15" 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"))%>">
      <span class="STYLE1">*</span>　
      
      　　　      </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td align="right">所需积分：</td>
    <td colspan="2"><input name="jifen" type="text"  class="wenbenkuang" id="jifen" size="15" 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"))%>">
      <span class="STYLE1">*</span></td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td align="right">库存：</td>
    <td colspan="2"><input name="kc" type="text" class="wenbenkuang" id="kc" onKeyPress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" value="<%=trim(rs1("kc"))%>" size="15" 
		onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))">
      <span class="STYLE1">*</span></td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td align="right">等级：</td>
    <td colspan="2"><select name="section">
      <option value="1" <%if rs1("section")=1 then%>selected<%end if%>>A</option>
      <option value="2" <%if rs1("section")=2 then%>selected<%end if%>>B</option>
      <option value="3" <%if rs1("section")=3 then%>selected<%end if%>>C</option>
    </select></td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td width="15%" height="18" align="right">奖品图片： </td>
    <td height="18" colspan="2">
      <input name="shoppic" type="text"  class="wenbenkuang" id="shoppic" size="30" value="<%=trim(rs1("shoppic"))%>">
&nbsp;
      <input type="button" name="Submit2"  class="go-wenbenkuang" value="上传小图片" onClick="window.open('../upload.asp?formname=myform&editname=shoppic&uppath=shoppic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td width="15%" height="18" align="right">&nbsp; </td>
    <td height="18" colspan="2">
      <input name="shoppic2" type="text"  class="wenbenkuang" id="shoppic2" size="30" value="<%=trim(rs1("shoppic2"))%>">
&nbsp;
      <input type="button" name="Submit2"  class="go-wenbenkuang" value="上传大图片" onClick="window.open('../upload.asp?formname=myform&editname=shoppic2&uppath=shoppic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td width="15%" align="right" valign="top">奖品说明： </td>
    <td colspan="2">
      <textarea name="shopcontent"  class="wenbenkuang" cols="80" rows="8" id="shopcontent"><%=trim(rs1("shopcontent"))%></textarea>    </td>
  </tr>
  <tr bgcolor="#F3F3F3">
    <td height="32" colspan="3">
      <div align="center">
        <input name="xianshi" type="radio" value="1" <%if rs1("xianshi")=1 then%>checked<%end if%>>
        显示（指让不让用户在前台看到）
        <input type="radio" name="xianshi" value="0" <%if rs1("xianshi")=0 then%>checked<%end if%>>
      不显示
       <input type="checkbox" name="tuijian" value="1" <%if rs1("tuijian")=1 then%>checked<%end if%>>
       推荐到首页</div>  </td>
    </tr>
  <tr bgcolor="#F3F3F3">
    <td height="32" colspan="3"> <div align="center">
      <input type="submit" name="Submit" value="修 改"  class="go-wenbenkuang">
    </div></td>
  </tr>
</table>
</form>
<%rs1.close
								set rs1=nothing%>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>

<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
     if(checkspace(document.myform.shopname.value)) {
	document.myform.shopname.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;
  }
  if(checkspace(document.myform.kc.value)) {
	document.myform.kc.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>
