Bine ati venit pe StarTutoriale inregistreazaTE SI daca vrei un post in echipa da add la sportivu_razvan99 administratorul principal.


 
AcasaAcasa  CalendarCalendar  GalerieGalerie  FAQFAQ  CautareCautare  MembriMembri  GrupuriGrupuri  InregistrareInregistrare  ConectareConectare  Info upload  
Site-ul nostru de upload este Site upload
Cautare
 
 

Rezultate pe:
 
Rechercher Cautare avansata
Navigare
 Portal
 Index
 Membri
 Profil
 FAQ
 Cautare
Top postatori
RazVaN
 
Benl4deN
 
DeLuX
 
M3trix
 
DeConnection
 
AlyNNN :X
 
S2m3H
 
Sky
 
Da-Kid
 
seboros
 
Ultimele subiecte
» ce ati face cu 50 lei ?
Dum Noi 13, 2011 7:52 pm Scris de DeLuX

» [TUTORIAL] HL Guard pe server Counter Strike 1.6
Dum Noi 13, 2011 6:33 pm Scris de DeLuX

» Toate Gta-urile
Dum Noi 13, 2011 5:50 pm Scris de RazVaN

» metin2Star
Dum Noi 13, 2011 5:14 pm Scris de Sky

» DS-LAN SV
Dum Noi 13, 2011 5:12 pm Scris de Sky

» Fifa 2012
Dum Noi 13, 2011 5:10 pm Scris de Sky

» [ADDONS] Invision AmxX 2.0 Color [Linux & Windows]
Dum Noi 13, 2011 4:54 pm Scris de DeLuX

» [ADDONS] MaX Security !!
Dum Noi 13, 2011 4:52 pm Scris de DeLuX

» [ADDONS] Interesant
Dum Noi 13, 2011 4:50 pm Scris de DeLuX

Iunie 2018
LunMarMierJoiVinSamDum
    123
45678910
11121314151617
18192021222324
252627282930 
CalendarCalendar
Cine este conectat?
In total este 1 utilizator conectat: 0 Inregistrati, 0 Invizibil si 1 Vizitator

Nici unul

Recordul de utilizatori conectati a fost de 8, Dum Dec 19, 2010 4:54 pm
Statistici
Avem 118 membri inregistrati
Cel mai nou utilizator inregistrat este: Sky

Membrii nostri au postat un numar de 260 mesaje în 166 subiecte
Subiectele cele mai vizionate
Triburile-Lan v0.1,0.2(download)
DS-LAN SV
Echipa Ds Lan RomaniA
ghiduri triburile .ro
O sa invatam sa facem un sv de triburile cu 2 versiuni
Ce Muzica Mai Ascultati?
Cum sa-ti pui srvu pe no-ip.org [tutorial cu imagini]
Cum sa faci server pe router
CUM SA FACI SERVERUL LAN/PUBLIC
Securitate Antiflood + database!
Cei mai activi postatori ai saptamanii

Distribuiţi | 
 

 Cum sa mearga "tine-ma minte"

In jos 
AutorMesaj
RazVaN
administrator
administrator
avatar

Mesaje : 230
Data de inscriere : 18/06/2010

MesajSubiect: Cum sa mearga "tine-ma minte"    Lun Aug 09, 2010 4:03 am

Cum sa mearga "tine-ma minte"
*In acest tutorial va voi explica cum sa faceti sa mearga aceasta functie , adica parola sa fie tinuta minte . Cand puneti userul sa nu mai trebuiasca sa puneti si parola pentru ca se pune automat !

Creati un fisier cu numele si extensia "login.asp" . In el introduceti urmatorul cod :
Cod:

<% Response.Buffer = True 'Buffers the content so Response.Redirect will work
Session("BlnAdministrator")=false 'Set our session object to false
'set the username and password
sUsername="codefixer"
sPassword="codefixer"
%>
<html>
<head>
<title>Cookie Login Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
'if form has not been filled in then display it otherwise check the details submitted
If Request.Form<>"" Then
If Request.form("checkbox") ="1" Then
Response.Cookies("UsernameCookie") = Request.Form("txtUsername")
Response.Cookies("PasswordCookie") = Request.Form("txtPassword")
Response.Cookies("RememberMeCookie") = "1"
Response.Cookies("UsernameCookie").expires = Now() + 60
Response.Cookies("PasswordCookie").expires = Now() + 60
Response.Cookies("RememberMeCookie").expires = Now() + 60
Else
Response.Cookies("RememberMeCookie") = ""
Response.Cookies("UsernameCookie") = ""
Response.Cookies("PasswordCookie") = ""
End If
'=== call checklogin subroutine
CheckLoginForm
Else
'=== call showlogin subroutine
ShowLoginForm
End If
'=== begin subroutine showlogin
Sub ShowLoginForm
%>
<div align="center"> <br>
<form name="form1" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<table width="50%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6185C1" bgcolor="EEF3FB">
<tr>
<td height="112" valign="top">
<table width='100%' border="0" cellpadding="3">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="45%">Username : </td>
<td width="54%"> <input value="<%= Request.Cookies("UsernameCookie") %>" name="txtUsername" type="text">
</td>
</tr>
<tr>
<td width="45%">Password : </td>
<td width="54%"> <input value="<%= Request.Cookies("PasswordCookie") %>" name="txtPassword" type="password">
</td>
</tr>
<tr>
<td width="45%">&nbsp;</td>
<td width="54%"> <input type="submit" value="Login" name="submit">
</td>
</tr>
<tr>
<td>Remember me</td>
<td><input value="1" type="checkbox" name="checkbox"
<% If Request.Cookies("RememberMeCookie") = "1" Then
Response.Write "CHECKED"
Else
Response.Write ""
End If %>>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>

<%
'=== end showloginform subroutine
End Sub

'===begin subroutine checkloginform
Sub CheckLoginForm
txtUsername=Request.Form("txtUsername")
txtPassword=Request.Form("txtPassword")
'simple/basic protection against SQL injection use of the apostrophe
If InStr(1,txtUsername,"'",1) > 0 and InStr(1,txtPassword,"'",1) > 0 then
response.redirect "Login.asp"
Else
'check to see if the form details filled in match 'username' and 'password' above
If txtUsername = sUsername AND txtPassword = sPassword Then
'if the correct login details are filled in then set up a Session Object and redirect
'visitor to admin page
Session("BlnAdministrator") = True
Response.Redirect "admin.asp" 'set page you want to direct to on successful login
Else
'if the correct details aren't filled in then show the subroutine showloginform again
'and the statement below
ShowLoginForm
response.write "<div align='center'>Your login failed.</div>"
End If
End If
End Sub
'=== end subroutine checkloginform
%>
</body>
</html>
Acuma mai creeati un fisier "admin.asp" . Dupa ce bifati "tine-ma minte" , v-a va duce pe aceasta pagina , deci bine e sa puneti un redirect spre joc . Am pus aici si un cod !
Cod:
:
<% If Session("BlnAdministrator") <> True Then
Response.Redirect("login.asp")
End If
%>
<html>
<head>
<title>Cookie Login Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align='center'>Successful login and your username & password will be remembered if you clicked 'remember me' on login.</div>
</body>
</html>

[<% If Session("BlnAdministrator") <> True Then
Response.Redirect("login.asp")
End If
%>
Sper ca v-a fost de folos !
SI ACESTEA AU FOST TUTORIALELE ZILEI DE AZI
Sus In jos
Vezi profilul utilizatorului http://startutorial.forumz.ro
 
Cum sa mearga "tine-ma minte"
Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
 :: Tutoriale GamEs :: Triburile SpeeD :: Tutoriale Triburile SpeeD-
Mergi direct la: