<%@ Language=VBScript %>
<!--#include file="../../yns_chklogin.asp" -->
<!--#include File="../Functions.asp"-->
<!--#include File="../ClientScript.asp"-->
<%
Dim SitcomID
SitcomID = Request("SitcomID")

If IsNull(SitcomID) Or IsEmpty(SitcomID) Then
	Response.End
End If

Dim MyConn, RS, SqlSelect
Set MyConn = GetConnection
Set RS = Server.CreateObject("Adodb.RecordSet")

SqlSelect = "Select * From SitcomInfo Where SitcomID=" & SitcomID

RS.Open SqlSelect, MyConn, 1, 3

If RS.BOF Then
	RS.Close
	Set RS = Nothing
	MyConn.Close
	Set MyConn = Nothing
	
	Response.End
End If

%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

<link rel="stylesheet" href="../../zf.css">

<TITLE>修改产品详细信息</TITLE>
</HEAD>

<script language="javascript">
<!--
function loginfocus()
	{
	document.FormAddSitCom.SitcomName.focus();
	return;
	}
	
function persubmit()
	{
	return (
		validate(document.FormAddSitCom.SitcomName, "片名",1,80) &&
		validate(document.FormAddSitCom.MarketPrice, "市场价",1,10) &&
		validate(document.FormAddSitCom.MemberPrice, "会员价",1,10) &&
		
	<%	
	Dim i
	For i = 0 To 9
	%>
		validate(document.FormAddSitCom.link_name_<%=i%>, "链接名称",0,127) &&
		validate(document.FormAddSitCom.link_addr_<%=i%>, "链接地址",0,127) &&
	<%
	Next
	%>
	<%for i = 24 to rs.fields.count-1
	   %>
	    validate(document.FormAddSitCom.rsname_<%=i%>, "<%=rs(i).name%>",1,250) &&
	<%next%> 
		validateNumber(document.FormAddSitCom.MarketPrice,"市场价") &&
		validateNumber(document.FormAddSitCom.MemberPrice,"会员价"));
	}
//-->
</script>

<BODY onload="loginfocus();" bgcolor="#ffffff">

<P>&nbsp;</P>
<form name=FormAddSitCom method=post action=DoModifySitcom.asp onsubmit="return persubmit();" enctype="multipart/form-data">
<input type="hidden" name=SitcomID value=<%=SitcomID%>>
  <table width="100%" align=center cellpadding=0 cellspacing=0>
    <tr> 
      <td align=center colspan=4><font size=4><b>修改产品</b></font></td>
    </tr>
    <tr> 
      <td align=right colspan=4>带<font color=red>*</font>的为必填项</td>
    </tr>
    <tr> 
      <td align=center colspan=4> <hr> </td>
    </tr>
    <tr> 
      <td align=right><font color=Red>*</font>品　　名：</td>
      <td height="30" align=left> <INPUT name=SitcomName type="text" class=text id=text1 value=<%=RS("SitcomName")%> size="40"> 
      </td>
    </tr>
    <tr> 
      <td align=right>产品编号：</td>
      <td height="30" align=left> <INPUT type="text" id=text8 name=sitcombh class=text size=20 value=<%=RS("sitcombh")%>>
       <label for="tj"><input name="tj" type="checkbox" id="tj" value="true" <%if rs("tj")=true then Response.write " checked"%>>
        是否推荐</label></td>
    </tr>
    <tr> 
      <td align=right>类　　型：</td>
      <td height="30" align=left> <Select id=select name=SitcomType>
          <%
      Dim TypeRS
      Set TypeRS = Server.CreateObject("Adodb.RecordSet")
      
      SqlSelect = "Select * From SitcomType"
      Set TypeRS = MyConn.Execute(SqlSelect)
      
      If TypeRS.BOF Then
      %>
          <Option value=0>还没有类型</Option>
          <%
      Else
		Do While Not TypeRS.EOF
      %>
          <Option value=<%=TypeRS("TypeID")%><%If TypeRS("TypeID")=RS("Type") Then%> Selected <%End If%>><%=TypeRS("TypeName")%></Option>
          <%
		  TypeRS.MoveNext
		Loop
	  TypeRS.Close
	  Set TypeRS = Nothing
      End If
      %>
        </Select>
      </td>
    </tr>
    <tr> 
      <td align=right>选择小图片：</td>
      <td align=left colspan=3> <img src="../showpic.asp?SitcomID=<%=SitcomID%>&Size=Small"><br> 
        <INPUT type="file" id=file1 name=SmallPic class=file size=40> </td>
    </tr>
    <tr> 
      <td align=right>选择大图片：</td>
      <td align=left colspan=3> <img src="../showpic.asp?SitcomID=<%=SitcomID%>&Size=Large"><br> 
        <INPUT type="file" id=file2 name=LargePic class=file size=40> </td>
    </tr>
    <tr> 
      <td align=right>简　　介：</td>
      <td align=left colspan=3> <TEXTAREA rows=4 cols=55 id=textarea1 name=BriefIntroduction><%=RS("BriefIntroduction")%></TEXTAREA> 
      </td>
    </tr>
    <tr> 
      <td align=right>详　　情：</td>
      <td align=left colspan=3> <iframe ID="eWebEditor1" src="../editor/ewebeditor.asp?id=Detail&style=standard" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe> 
        <input name="Detail" type="hidden" id="Detail" value="<%=Server.HTMLEncode(rs.Fields.Item("Detail").Value)%>"> 
        <input name="enDetail" type="hidden" id="enDetail" value="<%=Server.HTMLEncode(rs.Fields.Item("enDetail").Value)%>"> 
        <input name="guzhang" type="hidden" id="guzhang2" value="<%=Server.HTMLEncode(rs.Fields.Item("guzhang").Value)%>"></td>
    </tr>
    <tr> 
      <td align=right>&nbsp;</td>
      <td align=left colspan=3>&nbsp;</td>
    </tr>
    <tr> 
      <td align=right>&nbsp;</td>
      <td align=left colspan=3>&nbsp;</td>
    </tr>
    <tr> 
      <td colspan=4> <HR> <input name="test" type="hidden" id="test" value=""> 
      </td>
    </tr>
    <tr> 
      <td colspan=4 align=right> <INPUT type="submit" value="确定" id=submit1 name=SubmitModify class=buttonmanager> 
        <INPUT type="button" value="取消" id=button1 name=button1 onclick="window.history.back()" class=buttonmanager> 
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
    </tr>
  </table>
</form>
</BODY>
</HTML>
<%
RS.Close
Set RS = Nothing
MyConn.Close
Set MyConn = Nothing
%>