Jump to content
php.lv forumi

maza fiča


alfinsh

Recommended Posts

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 by alfinsh
Link to comment
Share on other sites

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 by alfinsh
Link to comment
Share on other sites

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 by alfinsh
Link to comment
Share on other sites

ī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)

Link to comment
Share on other sites

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 by alfinsh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...