
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()
call saycarda("审核文件")%>


<% dim id,lid,idd,name,laiy,title,green,pay,types,very,cent,sore,guest,usid
id=request.QueryString("id")
 lid=request.QueryString("lid")
idd=request.querystring("idd") 

if id="" or IsNumeric(id)=False then
  Call Error("<p>ID无效！")
  end if
if lid="" or IsNumeric(lid)=False then
  Call Error("<p>ID无效！")
  end if
  if idd="" or IsNumeric(idd)=False then
  Call Error("<p>ID无效！")
  end if
 cent=request.form("cent")
 sore=request.form("sore")  
    if cent="" or IsNumeric(cent)=False then
  Call Error("<p>ID无效！")
  end if
  
    if sore="" or IsNumeric(sore)=False then
  Call Error("<p>ID无效！")
  end if
 guest=request.form("guest")  
 guest=clng(guest)
 
 usid=request.form("usid")
 '判断会员是否存在
 dim ids
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id from [users] where id="&usid,conn,1,1
if rs.eof then
ids=0
else
ids=1
  end if
rs.close
set rs=Nothing
 name=request.form("name")
 laiy=request.form("laiy")  
 title=request.form("title")
 green=request.form("green")
 very=request.form("very")
 pay=request.form("pay")  
 types=request.form("type")
        set rs=server.createobject("adodb.recordset")
	sql="select * from xzfile where id="&id
	rs.open sql,conn,3,3
        if name<>"" then rs("name")=name
        if laiy<>"" then rs("laiy")=laiy
        if title<>"" then rs("title")=title
        if very<>"" then rs("very")=very
        if pay<>"" then rs("pay")=pay
        if types<>"" then rs("type")=types
        if green<>"" then rs("green")=green
        rs("yc")=0
        rs("times")=now()
        rs.update
	 rs.close
	 set rs=nothing
	 IF IDS>0 then
conn.execute("update users  Set myjb = myjb+"&clng(cent)&",myjy=myjy+"&clng(sore)&" where ID = "&usID)
	 end if
	 if guest>0 then
	'发信
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from guest",conn,1,2
rs.addnew
rs("fnr")="您上传的文件["&name&"]已经通过审核了，系统奖励您"&clng(cent)&getcent&","&clng(sore)&"经验,谢谢您的支持!"
rs("sid")=Usid
rs("fid")=0
rs.update
rs.close
set rs=nothing
END IF
         conn.Close
         set conn=Nothing 
        %>
文件审核成功!
<br/>----------<br/>
<a href='wjpass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件审核]</a><br/>
<a href='wjcl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件管理]</a><br/>
<a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%call headsay()%>