<META http-equiv=Content-Type content=text/html; charset=UTF-8 charset=UTF-8>
<!--#include file ="../veriables.asp"-->
<% 
set baglanti = server.CreateObject("adodb.connection")
baglanti.open "Provider=Microsoft.Jet.oledb.4.0;Data Source=" & server.Mappath("../db/"&datayol&".mdb")
Set Guncelle = Server.CreateObject("Adodb.Recordset")
sql="Select * From Admin"
Guncelle.Open sql,Baglanti,1,3
session("plang") = Guncelle("panel")
Guncelle.close
set Guncelle=nothing

page = Request.Querystring("page")
if page="" then page="login" end if
if page="login" then 
if session("girdinmilan") = "evetgirdimlan" then
Response.Redirect "?page=admin"
Response.end
end if
set baglanti = server.CreateObject("adodb.connection")
baglanti.open "Provider=Microsoft.Jet.oledb.4.0;Data Source=" & server.Mappath("../db/"&datayol&".mdb")
%>
<center><% = request.servervariables("http_user_agent")  %></center>

<head>

	<title>Admin</title>
	
    <style type="text/css" media="all">
		@import url("css/style.css");
		@import url("css/jquery.wysiwyg.css");
		@import url("css/facebox.css");
		@import url("css/visualize.css");
		@import url("css/date_input.css");
    </style>
	
	<!--[if lt IE 8]><style type="text/css" media="all">@import url("css/ie.css");</style><![endif]-->

</head>

</head>
<body>

	<div id="hld">
	
		<div class="wrapper">		<!-- wrapper begins -->
		
		
		
		
		
		
			
			
			
			
			
			
			
			<div class="block small center login">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>
          			<% 
					dil=session("plang") 
					if dil="tr" then 
					%>Giris yap<% 
					end if 
					if dil="en" then 
					%>Login<% 
					end if 
					if dil="fr" then 
					%>S'identifier<% 
					end if 
					if dil="ru" then 
					%>вход<%
					 end if 
					 if dil="ar" then 
					 %>دخول<% 
					 end if 
					 %></h2>
					<ul>
						<li><a href="../default.asp">
					<% 
					dil=session("plang") 
					if dil="tr" then 
					%>Siteye geri d&ouml;n<% 
					end if 
					if dil="en" then 
					%>Return to site<% 
					end if 
					if dil="fr" then 
					%>Retour au site<% 
					end if 
					if dil="ru" then 
					%>Вернуться на сайт<%
					end if 
					if dil="ar" then 
					%>عودة إلى موقع<% 
					end if 
					%></a></li>
					</ul>
				</div>		<!-- .block_head ends -->
				
				
				
				
				<div class="block_content">
                
                
                
                <%

If SESSION("koru" )="" Then '
SESSION("koru" )=0 
Else 
SESSION("koru" )= SESSION("koru" ) + 1 
End If 

If CInt(SESSION("koru" ))> 10 Then '
Session.TimeOut=60 
response.redirect "panel.asp?box=error&text=Yonetim%20panelinden%20uzaklastirildiniz.&second=1&url=../default.asp"
RESPONSE.End 
End If 
%>

<%
If CInt(SESSION("koru" ))< 5 Then
%>
<div class="message info"><p><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Lütfen kullanici adinizi ve sifrenizi giriniz<% 
					end if 
					if dil="en" then 
					%>Please enter your username and password<% 
					end if 
					if dil="fr" then 
					%>S'il vous plaît entrer votre nom d'utilisateur et mot de passe<% 
					end if 
					if dil="ru" then 
					%>Пожалуйста, введите ваше имя пользователя и пароль<%
					end if 
					if dil="ar" then 
					%>الرجاء إدخال اسم المستخدم وكلمة المرور الخاصة بك<% 
					end if 
					%></p></div>
<% end if %>
					<form action="default.asp" method="post">
						<p>
							<label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Kullanıcı adı<% 
					end if 
					if dil="en" then 
					%>Username<% 
					end if 
					if dil="fr" then 
					%>Nom d'utilisateur<% 
					end if 
					if dil="ru" then 
					%>имя пользователя<%
					end if 
					if dil="ar" then 
					%>اسم المستخدم<% 
					end if 
					%>:</label> <br />
							<input type="text" name="kullanici" class="text" value="" />
						</p>
						
						<p>
							<label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Şifre<% 
					end if 
					if dil="en" then 
					%>Password<% 
					end if 
					if dil="fr" then 
					%>Mot de passe<% 
					end if 
					if dil="ru" then 
					%>пароль<%
					end if 
					if dil="ar" then 
					%>كلمة السر<% 
					end if 
					%>:</label> <br />
							<input type="password" name="parola" class="text" value="" />
						</p>
						
						<p>
							<input type="submit" name="login" class="submit" value="<% 
					dil=session("plang") 
					if dil="tr" then 
					%>Giris yap<% 
					end if 
					if dil="en" then 
					%>Login<% 
					end if 
					if dil="fr" then 
					%>Entrer<% 
					end if 
					if dil="ru" then 
					%>ВХОД<%
					end if 
					if dil="ar" then 
					%>تسجيل الدخول<% 
					end if 
					%>" /> &nbsp; 
							
						</p>
					</form>
                    
                    <% 
function guvenlik(genel ) 
genel = Replace (genel ,"<","abc",1,-1,1 ) 
genel = Replace (genel ,"=","abc",1,-1,1 )
genel = Replace (genel ,"$","abc",1,-1,1 )
genel = Replace (genel ,">","abc",1,-1,1 ) 
genel = Replace (genel ,"%","abc",1,-1,1 ) 
genel = Replace (genel ,"'","abc",1,-1,1 ) 
guvenlik=genel
end function 
%>  


				<%
				Dim MZKLoginol
				Dim MZKUser
				Dim MZKParola
				
				MZKLoginol=guvenlik(Request.Form("login"))
				If MZKLoginol <> "" Then
				
				MZKUser=guvenlik(Request.Form("kullanici"))
				MZKParola=guvenlik(Request.Form("parola"))
				
				
				sql="Select * From admin where onay=1 and kullaniciadi='"& MZKUser &"' and sifre='"& MZKParola &"'"
                		set LoginUp = Baglanti.ExeCute(sql)
				
				If LoginUp.EOF Then
				
				Response.WRite ("<div class=""message errormsg""><p>Error username or password</p></div>")
				SESSION("koru" )= SESSION("koru" ) + 6
				
				Set kaydet = Server.CreateObject("ADODB.Recordset")
    			sql = "SELECT * from logs"
    			kaydet.open sql, baglanti, 1, 3
   			    kaydet.addnew
				kaydet("ip") = Request.ServerVariables("remote_addr")
			    kaydet("zaman") = now()
				kaydet("sifre") = "false"
				kaydet("durum") = "false"
				kaydet("kull") = guvenlik(request.Form("parola"))
				kaydet("pass") = guvenlik(Request.Form("kullanici"))
				kaydet.update
   				kaydet.close
   				set kaydet=nothing
				
				Elseif Not LoginUp("sifre")=MZKParola Then
				Response.WRirte ("<div class=""message errormsg""><p>Error username or password</p></div>")
				SESSION("koru" )= SESSION("koru" ) + 6
				
				Set kaydet = Server.CreateObject("ADODB.Recordset")
    			sql = "SELECT * from logs"
    			kaydet.open sql, baglanti, 1, 3
   			    kaydet.addnew
				kaydet("ip") = Request.ServerVariables("remote_addr")
			    kaydet("zaman") = now()
				kaydet("sifre") = "false"
				kaydet("durum") = "false"
				kaydet("kull") = guvenlik(request.Form("parola"))
				kaydet("pass") = guvenlik(Request.Form("kullanici"))
				kaydet.update
   				kaydet.close
   				set kaydet=nothing
				
				Elseif LoginUp("sifre")=MZKParola Then
				session("girdinmilan") = "evetgirdimlan"
               			session("id") = LoginUp("id")
                		session("kullaniciadi")= LoginUp("kullaniciadi")
				Session.Timeout=60
				
				
				
				Set kaydet = Server.CreateObject("ADODB.Recordset")
    			sql = "SELECT * from logs"
    			kaydet.open sql, baglanti, 1, 3
   			    kaydet.addnew
				kaydet("ip") = Request.ServerVariables("remote_addr")
			    kaydet("zaman") = now()
				kaydet("sifre") = "true"
				kaydet("durum") = "true"
				kaydet("pass") = "TruePass"
				kaydet("kull") = "TrueGuess"
				kaydet.update
   				kaydet.close
   				set kaydet=nothing
	
	
				if session("backurl")="" then
				response.redirect "panel.asp?box=success&text=Giris%20basarili.&second=2&url=default.asp?page=admin"
				else
				response.redirect "panel.asp?box=success&text=Giris%20basarili.&second=2&url=turnback"
				end if
				
				End if				
				End if
				
				%>
					
				</div>		<!-- .block_content ends -->
					
				<div class="bendl"></div>
				<div class="bendr"></div>
								
			</div>		<!-- .login ends -->
			
			
			
			
			
			
			
			
			
			
			
		
		
		</div>						<!-- wrapper ends -->
		
	</div>		<!-- #hld ends -->
	
	
	<!--[if IE]><script type="text/javascript" src="js/excanvas.js"></script><![endif]-->	
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.img.preload.js"></script>
	<script type="text/javascript" src="js/jquery.filestyle.mini.js"></script>
	<script type="text/javascript" src="js/jquery.wysiwyg.js"></script>
	<script type="text/javascript" src="js/jquery.date_input.pack.js"></script>
	<script type="text/javascript" src="js/facebox.js"></script>
	<script type="text/javascript" src="js/jquery.visualize.js"></script>
	<script type="text/javascript" src="js/jquery.visualize.tooltip.js"></script>
	<script type="text/javascript" src="js/jquery.select_skin.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
	<script type="text/javascript" src="js/ajaxupload.js"></script>
	<script type="text/javascript" src="js/jquery.pngfix.js"></script>
	<script type="text/javascript" src="js/custom.js"></script>
	
    
<%
else If page="admin" then 
%>
<%
if not session("girdinmilan") = "evetgirdimlan" then
Response.Redirect "default.asp?page=login"
Response.end
end if
%>
<!--#include file="head.asp"--> 

			<div class="block">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2><% 
					dil=session("plang") 
					if dil="tr" then 
					%>HOŞ GELDİNİZ<% 
					end if 
					if dil="en" then 
					%>WELCOME<% 
					end if 
					if dil="fr" then 
					%>BIENVENUE<% 
					end if 
					if dil="ru" then 
					%>ДОБРО ПОЖАЛОВАТЬ<%
					end if 
					if dil="ar" then 
					%>ترحيب<% 
					end if 
					%></h2>
					
				
				</div>		<!-- .block_head ends -->
				
				
				<div class="block_content">
				<BR /><BR />
                <BR /><BR />
    			<center>
                	<% 
					dil=session("plang") 
					if dil="tr" then 
					%>
                Bu yazılım, kurumsal web site çözümü hizmetinizi sağlamak amacıyla tasarlanmıştır..<br />
				Sistem üzerinde yapılacak her işlemde yetkili editör sorumludur..<% 
					end if 
					if dil="en" then 
					%>This software is designed to provide service corporate web site solution .. <br />
Authorized the editor responsible for each process on the system..<% 
					end if 
					if dil="fr" then 
					%>Ce logiciel est conçu pour fournir une solution de site Web d'entreprise de service .. <br />
Autorisé l'éditeur responsable de chaque processus du système à faire ..<% 
					end if 
					if dil="ru" then 
					%>Это программное обеспечение предназначено для предоставления услуг корпоративным решением веб-сайте .. <br />
Уполномоченный с редактором ответственность за каждый процесс в системе, чтобы сделать ..<%
					end if 
					if dil="ar" then 
					%>تم تصميم هذا البرنامج لتقديم خدمة الشركات حل موقع على شبكة الإنترنت .. <br />
أذن المحرر المسؤول عن كل عملية على النظام القيام به ..<% 
					end if 
					%>
				</center>
                <BR /><BR />
                <BR /><BR />
				</div>
                
                <div class="bendl"></div>
				<div class="bendr"></div>
				
			
			</div>		<!-- .block ends -->
			
        
        

<!--#include file="foot.asp"-->


<%
else if page="logout" then
session.Abandon
response.redirect "panel.asp?box=success&text=Cikis%20basarili.&second=2&url=default.asp?page=login"
else
response.redirect "panel.asp?box=warning&text=Sayfa%20hatali.&second=2&url=../default.asp"
end if
end if 
end if
%>


</body>
</html>

