

<%if Session("weight")=0 then 
	Response.Redirect "error.asp?cause=4"
 end if
%>
<object runat=server id=connpic progid="adodb.connection"></object>
<%application.Lock
connpic.Open Application("p_pic")
Application.UnLock
%>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
id=request("id")
'user_name=request("user_name")

'-----------------------------------------------------------------

set rs_apply=server.createobject("adodb.recordset")
sql="delete * from pic where id ="& id 
rs_apply.open sql,connpic,3,2

connpic.close

'-----------------------------------------------------------------

'-----------------------------------------------------------------
sql2="Update user Set photo=photo-1 Where user_name='"& session("Current_user")&"'"
rs_apply.open sql2,conn1,3,2

 
  
  response.redirect "my_photo.asp"
 %>
  