<%Option Explicit%><!--#include file="CONN.ASP"--><%
dim rs
dim formsize,formdata,bncrlf,divider,datastart,dataend,mydata,jiutian,username,id,name,user_id
user_id=request("id")

formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)

Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * from ΓϋΌΛ where id=" & user_id,conn,3,2

rs("photo")=rs("photo")+1
rs.update
id=rs("id")
name=rs("ΠΥΓϋ")

%><!--#include file="CONNPIC.ASP"--><%

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "pic",conn,3,2
rs.addnew
rs("big").appendchunk mydata
rs("user_id")=user_id
rs("date")=date
rs("ΠΥΓϋ")=name
rs.update

set rs=nothing
set conn=nothing
response.redirect "admin.asp?id=" & user_id

%>