<!--#include file=conn.asp-->
<!--#include file="config.asp"-->
<%
if gx=1 then
if not IsNumeric(request("id")) or request("id")="" then
		Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
		Response.end
	end if
%>
<%if request("id")<>"" then
	id=CLNG(request("id"))
	end if
if session("person")="" then
	response.write"<script>alert('对不起,您未登录!');window.navigate('login.asp');</script>"
	Response.end
	end if
	rs.open"select * from Share where id="&id&"",conn,1,1
	if rs.eof then
	Response.Write ("<script>alert('友情提示!\n\参数错误!');history.back();</script>")
		Response.end
		rs.close
	end if
	url=weburl&"/"&rs("fname")
	if rs("fen")=0 then
	if rs("upuser")<>session("person") then
	rs1.open"select * from person where name='"&rs("upuser")&"'",conn,1,3
	rs1("jifen")=rs1("jifen")+xzjl
	if rs1("jifen")+xzjl<fen1 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")+xzjl>=fen1 and rs1("jifen")+xzjl<fen2 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")+xzjl>=fen2 and rs1("jifen")+xzjl<fen3 then
		  rs1("touxian")=""&ji2&" 二级"
		  elseif rs1("jifen")+xzjl>=fen3 and rs1("jifen")+xzjl<fen4 then
		  rs1("touxian")=""&ji3&" 三级"
		  elseif rs1("jifen")+xzjl>=fen4 and rs1("jifen")+xzjl<fen5 then
		  rs1("touxian")=""&ji4&" 四级"
		  elseif rs1("jifen")+xzjl>=fen5 and rs1("jifen")+xzjl<fen6 then
		  rs1("touxian")=""&ji5&" 五级"
		  elseif rs1("jifen")+xzjl>=fen6 and rs1("jifen")+xzjl<fen7 then
		  rs1("touxian")=""&ji6&" 六级"
		  elseif rs1("jifen")+xzjl>=fen7 and rs1("jifen")+xzjl<fen8 then
		  rs1("touxian")=""&ji7&" 七级"
		  elseif rs1("jifen")+xzjl>=fen8 and rs1("jifen")+xzjl<fen9 then
		  rs1("touxian")=""&ji8&" 八级"
		  elseif rs1("jifen")+xzjl>=fen9 and rs1("jifen")+xzjl<fen10 then
		  rs1("touxian")=""&ji9&" 九级"
		  elseif rs1("jifen")+xzjl>=fen10 then
		  rs1("touxian")=""&ji10&" 十级"
		  end if
	rs1.update
	rs1.close
	end if
	else
	rs1.open"select * from person where name='"&rs("upuser")&"'",conn,1,3
	rs1("jifen")=rs1("jifen")+rs("fen")
	if rs1("jifen")+rs("fen")<fen1 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")+rs("fen")>=fen1 and rs1("jifen")+rs("fen")<fen2 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")+rs("fen")>=fen2 and rs1("jifen")+rs("fen")<fen3 then
		  rs1("touxian")=""&ji2&" 二级"
		  elseif rs1("jifen")+rs("fen")>=fen3 and rs1("jifen")+rs("fen")<fen4 then
		  rs1("touxian")=""&ji3&" 三级"
		  elseif rs1("jifen")+rs("fen")>=fen4 and rs1("jifen")+rs("fen")<fen5 then
		  rs1("touxian")=""&ji4&" 四级"
		  elseif rs1("jifen")+rs("fen")>=fen5 and rs1("jifen")+rs("fen")<fen6 then
		  rs1("touxian")=""&ji5&" 五级"
		  elseif rs1("jifen")+rs("fen")>=fen6 and rs1("jifen")+rs("fen")<fen7 then
		  rs1("touxian")=""&ji6&" 六级"
		  elseif rs1("jifen")+rs("fen")>=fen7 and rs1("jifen")+rs("fen")<fen8 then
		  rs1("touxian")=""&ji7&" 七级"
		  elseif rs1("jifen")+rs("fen")>=fen8 and rs1("jifen")+rs("fen")<fen9 then
		  rs1("touxian")=""&ji8&" 八级"
		  elseif rs1("jifen")+rs("fen")>=fen9 and rs1("jifen")+rs("fen")<fen10 then
		  rs1("touxian")=""&ji9&" 九级"
		  elseif rs1("jifen")+rs("fen")>=fen10 then
		  rs1("touxian")=""&ji10&" 十级"
		  end if
	rs1.update
	rs1.close
	rs1.open"select * from person where name='"&session("person")&"'",conn,1,3
	rs1("jifen")=rs1("jifen")-rs("fen")
	if rs1("jifen")-rs("fen")<fen1 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")-rs("fen")>=fen1 and rs1("jifen")-rs("fen")<fen2 then
		  rs1("touxian")=""&ji1&" 一级"
		  elseif rs1("jifen")-rs("fen")>=fen2 and rs1("jifen")-rs("fen")<fen3 then
		  rs1("touxian")=""&ji2&" 二级"
		  elseif rs1("jifen")-rs("fen")>=fen3 and rs1("jifen")-rs("fen")<fen4 then
		  rs1("touxian")=""&ji3&" 三级"
		  elseif rs1("jifen")-rs("fen")>=fen4 and rs1("jifen")-rs("fen")<fen5 then
		  rs1("touxian")=""&ji4&" 四级"
		  elseif rs1("jifen")-rs("fen")>=fen5 and rs1("jifen")-rs("fen")<fen6 then
		  rs1("touxian")=""&ji5&" 五级"
		  elseif rs1("jifen")-rs("fen")>=fen6 and rs1("jifen")-rs("fen")<fen7 then
		  rs1("touxian")=""&ji6&" 六级"
		  elseif rs1("jifen")-rs("fen")>=fen7 and rs1("jifen")-rs("fen")<fen8 then
		  rs1("touxian")=""&ji7&" 七级"
		  elseif rs1("jifen")-rs("fen")>=fen8 and rs1("jifen")-rs("fen")<fen9 then
		  rs1("touxian")=""&ji8&" 八级"
		  elseif rs1("jifen")-rs("fen")>=fen9 and rs1("jifen")-rs("fen")<fen10 then
		  rs1("touxian")=""&ji9&" 九级"
		  elseif rs1("jifen")-rs("fen")>=fen10 then
		  rs1("touxian")=""&ji10&" 十级"
		  end if
	rs1.update
	rs1.close
	end if
	rs1.open"select * from Share where id="&id&"",conn,1,3
	rs1("xia")=rs1("xia")+1
	rs1.update
	rs1.close
	rs.close
	response.redirect ""&url&""
	response.end
else
Response.Write ("<script>alert('对不起,共享资料功能未启用!');history.back();</script>")
		Response.end
	end if
%>