ASp de yardım

azgalor

New member
Katılım
12 May 2007
Mesajlar
74
Reaction score
0
Puanları
0
Merhaba arkadaşlar az bucuk asp den anlıorm ama bende bi üyelık scripti var bu üyelık sctiptindeki resimli guvenlık kodu uygulamasını kaldırmak ıstıorum yardımcı olurmusunuz saygılarımla

guvenlık kodunun veri yolu bu > codecreate.asp olarak gecıo
PHP:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Smyrna Account Islemler</title>
<!--#include file="ayarlar.asp"-->
<style type="text/css">
<!--
body {
	background-color: <%=BgColor%>;
}
body,td,th {
	font-family: Verdana;
	font-size: 10px;
	font-weight: bold;
	color: <%=TxtColor%>;
}
a:link {
	color: <%=TxtColor%>;
}
a:visited {
	color: <%=TxtColor%>;
}
a:hover {
	color: <%=TxtColor%>;
}
a:active {
	color: <%=TxtColor%>;
}
.style5 {
	font-size: 10px;
	font-family: Verdana;
	font-weight: bold;
}
.entry {	BORDER-RIGHT: #acacac 1px solid; BORDER-TOP: #acacac 1px solid; PADDING-LEFT: 1px; FONT-SIZE: 9px; BACKGROUND: white; BORDER-LEFT: #acacac 1px solid; COLOR: #515151; BORDER-BOTTOM: #acacac 1px solid; FONT-FAMILY: Verdana
}
.buton {	BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 9px; BACKGROUND: #F3F3F3; BORDER-LEFT: #999999 1px solid; COLOR: #484848; BORDER-BOTTOM: #999999 1px solid
}
.brdr {
	border: 1px dotted #CCCCCC;
}
-->
</style>
</head>
<%
process=request.querystring("process")

if process="addnew" then 
call topside
' Yeni account ekleme form
%>
<div align="center">
<form action="?process=addform" method="post" name="accinfo">
  <table width="200" border="0" class="brdr">
    <tr>
      <td><table width="274" border="0">
        <tr>
          <th width="133" align="left" class="style5" scope="col">İsim Soyisim:</th>
          <th width="131" align="right" scope="col"><input name="isim" type="text" class="entry" id="isim" maxlength="25" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Kullanıcı Adı: </th>
          <th align="right" scope="row"><input name="kadi" type="text" class="entry" id="kadi" maxlength="10" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Şifre:</th>
          <th align="right" scope="row"><input name="sifre" type="password" class="entry" id="sifre" maxlength="12" /></th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Şifre Tekrar: </th>
          <th align="right" scope="row"><input name="sifret" type="password" class="entry" id="sifret" maxlength="12" /></th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">E-Mail:</th>
          <th align="right" scope="row"> <input name="email" type="text" class="entry" id="email" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">E-Mail Tekrar:</th>
          <th align="right" scope="row"> <input name="emailt" type="text" class="entry" id="emailt" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Güvenlik Kodu:</th>
          <th align="right" scope="row"> <input name="gkodu" type="text" class="entry" id="gkodu" maxlength="6" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Güvenlik Kodu Tekrar: </th>
          <th align="right" scope="row"> <input name="gkodut" type="text" class="entry" id="gkodut" maxlength="6" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği:</th>
          <th align="right" scope="row"><img src="codecreate.asp" alt="Smyrna Web Secure" width="120" height="15" /></th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"> <input name="systemsecure" type="text" class="entry" id="systemsecure" maxlength="5" />
          </th>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td align="center"><input name="Submit" type="submit" class="buton" value="Kayıt Ol" /></td>
    </tr>
  </table>
</form></div>
<%
' Form dan gelenleri db ekleme
elseif process="addform" then
call topside
errormsg = ""
systemsecure=trim(fixvariable(request.form("systemsecure")))
if controlsystemsecure(systemsecure)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
realname=trim(fixvariable(request.form("isim")))
username=trim(fixvariable(request.form("kadi")))
password=trim(fixvariable(request.form("sifre")))
password2=trim(fixvariable(request.form("sifret")))
email=trim(fixvariable(request.form("email")))
email2=trim(fixvariable(request.form("emailt")))
scode=trim(fixvariable(request.form("gkodu")))
scode2=trim(fixvariable(request.form("gkodut")))
	if not password = password2 then
		response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
		response.write "<span class=""style5"">Girmis oldugunuz sifreler birbirleri ile uyusmuyor.</span>"
	elseif not email = email2 then
		response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
		response.write "<span class=""style5"">Girmis oldugunuz e-posta adresleri birbirleri ile uyusmuyor.</span>"
	elseif not scode = scode2 then
		response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
		response.write "<span class=""style5"">Girmis oldugunuz güvenlik kodlari birbirleri ile uyusmuyor.</span>"
	elseif controlrealname(realname)="1" or controlusername(username)="1" or controlpassword(password)="1" then
		response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
		response.write errormsg
	elseif controlemail(email)="1" or controlscode(scode)="1" then
		response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
		response.write errormsg
	else
		session("realname")=realname
		session("username")=username
		session("password")=password
		session("email")=email
		session("scode")=scode
%>
		<div align="center"><span class="style5">İsim Soyisim: <%=realname%><br />
		Kullanıcı Adı: <%=username%><br />
		Şifre: ****** (Güvenlik sebebiyle kapatılmıştır.)<br />
		E-Mail: <%=email%><br />
		Güvenlik Kodu: <%=scode%><br />
		<form action="?process=confirmaccount" method="post" name="confirm">
		<div align="center">Bu bilgiler doğrultusunda hesabınız kayıtlara işlenecek emin misiniz?<br />
		  <br />
		  <input name="confirmed" type="submit" class="buton" id="confirm" value="Ekle" />
		         
		<input name="notconfirmed" type="submit" class="buton" id="notconfirm" value="Vazgec" />
		</div>
		</form></span></div>
<%
	set	realname=Nothing
	set	username=Nothing
	set	password=Nothing
	set	password2=Nothing
	set email=Nothing
	set	email2=Nothing
	set	scode=Nothing
	set	scode2=Nothing
	end if
end if
elseif process="confirmaccount" then
call topside

if request.form("confirmed")="Ekle" and not (session("username")="" and session("password")="") then
realname=session("realname")
username=session("username")
password=session("password")
email=session("email")
scode=session("scode")
record.activeconnection = conntype
sorgu="select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
	if not kontrol.eof then
		response.write "<span class=""style5"">Bu kullanici adi daha önceden kayit edilmistir..</span><br>" %>
		Kayıt sayfasına dönmek için <a href="?process=addnew">tıklayınız.</a>
		<%
	else
		sorgu="select * from account where email='"&email&"'"
		set kontrol = conntype.execute (sorgu)
			if not kontrol.eof then
				response.write "<span class=""style5"">Bu e-posta adresine ait kullanici bulunmaktadir.</span><br>"
			else
				randomize()
				dim randomses
				randomses = int(rnd() * 9999999999)
				record.open "account",conntype,3,2
				record.addnew
				record.fields ("name")=realname
				record.fields ("username")=username
				record.fields ("password")=password
				record.fields ("email")=email
				record.fields ("scode")=scode
				record.fields ("activation")="0"
				record.fields ("session")=randomses
				record.update
				msg_txt = "<font face=""Tahoma"" size=""2""><b> " & ShardName & " Uyeleginiz</b>"
				msg_txt = msg_txt & "<br><br><b>Isim Soyisim:</b> " & realname
				msg_txt = msg_txt & "<br><b>Kullanici Adiniz:</b> " & username
				msg_txt = msg_txt & "<br><b>Sifreniz:</b> ******* (Guvenlik sebebiyle kapatilmistir.) "
				msg_txt = msg_txt & "<br><b>E-Mail:</b> " & email
				msg_txt = msg_txt & "<br><b>Guvenlik Kodunuz:</b> " & scode
				msg_txt = msg_txt & "<br><br>"
				msg_txt = msg_txt & "<br><b>Hesabinizi aktif etmek için</b> <a href="""
				msg_txt = msg_txt & ShardRegSite & "?process=activation&user=" & username & "&actcode=" & randomses & """>"
				msg_txt = msg_txt & "tiklayiniz.</a>"
				msg_txt = msg_txt & "<br><br>"
				msg_txt = msg_txt & "<br><b>Bu postanin size yanlis geldigini dusunuyorsaniz:</b>"
				msg_txt = msg_txt & "<b>hesabi silmek için</b> <a href="""
				msg_txt = msg_txt & ShardRegSite & "?process=wrongmail&user=" & username & "&actcode=" & randomses & """>"
				msg_txt = msg_txt & "tiklayiniz.</a><br><br>"
				msg_txt = msg_txt & "<div align=center><b><a href=""" & ShardWebSite & """>" & ShardName & "</a></div></b>"
				msg_txt = msg_txt & "</font>"
				Set Mail = Server.CreateObject("Persits.MailSender")
				if MailServAuth = "1" and not (MailServUser = "" and MailServPass = "") then
				Mail.Username = MailServUser
				Mail.Password = MailServPass
				end if
				Mail.Host = MailServer
				Mail.From = AdminEmail
				Mail.FromName = ShardName
				Mail.AddAddress email
				Mail.Subject = ShardName & " Uyeliginiz"
				Mail.IsHTML = True
				Mail.Body = msg_txt
				Mail.Send
				set Mail=Nothing
				response.write "<span class=""style5"">Tebrikler kaydiniz basariyla alinmistir.</span>"
				response.write "<span class=""style5"">Aktivasyon kodunuz e-posta adresinize gönderildi.</span><br><br>"
				response.write "<h7>Not: Aktivasyon kodunuz e-posta adresinize ulasmadiysa lutfen " & AdminEMail & " adresi ile irtibata geçiniz.</h7>"
			end if
			end if
session.abandon
set realname=Nothing
set username=Nothing
set password=Nothing
set email=Nothing
set scode=Nothing
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
elseif session("username")="" and session("password")="" then
set realname=Nothing
set username=Nothing
set password=Nothing
set email=Nothing
set scode=Nothing
%>
Bu işlem tekrar edilemez.
<%
else
session.abandon
set realname=Nothing
set username=Nothing
set password=Nothing
set email=Nothing
set scode=Nothing
%>
İsteğiniz üzerine işlem iptal edilmiştir...
<%
end if

' Mail den donus olan aktivasyon kodu kontrolü
elseif process="activation" then
call topside
username=request.querystring("user")
actcode=request.querystring("actcode")
record.activeconnection = conntype
sorgu = "select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
	if not kontrol.eof then
		getcode=trim(kontrol("session"))
		actstatus=trim(kontrol("activation"))
			if getcode="notset" or actstatus="1" then
				response.write "<span class=""style5"">Kullanici hesabi daha önceden aktive edilmis.</span><br>"
			else
				record.open sorgu,conntype,3,2
				record.update "activation","1"
				record.update "session","notset"
				password=trim(kontrol("password"))
				scode=trim(kontrol("scode"))
				Set dn=Server.CreateObject("Scripting.FileSystemObject")
				Set setdn=dn.opentextfile (AccFile, 8)
				Setdn.WriteLine "[" & username & "]"
				Setdn.WriteLine "Password=" & password
				Setdn.WriteLine "tag.scode=""" & scode&""""
				Setdn.WriteLine ""
				Setdn.Close
				Set Setdn=Nothing
				Set dn=Nothing
				response.write "<span class=""style5"">""" & username & """ kullanici adiniz basariyla aktive edildi.</span><br>"
			end if
	else
		response.write "<span class=""style5"">Kullanici adi veritabaninda bulunamadi.</span><br>"
	end if
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
'Mail yanlis gitmis ise
elseif process="wrongmail" then
call topside
username=request.querystring("user")
actcode=request.querystring("actcode")
record.activeconnection = conntype
sorgu = "select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
if not kontrol.eof then
	getcode=trim(kontrol("session"))
	sessionstat=trim(kontrol("session"))
		if sessionstat="notset" then
			response.write "<span class=""style5"">Bu kullanici adi daha önceden aktive edilmistir. Silinemez.</span><br>"
		elseif getcode=actcode then
			sorgu="delete from account where username='"&username&"'"
			conntype.execute (sorgu)
			response.write "<span class=""style5"">Kullanici adi veritabanindan silinmistir.</span><br>"
		else
			response.write "<span class=""style5"">Bu aktivasyon kodu kullanici adina uymuyor .</span><br>"
		end if
else
	response.write "<span class=""style5"">Bu kullanici adi veritabaninda bulunamadi.</span><br>" 
end if
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
elseif process="forgotpass" then
call topside
%>
<div align="center">
<form action="?process=sendpass" method="post" name="sendpass">
  <table width="200" border="0" class="brdr">
    <tr>
      <td><table width="245" border="0" bordercolor="<%=BrdColor%>">
        <tr>
          <th width="106" align="left" class="style5" scope="col">Kullanıcı Adı: </th>
          <th width="129" align="right" scope="col"> <input name="kadi" type="text" class="entry" id="kadi" maxlength="10" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">E-Mail:</th>
          <th align="right" scope="row"> <input name="email" type="text" class="entry" id="email" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"><img src="codecreate.asp" alt="Smyrna Web Secure" width="120" height="15" /></th>
        </tr>
        <tr>
          <th height="22" align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"> <input name="systemsecure" type="text" class="entry" id="systemsecure" maxlength="5" />
          </th>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td align="center"><input name="Submit" type="submit" class="buton" value="Şifremi Gönder" /></td>
    </tr>
  </table>
  </form></div>
<%
elseif process="sendpass" then
call topside
errormsg=""
systemsecure=trim(fixvariable(request.form("systemsecure")))
if controlsystemsecure(systemsecure)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
username=trim(fixvariable(request.form("kadi")))
email=trim(fixvariable(request.form("email")))
if controlusername(username)="1" or controlemail(email)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
record.activeconnection = conntype
sorgu = "select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
	if not kontrol.eof then
		getmail=trim(kontrol("email"))
		if email=getmail then
			gotpass=trim(kontrol("password"))
			msg_txt = "<font face=""Tahoma"" size=""2""><b>" & ShardName & " Sifre Hatirlatma Islemi</b><br>"
			msg_txt = msg_txt & "<br><b>Kullanici Adiniz:</b> " & username
			msg_txt = msg_txt & "<br><b>Sifreniz:</b> " & gotpass
			msg_txt = msg_txt & "<br><br>"
			msg_txt = msg_txt & "<b>Lutfen sifrenizi <a href=""" & ShardRegSite & "?process=changepass"">"
			msg_txt = msg_txt & "buraya tiklayarak</a> degistiriniz.</b><br><br>"
			msg_txt = msg_txt & "<div align=center><b><a href=""" & ShardWebSite & """>" & ShardName & "</a></b></div>"
			msg_txt = msg_txt & "</font>"
			Set Mail = Server.CreateObject("Persits.MailSender")
			Mail.Host = MailServer
			Mail.From = AdminEmail
			Mail.FromName = ShardName
			Mail.AddAddress email
			Mail.Subject = ShardName & " Sifre Hatirlatma"
			Mail.IsHTML = True
			Mail.Body = msg_txt
			if MailServAuth = "1" and not (MailServUser = "" and MailServPass = "") then
			Mail.Username = MailServUser
			Mail.Password = MailServPass
			end if
			Mail.Send
			response.write "<span class=""style5"">Sifreniz e-posta adresenize gönderilmistir."
			response.write "Dikkat! Hatirlatma sonrasinda sifrenizi <a href=""?process=changepass"">"
			response.write "buradan</a> degistiriniz.</span><br><br>"
			response.write "<h7>Not: Sifreniz e-posta adresinize ulasmadiysa lutfen " & AdminEMail & " adresi ile irtibata geçiniz.</h7>"
		else
			response.write "<span class=""style5"">Kullanici adi için yazdiginiz e-posta adresi yanlis.</span><br>"
		end if
	else
		response.write "<span class=""style5"">Bu kullanici adi veritabaninda bulunamadi.</span><br>"
	end if
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
end if
end if
elseif process="changepass" then
call topside
%>
<div align="center">
<form action="?process=changepassnow" method="post" name="chgpass">
  <table width="200" border="0" class="brdr">
    <tr>
      <td><table width="242" border="0">
        <tr>
          <th width="104" align="left" class="style5" scope="col">Kullanıcı Adı: </th>
          <th width="128" align="right" scope="col"> <input name="kadi" type="text" class="entry" id="kadi" maxlength="10" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Güvenlik Kodu:</th>
          <th align="right" scope="row"> <input name="gkodu" type="text" class="entry" id="gkodu" maxlength="6" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Eski Şifre:</th>
          <th align="right" scope="row"> <input name="esifre" type="password" class="entry" id="esifre" maxlength="12" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Yeni Şifre:</th>
          <th align="right" scope="row"> <input name="ysifre" type="password" class="entry" id="ysifre" maxlength="12" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Yeni Şifre Tekrar: </th>
          <th align="right" scope="row"> <input name="ysifret" type="password" class="entry" id="ysifret" maxlength="12" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"><img src="codecreate.asp" alt="Smyrna Web Secure" width="120" height="15" /></th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"><input name="systemsecure" type="text" class="entry" id="systemsecure" maxlength="5" /></th>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td align="center"><input name="Submit" type="submit" class="buton" value="Şifremi Değiştir" /></td>
    </tr>
  </table>
</form></div>
<%
elseif process="changepassnow" then
call topside
errormsg=""
systemsecure=trim(fixvariable(request.form("systemsecure")))
if controlsystemsecure(systemsecure)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
username=trim(fixvariable(request.form("kadi")))
scode=trim(fixvariable(request.form("gkodu")))
oldpass=trim(fixvariable(request.form("esifre")))
newpass=trim(fixvariable(request.form("ysifre")))
newpass2=trim(fixvariable(request.form("ysifret")))
if not newpass=newspass2 then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write "<span class=""style5"">Girdiginiz sifreler birbiri ile uyusmuyor.</span>"
elseif controlusername(username)="1" or controlpassword(oldpass)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
elseif controlpassword(newpass)="1" or controlscode(scode)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
record.activeconnection = conntype
sorgu = "select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
	if not kontrol.eof then
		getscode=trim(kontrol("scode"))
		getpass=trim(kontrol("password"))
			if getscode=scode then
				if oldpass=getpass then
					record.open sorgu,conntype,3,2
					record.update "password",newpass
					Set dn=Server.CreateObject("Scripting.FileSystemObject")
					Set setdn=dn.opentextfile (AccFile, 8)
					Setdn.WriteLine "[" & username & "]"
					Setdn.WriteLine "Password=" & newpass
					Setdn.WriteLine ""
					Setdn.Close
					Set Setdn=Nothing
					Set dn=Nothing
					response.write "<span class=""style5"">Sifreniz basariyla degistirildi.</span><br>"
				else
				response.write "<span class=""style5"">Eski sifrenizi hatali girdiniz.</span><br>"
				end if
			else
				response.write "<span class=""style5"">Bu kullaniciya ait güvenlik kodunu yanlis girdiniz.</span><br>"
			end if
	else
		response.write "<span class=""style5"">Bu kullanici adi veritabaninda bulunamadi.</span><br>"
	end if
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
end if
end if
elseif process="changescode" then
call topside
%>
<div align="center">
<form action="?process=changescodenow" method="post" name="chgscode">
  <table width="200" border="0" class="brdr">
    <tr>
      <td><table width="296" border="0" bordercolor="<%=BrdColor%>">
        <tr>
          <th width="157" align="left" class="style5" scope="col">Kullanıcı Adı: </th>
          <th width="129" align="right" scope="col"> <input name="kadi" type="text" class="entry" id="kadi" maxlength="10" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Şifre:</th>
          <th align="right" scope="row"> <input name="sifre" type="password" class="entry" id="sifre" maxlength="12" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Yeni Güvenlik Kodu: </th>
          <th align="right" scope="row"> <input name="ygkodu" type="text" class="entry" id="ygkodu" maxlength="6" />
          </th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Yeni Güvenlik Kodu Tekrar: </th>
          <th align="right" scope="row"> <input name="ygkodut" type="text" class="entry" id="ygkodut" maxlength="6" /></th>
        </tr>
        <tr>
          <th align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"><img src="codecreate.asp" alt="Smyrna Web Secure" width="120" height="15" /></th>
        </tr>
        <tr>
          <th height="22" align="left" class="style5" scope="row">Sistem Güvenliği: </th>
          <th align="right" scope="row"><input name="systemsecure" type="text" class="entry" id="systemsecure" maxlength="5" /></th>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td align="center"><input name="Submit" type="submit" class="buton" value="Güvenlik Kodunu Değiştir" /></td>
    </tr>
  </table>
</form></div>
<%
elseif process="changescodenow" then
call topside
errormsg=""
systemsecure=trim(fixvariable(request.form("systemsecure")))
if controlsystemsecure(systemsecure)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
username=trim(fixvariable(request.form("kadi")))
password=trim(fixvariable(request.form("sifre")))
newscode=trim(fixvariable(request.form("ygkodu")))
newscode2=trim(fixvariable(request.form("ygkodut")))
if not newscode=newscode2 then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write "<span class=""style5"">Girdiginiz güvenlik kodlari birbiri ile uyusmuyor.</span>"
elseif controlusername(username)="1" or controlpassword(password)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
elseif controlscode(newscode)="1" then
response.write "<span class=""style5"">Formda hatalar bulundu:</span><br>"
response.write errormsg
else
record.activeconnection = conntype
sorgu = "select * from account where username='"&username&"'"
set kontrol = conntype.execute (sorgu)
	if not kontrol.eof then
		getpass=trim(kontrol("password"))
			if password=getpass then
				record.open sorgu,conntype,3,2
				record.update "scode",newscode
				Set dn=Server.CreateObject("Scripting.FileSystemObject")
				Set setdn=dn.opentextfile (AccFile, 8)
				Setdn.WriteLine "[" & username & "]"
				Setdn.WriteLine "tag.scode=""" & newscode&""""
				Setdn.WriteLine ""
				Setdn.Close
				Set Setdn=Nothing
				Set dn=Nothing
				response.write "<span class=""style5"">Güvenlik kodunuz basariyla degistirildi.</span><br>"
			else
				response.write "<span class=""style5"">Bu kullaniciya ait sifreyi yanlis girdiniz.</span><br>"
			end if
	else
		response.write "<span class=""style5"">Bu kullanici adi veritabaninda bulunamadi.</span><br>"
	end if
set kontrol=Nothing
set record=Nothing
conntype.close
set conntype=Nothing
end if
end if
else
response.redirect "?process=addnew"
end if

function controlsystemsecure(str)
controlsystemsecure = "0"
if len(str) = 0 then
errormsg =  errormsg &  "<span class=""style5"">Lütfen sistem güvenligi kodunu yaziniz.</span>"
controlsystemsecure = "1"
elseif not len(str) = 5 then
errormsg =  errormsg &  "<span class=""style5"">Sistem güvenligi kodu 5 haneden olusmaktadir.</span>"
controlsystemsecure = "1"
elseif not str = trim(session("CAPTCHA_" & session.sessionid)) then
errormsg =  errormsg &  "<span class=""style5"">Girdiginiz sistem güvenligi kodu resimdeki ile uyusmuyor.</span>"
controlsystemsecure = "1"
end if
end function

function controlrealname(str)
controlrealname = "0"
if str = "" then
errormsg =  errormsg &  "<span class=""style5"">Lütfen isim ve soyisminizi yaziniz.</span>"
controlrealname = "1"
elseif len(str) < 6 then
errormsg =  errormsg &  "<span class=""style5"">Isminiz ve soyisminiz 6 karakterden kisa olamaz.</span>"
controlrealname = "1"
elseif len(str) > 25 then
errormsg =  errormsg &  "<span class=""style5"">Isminiz ve soyisminiz 25 karakterden uzun olamaz.</span>"
controlrealname = "1"
end if
end function

function controlusername(str)
controlusername = "0"
if str = "" then
errormsg =  errormsg &  "<span class=""style5"">Lütfen kullanici adinizi yaziniz.</span>"
controlusername = "1"
elseif len(str) < 4  then
errormsg =  errormsg &  "<span class=""style5"">Kullanici adiniz 4 karakterden kisa olamaz.</span>"
controlusername="1"
elseif len(str) > 10 then
errormsg =  errormsg &  "<span class=""style5"">Kullanici adiniz 10 karakterden uzun olamaz.</span>"
controlusername="1"
end if
end function

function controlpassword(str)
controlpassword = "0"
if str = "" then
errormsg =  errormsg &  "<span class=""style5"">Lütfen sifrenizi yaziniz.</span>"
controlpassword = "1"
elseif len(str) < 6 then
errormsg =  errormsg &  "<span class=""style5"">Sifreniz 6 karakterden kisa olamaz.</span>"
controlpassword = "1"
elseif len(str) > 12 then
errormsg =  errormsg &  "<span class=""style5"">Sifreniz 12 karakterden uzun olamaz.</span>"
controlpassword = "1"
end if
end function

function controlemail(str)
controlemail = "0"
if str = "" then
errormsg =  errormsg &  "<span class=""style5"">Lütfen e-posta adresinizi yaziniz.</span>"
controlemail = "1"
elseif len(str) < 6 then
errormsg =  errormsg &  "<span class=""style5"">E-Posta adresiniz 6 karakterden kisa olamaz.</span>"
controlemail = "1"
else
et = instr(2, str , "@" ) 
if et = vbisnull then
errormsg =  errormsg &  "<span class=""style5"">Geçersiz bir e-posta adresi yazdiniz.</span>"
controlemail = "1"
else
etk = et
et = true
end if
if not controlemail = "1" then
if et = true then
nkt = instr(etk + 2, str , "." ) 
if nkt = vbisnull then
errormsg =  errormsg &  "<span class=""style5"">Geçersiz bir e-posta adresi yazdiniz.</span>"
controlemail = "1"
else
controlemail = "0"
end if
else
errormsg =  errormsg &  "<span class=""style5"">Geçersiz bir e-posta adresi yazdiniz.</span>"
controlemail = "1"
end if
end if
end if
end function

function controlscode(str)
controlscode = "0"
if str = "" then
errormsg =  errormsg &  "<span class=""style5"">Lütfen güvenlik kodunuzu yaziniz.</span>"
controlscode = "1"
elseif len(str) < 4 then
errormsg =  errormsg &  "<span class=""style5"">Güvenlik kodunuz 4 haneden kisa olamaz.</span>"
controlscode = "1"
elseif len(str) > 6 then
errormsg =  errormsg &  "<span class=""style5"">Güvenlik kodunuz 6 haneden uzun olamaz.</span>"
controlscode = "1"
else
for i = 1 to len(str)
	if instr(1,"0123456789",mid(str,i,1),vbBinaryCompare) = "0" then
	errormsg = errormsg & "<span class=""style5"">Güvenlik kodu sadece rakamlardan olusabilir.</span>"
	controlscode = "1"
exit for
end if
next
end if
end function

function fixvariable(data) 
data = Replace (data ,"`","",1,-1,1)
data = Replace (data ,"=","",1,-1,1)
data = Replace (data ,"&","",1,-1,1)
data = Replace (data ,"%","",1,-1,1)
data = Replace (data ,"!","",1,-1,1)
data = Replace (data ,"#","",1,-1,1)
data = Replace (data ,"<","",1,-1,1)
data = Replace (data ,">","",1,-1,1)
data = Replace (data ,"*","",1,-1,1)
data = Replace (data ,"\","",1,-1,1)
data = Replace (data ,"/","",1,-1,1)
data = Replace (data ,"^","",1,-1,1)
data = Replace (data ,")","",1,-1,1)
data = Replace (data ,"(","",1,-1,1)
data = Replace (data ,"+","",1,-1,1)
data = Replace (data ,"é","",1,-1,1)
data = Replace (data ,"{","",1,-1,1)
data = Replace (data ,"[","",1,-1,1)
data = Replace (data ,"]","",1,-1,1)
data = Replace (data ,"}","",1,-1,1)
data = Replace (data ,"|","",1,-1,1)
data = Replace (data ,"$","",1,-1,1)
data = Replace (data ,"And","",1,-1,1)
data = Replace (data ,"'","",1,-1,1)
data = Replace (data ,";","",1,-1,1)
data = Replace (data ,":","",1,-1,1)
data = Replace (data ,"?","",1,-1,1)
data = Replace (data ,"ö","o",1,-1,1)
data = Replace (data ,"Ö","o",1,-1,1)
data = Replace (data ,"ç","c",1,-1,1)
data = Replace (data ,"s","s",1,-1,1)
data = Replace (data ,"S","s",1,-1,1)
data = Replace (data ,"I","i",1,-1,1)
data = Replace (data ,"i","i",1,-1,1)
data = Replace (data ,"ü","u",1,-1,1)
data = Replace (data ,"Ü","u",1,-1,1)
data = Replace (data ,"g","g",1,-1,1)
data = Replace (data ,"G","g",1,-1,1)
data = Replace (data ,"Chr(34)","",1,-1,1)
data = Replace (data ,"Chr(39)","",1,-1,1)
data = Replace (data ,"select","",1,-1,1)
data = Replace (data ,"join","",1,-1,1)
data = Replace (data ,"union","",1,-1,1)
data = Replace (data ,"where","",1,-1,1)
data = Replace (data ,"insert","",1,-1,1)
data = Replace (data ,"delete","",1,-1,1)
data = Replace (data ,"update","",1,-1,1)
data = Replace (data ,"like","",1,-1,1)
data = Replace (data ,"drop","",1,-1,1)
data = Replace (data ,"create","",1,-1,1)
data = Replace (data ,"modify","",1,-1,1)
data = Replace (data ,"rename","",1,-1,1)
data = Replace (data ,"alter","",1,-1,1)
data = Replace (data ,"cast","",1,-1,1)
fixvariable=data
end function

sub topside
%>
<p align="center" class="style5"><%=ShardName%> Account Sistemi</p><br>
<div align="center">
  <table width="621" border="0" bordercolor="<%=BrdColor%>" class="brdr">
    <tr>
      <th width="97" height="14" class="style5" scope="col"><a href="?process=addnew">Yeni Kayıt</a> </th>
      <th width="138" class="style5" scope="col"><a href="?process=forgotpass">Şifre Hatırlat</a> </th>
      <th width="150" class="style5" scope="col"><a href="?process=changepass">Şifre Değiştir</a> </th>
      <th width="206" class="style5" scope="col"><a href="?process=changescode">Güvenlik Kodu Değiştir</a> </th>
    </tr>
  </table>
</div><br><br>
<%
end sub
%>
<body>
</body>
</html>
 
Geri
Üst