www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > i5808/xiugai_products.asp

    <!--#include file="../Conn.asp" -->
<!--#include file="seeion.asp"-->
<% 
exec="select * from Products where id="& request.QueryString("id") 
set rsa=server.createobject("adodb.recordset") 
rsa.open exec,conn,1,1 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<title>修改产品</title><SCRIPT language=JavaScript src="../js/digital.js" type=text/javascript ></SCRIPT>
<%

Dim htmlData

htmlData = Request.Form("body")

Function htmlspecialchars(str)
	str = Replace(str, "&", "&amp;")
	str = Replace(str, "<", "&lt;")
	str = Replace(str, ">", "&gt;")
	str = Replace(str, """", "&quot;")
	htmlspecialchars = str
End Function
%>
<link rel="stylesheet" href="themes/default/default.css" />
	<link rel="stylesheet" href="plugins/code/prettify.css" />
	<script charset="utf-8" src="kindeditor.js"></script>
	<script charset="utf-8" src="lang/zh_CN.js"></script>
	<script charset="utf-8" src="plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="body"]', {
				cssPath : 'plugins/code/prettify.css',
				uploadJson : 'asp/upload_json.asp',
				fileManagerJson : 'asp/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=add]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=add]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
<script language = "JavaScript">
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "SELECT * FROM SmallClass ORDER BY SmallClassID asc",conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
   i = 0
   Do While Not Rs.eof 
%>
subcat[<%=i%>] = new Array("<%= Trim(Rs("SmallClassName"))%>","<%= Rs("BigClassID")%>","<%= Rs("SmallClassID")%>");
<%
        i = i + 1
        Rs.MoveNext
        Loop
        Rs.Close
%>
  
onecount=<%=i%>;

function changelocation(locationid,formname)
    {
    formname.SmallClassID.length = 0; 

    var locationid = locationid;
    var i;
    for (i = 0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            {
             formname.SmallClassID.options[formname.SmallClassID.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
</head>
<body>
<form  name="add" method="post" action="updata_products.asp">
<table width="100%" border="0" align="center" cellpadding="0"  >
  <tr>
    <td height="30" background="images/bg_list.gif"><div  style="padding-left:10px; font-weight:bold; color:#0075a9">修改产品</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
      <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8" >
        <td height="30" width="16%" class="td">产品标题 <font color="#FF0000">*</font></td>
        <td width="84" colspan="2"  class="td">
          <input name="title" type="text" value="<%=rsa("title")%>" size="40"  />
          <label>
          <input name="id" type="hidden" id="id" value="<%=rsa("id")%>" />
          </label></td>
      </tr>
      <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
        <td width="16%" height="30" class="td">产品分类</td>
        <td colspan="2" class="td"><select name="BigClassID" id="BigClassID" onChange="changelocation(document.add.BigClassID.options[document.add.BigClassID.selectedIndex].value,document.add)">
        <option value="<%=rsa("BigClassID")%>">请选择大类</option>
 <%
 i = 0
 Set RsBig = Conn.Execute("SELECT * FROM BigClass ORDER BY px_id")
 Do While Not RsBig.Eof
  If i = 0 Then BigClassID = RsBig(0)
  if rsa("BigClassID")=RsBig(0) then
			response.Write("<option value="""&RsBig(0)&""" selected>"&RsBig(1)&"</option>")
			else
			response.Write("<option value="""&RsBig(0)&""">"&RsBig(1)&"</option>")
			end if
  i = i + 1
  RsBig.MoveNext
 Loop
 Set RsBig = Nothing
 %>
    </select>
          <select name="SmallClassID" id="SmallClassID">
            <option value="<%=rsa("SmallClassID")%>">请选择小类</option>
            <%
 If BigClassID <> "" Then
  Set RsSmall = Conn.Execute("SELECT * FROM SmallClass WHERE BigClassID = "&BigClassID)
  Do While Not RsSmall.Eof 
  if rsa("SmallClassID")=RsSmall(0) then
			response.Write("<option value="""&RsSmall(0)&""" selected>"&RsSmall(1)&"</option>")
			else
			response.Write("<option value="""&RsSmall(0)&""">"&RsSmall(1)&"</option>")
			end if
  RsSmall.MoveNext
  Loop
 End if
 Set RsSmall = Nothing
 %>
          </select></td>
      </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
        <td height="30" class="td">发布作者</td>
        <td colspan="2" class="td"><% 
exec="select * from i5808 where id="&session("admin")&" "
set rsn=server.createobject("adodb.recordset") 
rsn.open exec,conn,1,1 
%> <input name="zz" type="text" value="<%=rsa("zz")%>" size="30"  /></td>
      </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
         <td height="30" class="td">价格</td>
         <td colspan="2" class="td"><input name="jiage" type="text" id="jiage" value="<%=rsa("jiage")%>" size="30"  onKeyPress="event.returnValue=IsDigit();"/></td>
       </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
         <td height="3" class="td">Logo</td>
         <td class="td"><input name="img" type="text" id="img" value="<%=rsa("img")%>" size="30" maxlength="200" /></td>
         <td class="td"><iframe style="top:2px" id="UploadFiles" src="upload_Photo.asp?PhotoUrlID=0" frameborder="0" scrolling="No" width="320" height="25"></iframe></td>
       </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
         <td height="30" bgcolor="#F1F5F8" class="td">关键词</td>
         <td colspan="2" bgcolor="#F1F5F8" class="td"><input name="keywords" type="text" id="keywords" value="<%=rsa("keywords")%>" size="30" />
           不设置留空默认格式为:文章标题+文章类别+网站名称</td>
       </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
         <td height="30" class="td">描述</td>
         <td colspan="2" class="td"><textarea name="description" cols="50" rows="5" id="description"><%=rsa("description")%></textarea>
           不设置留空默认格式为:文章内容前200个字符</td>
       </tr>
       
     <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
       <td height="30" class="td">产品信息内容 <font color="#FF0000">*</font><br><script>  
function oCopy(obj){  
obj.select();  
js=obj.createTextRange();  
js.execCommand("Copy")  
}  
</script> 
点击一下即可复制<input onClick="oCopy(this)" value="[YiFanPage]" size="13" maxlength="13">
分页符</td>
       <td colspan="2" class="td"><textarea name="body" id="body" style="width:700px;height:300px;visibility:hidden;"><%=rsa("body")%></textarea></td>
     </tr>
       <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
        <td height="30" class="td">是否推荐</td>
        <td colspan="2" class="td"><label>
<input type="radio" name="tuijian" value="0" <%if rsa("tuijian")=0 then%>checked<%end if%>>不推荐  
<input type="radio" name="tuijian" value="1" <%if rsa("tuijian")=1 then%>checked<%end if%>>推荐</label></td>
      </tr>
     <tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
         <td height="30" class="td">&nbsp;</td>
         <td colspan="2" class="td"><input type="submit" name="button" id="button" value="确认修改"  class="btn"/></td>
       </tr>
    </table>
</td>
  </tr>
</table></form>
</body>
</html>