<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>


<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>


<object runat=server id=connpic progid="adodb.connection"></object>
<%application.Lock
connpic.Open Application("p_pic")
Application.UnLock
%>
<%
id=request("id")
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='"& request("user_name")&"'"
rs_apply.open sql2,conn1,3,2

  conn1.close
  
  
  response.redirect "photo_manage.asp?sex="&request("sex")
 %>
  