K|NG Posted February 27, 2003 Report Share Posted February 27, 2003 Ielogošanās forma: Nu ļoti vienkāršs variants i papildināms i viskādi citādi te: <code><font color="#000000"> <font color="#0000CC"><?php </font><font color="#FF9900">#Ielogoshanas forma: #Nu ljoti vienkarss variants. ir papildinAAms i viskaadi citadi te: # lietotaaja vaards: </font><font color="#0000CC">$usr </font><font color="#006600">= </font><font color="#CC0000">"xxx"</font><font color="#006600">; </font><font color="#FF9900"># lietotaaja parole: </font><font color="#0000CC">$pw </font><font color="#006600">= </font><font color="#CC0000">"yyy"</font><font color="#006600">; </font><font color="#FF9900"># saakas lietas: </font><font color="#006600">if ((</font><font color="#0000CC">$ielogo</font><font color="#006600">!== </font><font color="#CC0000">"$usr" </font><font color="#006600">&& </font><font color="#0000CC">$parole</font><font color="#006600">!== </font><font color="#CC0000">"$pw"</font><font color="#006600">)|| (</font><font color="#0000CC">$ielogo</font><font color="#006600">!== </font><font color="#CC0000">"$usr" </font><font color="#006600">&& </font><font color="#0000CC">$parole</font><font color="#006600">!== </font><font color="#CC0000">""</font><font color="#006600">)|| (</font><font color="#0000CC">$ielogo</font><font color="#006600">!== </font><font color="#CC0000">"" </font><font color="#006600">&& </font><font color="#0000CC">$parole</font><font color="#006600">!== </font><font color="#CC0000">"$pw"</font><font color="#006600">)){ </font><font color="#FF9900">#formas paskats: </font><font color="#006600">echo </font><font color="#CC0000">"<center>IP:$REMOTE_ADDR n"</font><font color="#006600">; echo </font><font color="#CC0000">"<form method="</font><font color="#0000CC">post</font><font color="#CC0000">" action="</font><font color="#0000CC">index</font><font color="#006600">.</font><font color="#0000CC">php</font><font color="#CC0000">">n"</font><font color="#006600">; echo </font><font color="#CC0000">"<b>Lietotajs(a)</b>n"</font><font color="#006600">; echo </font><font color="#CC0000">"<input type="</font><font color="#0000CC">text</font><font color="#CC0000">" name="</font><font color="#0000CC">ielogo</font><font color="#CC0000">">n"</font><font color="#006600">; echo </font><font color="#CC0000">" <b>Paroli zini?</b>n"</font><font color="#006600">; echo </font><font color="#CC0000">"<input type="</font><font color="#0000CC">password</font><font color="#CC0000">" name="</font><font color="#0000CC">parole</font><font color="#CC0000">">n"</font><font color="#006600">; echo </font><font color="#CC0000">" n"</font><font color="#006600">; echo </font><font color="#CC0000">"<input type="</font><font color="#0000CC">submit</font><font color="#CC0000">" name="</font><font color="#0000CC">Submit</font><font color="#CC0000">" value="</font><font color="#0000CC">Nu ieej</font><font color="#006600">!</font><font color="#CC0000">">n"</font><font color="#006600">; echo </font><font color="#CC0000">"</form>n"</font><font color="#006600">; echo </font><font color="#CC0000">"</center>n"</font><font color="#006600">; echo </font><font color="#CC0000">" <center>Copyright © Parole :)))))) <a href='mailto:acidus@acidus.lv'>K|NG</a></center>"</font><font color="#006600">;} </font><font color="#FF9900"># ja lietotaaja parole ir pareiza tad: </font><font color="#006600">if (</font><font color="#0000CC">$ielogo </font><font color="#006600">== </font><font color="#CC0000">"$usr" </font><font color="#006600">&& </font><font color="#0000CC">$parole </font><font color="#006600">== </font><font color="#CC0000">"$pw"</font><font color="#006600">){ </font><font color="#FF9900"># paraada visu informaaciju </font><font color="#006600">echo </font><font color="#CC0000">"<center><h2>Uraa parole ir pareiza!</h2> <a href="</font><font color="#0000CC">auth_test</font><font color="#006600">.</font><font color="#0000CC">html</font><font color="#CC0000">">Apskati kodu</a> Te tik pat labi var atrasties Tava slepenaa :)) informaacija</center>n"</font><font color="#006600">; } </font><font color="#FF9900"># gadiijumaa ja ko neinu, pie citiem ielogoshanaas variantiem DIE </font><font color="#006600">else die(); </font><font color="#0000CC">?></font> </font> </code> Strādā uz Latnet servera, par mājas Apache nezinu :) Nenodrukājās tas kods te īsti tā kā jābūt :blink: Darbībā un kods i ari te: http://www.acidus.lv/logins/index.php skatāms: http://www.acidus.lv/logins/auth_test.html Link to comment Share on other sites More sharing options...
Guest noisex Posted March 3, 2003 Report Share Posted March 3, 2003 Hmm...diezgan primitivs pasakums un nedrosh..tomer labak ir db ar kriptaciju Link to comment Share on other sites More sharing options...
jannis Posted March 14, 2003 Report Share Posted March 14, 2003 ee buutu vismaz sessijas izmantojis Link to comment Share on other sites More sharing options...
K|NG Posted March 14, 2003 Author Report Share Posted March 14, 2003 ee buutu vismaz sessijas izmantojis Nu ta būtu kaut ko uzrakstījis! session_start() .... :wacko: Link to comment Share on other sites More sharing options...
K|NG Posted March 17, 2003 Author Report Share Posted March 17, 2003 jā šito gan nevajadzētu kopēt 1:1 un likt savās superadminu lapās. šis bij tik piemērs domāšanai... un augšā arī biju uzrakstījis: Nu ļoti vienkāršs variants i papildināms Link to comment Share on other sites More sharing options...
Recommended Posts