<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_PublicAffairsBookManage")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_BookMain":action=request("action"):WS_BOID=request("WS_BOID")
if WS_BOID="" or isnull(WS_BOID) or (WS_BOID<>"" and not isnumeric(WS_BOID)) then HX_GoBack "非法操作",""  
Orderby=" where WS_BOID="&WS_BOID
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
      a=DateSerial(cint(request("Bookyy")),cint(request("Bookmm")),cint(1))
      rs("WS_BookpublishDate")=a&" "&"11"&":"&"22"&":"&"00"
      rs("WS_BookNUM")=request("Booknumber")
      rs("WS_BookName")=request("Bookname")
      rs("WS_BookAuthor")=request("Bookauthor")
	  if request("Bookprice")<>"" and isnumeric(request("Bookprice")) then  rs("WS_BookPrice")=request("Bookprice")
	  rs("WS_BookPriceUnit")=request("Bookpriceunit")
      rs("WS_BookDetail")=request("bookdetail")
      rs("WS_BookConcern")=request("bookconcern")
      rs.update
	  response.write "<script>alert('修改成功！');location.href='booksmanage.asp';</script>"
      response.end
end if
if rs.recordcount<=0 then  HX_GoBack "非法操作",""
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title></title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'></head><body topmargin='20' leftmargin='0' bottommargin='0'><script language='JavaScript'>function bookcheck(form){if(form.booknumber.value==''){alert('请输入书籍编号!');form.booknumber.focus();return false; }if (form.bookname.value==''){   alert('请输入书籍名称!');  form.bookname.focus(); return false;}return true}</script><table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>添加图书</font></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><form name='form1' method='post' action='?action=saveinfo&WS_BOID="&WS_BOID&"' onSubmit='return bookcheck(this);'><tr bgcolor='#FFFBE8'><td width='14%'>编　　号</td><td width='31%'><input type='text' name='booknumber' maxlength='20' size='20' value='"&rs("WS_BookNum")&"' title='编号格式为：前两位为大写字母，后面跟大于1000的数字'></td><td width='15%'>书　　名</td><td width='40%'><input name='bookname' type='text' value='"&rs("WS_bookname")&"' size='28' maxlength='50'></td></tr><tr bgcolor='#FFFBE8'><td width='14%'>作　　者</td><td width='31%'><input name='bookauthor' type='text' value='"&rs("WS_bookauthor")&"' maxlength='100'></td><td width='15%'>单　　价</td><td width='40%'><input name='bookprice' type='text' style='ime-mode:disabled' value='"&rs("WS_bookprice")&"' size='12' maxlength='12'> <select name='bookpriceunit'><option value='元' selected>元（人民币）</option><option value='美元'>美元</option><option value='港元'>港元</option><option value='新台币'>新台币</option></select></td></tr><tr bgcolor='#FFFBE8'><td width='14%'>出 版 社</td><td width='31%'><input name='bookconcern' type='text' value='"&rs("WS_bookconcern")&"' maxlength='30'></td><td width='15%'>出版时间</td><td width='40%'><select name='bookyy' classname='5'  size='1' >"
for i=year(date)-5 to year(date)
response.Write "<option value='"&i&"'"
if i=year(rs("WS_BookPublishDate")) then response.Write " selected"
response.Write ">"&i&"</option>"
next
response.Write "</select>年<select name='bookmm' classname='5'  size='1' >"
for i=1 to 12
response.Write "<option value='"&i&"'"
if i=month(rs("WS_BookPublishDate")) then response.Write " selected"
response.Write ">"&i&"</option>"
next
response.Write "</select>月</td></tr><tr bgcolor='#FFFBE8'><td width='14%' valign='top'>内容简介</td><td colspan='3'><textarea rows='5' name='bookdetail' cols='70' class='bgLine'>"&rs("WS_bookdetail")&"</textarea></td></tr><tr bgcolor='#FFFBE8'><td>&nbsp;</td><td colspan='3'><input type='submit' name='Submit' value=' 修 改 '></td></tr></form></table></td></tr></table>"
%>