alfinsh Posted May 16, 2009 Report Share Posted May 16, 2009 (edited) Tātad svienots ipb login ar main lapu.. zemak atrodas poga Iziet kurai ir sekojoša rinda <a href= 'forums/index.php?act=Login&CODE=03&k=16a9e36261cb735c074f7146812c8f7d'>[iZIET]</a>"; Un jā jau saprotams katram cilvēkam šī rindiņa 03&k=16a9e36261cb735c074f7146812c8f7d mainās ( nav vienāda) un jautājums kā lai rindiņa pielāgojas katram lietotājam? Paldies iepriekš Edited May 16, 2009 by alfinsh Quote Link to comment Share on other sites More sharing options...
kechums Posted May 16, 2009 Report Share Posted May 16, 2009 Nāksies atkost, kā ipb uzģenerē logout sesiju, citu variantu neredzu. Quote Link to comment Share on other sites More sharing options...
alfinsh Posted May 16, 2009 Author Report Share Posted May 16, 2009 (edited) mja es jau kadu 2 stundu sēžu un mēginu atkost itkā rindiņu atradu <a href=\"{$this->ipsclass->base_url}act=Login&CODE=03&k={$this->ipsclass->md5_check}\">{$this->ipsclass->lang['log_out']}</a> šis itkā uzģenerē to kodu {$this->ipsclass->md5_check} bet ko talak iesākt ?? Edited May 16, 2009 by alfinsh Quote Link to comment Share on other sites More sharing options...
marcis Posted May 16, 2009 Report Share Posted May 16, 2009 $this->ipsclass->md5_check neko neģenerē, tas ir mainīgais, kam jau ir piešķirta vērtība. Meklē kas piešķir vērtību šim variablim un attiecīgi arī kā tiek veidota šī vērtība. Quote Link to comment Share on other sites More sharing options...
alfinsh Posted May 16, 2009 Author Report Share Posted May 16, 2009 (edited) visu dienu jau meklēju bet nekā .. Varbut vieglak ir aizvakt logout pogu , un piemest klat rindiņu lai izejot no browseri un atkal ieejot no jauna pieprasa ielogoties. Kads varetu palidzet ar to rindiņu ja nav gruti. Login funkcija <?php mysql_connect("localhost", "xxxx", "xxxx"); mysql_select_db("xxxx"); if(isset($_COOKIE['member_id'])){ $get=mysql_query("SELECT * FROM `ibf_members` WHERE id='".intval($_COOKIE['member_id'])."'") or die(mysql_error()); $udata=mysql_fetch_object($get); if($udata->member_login_key==$_COOKIE['pass_hash']) { echo " <center>Sveiks ".$udata->members_display_name."</center><br> <a href= 'forums/index.php?act=UserCP&CODE=00'>Labot Profilu</a><br> <a href= 'forums/index.php?act=Msg&CODE=01'>Vēstules</a><br> <a href= 'forums/index.php?act=Members'>Lietotāji</a><br> <a href= 'forums/index.php?act=Search&f=0'>Meklēt forumā</a><br><br> <a href= 'forums/index.php?act=Login&CODE=03&k=16a9e36261cb735c074f7146812c8f7d'>[IZIET]</a>"; }else{ echo " <form method='post' action='http://cs-ffs.oo.lv/forums/index.php?act=Login&CODE=01' name='LOGIN'> <b>Lietotājvārds:</b><br> <input style='width: 124px;' name='UserName' type='text'><br> <b>Parole:</b><br> <input style='width: 124px;' name='PassWord' type='password'><br> <b>acereties mani?</b> <input name='CookieDate' value='1' type='checkbox'><br> <input value=' ienākt ' name='CookieDate' type='submit'><a href=http://www.duck.lv/forums/index.php?act=Reg&CODE=00'> Reģistrēties</a> </form>"; } }else{ echo " <form method='post' action='http://cs-ffs.oo.lv/forums/index.php?act=Login&CODE=01' name='LOGIN'> <b>Lietotājvārds:</b><br> <input style='width: 124px;' name='UserName' type='text'><br> <b>Parole:</b><br> <input style='width: 124px;' name='PassWord' type='password'><br> <b>acereties mani?</b> <input name='CookieDate' value='1' type='checkbox'><br> <input value=' Ienākt ' name='CookieDate' type='submit'><a href=http://www.duck.lv/forums/index.php?act=Reg&CODE=00'> Reģistrēties</a> </form>"; } ?> Edited May 16, 2009 by alfinsh Quote Link to comment Share on other sites More sharing options...
anonīms Posted May 17, 2009 Report Share Posted May 17, 2009 īsti gan nepateikšu kodu, bet tev vajag izveidot, lai cepumam ir nevis tur kaut kāds lielais laiks, bet gan 0, kas attiecīgi nozīmē to, ka cepums izdzēsīsies tiklīdz tiks aizvērts browseris. (līdzīgi kā ar sesijām) Quote Link to comment Share on other sites More sharing options...
alfinsh Posted May 17, 2009 Author Report Share Posted May 17, 2009 (edited) Varat slegt ciet.. problema atrisinata .. rindinas izskatas sadi ja nu kadam vajag $id = $_COOKIE['member_id']; $dati= "SELECT * FROM `ibf_members` WHERE id = $id LIMIT 1"; $dati1=mysql_query($dati) or mysql_error(); $dati2= mysql_fetch_array($dati1); $logout = md5($dati2['email']."&".$dati2['member_login_key']."&".$dati2['joined']); Talak attiecigi pie logout iebarojam <a href= 'forums/index.php?act=Login&CODE=03&k=".$logout."'>[IZIET]</a>"; Edited May 17, 2009 by alfinsh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.