asp kodarı

by metin

New member
Katılım
22 Şub 2006
Mesajlar
472
Reaction score
0
Puanları
0
Yaş
30
asp kodlarını buraya koycam ilk benden olsun

Sql server connect

<%

dim i

Set Bag = Server.CreateObject("ADODB.Connection" )
Bag.Open ("Driver={SQL Server};" & "Server=SERVERADINIYAZIN;" & _
"Address=SERVERIPADRESIYAZIN,1433;" & _
"Network=DBMSSOCN;" & _
"Database=DATABASEADIYAZIN;" & _
"Uid=sa;")

Set RS = Server.CreateObject("ADODB.RecordSet" )
RS.Open "SELECT webadres FROM linkler",BAG,1,3

For i = 1 TO 10
IF RS.eof THEN EXIT FOR
Response.write(RS.Fields("webadres") & "<br>")
RS.MoveNext
Next

RS.Close
Set RS = Nothing

Bag.Close
Set Bag = Nothing

%>
 
Multi component mail function

<%
'got from iisworks.com's encoded source
'edited by nolovelust
'wap.smslust.net
'smslust.net
'########################
Sub SendMail(SendTo,From,ReplyTo,Subject,Body,Attachme nts)

MailComponent="cdo"'### Defines which email component to use. Valid values are: "jmail", "aspmail", "cdo" or "cdonts" (Note: cdonts only works with the local server, SMTPMailServer is ignored! CDO has problems on some servers.).
MailServer="localhost"'### SMTP Mailserver to be used to send account information to users.

SenderIp=Request.ServerVariables("HTTP_X_FORWARDED_FOR")'Sender ip



' ### Send mail with jmail
If LCase(MailComponent="jmail") Then
Set Msg = Server.CreateObject( "JMail.Message" )
Msg.ISOEncodeHeaders = false
Msg.AddRecipient SendTo
If ReplyTo<>"" Then Msg.ReplyTo = ReplyTo
Msg.From = From
Msg.Subject = Subject
Msg.Body = Body
If IsArray(Attachments) Then
For i = 0 To Ubound(Attachments)
Msg.AddAttachment Attachments(i)
Next
End If
Msg.AddHeader "Originating-IP", SenderIp
Msg.send(MailServer)
Msg.close
Set Msg=Nothing

' ### Send mail with AspMail
ElseIf LCase(MailComponent="aspmail") Then
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromAddress = From
Mailer.AddRecipient SendTo,SendTo
If ReplyTo<>"" Then Mailer.ReplyTo = ReplyTo
Mailer.Subject = Subject
Mailer.BodyText = Body
If IsArray(Attachments) Then
For i = 0 To Ubound(Attachments)
Mailer.AddAttachment Attachments(i)
Next
End If
Mailer.AddExtraHeader "Originating-IP: " & SenderIp
Mailer.RemoteHost = MailServer
SentOK=Mailer.SendMail
Set Mailer=Nothing

' ### Send mail with Cdonts
ElseIf LCase(MailComponent="cdonts") Then
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = From
If ReplyTo<>"" Then objNewMail.Value("Reply-To") = ReplyTo
objNewMail.Value("Originating-IP") = SenderIp
objNewMail.To = SendTo
objNewMail.Subject =Subject
objNewMail.Body = Body
objNewMail.BodyFormat=1
objNewMail.MailFormat=0
If IsArray(Attachments) Then
For i = 0 To Ubound(Attachments)
objNewMail.AttachFile Attachments(i)
Next
End If
objNewMail.Send
Set objNewMail = Nothing

' ### Send mail with Cdo
ElseIf LCase(MailComponent="cdo") Then
Set cdoConfig = Server.CreateObject("CDO.Configuration")
sch = "http://schemas.microsoft.com/cdo/configuration/"
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = MailServer
'cdoConfig.Fields.Item(sch & "authenticate") = 2 'Type of authentication, NONE, Basic (Base64 encoded), NTLM
'cdoConfig.Fields.Item(sch & "sendusername") = "username"
'cdoConfig.Fields.Item(sch & "sendpassword") = "parolam"
cdoConfig.Fields.Item(sch & "smtpserverport") = 25
'cdoConfig.Fields.Item(sch & "smtpusessl") = False
cdoConfig.fields.update
Set objNewMail = Server.CreateObject("CDO.Message")
Set objNewMail.Configuration = cdoConfig
objNewMail.From= From
objNewMail.To= SendTo
objNewMail.ReplyTo= ReplyTo
'objNewMail.Cc= SendTo
'objNewMail.Bcc= SendTo
objNewMail.Subject=Subject
objNewMail.TextBody=Body
'objNewMail.HtmBody = "<h1>Thtml</h1>"
'objNewMail.HtmBody = "file://c|/temp/test.htm"
'objNewMail.HtmBody = "http://www.smslust.net"

If IsArray(Attachments) Then
For i = 0 To Ubound(Attachments)
objNewMail.AddAttachment Attachments(i)
Next
End If
objNewMail.Send
Set objNewMail = Nothing
End If
End Sub



SendTo="[email protected]"
From="[email protected]"
ReplyTo="[email protected]"
Subject="Selam"
Body="Test"
SendMail SendTo,From,ReplyTo,Subject,Body,Attachments

%>
 
bu nedir şimdi?
yani ne kodu?
 
Asptear ile hava durumu


Scripti kullanabilmek için ilk önce havadurumu.zip dosyasını çekin daha sonra sunucunun kök dizinde "meteo" adlı bir klasör yarattıktan sonra "default.asp" yaratın ve zip dosyasını bu dizinin içine açın.

NOT: Eğer sayfaya citycode kodu göndermezseniz, script default.asp'ye gidecektir. Bu yüzden citycode'a değer verin.
Örneğin ADANA için citycode=1 kullanın.
 
aynı mesajında versen daha iyi olur üst üste mesaj yazmana gerekyok teşekkürler...
 
Üyelik sistemi


Bir üyelik sisteminin oluşturulması için bir veritabanının varlığından söz etmek gerekir. Bu veritabanında membership
adında bir tablo olmalı. Bu tablonun alanları ise, userid, username,password, IP, Email, freq gibi alanlardan olmalı. Bu alanlardan en
önemlileri username ve password alanlarıdır ve diğerleri isteğe göre değiştirilebilir. Bu tablonun primary key'si userid alanıdır ve bu alan
diğer tablolarla ilişki kurmak için çok ideal bir alandır. Bu alanın en büyük özelliği eşsizdir, yani tablodaki her kayıt için bu alanın değeri farklıdır.

MS-SQL Server'da, bu tabloyu oluştururken dikkat edilmesi gereken, userid alanının otomatik olarak değişmesidir. Userid alanının tipi integer olmalıdır.
Username, password,IP ve email gibi alanlar varchar(N) tipinde olmalıdır. Buradaki N verinin boyutunu gösterir. Freq alanı uyenin ne kadar sıklıkta
geldigini göstermek için kullanılabilecek olan bir alandır ve tipi de integer olmalıdır.

Üye kaydedebilmek için ise, bir form taşıyan bir html dosyasına ihtiyaç var.

<form name="membership" action="membership.asp" method="post">
<table>
<tr>
<td>User Name </td>
<td><input type="text" name="username" value="">
</tr>

<tr>
<td>Password</td>
<td><input type="password" name="password" value="">
</tr>

<tr>
<td>Email</td>
<td><input type="text" name="email" value="">
</tr>

..................
.................
...............

<tr>
<td><input type="submit" name="continue" value="BECOME A MEMBER">
</tr>


</table>
</form>

Nokta nokta olan yerlere isteğe göre alanlar eklenebilir. Burada önemli olan kısım ise, eklediğimiz alanların veritabanında da yer alıyor olması
gerektiğidir.

Bu form "BECOME A MEMBER" butonuna tıklandığında, "membership.asp" adlı dosyaya bilgi gönderecektir. Bu dosya server'da bulunması gereken
bir dosyadır.

Bu dosyanın içeriği ise,

<%
dim sqlstring,connectionstring,username,password,email ,..............

Connectionstring="PROVIDER=SQLOLEDB;DATABASE=MEMBERSHIP;USER ID=SA;PASSWORD=000019"
SET Connection=server.createobject("ADODB.Connection")

connection.open connectionstring

username=Trim(Request.Form("username"))
password=Trim(Request.Form("password"))
email=Trim(Request.Form("email"))
......................
....................

sqlstring="insert into membership (username,password,email) values ('"&usename&"',''"&password&"',''"&email&"')"

SET RecordSet=Server.CreateObject("ADODB.RecordSet")

RecordSet.Open sqlstring,connection,adopenstatic,adlockoptimistic ,adcmdtext


SET RecordSet=NOTHING

SET Connection=NOTHING

%>

Buradaki connectionstring değişkeninin içerdiği bilgi, veri tabanına bağlanmak için gerekli olan bağlantı ifadesidir.Database adı olarak,
veri tabanına verdiğimiz isim kullanılmalıdır. User Id SQL Server'a bağlanmak için kullanılan user id ve password de SQL Server'a bağlanmak
için gerekli olan şifredir. Daha sonra ki satırda yapılan ise, ADO nesnesini kullanarak bundan bir örnek yaratmak ve veri tabanı ile bağlantının
sağlanılmaya çalışılmasıdır. Diğer kullanılan nesne ise ADO nesnesine ait olan RecordSet nesnesidir.

Böylece üye tabloya işlenmiş oldu. Böyle bir üyelik sistemi oluşturmak üç ayaklı bir olaydır. İlk ayağı sunucuya gönderilecek olan istemci verisinin
yani formun hazırlanması, diğer ayak veri tabanı tasarımı ve son ayak ta, veri tabanı ile istemcinin konuşmasını sağlayan ASP kodudur. Tabi bu kod,
sadece üyeyi veri tabanına yazmaktadır. Dikkat edilmesi gereken konu, üye isminin veya şifrenin bir başkası tarafından kullanılıyor olup olmadığıdır.
Yani, tabloya bir üyeyi kaydetmeden evvel bunun da kontrolünün yapılması gerekir. Bu bir başka yazıda olacak.
 
Dosya upload etmek


<%@ Language=VBScript %>
<%

dim totalbytes
dim safearray
'upload.mdb dosyasi file dsn olarak tanimlanmali
'yada bir connection stringi ile baglanti kurulabilir
'Internet Guest Account (serverismi\IUSR_serverismi)kullanıcısına full yetki verilmeli
if request.servervariables("REQUEST_METHOD") = "POST" then
set cnnl=server.CreateObject("ADODB.Connection")
cnnl.Open "upload"
set adtbl=server.CreateObject("ADODB.Recordset")
adtbl.Open "files", cnnl, adOpenDynamic, adLockOptimistic

set x = server.createobject("SCUpload.Upload")

x.upload

response.write "<br><br><br>FILE:<br>"

for i = 1 to x.files.count
for j = 1 to x.files(i).item.count
response.write " Path Name: " & x.files(i).item(j).pathname & "<br>"
response.write " File Size: " & x.files(i).item(j).size & "<br>"
response.write " Content Type: " & x.files(i).item(j).contenttype & "<br><br>"
x.files(i).item(j).save "c:\inetpub\wwwroot\raporlar"
adtbl.AddNew
adtbl("adi") = x.files(i).item(j).filename
adtbl("tarih") = date()
adtbl("lokasyon")="http:/raporlar/"&x.files(i).item(j).filename
adtbl.update
next
next
response.write "<br><br>"
response.write "File Name: " & x.file("F1").filename & "<br>"

adtbl.close
cnnl.Close
else

%>
<html>
<body bgColor=lightgrey>
<p align="center"> </p>
<p align="center"> </p>
<form method="post" enctype="multipart/form-data" action="upload.asp">
<p align="center">

<TABLE border=0 cellPadding=1 cellSpacing=1 width="473" style="WIDTH: 473px; HEIGHT: 79px" bgColor=red>

<TR>
<TD><STRONG><FONT
color=white> DOSYA SEÇINIZ </FONT> </STRONG> </TD>
<TD>

<input type="file" name="F1" style="WIDTH: 327px; HEIGHT: 22px"></TD>
<TD></TD></TR>
<TR>
<TD></TD>
<TD>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></TD>
<TD></TD></TR></TABLE>
<br> </p>
<p align="center"> </p>
</form>
<p align="center"> </p>

<%
end if
%>
</body>

</html>
 
asp de cok ustamısın?
yani bi scripte database yazabilirmisin?

eger yazabilirsen bi script var onu editleyip burda paylasalım...
inanki cok kişi mutlu olur ;)
paylasımların için saol....
 
döviz kuru almak


<%
Public Function VeriAl(strGelen)
Set objVeriAl = Server.CreateObject("Microsoft.XMLHTTP" )
objVeriAl.Open "GET" , strGelen, FALSE
objVeriAl.sEnd
VeriAl = objVeriAl.Responsetext
SET objVeriAl = Nothing
End Function

strAdres = "http://www.tcmb.gov.tr/kurlar/today.html"
strVeri = VeriAL(strAdres)
iDolar=InStr(strVeri,"USD" )
strDolarAlis=Mid(strVeri,iDolar+39,10)
strDolarSatis=Mid(strVeri,iDolar+52,10)

iEuro=InStr(strVeri,"EUR" )

strEuroAlis=Mid(strVeri,iEuro+39,11) 'alis
strEuroSatis=Mid(strVeri,iEuro+52,11) 'satis
%>

Döviz kurlarının görünmesini istediğiniz yere aşağıdaki kodları yazın.

<%=strdolarsatis%>
<%=streurosatis%>
 
Arama motoru



//search.asp dosyası------------------------------------------------------------------------------


<%

'Optimize eden varlık=Toygar Dundaralp
'[email protected]

%>
<% 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>
--------------------------------------------------------------
 
Sitenizdeki aktif kullanıcılar




<Object Runat="Server" Scope="application" ID="dOnlineUsers" ProgID="Scripting.Dictionary"></Object>

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
sub Application_OnStart
application("ServerStart") = now
end sub
function Decrypt(sText)
Decrypt = sText
end function

function adZero(sText)
if isNull(sText) then exit function
adZero = string(5 - len(sText), "0") & sText
end function

Sub Session_OnStart


Session.TimeOut = 5
sAktifUsrList = application("AktifUsrList")

sNewUserName = Decrypt(request.cookies("isim")+ request.cookies("soyisim"))

if sNewUserName = "" then sNewUserName = "Ziyaretci-" & AdZero(CInt(application("Ziyaretci")))

sLastActionTime = Time

sUserInfo = sNewUserName & "<|>" & sLastActionTime & "<|>" & sLastPageViewed


dOnlineUsers.Add Session.SessionID, sUserInfo

application.lock
application("AktifUsr") = application("AktifUsr") + 1
application("Ziyaretci") = application("Ziyaretci") + 1

if application("TodaysDate") <> Date() then
application("PageViewsToday") = 0
application("ZiyaretciToday") = 0
end if
application("ZiyaretciToday") = application("ZiyaretciToday") + 1
application("TodaysDate") = Date()
application.unlock

End Sub

Sub Session_OnEnd

on error resume next
dOnlineUsers.Remove Session.SessionID

application.lock
application("AktifUsr") = application("AktifUsr") - 1
application.unlock

End Sub
</SCRIPT>
 
Şifreleme



<%
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
%>
 
Ağaç kategorileme sistemi


DB.mdb veritabanı:
----------------------
ID: Otomatik Sayı
ParentID: Sayı
Kategori: Metin



Kategorilerin Listeleneceği Sayfa: (default.asp)
--------------------------------------

<%
Set baglanti = Server.CreateObject ("ADODB.Connection" )
baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("DB.mdb" )
%>

<div align="center">
<center>
<%
Set Rs = Server.CreateObject("Adodb.Recordset" )
SQL = "Select * from Tablo where ParentID='0' order by ID Asc"
Rs.Open SQL, baglanti, 1, 3
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="300" id="AutoNumber1">
<tr>
<td width="100%"> </td>
</tr>
<%
For t=1 To Rs.RecordCount
If Rs.Eof Then exit for
%>

<tr>
<td width="100%"><a href="Kategori.asp?ID=<%=Rs("ID" ) %>"><font face="Arial" size="2" color="#000000"><%=Rs("Kategori" ) %></font></a></td>
</tr>
<%
Rs.Movenext
Next
Rs.Close
Set Rs = Nothing
%>
</table>
</center>
</div>


Alt Kategorilerin Listeleneceği Sayfa: (kategori.asp)
------------------------------------------

<%
Set baglanti = Server.CreateObject ("ADODB.Connection" )
baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("DB.mdb" )
%>

<div align="center">
<center>
<%
ID = Request.QueryString("ID" )
Set Rs = Server.CreateObject("Adodb.Recordset" )
SQL = "Select * from Tablo where ParentID='" &ID&"' order by ID Asc"
Rs.Open SQL, baglanti, 1, 3
%>
<%
Sub PrintParents(Cat)
Set rsSelect = Server.CreateObject("Adodb.Recordset" )
If Cat > 0 Then
strSQL = "Select ParentID from Tablo where ID = " & Cat
rsSelect.Open strSQL, baglanti
Set ObjPt = rsSelect("ParentID" )
Pt = ObjPt
rsSelect.Close
PrintParents(Pt)

Else
Response.Write ("<b><a href='default.asp'><font face='Arial' size='2' color='#0066CC'>Anasayfa</font></a></b> " )

End If

strSQL = "Select * from Tablo Where ID = " & Cat
strSQL = strSQL & ""
'Debuggin of SQL
'Response.Write("<br>Get Parent Info" & strSQL & "<br>" )
rsSelect.Open strSQL, baglanti
If Not rsSelect.Eof Then
Set objName = rsSelect("Kategori" )
Set objID = rsSelect("ID" )
'Response.Write ( "<br>" & objID & "-" & objName & "<br>" )
Response.Write ( " <font face='Arial' size='1'>>></font> <a href='Kategori.asp?ID=" & ObjID)
Response.Write ("'><b><font face='Arial' size='2' color='#0066CC'>" & objName & "</font></b></a>" )
Response.Write (" " )
End If
rsSelect.Close

End Sub

Function GetCatID()
Current = Request("ID" )
If Current = "" Then
Current = 0
End If
GetCatID = Current
End Function
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="%90" id="AutoNumber1">
<tr>
<td width="100%"><% Call PrintParents(Request("ID" )) %></td>
</tr>
<%
For t=1 To Rs.RecordCount
If Rs.Eof Then exit for
%>

<tr>
<td width="100%"><a href="Kategori.asp?ID=<%=Rs("ID" ) %>"><font face="Arial" size="2" color="#000000"><%=Rs("Kategori" ) %></font></a></td>
</tr>
<%
Rs.Movenext
Next
Rs.Close
Set Rs = Nothing
%>
</table>
</center>
</div>
 
Şifre korumalı giriş


<%
logstatus=request.QueryString("logadm")
if logstatus="true" then
session("user_admin")=""
session.Contents.RemoveAll()
session.Abandon()
'response.Redirect("Cikistamamlaninca yonlenecek sayfa")
end if

action=request.form("action")
if action="login" then
kullanici=trim(request.Form("kullanici"))
sifre=trim(request.Form("sifre"))

if kullanici="yahya" AND sifre="yahya" then

session.Timeout=180
session("user_admin")="admin"
response.Redirect("giristamam.asp")
else
error_msg="Yanlış kullanıcı veya şifre"
end if

end if
%>

<html>
<head>
<title>Admin giris</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<link href="../nar_css.css" rel="stylesheet" type="text/css">
</head>

<body>
<p> </p>
<p> </p>
<form action="default.asp" method="post" name="giris" target="_top" id="giris" >
<table width="256" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF0099">
<tr>
<td>
<table width="254" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td colspan="2"><div align="center"><font color="#990000"><%=error_msg%></font></div></td>
</tr>
<tr>
<td width="95">Kullanıcı</td>
<td width="305"><input name="kullanici" type="text" id="kullanici" size="19" maxlength="20" style="width:100"></td>
</tr>
<tr>
<td>Şifre</td>
<td><input name="sifre" type="password" id="sifre" size="20" maxlength="20" style="width:100"></td>
</tr>
<tr>
<td> </td>
<td><input name="Submit" type="submit" class="submit" value="Giriş">
<input name="action" type="hidden" id="action" value="login"></td>
</tr>
</table>
</td></tr></table>
</form>
</body>
</html>
 
Girilmesini istemediğiniz sayfaları şifreleme

Tek yapmanız gereken girilmesini istemediğiniz sayfaya include etmek

' Bu sayfayı guvenlik.asp olarak kaydet

<% Response.Buffer = True %>
<%
'Sifre = Burada bulunan admin yazısı yerine kendi şifrenizi yazınız.
sifre = "8282"
if Session("sifreniz") <> sifre then
if Request.Form("sifrem") <> sifre then
Call giris
Else
Session("sifreniz") = sifre
End if
End if
Sub giris
gelen_sayfa = "http://"&Request.ServerVariables ("HTTP_HOST")&Request.ServerVariables("URL")
%>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="100%"><form method="POST" action="<% = gelen_sayfa %>">
<p align="center"><i><b><font color="#FF6600" size="1">( Güvenlik Girişi
)</font></b></i></td>
</tr>
<tr>
<td width="100%">
<p align="center"><i><b><font color="#6F778C"><font size="1"></font></font></b></i></td>
</tr>
<tr>
<td width="100%">
<p align="center"><i><font color="#FF6600">Sifre : <input type="password" name="sifrem" size="20" style="font-family: Verdana; font-size: 10px; color: #A7ACBA; border: 1 solid #C2C6CF" value="123456"></font></i></td>
</tr>
<tr>
<td width="100%">
<p align="center"><input type="submit" value="Giriş" name="B1" style="font-family: Verdana; font-size: 10px"><p align="center">
<i><b><font color="#FF6600">
<a href="mailto:[email protected]" style="text-decoration: none">m U S
T A f a  UYAR</a></font></b></i></td>
</tr>
</table>
<%
Response.End
End Sub
%>
 
Geri
Üst