<% Session.TimeOut = 1400 Response.Expires = -1 Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "no-cache" %> <% islem = Request("islem") If islem = "Yukle" Then call ImageUpload End If %> Image Upload

<%=session("rumuz")%> Resimini Yükle   <% Function SifreUret(Boy) Dim Sifre,KarakterBoyu,KacinciKarakter Const Karakterler = "ABCDEFGHIJKLMNOPRSTUVYZXW0123456789" Randomize KarakterBoyu = Len(Karakterler) For x = 1 To Boy KacinciKarakter = Int((KarakterBoyu * Rnd) + 1) sifre = sifre & Mid(Karakterler,KacinciKarakter,1) Next SifreUret = sifre End Function Session("KarisikYazi") = SifreUret(7) Kac = request.querystring("Kac") %>


Resim Adresi :


[ KAPAT ]

<% Sub ImageUpload GercekKlasor = "../imgs" ' URL OLRAK VERİLECEK RESİM ADRESİ AŞAĞIDAKİ KLASÖRÜN ADI İLE AYNI OLACAK ImageDir = "../imgs" ' RESİMLERİN YÜKLENECEĞİ KLASÖRÜN ADRESİ ForWriting = 2 adLongVarChar = 201 lngNumberUploaded = 0 'Get binary data from form noBytes = Request.TotalBytes binData = Request.BinaryRead (noBytes) 'convery the binary data to a string Set RST = CreateObject("ADODB.Recordset") LenBinary = LenB(binData) if LenBinary > 0 Then RST.Fields.Append "myBinary", adLongVarChar, LenBinary RST.Open RST.AddNew RST("myBinary").AppendChunk BinData RST.Update strDataWhole = RST("myBinary") End if strBoundry = Request.ServerVariables ("HTTP_CONTENT_TYPE") lngBoundryPos = instr(1, strBoundry, "boundary=") + 8 strBoundry = "--" & right(strBoundry, len(strBoundry) - lngBoundryPos) lngCurrentBegin = instr(1, strDataWhole, strBoundry) lngCurrentEnd = instr(lngCurrentBegin + 1, strDataWhole, strBoundry) - 1 Do While lngCurrentEnd > 0 'Get the data between current boundry and remove it from the whole. strData = mid(strDataWhole, lngCurrentBegin, lngCurrentEnd - lngCurrentBegin) strDataWhole = replace(strDataWhole, strData,"") 'Get the full path of the current file. lngBeginFileName = instr(1, strdata, "filename=") + 10 lngEndFileName = instr(lngBeginFileName, strData, chr(34)) 'Make sure they selected a file. if lngBeginFileName = lngEndFileName and lngNumberUploaded = 0 Then Response.Redirect "ResimEkle.asp?" End if 'There could be an empty file box. if lngBeginFileName <> lngEndFileName Then strFilename = mid(strData, lngBeginFileName, lngEndFileName - lngBeginFileName) tmpLng = instr(1, strFilename, "\") Do While tmpLng > 0 PrevPos = tmpLng tmpLng = instr(PrevPos + 1, strFilename,"\") Loop FileName = right(strFilename, len(strFileName) - PrevPos) lngCT = instr(1,strData, "Content-Type:") if lngCT > 0 Then lngBeginPos = instr(lngCT, strData, chr(13) & chr(10)) + 4 Else lngBeginPos = lngEndFileName End if lngEndPos = len(strData) 'Calculate the file size. lngDataLenth = lngEndPos - lngBeginPos 'Get the file data strFileData = mid(strData, lngBeginPos, lngDataLenth) IF instr(1,FileName,".asp",1) or instr(1,FileName,".mdb",1) or instr(1,FileName,".htm",1) or instr(1,FileName,".txt",1) or instr(1,FileName,".doc",1) or instr(1,FileName,".psd",1) or instr(1,FileName,".exe",1) or instr(1,FileName,".vbs",1) or instr(1,FileName,".dll",1) or instr(1,FileName,".com",1) or instr(1,FileName,".bat",1) or instr(1,FileName,".rar",1) or instr(1,FileName,".zip",1) or instr(1,FileName,".xls",1) or instr(1,FileName,".html",1) or instr(1,FileName,".php",1) or instr(1,FileName,".cgi",1) or instr(1,FileName,".ocx",1) Then %> Image Upload


Göndermeye çalıştığınız dosya türü desteklenmiyor.








[ KAPAT ]
<% ELSE 'Create the file. Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile(server.mappath(imagedir) & "/"&Session("KarisikYazi")&"" & FileName, ForWriting, True) f.Write strFileData Set f = nothing Set fso = nothing End IF lngNumberUploaded = lngNumberUploaded + 1 End if lngCurrentBegin = instr(1, strDataWhole, strBoundry) lngCurrentEnd = instr(lngCurrentBegin + 1, strDataWhole, strBoundry) - 1 loop IF instr(1,FileName,".asp",1) or instr(1,FileName,".mdb",1) or instr(1,FileName,".htm",1) or instr(1,FileName,".txt",1) or instr(1,FileName,".doc",1) or instr(1,FileName,".psd",1) or instr(1,FileName,".exe",1) or instr(1,FileName,".vbs",1) or instr(1,FileName,".dll",1) or instr(1,FileName,".com",1) or instr(1,FileName,".bat",1) or instr(1,FileName,".rar",1) or instr(1,FileName,".zip",1) or instr(1,FileName,".xls",1) or instr(1,FileName,".html",1) or instr(1,FileName,".php",1) or instr(1,FileName,".cgi",1) or instr(1,FileName,".ocx",1) Then ELSE %> <%Kac = request.querystring("Kac")%> <% set lar = Server.CreateObject("ADODB.RecordSet") SQL="select * from resimler" lar.open SQL,connect,1,3 lar.addnew lar("resim")="imgs/"&Session("KarisikYazi")&""&FileName&"" lar("onay")=1 lar("tarih")=now() lar.update %> Bitti Teşekkür Ederim <% End IF Response.End End Sub %>

<% if (Request.QueryString("uye"))="kayit" then dim resim resim=Request.Form("resim") %> <% if resim="" then Response.Write "" %> <% Response.End End if %> <%=resim%>
Yüklendi. en yakın zamanda yöneticiler tarafından onaylanacaktır. <% Response.Redirect "?uye=bitti" %> <% else %> <% if (Request.QueryString("uye"))="bitti" then %>

Kayıta Alımıştır Yönetici Onayladıktanson Kayıta Alınacaktır. [ KAPAT ]

<% else %><% end if %><% end if %>