PDA

Orijinalini görmek için tıklayınız : Asp Kodları Arşivi


ANKEBUT
18-08-2008, 22:17
Arama motoru kodu:


//search.asp dosyası


<%

'Optimize eden varlık=Toygar Dundaralp
'e-Mail=tdundaralp@msn.com

%>
<% option explicit %>
<body bgcolor=336699>
<style type=text/css>
a{color:white;font-family:tahoma;font-size:12;font-weight:bold}
a:hover{color:#990000}
</style>
<font color=orange face=tahoma size=2><b>
<%
dim sol,sag,sayi,connobj,rsobj,sql,ara,sayiand,soland, sagand
set connobj=server.createobject("adodb.connection")
connobj.open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("denek.mdb"))
set rsobj=server.createobject("adodb.recordset")

ara=request.form("ara")
if instr(ara,"'") then
ara=replace(ara,"'","")
end if
if instr(ara," and ") then
ara=replace(ara," and ","|")
sayiand=instr(ara,"|")
soland=left(ara,sayiand-1)
sagand=mid(ara,sayiand+1)
sql="select site,bilgi from denek where kelime1 like '"&soland&"' or kelime2 like '"&soland&"' or " &_
"kelime3 like '"&soland&"' or kelime4 like '"&soland&"' or kelime1 like '"&sagand&"' or " &_
"kelime2 like '"&sagand&"' or kelime3 like '"&sagand&"' or kelime4 like '"&sagand&"'"
elseif instr(ara,"*") then
sol=left(ara,1)
sag=right(ara,1)
sayi=len(ara)-1
if left(ara,1)="*" then
ara=mid(ara,2)
sql="select site,bilgi from denek where kelime1 like '%"&ara&"' or kelime2 like '%"&ara&"' or " &_
"kelime3 like '%"&ara&"' or kelime4 like '%"&ara&"'"
elseif right(ara,1)="*" then
ara=left(ara,sayi)
sql="select site,bilgi from denek where kelime1 like '"&ara&"%' or kelime2 like '"&ara&"%'or " &_
"kelime3 like '"&ara&"%' or kelime4 like '"&ara&"%'"
end if
else
sql="select site,bilgi from denek where kelime1 like '"&ara&"' or kelime2 like '"&ara&"' or " &_
"kelime3 like '"&ara &"' or kelime4 like '"& ara &"'"
end if
rsobj.open sql,connobj,2,3
do while not rsobj.eof
response.write "<a href=http://"& rsobj(0)&">" & rsobj(0) &"</a>" &"<br>" & rsobj(1) &"<br><br>"
rsobj.movenext
loop

%>


<%
rsobj.close
set rsobj = nothing
connobj.close
set connobj = nothing
%>

//search.asp dosyası--------------------------------buraya kadar--------------------------------


//html dosyası--------------------------------------
<html>
<body bgcolor=336699>
<center><br><br>
<form action=search.asp method=post>
<input type=text name=ara> &nbsp
<input type=submit value=" Ara ">
</form>
</center>
</body>
</html>

Sifreleme
Sifrelerinizi korumak için yazilmis bir uygulama. orjinal sifreye sadik kalarak bir yöntemle bu sifrenin karistirilip baskalari tarafindan okunmasini engeller.



<%
function Encrypt(Text,Password)
Dim TextCharCode, PasswordCharCode, NewCharCode

For Char = 1 To LEN(Text)
TextCharCode = ASC(MID(Text,Char,1))
PasswordCharCode = ASC(MID(Password,(Char MOD LEN(Password) + 1),1))
NewCharCode = TextCharCode + PasswordCharCode
if NewCharCode > 255 Then NewCharCode = NewCharCode -255

Encrypt = Encrypt & CHR(NewCharCode)
NEXT
End function

function Decrypt(Code,Password)
Dim CodeCharCode, PasswordCharCode, OriginalCharCode

For Char = 1 To LEN(Code)
CodeCharCode = ASC(MID(Code,Char,1))

PasswordCharCode = ASC(MID(Password,(Char MOD LEN(Password) + 1),1))
OriginalCharCode = CodeCharCode - PasswordCharCode

if OriginalCharCode < 1 Then OriginalCharCode = OriginalCharCode + 255

Decrypt = Decrypt & CHR(OriginalCharCode)
NEXT
End function
%>

Üyelik sistemi
İlk önce bir sayfa açrak onu .asp ye donusturun.
Benim vereceğim kodları yazın...


<% Response.Buffer = True %><%on error resume next%><!--#Include File="dahil.asp"--><% Set getValues = objConn.Execute("SELECT * FROM AYARLAR WHERE A_ID = 0") dk_g = getValues("A_TIMEOUT") recordNo = getValues("A_LINK_RECORD") nRecordNo = getValues("A_NEWS_RECORD") lcid = getValues("A_LCID") Session.LCID = lcid titleAdd = getValues("A_SITE_NAME") msgLimit = getValues("A_MSG_LIMIT") msgTimeout = getValues("A_MSG_TIMEOUT") bannedIPs = getValues("A_BANNED_IPS") passRemind = getValues("A_PASS_REMIND") siteAddr = getValues("A_SITE_ADDR") siteMail = getValues("A_SITE_EMAIL") mailServer = getValues("A_MAIL_SERVER") uyeMetod = getValues("U_METOD") uExp = getValues("U_EXPIRE") mailBil = getValues("A_MAIL_BIL") clientIP = Request.ServerVariables("REMOTE_ADDR") If InStr(1, bannedIPs, clientIP, 1) <> 0 Then Response.Write "<b>BU IP ADRESININ SITEYE GİRİŞİ YASAKLANMIŞTIR!...</b>" Response.END End If%><head><meta name="Generator" content="Microsoft FrontPage 5.0"><meta name="Author" content="Akif"><meta name="Keywords" content="Akif"><meta name="Description" content="Üyelik XP - Üyelik Sistemi"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-9"><title> Şifre Hatırlatma Sistemi - © NB Studios 2002 </title><style>Body { font-family: verdana,tahoma,arial; font-size: 11px; color: #000000; }a:link { cursor: none; font-weight: bold; text-decoration: none; color: #1E5ED2; }a:visited { cursor: none; font-weight: bold; text-decoration: none; color: #1E5ED2; }a:active { cursor: none; font-weight: bold; text-decoration: none; color: #5691F1; }a:hover { cursor: none; font-weight: bold; text-decoration: none; color: #5691F1; }a.news:link { cursor: none; font-weight: none; text-decoration: none; color: #9A9A9A; }a.news:visited { cursor: none; font-weight: none; text-decoration: none; color: #9A9A9A; }a.news:active { cursor: none; font-weight: none; text-decoration: none; color: #9A9A9A; }a.news:hover { cursor: none; font-weight: none; text-decoration: underline; color: #D4D4D5; }table { font: 11px verdana,tahoma,arial; }#tdID {border : 1px dashed silver solid; font: 11px verdana,tahoma,arial; vertical-align:middle;}.input { border-left:1px solid Silver; border-right:1px solid Silver; border-top:1px solid Dashed; border-bottom:1px solid Dashed; Background-Color: #EFEFEF; Color: #000000; Font-Size: 10PX; Font-Weight: Bold; Font-Family: verdana,tahoma,arial }.input2 { border-left:1px solid Silver; border-right:1px solid Silver; border-top:1px solid Dashed; border-bottom:1px solid Dashed; Background-Color: #EFEFEF; Color: #000000; Font-Size: 9PX; Font-Weight: None; width:132; Font-Family: verdana,tahoma,arial }.td {border : 1px dashed silver solid; font: none 11px tahoma; vertical-align:above;}.textarea {border-left:1px solid Silver; border-right:1px solid Silver; border-top:1px solid Dashed; border-bottom:1px solid Dashed; background-color: #EFEFEF; color: #000000; width: 133; font-size: 10px; height: 80; font-family: verdana,tahoma,arial}.textarea_y {border-left:1px solid Silver; border-right:1px solid Silver; border-top:1px solid Dashed; border-bottom:1px solid Dashed; background-color: #EFEFEF; color: #000000; width: 350; font-size: 10px; height: 125; font-family: verdana,tahoma,arial}</style></head><% If Session("Oturum") = "Acik" Then Response.Redirect "default.asp" : Response.End %><form action="uye_ol.asp" method=post name="form"></form><table align=center border=0 borderstyle=groove bordercolor=navy width=420> <tr> <td style="border : 1px dashed silver solid; font: none 11px tahoma; vertical-align:above;"> <center> <font style="font-size:19px; font-weight:bold;">BENDENIZ FUN CLUB <font style="font-size: 14px; font-weight: none;"><i></i><font style="font-size:19px; font-weight:bold;"></font><i>Üyelik Formu</i></font></font> <hr width="310"><br> <table style="font-size: 11px;" width="300" align=center> <tr> <td align=center><font color="#000000">Adınız ve soyadınız, diğer üyelere gösterilmez..</font></td> </tr> <tr> <td align=center><a href="default.asp">Ana sayfa</a></td> </tr> </table><br> <table style="font-size: 11px;" width="420"> <tr> <td align=right width="50%"> ..:: | Üye Adı * </td> <td align=left width="50%"> <input type="text" name="uye_adi" class="input" maxlength=13 size="20"> </td> <td align=left> <a href="nedir.html#1" onClick="window.name='main_uye'; window.open('nedir.html#1','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Şifre * </td> <td align=left width="50%"> <input type="password" name="sifre" class="input" size="20"> </td> <td align=left> <a href="nedir.html#2" onClick="window.name='main_uye'; window.open('nedir.html#2','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Şifre Tekrarı * </td> <td align=left width="50%"> <input type="password" name="sifre_t" class="input" size="20"> </td> <td align=left> <a href="nedir.html#3" onClick="window.name='main_uye'; window.open('nedir.html#3','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | E-Mail Adresi * </td> <td align=left width="50%"> <input type="text" name="email" class="input" maxlength=45 size="20"> </td> <td align=left> <a href="nedir.html#4" onClick="window.name='main_uye'; window.open('nedir.html#4','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Ad Soyad * </td> <td align=left width="50%"> <input type="text" name="adsoyad" class="input" maxlength=40 size="20"> </td> <td align=left> <a href="nedir.html#5" onClick="window.name='main_uye'; window.open('nedir.html#5','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Hatırlatma Sorusu * </td> <td align=left width="50%"> <input type="text" name="h_soru" class="input" maxlength=70 size="20"> </td> <td align=left> <a href="nedir.html#6" onClick="window.name='main_uye'; window.open('nedir.html#6','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Cevabı * </td> <td align=left width="50%"> <input type="text" name="h_cevap" class="input" maxlength=70 size="20"> </td> <td align=left> <a href="nedir.html#7" onClick="window.name='main_uye'; window.open('nedir.html#7','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | ICQ </td> <td align=left width="50%"> <input type="text" name="icq" class="input" maxlength=20 size="20"> </td> <td align=left> <a href="nedir.html#8" onClick="window.name='main_uye'; window.open('nedir.html#8','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Şehir </td> <td align=left width="50%"> <input type="text" name="sehir" class="input" size="20"> </td> <td align=left> <a href="nedir.html#9" onClick="window.name='main_uye'; window.open('nedir.html#9','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Meslek </td> <td align=left width="50%"> <input type="text" name="meslek" class="input" size="20"> </td> <td align=left> <a href="nedir.html#10" onClick="window.name='main_uye'; window.open('nedir.html#10','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Yaş Aralığı </td> <td align=left width="50%"> <select name="yas" style="Background-Color: #EFEFEF; Color: #000000; Border: 2; Border-Style: Groove; Border-Color: Dashed Silver; Font-Size: 9PX; Font-Weight: bold; width:137; Font-Family: verdana,tahoma,arial;"> <option>=< 18</option> <option>18-24</option> <option>24-30</option> <option>30+</option> </select> </td> <td align=left> <a href="nedir.html#11" onClick="window.name='main_uye'; window.open('nedir.html#11','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | Web Adresi </td> <td align=left width="50%"> <input type="text" name="webadresi" class="input" value="http://" size="20"> </td> <td align=left> <a href="nedir.html#12" onClick="window.name='main_uye'; window.open('nedir.html#12','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right valign=top width="50%"> ..:: | Açıklama </td> <td align=left width="50%"> <textarea name=aciklama style="background-color: #EFEFEF; color: #000000; border: 2; border-style: groove; border-color: #FFFFFF; width: 133; font-size: 10px; height: 80; font-family: verdana,tahoma,arial" rows="1" cols="20"></textarea> </td> <td align=left> <a href="nedir.html#13" onClick="window.name='main_uye'; window.open('nedir.html#13','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> ..:: | E-Mail adresim <br> diğer üyelere görünsün </td> <td align=left width="50%"> <input type="checkbox" name="mailg" class="input" checked value="ON"> </td> <td align=left> <a href="nedir.html#14" onClick="window.name='main_uye'; window.open('nedir.html#14','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Bu nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> Kaydete tıklayınca <a href="kurallar.html" target=_blank>kurallar</a>ı </td> <td align=left width="50%"> kabul etmiş sayılacaksınız </td> <td align=left> <a href="nedir.html#15" onClick="window.name='main_uye'; window.open('nedir.html#15','Nedir', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no, resizable=no,copyhistory=no,width=325,height=100') ; return false;"> <img src="image/soru.jpg" width="16" height="16" border=0 alt="Kurallar nedir?"> </a> </td> </tr> <tr> <td align=right width="50%"> <input type="reset" value=". . : : | KayBet | : : . ." style="Background-Color: #EFEFEF; Color: #000000; Border: 2; Border-Style: Groove; Border-Color: #FFFFFF; Font-Size: 10PX; Font-Weight: None; "> </td> <td align=left width="50%"> <input type="submit" name="yolla" value=". . : : | KayDet | : : . ." style="Background-Color: #EFEFEF; Color: #000000; Border: 2; Border-Style: Groove; Border-Color: #FFFFFF; Font-Size: 10PX; Font-Weight: None; " onClick="javascript: if (form.uye_adi.value == '' || document.form.uye_adi.value.length < 2) { alert('Lütfen üye adını doğru olarak yazınız!.. (En az 2 karakter)'); form.uye_adi.focus(); return false } if (form.sifre.value == '' || document.form.sifre.value.length < 4 || document.form.sifre.value.length > 8) { alert('Lütfen şifrenizi doğru olarak yazınız!.. (En az 4, en çok 8 karakter)'); form.sifre.focus(); return false } if (form.sifre.value != form.sifre_t.value) { alert('Şifreniz ve tekrarı, birbirinden farklı!..'); form.sifre.focus(); return false } if (form.email.value == '' || document.form.email.value.indexOf('@') ==-1 || document.form.email.value.indexOf('.') ==-1) { alert('Lütfen geçerli bir e-mail adresi yazınız!..'); form.email.focus(); return false } if (form.adsoyad.value == '' || document.form.adsoyad.value.length < 4) { alert('Lütfen Ad ve Soyadınızı doğru olarak yazınız!...'); form.adsoyad.focus(); return false } if (form.h_soru.value == '' || document.form.h_soru.value.length < 3) { alert('Lütfen hatırlatma sorusu yazınız!...'); form.h_soru.focus(); return false } if (form.h_cevap.value == '') { alert('Lütfen hatırlatma sorusuna cevap yazınız!..'); form.h_cevap.focus(); return false } if (form.aciklama.value.length > 125) { alert('Açıklama en fazla 125 karakter olmalı!..'); form.aciklama.focus(); return false } else { form.submit(); this.disabled=true; } "><input type=hidden name="xp" value="xp"> </td> <td align=left> </td> </tr> </table> </td> </tr></form><%Sub hataYaz(str)Response.write "<center><font color=""#FF0000""><b>" & str & "</b></font><br><a href=""javascript:history.back(1)"">Geri</a></center><br><br>"End SubIf Request.Form("xp") = "xp" ThenIf InStr(1, Request.Form("uye_adi"), "'", 1) <> 0 OR InStr(1, Request.Form("sifre"), "'", 1) <> 0 ThenResponse.write "<center><font color=""#FF0000""><b>Lütfen üye adınız ve şifrenizde kesme işareti (') kullanmayın</b></font><br><a href=""javascript:history.back(1)"">Geri</a></center><br><br>"Response.endEnd Ifacik = Replace(Request.Form("aciklama"), "<", "<")aciklama = Replace(acik, ">", ">")If Request.Form("mailg") = "on" Thenmailgoster = trueElsemailgoster = falseEnd IfIf Mid(Request.Form("webadresi"), 1, 7) <> "http://" AND Request.Form("webadresi") <> "" Thenaddress = Request.Form("webadresi")adres = Replace(address, address, "http://"&address)ElseIf Request.Form("webadresi") = "http://" OR Request.Form("webadresi") = "" Thenadres = ""Elseadres = Request.Form("webadresi")End IfSet getType = objConn.Execute("SELECT * FROM AYARLAR WHERE A_ID = 0")Set objRs = Server.CreateObject("ADODB.RecordSet")objRs.Open "SELECT * FROM UYELER", objConn, 3, 3Set nameCheck = objConn.Execute("SELECT * FROM UYELER WHERE U_ADI='"&Request.Form("uye_adi")&"'")If Not nameCheck.EOF Thencall hataYaz("Bu Kullanıcı Adı Sistemde Kayıtlı!...")Response.EndEnd Ifemail = Request.Form("email")bolge = InStr(1, email, "@", 1)If Mid(email, bolge+1, 1) = "." Thencall hataYaz("Doğru bir e-mail adresi girin")Response.EndElse bolge2 = InStr(bolge, email, ".", 1) If Mid(email, bolge2+1, 1) = "" Then call hataYaz("Doğru bir e-mail adresi girin") Response.End End IfEnd IfSet emailCheck = objConn.Execute("SELECT * FROM UYELER WHERE EMAIL='"&Request.Form("email")&"'")If Not emailCheck.EOF Thencall hataYaz("Bu E-Mail Adresine Sahip Kullanıcı Mevcut!...")Response.EndEnd IfobjRs.AddNewobjRs("U_ADI") = Request.Form("uye_adi")objRs("U_SIFRE") = Request.Form("sifre") objRs("AD") = Request.Form("adsoyad")objRs("EMAIL") = Request.Form("email")objRs("H_SORU") = Request.Form("h_soru")objRs("H_CEVAP") = Request.Form("h_cevap")If Request.Form("icq") <> "" AND IsNumeric(Request.Form("icq")) ThenobjRs("ICQ") = Request.Form("icq")End IfobjRs("SEHIR") = Request.Form("sehir")objRs("MESLEK") = Request.Form("meslek")objRs("YAS") = Request.Form("yas")objRs("WEB") = adresobjRs("ACIKLAMA") = aciklamaobjRs("MAILGOSTER") = mailgosterobjRs("LOGIN_SAYISI") = 1objRs("U_TARIHI") = Date()If getType("U_METOD") = 0 Then objRs("SON_TARIH") = Now()objRs("SEVIYE") = "0"objRs("M_NICKNAME") = Request.Form("uye_adi")objRs("OS") = osobjRs("BROWSER") = browser If getType("U_METOD") = 1 Then objRs("ACTIVE") = "0" k = "0" Randomize sayi = Int((Rnd*9999999999999) + 10000000000000) For I = 1 To objRs.RecordCount If sayi = objRs("ACTIVE_CODE") Then k = k + 1 Next If k > 0 Then Randomize sayi = Int((Rnd*9999999999999) + 10000000000000) objRs("ACTIVE_CODE") = sayi objRs("ONAY_BEKLE") = "0" tip = 1 Else objRs("ACTIVE_CODE") = sayi objRs("ONAY_BEKLE") = "0" tip = 1 End If ElseIf getType("U_METOD") = 0 Then objRs("ACTIVE") = "1" objRs("ONAY_BEKLE") = "0" ElseIf getType("U_METOD") = 2 Then objRs("ACTIVE") = "0" objRs("ONAY_BEKLE") = "1" tip = 2 Else Response.Write "<b>Veritabanındaki bir hatadan dolayı kayıt yapılamıyor</b><br><br>" Response.End End IfobjRs.UpdateobjRs.CloseSet objRs = NothingSet idAl = objConn.Execute("SELECT * FROM UYELER WHERE U_ADI = '" & Request.Form("uye_adi") &"'")idNo = idAl("U_ID")Set expAl = objConn.Execute("SELECT * FROM AYARLAR WHERE A_ID = 0")expDur = expAl("U_EXPIRE")siteMail = expAl("A_SITE_EMAIL")mailServer = expAl("A_MAIL_SERVER")titleAdd = expAl("A_SITE_NAME")If tip = 1 ThenkonuA = "Aktivasyon Kodunuz"hostName = Request.ServerVariables("HTTP_HOST")urlCont = Request.ServerVariables("URL")charFoundSlash = InStrRev(urlCont, "/", -1, 1)stringAfterHost = Mid(urlCont, 1, charFoundSlash)lastString = "http://"& hostName & stringAfterHostpathAct = lastString & "activate.asp?RNDNO="& sayi &"&UID="&idNo&""mesajA = "Aşağıdaki linke tıklayıp, üyeliğinizi aktif hale getirebilirsiniz." & vbCrLf & vbCrLf & pathActIf mailBil = "CDONTS" Thenyolla = CDONTS (konuA, mesajA, Request.Form("email")) If NOT yolla Then Response.Write "<b>HATA VAR!! POSTA, ADRESINIZE GONDERILEMIYOR. LUTFEN SITE YONETICISI ILE IRTIBATA GECINIZ</b><br><br>" Response.End End IfElseIf mailBil = "PERSITS" Thenyolla = PERSITS (konuA, mesajA, Request.Form("email")) If NOT yolla Then Response.Write "<b>HATA VAR!! POSTA, ADRESINIZE GONDERILEMIYOR. LUTFEN SITE YONETICISI ILE IRTIBATA GECINIZ</b><br><br>" Response.End End IfElseIf mailBil = "JMAIL" Thenyolla = JMAIL (konuA, mesajA, Request.Form("email")) If NOT yolla Then Response.Write "<b>HATA VAR!! POSTA, ADRESINIZE GONDERILEMIYOR. LUTFEN SITE YONETICISI ILE IRTIBATA GECINIZ</b><br><br>" Response.End End IfElse Response.Write "<b>HATA VAR!! POSTA, ADRESINIZE GONDERILEMIYOR. LUTFEN SITE YONETICISI ILE IRTIBATA GECINIZ</b><br><br>" Response.EndEnd IfResponse.Redirect "default.asp?ISN=354763"ElseIf tip = 2 ThenResponse.Redirect "default.asp?ISN=354986"ElseIf tip = 0 Then Set objRst = Server.CreateObject("ADODB.RecordSet") objRst.Open "SELECT * FROM UYELER WHERE U_ADI='"&Request.Form("uye_adi")&"' AND U_SIFRE='"&Request.Form("sifre")&"' AND ACTIVE = 1", objConn, 3, 3 If Not objRst.EOF Then Session("Oturum") = "Acik" Session("Uye_Adi") = objRst("U_ADI") Session("Uye_Id") = objRst("U_ID") Session("Uye_Sifre") = objRst("U_SIFRE") Session("Uye_Email") = objRst("EMAIL") Session("Uye_Login") = objRst("LOGIN_SAYISI") Response.Cookies("xp_uye")("mevcut") = "evet" Response.Cookies("xp_uye")("kullanici") = objRst("U_ADI") Response.Cookies("xp_uye")("sifre") = objRst("U_SIFRE") Response.Cookies("xp_uye").Expires = Date() + 365 objRst.Close Set objRs = Nothing Response.Redirect "default.asp" End IfEnd If %><!--#Include File="mail_functions.asp"--><% http://www.yudumla.com/forum/images/buttons2/reputation.gif vbrep_register("12898") http://www.yudumla.com/forum/images/buttons2/report.gif


Asp upload


<html>
<head>
<title>Resim Yükle</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<LINK href="../images/links.css" rel="stylesheet">
<script language="_JavaScript">
function S_im()
{
var tm=new Image();
var o=document.all;
if (o.statu.value=="ok") {
tm.src=o.upi.src;
window.location="Limage.asp?fn="+o.fn.value+"&w="+tm.width+"&h="+tm.height+"&qstr=<%=Request.ServerVariables("QUERY_STRING")%>";
}
}
</script>
</head>

<body onfiltered='S_im()'>
<%
dim ImageType,Ft_Filename
ImageType=false
' This code is needed to "initialize" the retrieved data
Dim q
q = Chr(34)
' All data
Dim aAllDataB, aAllData, x, aHdr
aAllDataB = Request.BinaryRead(Request.TotalBytes)
' It comes in as unicode, so convert it to ascii
For x = 1 To LenB(aAllDataB)
aAllData = aAllData & Chr(AscB(MidB(aAllDataB, x, 1)))
Next
' The "header" is a unique string generated by the system to indicate
' the beginning and end of file data
aHdr = Left(aAllData, Instr(aAllData,vbCrLf)+1)

'response.write(len(aHdr))

'response.end
%>

<%
' Here's where your code goes.
' In this example, "file1" and "file2" are the field names
' specified within the form of the upload submission page.
' Response.Write "file1: Filename = " & GetFilename("file1") & "<br>"
Response.Write GetFileData("file1") & "<br><br>"

'Response.Write "file2: Filename = " & GetFilename("file2") & "<br>"
Response.Write GetFileData("file2") & "<br><br>"

' Writing out the file data like this only looks okay when
' the uploaded file is some kind of text - images and things
' like that probably just need to be saved or otherwise
' acted upon.
' Response.Write Replace(aAllData,vbCrLf,"<br>")

Dim aFilename
' aFilename equates to the original filename, except saved
' in the root path of the server. The root path must have
' Change rights for the default internet user.
Ft_FileName=GetFileName("file1")
aFilename = Server.MapPath("images/Users") & "/" & Ft_FileName

'response.write("///"&GetFileName("file1")&"///")
Set FSO1 = server.CreateObject("Scripting.FileSystemObject")
if FSO1.FileExists(aFilename) then
Dim tfl
tfl=Ft_Filename
x=instr(tfl,".")
if x>0 then
if userId="" then userId=1
tfl=Mid(tfl,1,x-1)&"_"&Second(time)&"."&Right(tfl,3)
aFilename = Server.MapPath("images/Users") & "/" & tfl
'response.write("000-"&tfl&"-000")
Ft_FileName=tfl
end if
end if
Set FSO1=nothing

Call SaveFile("file1", aFilename)
' aFilename = Server.MapPath("images/Users") & "\" & GetFileName("file2")
'Call SaveFile("file2", aFilename)
%>

<%
' These are functions used to retrieve the data
Function GetFileName(aField)
Dim x2, i
x = Instr(aAllData, aHdr & "Content-Disposition: form-data; name=" &q&aField & q)
x = Instr(x, aAllData, "filename=" & q)
x2 = Instr(x, aAllData, vbCrLf)
For i = x2 To x Step -1
If Mid(aAllData,i,1) = "\" Then
x = i - 9
Exit For
End If
Next
GetFileName = Mid(aAllData, x+10, x2-(x+11))
End Function
Function GetFileData(aField)
Dim x2
'aHdr="-----------------------------7d21db231008c2 "
x = Instr(aAllData, aHdr & "Content-Disposition: form-data; name=" & q &aField & q)
x = Instr(x, aAllData, vbCrLf)
x = Instr(x+1, aAllData, vbCrLf)
x = Instr(x+1, aAllData, vbCrLf) + 2
x2 = Instr(x, aAllData, Left(aHdr,Len(aHdr)-2))
GetFileData = Mid(aAllData, x+2, x2-x-4)
End Function
Function SaveFile(aField1, aFilename)
bh=lcase(aFileName)
if instr(bh,".gif")>0 then ImageType=true
if instr(bh,".jpg")>0 then ImageType=true
if instr(bh,".png")>0 then ImageType=true
if instr(bh,".bmp")>0 then ImageType=true

Dim FSO, TS
Set FSO = server.CreateObject("Scripting.FileSystemObject")
if ImageType then Set TS = FSO.CreateTextFile(aFilename, True, False)
' response.write(afield)
'response.end
on error resume next
if ImageType then TS.Write GetFileData(aField1)
TS.Close
if ImageType then Set TS = Nothing
Set FSO = Nothing


End Function
%><% If not ImageType then %>
<input type="Hidden" name="statu" value="badfile">
<div align="center">
Hatalı Dosya formatı.<br>
<a href="_javascript:window.history.go(-1)">Geri Dön</a>
</div>
<% Else %>
<input type="Hidden" name="statu" value="ok">
<input type="Hidden" name="fn" value="<%=trim(Ft_FileName)%>"> <strong>Lütfen Bekleyiniz...</strong><br>
<IMG name="upi" SRC="images/users/<%=trim(Ft_FileName)%>">
<% End If %>



Asp ile güncel haberler


<%
alinacakadres = "http://www.ntvmsnbc.com/news/BCList2.txt"

Set Tear_ac = CreateObject("SOFTWING.ASPtear" )
dim bilgicek
bilgicek = Tear_ac.Retrieve(alinacakadres , 2, "" , "" , "" )

nereden="Güncel Ön Sayfa"
nereye="+UYUM YASASI"

baslanacakyer=InStr(bilgicek,nereden)+15
bitecekyer=InStr(bilgicek,nereye)
baslangic=0
son=0
alinacakbolum=Mid(bilgicek,baslanacakyer,bitecekye r-baslanacakyer)

For a= 1 To 100

t=Len(alinacakbolum)

If t<=0 Then
exit For
End If

c=InStr(alinacakbolum,Chr(10))

If c<=0 Then
exit For
End If

alinacakbolum=Right(alinacakbolum,t-c)

baslangic=InStr(alinacakbolum,"/news/./" )
son=InStr(alinacakbolum,Chr(10))

If baslangic<=0 or son<=0 or son<baslangic Then

Else
satir=Mid(alinacakbolum,baslangic,son-baslangic)
If InStr(satir,"/news/./" )=0 or Len(satir)<20 Then
Else
ekle=ekle & satir & "<br>"
End If
End If

Next

ekle=Replace(ekle,"/news/./" ,"<a href='http://www.ntvmsnbc.com/news/" ,1,-1,1)
ekle=Replace(ekle,"|" ,"'>" ,1,-1,1)
ekle=Replace(ekle,Chr(10),"</a>" ,1,-1,1)

Response.Write "<font face=verdana size=1 color=black>" & ekle & "</font>"

%>

Asp ile hava durumu bilgileri


<%
const Request_GET = 2
Dim haberURL, haberim, basliklar
haberURL = "http://www.tr.net"
Set alma = CreateObject("SOFTWING.ASPtear" )
On Error Resume Next
haberim = alma.Retrieve(haberURL, Request_GET, "" , "" , "" )
If Err.Number <> 0 Then
Response.Write "HATA!!!!!!! Lütfen Sayfayi Yeniden Yükleyiniz... "
Response.End
End If
dim baslangic , bitis
baslangic = "<table border=0 cellpadding=0 cellcpacing=0>"
bitis = "</table>"
dim x , abc
x = 0
abc = 0
dim lale
lale = ""
Do Until abc = 2
x = x + 1
If Mid(haberim,x,Len(bitis)) = bitis and abc = 1 Then
abc = abc + 1
End If
If Mid(haberim,x,Len(baslangic)) = baslangic Then
abc = abc + 1
Else
If abc = 1 Then
lale = lale + Mid(haberim,x,1)
End If
End If
Loop
Function seklesok(hammadde)
Dim gecicigeyik
gecicigeyik = hammadde
gecicigeyik = Replace(gecicigeyik, "" , "" , 1, -1, 1)
gecicigeyik = Replace(gecicigeyik, "" , "" & vbCrLf, 1, -1, 1)
seklesok = gecicigeyik
End Function
Response.Write "<"
Response.Write seklesok(lale)
Response.Write "</table>"
%>


Forumdaki online üyeler


<%
dk_g = 4
db = Server.MapPath("forums.mdb" )
Set objCon = Server.CreateObject("ADODB.Connection" )
objCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & db)

Session.LCID = 1033
tarih = DateAdd("n" , -1 * dk_g, Now())
Set objList = Server.CreateObject("ADODB.RecordSet" )
objList.Open "SELECT * FROM member WHERE son_giris >= #" &tarih&"# ORDER BY son_giris DESC" , objCon, 3, 3
Session.LCID = 2048

If objList.Eof Then ' kayit yoksa 0 degerini veriyos
uNumber = "0"
Else ' kayit varsa kaç tane oldugunu aliyoruz
uNumber = objList.RecordCount
End If

For I = 1 To uNumber ' döngüyü baslatiyos

Response.Write "<b>" & objList("kulad" ) &"</b>, "

objList.Movenext

Next
Response.Write " (" & uNumber &") "
%>


Ip banlama


<%
Dim ipno
Dim Toplam

'Burada array listesini tanimliyoruz (unutmayin ki 0 = 1 degerini alir, 1 = 2 değerini alir)
Dim Ip_array(5)

'Kulanicinin ip adresini aliyoruz
ipno = Request.ServerVariables("REMOTE_ADDR")

'Toplam array sayisini belirtiyoruz
Toplam = 5

'Bloke edilen ip numaralari (Databasetende yapabilirsiniz)
Ip_array(0) = "127.0.0.1"
Ip_array(1) = "202.56142.41"
Ip_array(3) = "12.232.31.166"
Ip_array(4) = "12.245.59.175"
Ip_array(5) = "149.99.116.62"

'Döngüye giriyoruz
For I = 0 to Toplam
If Ip_array(I) = ipno Then

'Eğer giren kullanicinin ip`si ban listesinde mevcut ise banlanmissiniz diye bir sayfa gosteriyoruz
Response.Redirect "ban.asp"

End If
Next