<% ipadd_local = Request.ServerVariables("REMOTE_ADDR") set fs = createobject("scripting.filesystemobject") set a = fs.opentextfile(Server.MapPath("ipadd.txt"),1) if a.AtEndOfStream then else ipadd = a.readline ipblock = split(ipadd,",") for i = 0 to ubound(ipblock) if 0 < instr(ipadd_local,ipblock(i)) then Response.Redirect("http://www.google.co.th/") exit for end if next end if %>
<% '----------------------------------------------------------------------------- 'Muli File's upload Created by Bhushan Paranjpe '----------------------------------------------------------------------------- Sub BuildUploadRequest(RequestBin) 'Get the boundary PosBeg = 1 PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13))) if PosEnd = 0 then Response.Write "Form was submitted with no ENCTYPE=""multipart/form-data""
" Response.Write "Please correct the form attributes and try again." Response.End end if boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg) boundaryPos = InstrB(1,RequestBin,boundary) 'Get all data inside the boundaries Do until (boundaryPos=InstrB(RequestBin,boundary & getByteString("--"))) 'Members variable of objects are put in a dictionary object Dim UploadControl Set UploadControl = CreateObject("Scripting.Dictionary") 'Get an object name Pos = InstrB(BoundaryPos,RequestBin,getByteString("Content-Disposition")) Pos = InstrB(Pos,RequestBin,getByteString("name=")) PosBeg = Pos+6 PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(34))) Name = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg)) PosFile = InstrB(BoundaryPos,RequestBin,getByteString("filename=")) PosBound = InstrB(PosEnd,RequestBin,boundary) 'Test if object is of file type If PosFile<>0 AND (PosFile "") Then ' ตอนแรกยังไม่ทำ if UploadQueryString <> "" then AF_uploadAction = AF_uploadAction & "&" & UploadQueryString end if End If If (CStr(Request.QueryString("AF_upload")) <> "") Then RequestBin = Request.BinaryRead(Request.TotalBytes) Dim UploadRequest Set UploadRequest = CreateObject("Scripting.Dictionary") BuildUploadRequest RequestBin AF_keys = UploadRequest.Keys for AF_i = 0 to UploadRequest.Count - 1 AF_curKey = AF_keys(AF_i) 'Save all uploaded files if UploadRequest.Item(AF_curKey).Item("FileName") <> "" then AF_value = UploadRequest.Item(AF_curKey).Item("Value") AF_valueBeg = UploadRequest.Item(AF_curKey).Item("ValueBeg") AF_valueLen = UploadRequest.Item(AF_curKey).Item("ValueLen") File_Name = "carabao-" & AF_value if right(File_Name,3) = "gif" or right(File_Name,3) = "jpg" or right(File_Name,4) = "jpeg" then if AF_valueLen = 0 then Response.Write "An error has occured saving uploaded file!

" Response.Write "Filename: " & Trim(AF_curPath) & UploadRequest.Item(AF_curKey).Item("FileName") & "
" Response.Write "File does not exists or is empty.
" Response.Write "Please correct and try again" Response.End end if 'Create a Stream instance Dim AF_strm1, AF_strm2 Set AF_strm1 = Server.CreateObject("ADODB.Stream") Set AF_strm2 = Server.CreateObject("ADODB.Stream") 'Open the stream AF_strm1.Open AF_strm1.Type = 1 'Binary AF_strm2.Open AF_strm2.Type = 1 'Binary AF_strm1.Write RequestBin AF_strm1.Position = AF_ValueBeg AF_strm1.CopyTo AF_strm2,AF_ValueLen 'Create and Write to a File AF_curPath = Request.ServerVariables("PATH_INFO") AF_curPath = Trim(Mid(AF_curPath,1,InStrRev(AF_curPath,"/")) & "") if Mid(AF_curPath,Len(AF_curPath),1) <> "/" then AF_curPath = AF_curPath & "/" end if 'on error resume next Randomize aaa=Rnd() aaa = int(aaa*1000) bbb = len(File_Name)-4 File_Name = left(File_Name,bbb) & aaa & right(File_Name,4) AF_strm2.SaveToFile Trim(Server.mappath(AF_curPath))& "\images_upload\" & File_Name,2 'Upload File to images_file Folder if err then Response.Write "An error has occured saving uploaded file!

" Response.Write "Filename : " & Trim(AF_curPath) & UploadRequest.Item(AF_curKey).Item("FileName") & "
" Response.Write "Maybe the destination directory does not exist, or you don't have write permission.
" Response.Write "Please correct and try again" err.clear response.End end if else Response.Write "Plese upload file type is GIF or JPG

" Response.Write "Filename: " & Trim(AF_curPath) & UploadRequest.Item(AF_curKey).Item("FileName") & "
" Response.Write "Please correct and try again" err.clear response.End end if end if next MemCheck = "" PostType = UploadRequest.Item("PostType").Item("Value") Name = UploadRequest.Item("Name").Item("Value") Pass = UploadRequest.Item("Pass").Item("Value") Subject = UploadRequest.Item("Subject").Item("Value") Message = UploadRequest.Item("Message").Item("Value") Submit = UploadRequest.Item("submit1").Item("Value") imgChk = UploadRequest.Item("imgChk").Item("Value") session("Name") = Name session("Subject") = Subject session("Message") = Message if session("cBaoImgName") = imgChk then memberCh = false if File_Name = "" then File_Name = "space.gif" end if Message = Message & vbcr & vbcr '& "" & vbcr & Request("OldMessage") oldstring = Message newstring = "" for i=1 to Len(oldstring) If Mid(oldstring, i, 1) = vbCr Then newstring = newstring & "
" Else newstring = newstring & Mid(oldstring, i, 1) End If Next Message = newstring ' If HTML not allowed remove it oldSubject = Subject newSubject = "" for i=1 to Len(oldSubject) Select Case HTML Case True If Mid(oldSubject, i, 1) = ">" Then HTML = False End If Case Else If Mid(oldSubject, i, 1) = "<" Then HTML = True Else newSubject = newSubject & Mid(oldSubject, i, 1) End If End Select Next Subject = newSubject 'Detect http:// and create link to it oldstring = Message newstring = "" for i = 1 to Len(oldstring) - 7 If LCASE(Mid(oldstring, i, 7)) = "http://" Then for j = i to Len(oldstring) If Mid(oldstring,j,1) = " " or Mid(oldstring,j,1) = vbcr Then Exit For End If next strLink = Mid(oldstring,i,(j-i)) newstring = newstring & "" & strLink & "" & Mid(oldstring,j,1) i = i + (j-i) Else newstring = newstring & Mid(oldstring,i,1) End If next Message = newstring & Mid(oldstring,i,i+7) if Name <> "" And Pass <> "" Then Set ConnCheck =Server.CreateObject("ADODB.Connection") dbname12="/member/CbaoMember0948.mdb" dbpath12="DBQ=" & server.mappath(dbname12) ConnCheck.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath12 sqlCheck = "select top 1 id, nickName, mType from register where userName = '" & Name & "' and password = '" & Pass & "' order by id desc" set rsCheck = ConnCheck.execute(sqlCheck) if rsCheck.eof then Response.Redirect("default.asp") end if ConnCheck.Close End if Set Conn0=Server.CreateObject("ADODB.Connection") dbname="/member/CbaoMember0948.mdb" dbpath="DBQ=" & server.mappath(dbname) Conn0.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath sql0 = "select top 1 id, nickName, mType from register where userName = '" & Name & "' and password = '" & Pass & "' order by id desc" set rs0=Conn0.execute(sql0) if rs0.eof then memberType = "0,0" memberNon = "NoMember" MemCheck = "Err" else MemCheck = rs0("mType") if rs0("id") < 7055 then memberType = rs0("id") & ",0" Name = rs0("nickName") memberType1 = rs0("id") else memberType = rs0("id") & "," & rs0("mType") Name = rs0("nickName") memberType1 = rs0("id") end if end if Conn0.Close Set Conn=Server.CreateObject("ADODB.Connection") Conn.ConnectionTimeout=150 Conn.CommandTimeout=300 dbname="CbaoBoard0948.mdb" dbpath="DBQ=" & server.mappath(dbname) Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath Set Cmd=Server.CreateObject("ADODB.Command") Set RS=Server.CreateObject("ADODB.Recordset") Set Cmd.ActiveConnection = Conn Cmd.CommandText="Select Count(SortCd) as [Count], Max(Int([SortCd])) as [NTop] from Message where ParentId = 0" RS.Open Cmd, , 0, 1 If RS("Count") > 0 Then NTop = RS("NTop") Else NTop = 0 End If RS.Close SortCd = int(NTop) + 1 MajorSort = SortCd Select Case len(SortCd) Case 1 SortCd = "000" & SortCd Case 2 SortCd = "00" & SortCd Case 3 SortCd = "0" & SortCd End Select if memberType1 < 7055 and File_Name <> "space.gif" then dim filesys, demofile set filesys = CreateObject ("Scripting.FileSystemObject") set demofile = filesys.GetFile(server.mappath("images_upload\" & File_Name)) demofile.Delete File_Name = "space.gif" end if if Name <> "ชัยยุทธ์" then Subject = replace(Subject,"*","") end if if MemCheck = "m" Or MemCheck = "x" Or MemCheck = "" Or MemCheck = "Err" then Cmd.CommandText="Select * from Message" RS.Open Cmd, , 2, 2 RS.AddNew RS("ParentId") = 0 RS("Name") = Name RS("Email") = memberType RS("Subject") = Subject RS("Description") = Message RS("MajorSort") = MajorSort RS("SortCD") = SortCD RS("MessageDate") = now()'month(now) & "/" &day (now) & "/" & year(now) & " " & Time RS("Picture_Name") = File_Name RS("ipadd") =Request.ServerVariables("REMOTE_ADDR") RS("Status") = "H" RS.Update RS.Close Conn.Close Response.Write "" if memberType1 < 7055 and memberNon <> "NoMember" then memberCh = true else Response.Redirect("default.asp") end if else 'Response.Write "" Cmd.CommandText="Select * from Message" RS.Open Cmd, , 2, 2 RS.AddNew RS("ParentId") = 0 RS("Name") = Name RS("Email") = memberType RS("Subject") = Subject RS("Description") = Message RS("MajorSort") = MajorSort RS("SortCD") = SortCD RS("MessageDate") = now()'month(now) & "/" &day (now) & "/" & year(now) & " " & Time RS("Picture_Name") = File_Name RS("ipadd") =Request.ServerVariables("REMOTE_ADDR") RS("Status") = "N" RS.Update RS.Close Conn.Close if memberType1 < 7055 and memberNon <> "NoMember" then memberCh = true else Response.Redirect("default.asp") end if end if 'Response.Redirect("default.asp") end if end if %> <%if memberCh then%>



ขณะนี้ท่านเป็นสมาชิก [M] เดิม กรุณาสมัครสมาชิกในระบบใหม่ [MC] ทันที คลิ๊กที่นี่
คาราบาว.เน็ต จะทำการยกเลิกระบบสมาชิก [M] เดิมทั้งหมด ภายใน 16 มกราคม 2549


กลับไป ดูกระทู้ของท่านที่เวทีสนทนาภาษา'บาว






<%else%> <% Set Conn2=Server.CreateObject("ADODB.Connection") dbname="CbaoBoard0948.mdb" dbpath="DBQ=" & server.mappath(dbname) Conn2.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & dbpath sql = "SELECT * FROM ConfigSetting " set rs = Conn2.execute(sql) %> onsubmit="return ValidateNotMem(this); <% Else %>onsubmit="return Validate(this); <% end if %>">

::: เปิดประเด็นใหม่! :::
::: ข้อความสนทนา :::
::: ค้นหาคำที่ต้องการ :::
::: ติดต่อเว็บมาสเตอร์์ :::

เปิดประเด็นใหม่

หัวข้อประเด็น : ">
ชื่อ / Username : "> ได้ทั้ง ไทย / English ขึ้นอยู่กับตอนสมัครครั้งแรก
รหัสผ่าน(เฉพาะสมาชิก) : ลืมรหัสผ่านคลิ๊กที่นี่ : สมัครสมาชิกใหม
รูปภาพ : * เฉพาะสมาชิก [MC] เท่านั้น
รายละเอียด :
<% Arr0 = array("wEPDwUJN.gif","DM4Nzc1O.gif","TYzZBgBB.gif","Q9DYXB0Y.gif","2hhQ29ud.gif","HJvbDEPB.gif","SQyNjAyZ.gif","mRmZC1kZ.gif","TczLTQ1M.gif","WUtODNjM.gif") Arr1 = array("Ah8AaGRk.gif","AZ2RkAg0.gif","BAA8WAh8.gif","LDzwrAA0.gif","fAGhkZAI.gif","NAQAPFgI.gif","CCQ88KwA.gif","HwBoZGQd.gif","AgcPPCsA.gif","DQEADxYC.gif") Arr2 = array("glQYWdlQ.gif","m91bmRnH.gif","yFEYXRhQ.gif","A8WBh4LX.gif","zwrAA0BA.gif","GhkZAILD.gif","QAPFgIfA.gif","FQ88KwAN.gif","AhMPPCsA.gif","HwBoZGQC.gif") Arr3 = array("DExZGQCA.gif","QcwMDAwM.gif","gRUZXh0B.gif","mYPDxYCH.gif","QIBD2QWE.gif","mYPZBbeA.gif","nQCbmQWA.gif","GVtQ291b.gif","R4LXyFJd.gif","291bnQCA.gif") Arr4 = array("DE3MiwxN.gif","h8EBQw2L.gif","AuMDBkZA.gif","gwMCwwMD.gif","8EBQw3LD.gif","ICDw8WAh.gif","JnguITuK.gif","LiBLiDgu.gif","AVK4Lir4.gif","Q8PFgIfB.gif") Arr5 = array("AUEMC4wM.gif","g8PFgIfB.gif","jAwZGQCB.gif","h8EBQQwL.gif","AIFDw8WA.gif","TguOTRkZ.gif","DY0OSwyN.gif","h8EBQwxL.gif","AIEDw8WA.gif","jEuMjRkZ.gif") Arr6 = array("hc3B4P0N.gif","0YWlscy5.gif","yZGVyRGV.gif","GVVcmwU9.gif","mF2aWdhd.gif","S44OR4LT.gif","zMyLDM3M.gif","gQfBAUKN.gif","BYCZg8PF.gif","GRkAgcPZ.gif") Arr7 = array("NhbGVUeX.gif","BlPTAzJl.gif","lNhbGVUe.gif","ZXJJRD0w.gif","Q3VzdG9t.gif","zLmFzcHg.gif","EZXRhaWx.gif","MDAxMSZT.gif","ySUQ9MDA.gif","1c3RvbWV.gif") Arr8 = array("IfBAUJOD.gif","QCAg8PFg.gif","mI4LiHZG.gif","OC4gS4g4.gif","wC4muC4i.gif","AgEPDxYC.gif","DAwMDAyM.gif","FgIfBAUH.gif","RkAgIPZB.gif","BlQz0wMm.gif") Arr9 = array("UEMC4wMG.gif","AwZGQCBQ.gif","YsNzcyLj.gif","IfBAUJLT.gif","QCBA8PFg.gif","cyLjAwZG.gif","UJODYsNz.gif","8PFgIfBA.gif","AwZGQCAw.gif","AsMDAwLj.gif") Randomize numArr=Rnd() numArr = int(numArr*10) Randomize imgName=Rnd() imgName = int(imgName*100000) imgName = right("00000" & cStr(imgName),5) session("cBaoImgName") = imgName for pi = 1 to 5 imgNumber = mid(imgName,pi,1) select case imgNumber case 0 response.Write "" case 1 response.Write "" case 2 response.Write "" case 3 response.Write "" case 4 response.Write "" case 5 response.Write "" case 6 response.Write "" case 7 response.Write "" case 8 response.Write "" case 9 response.Write "" end select next 'response.Write " : " & imgName & " : " 'response.Write numArr %>
พิมพ์ตัวเลขที่แสดงบนหน้าจอ

<% '*********************************************** 'เพิ่มส่วนของการ block ipaddress ipadd_local =Request.ServerVariables("REMOTE_ADDR") 'ipadd_local = left(ipadd_local,instrrev(ipadd_local,".")-1) 'ipadd_local = left(ipadd_local,instrrev(ipadd_local,".")-1) set fs = createobject("scripting.filesystemobject") set a = fs.opentextfile(Server.MapPath("ipadd.txt"),1) if a.AtEndOfStream then response.Write("") else ipadd = a.readline ipblock = split(ipadd,",") for i = 0 to ubound(ipblock) 'response.write ipblock(i) & "ip: " & ipadd_local & "
" if 0 < instr(ipadd_local,ipblock(i)) then 'response.write "instr > 0" session("postsubmit") = false exit for else session("postsubmit") = true end if next if session("postsubmit") then response.Write("") session("postsubmit") = true end if end if 'loop session("postsubmit") = false a.Close '************************************************* %>
<%end if%>