<!--#include file="tgzcm_Conn.asp"-->
<!--#include file="tgzcm_Check.asp"-->
<!--#include file="../tgzcm.Cache/tgzcm.Admin.asp"-->
<%
dim pid,pname,phow,pjf,ps,pj,data_color,pic,pintro
pid=PE_CLng(Request.QueryString("pid"))
'来源地址
session("reurl")=Request.ServerVariables("Http_Referer")
If pid=<0 Then 
	Call tgzcm_err_c("必要参数不能为空！")
	Response.End
End if
Set rs = Server.CreateObject("adodb.recordset")
sql = " select top 1 * from tgzcm_product where pid="&pid&" "
rs.Open sql, Conn, 1, 1
If Not(rs.bof And rs.eof) Then
	pname=Trim(rs("pname"))
	data_color=Trim(rs("pcolor"))
	pic=rs("pic")
	pjf=rs("pjf")
	pj=rs("pj")
	ps=rs("ps")
	pintro=rs("pabout")
Else
	Call tgzcm_err_c("没有找到该奖品的相关信息，无法编辑，请点击确定返回上一页！")
End If
rs.Close
Set rs=nothing

Sub DataColor()%>
<option value=''>颜色</option>                      
<option value=''>默认</option>                      
<option value='#000000' style='background-color:#000000' <%If data_color="#000000" Then Response.Write "selected"%>></option>
<option value='#FFFFFF' style='background-color:#FFFFFF' <%If data_color="#FFFFFF" Then Response.Write "selected"%>></option>
<option value='#008000' style='background-color:#008000' <%If data_color="#008000" Then Response.Write "selected"%>></option>
<option value='#FFFF00' style='background-color:#FFFF00' <%If data_color="#FFFF00" Then Response.Write "selected"%>></option>
<option value='#FF0000' style='background-color:#FF0000' <%If data_color="#FF0000" Then Response.Write "selected"%>></option>
<option value='#0000FF' style='background-color:#0000FF' <%If data_color="#0000FF" Then Response.Write "selected"%>></option>                      
<%End Sub%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>产品管理页面</TITLE>
<link href="skins/css/tgzcm_main.css" rel="stylesheet" type="text/css" />
<script language = "javaScript" src = "tgzcm_All.js" type="text/javascript"></script>
<script type='text/javascript' src='../Js/tgzcm.Ajax.js'></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<th colspan=5 style="text-align:center;"><strong>添 加 兑 换 奖 品</strong></th>
</tr>
<form name="form1" method="post" action="tgzcm_Product_save.asp?action=edit&pid=<%=pid%>" onSubmit="javascript:return tgzcmpForm()">
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">奖品名称：</td>
  <td colspan="3" class="td1" style="padding-left:10px"><input  style="width:250px; text-align:left" name="p_name" value="<%=pname%>"> <span class="td1" style="padding-left:2px">
   <select name="data_color" style=" width:60px;"><%Call DataColor%></select>
    *</span></td>
</tr>
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">奖品数量：</td>
  <td colspan="3" class="td1" style="padding-left:10px"><input name="p_how" type="text" id="p_how" style="width:250px; text-align:left" onkeyup='this.value=this.value.replace(/\D/gi,"")' value="<%=pj%>">
    * 必需为数字</td>
</tr>
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF"><span class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">所需积分</span>：</td>
  <td colspan="3" class="td1" style="padding-left:10px"><input name="p_jf" type="text" id="p_jf" style="width:250px; text-align:left" onkeyup='this.value=this.value.replace(/\D/gi,"")' value="<%=pjf%>">
   * 奖品兑换所要积分|必需为数字</td>
</tr>
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">产品小图：</td>
  <td width="266" class="td1" style="padding-left:10px;"><input name="data_smallpic" type="text" style="width:250px; text-align:left;" value="<%=pic%>"></td>
  <td width="280" class="td1" ><span style="padding-left:5px;">
    <iframe src="tgzcm_pic.file.htm.asp?name=data_smallpic" scrolling="no" topmargin="0" width="240" height="24" marginwidth="0" marginheight="0" frameborder="0" align="left"></iframe></span></td>
  <td width="327" class="td1" >&nbsp;</td>
</tr>
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">产品简介：</td>
  <td colspan="3" class="td1" style="padding-left:10px; height:240px"><textarea name="p_intro" cols="80" rows="15" id="p_intro" style="display:none"><%=pintro%></textarea><iframe ID="Editor" name="Editor" src="Editor/index.html?ID=p_intro" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:220;width:100%"></iframe></td>
</tr>
<tr >
  <td width="86" class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF">处理方式<span class="td2" style="text-align:right; border-bottom:1px solid #FFFFFF;"></span></td>
  <td colspan="3" class="td1" style=" text-align:center"><input type="submit" name="Submit" value="提交">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>

</body>
</html>