hogz Posted January 17, 2006 Author Report Share Posted January 17, 2006 hogz: tādus kodus no vārdiem kā māja, kāja1, koks2, krūms, ilze4, janis5 utt, ir pat vienkāršāk atcerēties nekā 5475, 1586, 3266, 9757 es saprotu, bet shis 4rciparu kods ir uznjeemuma pieskjirtaas garantijas Nr., kaads tas ir - taads ari ir, peec vinja es speeshu pateikt, kursh ir anketas aizpildiitaajs. Link to comment Share on other sites More sharing options...
hogz Posted February 2, 2006 Author Report Share Posted February 2, 2006 (edited) ... pēc tā login koda (ko es iedevu) Lapa paraada: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /opt/lampp/htdocs/tes/index.php on line 5 ievadiitaa parole neatbilst nevienam variantam Mans kods te: <?php // login.php vai kas taads $parole = $_POST['parole']; $visas_paroles = array("2222", "3333"); //mas?vs ar vis?m parol?m if (in_array($visas_paroles, $parole)) setcookie("parole", $parole); else echo "ievadiitaa parole neatbilst nevienam variantam"; ?> <?php if (isset($_COOKIE['parole']) && in_array(file("pswdallowed.txt"), $_COOKIE['parole'])) { //raadam lapas saturu.. } ?> Edited February 2, 2006 by hogz Link to comment Share on other sites More sharing options...
v3rb0 Posted February 2, 2006 Report Share Posted February 2, 2006 (edited) paroli nevajag iekš cepuma. tak jebkurš viņu izlasīt varēs. taisi sessijas un miers - miljoniem lapu ir ok, gan jau tev ar derēs. Edited February 2, 2006 by v3rb0 Link to comment Share on other sites More sharing options...
hogz Posted February 2, 2006 Author Report Share Posted February 2, 2006 paroli nevajag iekš cepuma. tak jebkurš viņu izlasīt varēs. taisi sessijas un miers - miljoniem lapu ir ok, gan jau tev ar derēs. par manis par sarezhgjiitu, man ir saprotama tikai html pamatvaloda ;o. Link to comment Share on other sites More sharing options...
v3rb0 Posted February 2, 2006 Report Share Posted February 2, 2006 (edited) nu nav sessijās nekas sarežģīts. visos scriptos sākumā izsauc session_start(); ielogošanās if (in_array($visas_paroles, $parole)) { $_SESSION['loged_in'] = true; } else { echo 'nav'; } pārbaudi vai ir ielogojies if(isset($_SESSION['loged_in']) && $_SESSION['loged_in']) { echo 'ir ielogojies'; } izlogojās kaut vai ar: unset($_SESSION['loged_in']); Edited February 2, 2006 by v3rb0 Link to comment Share on other sites More sharing options...
hogz Posted February 2, 2006 Author Report Share Posted February 2, 2006 (edited) nu nav sessijās nekas sarežģīts. visos scriptos sākumā izsaucsession_start(); ielogošanās if (in_array($visas_paroles, $parole)) { $_SESSION['loged_in'] = true; } else { echo 'nav'; } pārbaudi vai ir ielogojies if(isset($_SESSION['loged_in']) && $_SESSION['loged_in']) { echo 'ir ielogojies'; } izlogojās kaut vai ar: unset($_SESSION['loged_in']); jaa bet kaa tas kopaa izskataas, vai to visu man likt index lapaa? un kaa man iestatiit, lai vinsh paarbauda paroles nolasot taas no pswallowe.txt? ;o. Edited February 2, 2006 by hogz Link to comment Share on other sites More sharing options...
Vebers Posted February 2, 2006 Report Share Posted February 2, 2006 Ak dies.. ej te un sāk lasīt.. Link to comment Share on other sites More sharing options...
Recommended Posts