Jump to content
php.lv forumi

Login & Rederict (IPB)


GeRik

Recommended Posts

<form action="./index.php">

tas taču būs tiaki tādā gadījumā, ja tas login skripts ir iekš index faila.. nezinu par IPB, bet vinjiem nav tāda iespēja kā redirect after login.? Oo

pačolē to login skriptu. tur taču jābūt vietai kur aizmēt ^^

Link to comment
Share on other sites

bet es tak jau skatijos kur notiek login funkcija pierakstiju klat beigas izskatijas shadi

<form action='/index.php'>
<form method='post' action='http://sixsixone.oo.lv/forum/index.php?act=Login&CODE=01' name='LOGIN'>

<b>Lietotajvards:</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=' Ienakt ' name='CookieDate'  type='submit'><a href=http://sixsixone.oo.lv/forum/index.php?act=Reg&CODE=00'> Registreties</a>
</form>";

Link to comment
Share on other sites

man ir atsevishki ielikts taka tip caur <?include ("login.php");?>

luuk viss login.php

<?php
mysql_connect("localhost", "root", "parole");
mysql_select_db("forum");
$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']);
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>Čau, <b>".$udata->members_display_name."</b></center><br> 




<a href= 'http://sixsixone.oo.lv/'>Pievienot reklamu</a><br>
<a href= 'http://sixsixone.oo.lv/forum/index.php?act=Msg&CODE=01'>Vēstules</a><br>
<a href= 'http://sixsixone.oo.lv/forum/index.php?act=UserCP&CODE=00'>Labot Profilu</a><br>
<a href= 'http://sixsixone.oo.lv/forum/index.php?act=Members'>Lietotāji</a><br>
<a href= 'http://sixsixone.oo.lv/forum/index.php?act=Search&f=0'>Meklēt forumā</a><br>
<a href='irc://irc.lv/sixsixone'><font color=red>#sixsixone mIRC</font></a><br><br>
<a href= 'forum/index.php?act=Login&CODE=03&k=".$logout."'>[iZIET]</a>";
}else{
echo "
<form action='/index.php'>
<form method='post' action='http://sixsixone.oo.lv/forum/index.php?act=Login&CODE=01' name='LOGIN'>
<b>Lietotajvards:</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=' ienakt ' name='CookieDate' type='submit'><a href=http://sixsixone.oo.lv/forum/index.php?act=Reg&CODE=00'> Registreties</a>

</form>";

}

}else{

echo "
<form action='/index.php'>
<form method='post' action='http://sixsixone.oo.lv/forum/index.php?act=Login&CODE=01' name='LOGIN'>

<b>Lietotajvards:</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=' Ienakt ' name='CookieDate'  type='submit'><a href=http://sixsixone.oo.lv/forum/index.php?act=Reg&CODE=00'> Registreties</a>
</form>";



}

?>

Edited by GeRik
Link to comment
Share on other sites

wouuu, neesmu genius, bet izskatās ka Tev tur baigā šmuce.. to tavu skriptu vajadzētu savest kārtībā.. 2x pēc kātas atkārtojas vienāda daļa un tā daļa ir form. divas formas.. bextam katrā no tām ir divi formu sākumi ar atķirīgiem action.. Oo šādu piemēru pirmo reizi redzu.!

 

beztam, manjoprojām liekas, ka atrisinājumu vari atrāst foruma index failā kur act ir Login. skaties tur. tur vajadzētu būt kkam kas atbild tālāk par login.. ceru, ka nemaldos.

Link to comment
Share on other sites

maldies jo ja caur forumu ielagosies tad vinsh tak aizmetis uz web lapu bet man vaig ja caur web lapu tikai ja ielagojas ka vinju nemet uz forumu bet paliek turpat

Link to comment
Share on other sites

atradu atrisinajumu :)

<form action='/forum/index.php?act=Login&CODE=01&return=http://sixsixone.oo.lv/' method='post' name='LOGIN'>

Bet ka to izdarit ar logout ? :O

<a href= 'forum/index.php?act=Login&CODE=03&k=".$logout."'>[iZIET]</a>";

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...