<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp" -->
<!--#include file="top.asp"-->
<%
tid = int(Request("tid"))

action=request.QueryString("action")
select case action
case "save"
if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from com_down",conn,1,3
rs.addnew

rs("cid")=0
rs("type")=tid
rs("pid")=0

rs("titlecn")=trim(request("titlecn"))
rs("bookpicm")=trim(request("bookpicm"))
rs("bookpic")=trim(request("bookpic"))
rs("picsize")=trim(request("picsize"))

rs("date")=date()
rs("ck")=0

rs("lookcn")=1
rs("looken")=1
rs("lookutf")=1
rs("adminuser")=session("admin_xyz")

rs.update
rs.close
set rs=nothing

response.write "<script language=javascript>alert('添加成功！');window.location.href='photo_manage.asp';</script>"
response.redirect "photo_manage.asp?tid="&tid&""
response.End
end if
%>
<%case ""%>

<form name="myform" method="post" action="?action=save&tid=<%=tid%>">
<div id="container">
<div class="top_but">
 <li class="left"></li>
 <li><a href="photo_manage.asp?tid=<%=tid%>"><img src="images/but_11.gif" alt="管理"></a></li>
 <li><img src="images/but_8.gif" alt="刷新" style="cursor:hand" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" style="cursor:hand;" 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><input name="titlecn" type="text" id="titlecn" size="45"></li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">小图上传</li>
 <li><input name="bookpicm" type="text" id="bookpicm" size="60"></li>
 <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpicm&booksize=picsize&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe></li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">大图上传</li>
 <li><input name="bookpic" type="text" id="bookpic" size="60"></li>
 <li><iframe ID="UploadFiles" src="update_file.asp?editname=bookpic&booksize=picsize&filepath=upload_files" frameborder=0 scrolling=no width="200" height="20"></iframe></li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">资料大小</li>
 <li><input name="picsize" type="text" size="10" readonly> KB</li>
</div>

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

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