<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp" -->
<!--#include file="inc/htmlconfig.asp"-->
<!--#include file="top.asp"-->
<!--#include file="inc/up_img.asp"-->
<%
tid = int(Request("tid"))
word=request("word")
page=request("page")
pt=request("pt")
tuij=request("tuij")
sortpath=request("sortpath")
id=request.QueryString("id")

select case action
case "save"

set rs=server.CreateObject("adodb.recordset")
sql="select * from com_books where id="&id
rs.open sql,conn,1,3
rs("type")=tid
ccid= split(request("Cid"),"|")
rs("Cid")=ccid(0)
rs("Nid")=ccid(1)
rs("Sid")=ccid(2)

rs("keywordscn")=trim(request("keywordscn"))
rs("keywordsen")=trim(request("keywordsen"))
rs("keywordsutf")=trim(request("keywordsutf"))
rs("descriptioncn")=trim(request("descriptioncn"))
rs("descriptionen")=trim(request("descriptionen"))
rs("descriptionutf")=trim(request("descriptionutf"))

rs("titlecn")=trim(request("titlecn"))
rs("titleen")=trim(request("titleen"))
rs("titleutf")=trim(request("titleutf"))

rs("cs1")=request("cs1")
rs("cs2")=request("cs2")
rs("cs3")=request("cs3")

rs("bookpicm")=trim(request("bookpicm"))
rs("bookpicmm")=trim(request("bookpicmm"))
rs("bookpic")=trim(request("bookpic"))
rs("bookpicl")=trim(request("bookpicl"))
if Request("bookpicl")<>"" then
rs("homelbook")=1
end if

rs("DefaultPic")=replace(trim(request("DefaultPic"))," ","")


'if Request("kucun")="" then rs("kucun")="0" else rs("kucun")=request("kucun") end if
if Request("shichangjia")="" then rs("shichangjia")="0" else rs("shichangjia")=request("shichangjia") end if
if Request("shopxphyjia")="" then rs("shopxphyjia")="0" else rs("shopxphyjia")=request("shopxphyjia") end if
if Request("jifeng")="" then rs("jifeng")="0" else rs("jifeng")=request("jifeng") end if

rs("textcn")=trim(request("textcn"))
rs("texten")=trim(request("texten"))
rs("textutf")=trim(request("textutf"))
rs.update
rs.close
set rs=nothing
conn.close
set conn=Nothing

response.Redirect "book_manage.asp?page="&page&"&word="&word&"&pt="&pt&"&tuij="&tuij&"&sortpath="&sortpath&"&tid="&tid&""
response.End
end select
%>
<form name="myform" method="post" action="?action=save&id=<%=id%>&word=<%=word%>&pt=<%=pt%>&tuij=<%=tuij%>&sortpath=<%=sortpath%>&page=<%=page%>&tid=<%=tid%>" >
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from com_books where id="&id
rs.open sql,conn,1,1
%>


<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><a href="book_manage.asp?tid=<%=tid%>"><img src="images/but_11.gif" alt="管理"></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
</div>
<div class="tableAll titlebgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:700px;">修改内容</li>
</div>

<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">选择分类</li>
 <li>
<%
  set rs1=server.CreateObject("adodb.recordset")
  rs1.open "select * from com_class where type="&tid&" and Cid=0 and LevelID=0 order by pid asc,id desc",conn,1,1
  %>
   <select name="Cid" size="1" >
    <%
    do while not rs1.eof
	%>
    <option value="<%=rs1("ID")%>|<%=rs1("cID")%>|<%=rs1("nID")%>" <%if rs("cid")=rs1("id") then%>selected<%end if%>><%=rs1("ClassNamecn")%>
	
  <%
  set rs2=server.CreateObject("adodb.recordset")
  rs2.open "select * from com_class where type="&tid&" and Cid="&rs1("ID")&" and nid=0 order by pid asc,id desc",conn,1,1
  %>
    <%
    do while not rs2.eof
	%>
    <option value="<%=rs2("cID")%>|<%=rs2("ID")%>|<%=rs2("nID")%>" <%if rs("nid")=rs2("id") then%>selected<%end if%>>&nbsp;&nbsp;-&nbsp;<%=rs2("ClassNamecn")%>
	
	 <%
  set rs3=server.CreateObject("adodb.recordset")
  rs3.open "select * from com_class where type="&tid&" and Cid="&rs2("cID")&"  and  nid="&rs2("id")&" order by pid asc,id desc",conn,1,1
  %>
    <%
    do while not rs3.eof
	%>
    <option value="<%=rs3("cID")%>|<%=rs3("nID")%>|<%=rs3("ID")%>" <%if rs("sid")=rs3("id") then%>selected<%end if%>>&nbsp;&nbsp;&nbsp;--&nbsp;<%=rs3("ClassNamecn")%>
    <%
    rs3.movenext
    loop
	%>
    <%
	rs3.close
	set rs3=nothing
	%>
	
    <%
    rs2.movenext
    loop
	%>
    <%
	rs2.close
	set rs2=nothing
	%>
	
    <%
    rs1.movenext
    loop
	%>
    <%
	rs1.close
	set rs1=nothing
	%>
    </select>
</li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_cn%>名称</li>
<li><input name="titlecn" type="text" id="titlecn" style="width:650px;" value="<%=rs("titlecn")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_cn%>关键字</li>
<li><input name="keywordscn" type="text" id="keywordscn" style="width:650px;" value="<%=rs("keywordscn")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_cn%>描述</li>
<li><input name="descriptioncn" type="text" id="descriptioncn" style="width:650px;" value="<%=rs("descriptioncn")%>"></li>
</div>

<%if Const_webEn =1 then%>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_en%>名称</li>
<li><input name="titleen" type="text" id="titleen" style="width:650px;" value="<%=rs("titleen")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_en%>关键字</li>
<li><input name="keywordsen" type="text" id="keywordsen" style="width:650px;" value="<%=rs("keywordsen")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_en%>描述</li>
<li><input name="descriptionen" type="text" id="descriptionen" style="width:650px;" value="<%=rs("descriptionen")%>"></li>
</div>
<%end if%>
  
<%if Const_webUtf =1 then%>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_Utf%>名称</li>
<li><input name="titleutf" type="text" id="titleutf" style="width:650px;" value="<%=rs("titleutf")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_Utf%>关键字</li>
<li><input name="keywordsutf" type="text" id="keywordsutf" style="width:650px;" value="<%=rs("keywordsutf")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px"><%=language_Utf%>描述</li>
<li><input name="descriptionutf" type="text" id="descriptionutf" style="width:650px;" value="<%=rs("descriptionutf")%>"></li>
</div>
<%end if%>

<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">价　　格：</li>
<li>原价：<input name="shichangjia" type="text" value="<%=rs("shichangjia")%>">&nbsp;销售价：
	<input name="shopxphyjia" type="text" value="<%=rs("shopxphyjia")%>" ></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">积　　分：</li>
<li><input name="jifeng" type="jifeng" value="<%=rs("jifeng")%>" ></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">商品编号：</li>
<li><input name="cs1" type="text"  value="<%=rs("cs1")%>" ></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">产品货号：</li>
<li><input name="cs2" type="text"  value="<%=rs("cs2")%>"></li>
</div>
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">库　　存：</li>
<li><%=rs("kucun")%> </li>
</div>

<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:100px">计量单位：</li>
<li><input name="cs3" type="text"  value="<%=rs("cs3")%>"></li>
</div>

<%if thumb_pic=1 then%>
<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">缩　　图</li>
 <li><input name="bookpicm" type="text" id="bookpicm" value="<%=trim(rs("bookpicm"))%>" size="60" readonly="readonly"></li>
</div>
<%else%>
<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">小　　图</li>
 <li><input name="bookpicm" type="text" id="bookpicm" value="<%=trim(rs("bookpicm"))%>" size="60"></li>
  <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpicm&sltname=bookpicm&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe></li>
</div>
<%end if%>

<%if thumbm_pic=1 then%>
<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">中　　图</li>
 <li><input name="bookpicmm" type="text" id="bookpicmm" value="<%=trim(rs("bookpicmm"))%>" size="60" readonly="readonly"></li>
</div>
<%else%>
<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">中　　图</li>
 <li><input name="bookpicmm" type="text" id="bookpicmm" value="<%=trim(rs("bookpicmm"))%>" size="60"></li>
  <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpicmm&sltname=bookpicmm&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe></li>
</div>
<%end if%>

<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">大　　图</li>
 <li><input name="bookpic" type="text" id="bookpic" value="<%=trim(rs("bookpic"))%>" size="60"></li>
  <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpic&sltname=bookpicm&sltnamem=bookpicmm&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe> 800px*800px</li>
</div>

<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">长　　图</li>
 <li><input name="bookpicl" type="text" id="bookpicl" value="<%=trim(rs("bookpicl"))%>" size="60"></li>
  <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpicl&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe> 260px*500px</li>
</div>
<%if Const_Onepl =1 then%>
<div class="tableAll trbgcolor">
   <li style="width:30px;">&nbsp;</li>
  <li style="width:100px">图　　组</li>
  <li><%=Swfup("edit",rs("DefaultPic"),0)%></li>
</div>
<%end if%>

<div class="clear"></div> 
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:90%;"><textarea id="textcn" name="textcn" style="width:100%;height:280px;"><%=rs("textcn")%></textarea></li>
</div>
<%if Const_webEn =1 then%>
<div class="clear"></div> 
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:90%;"><textarea id="texten" name="texten" style="width:100%;height:280px;"><%=rs("texten")%></textarea></li>
</div>
<%end if%>
<%if Const_webUtf =1 then%>
<div class="clear"></div> 
<div class="tableAll trbgcolor">
<li style="width:30px;">&nbsp;</li>
<li style="width:90%;"><textarea id="textutf" name="textutf" style="width:100%;height:280px;"><%=rs("textutf")%></textarea></li>
</div>
<%end if%>

<div class="tableAll trbgcolor">
  <li style="width:30px;">&nbsp;</li>
 <li><input class="button" type="submit" name="Submit" value="确认ok，修改" > </li>
</div>

</div>
</form>
<!--#include file="footer.asp"-->