ashais13 Posted January 24, 2009 Report Posted January 24, 2009 Kāds nevarētu padotmājienu kā varētu dabūt gatavu apmēram kautko šādu?.: Tas login panelis ir apvienots ar ipb forumu..
Val Posted January 24, 2009 Report Posted January 24, 2009 skaties pats. sharashka.lv. Yo Tiger, firefox tabam aukšā var izlasīt adresi... kautkas tāds? http://www.tutorialfx.com/forums/index.php?showtopic=2006
ashais13 Posted January 25, 2009 Author Report Posted January 25, 2009 Nu jaa taa buutu taka viena dalja bet kaa lai panak to kad esi ielogojies lai vairs nerada to login paneli.?
kechums Posted January 25, 2009 Report Posted January 25, 2009 Kā jau teicu, ar $_COOKIE no IPB dabūn cepumu member_id un uzraksti kveriju. Ja member_id = 0, tad parāda login formu, ja cits, tad login forma pazūd, bet parādās logged in saturs.
ashais13 Posted January 25, 2009 Author Report Posted January 25, 2009 (edited) Kā jau teicu, ar $_COOKIE no IPB dabūn cepumu member_id un uzraksti kveriju. Ja member_id = 0, tad parāda login formu, ja cits, tad login forma pazūd, bet parādās logged in saturs. To kaut kā ar if else dabū gatavu vai kā?? Edited January 25, 2009 by ashais13
duplets Posted January 30, 2009 Report Posted January 30, 2009 Nesen te vienam taisīju galveno lapu ipb forumam, tāka varu padalīties ar jūzeru autorizācijas kodu: <?php 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']) { //izvadam kko shaadu: echo "Cau ".$udata->members_display_name.""; }else{ echo "tu neesi autorizeets"; //izvadam logina paneli } }else{ echo "tu neesi autorizeets1"; //izvadam logina paneli } ?>
waplet Posted January 30, 2009 Report Posted January 30, 2009 (edited) <form action='http://tava_ip/index.php?act=Login&CODE=01' method='post' name='theform'> <div align="left"><font size="1" face="Arial, Helvetica, sans-serif">Username <input type='text' class='text' name='username'> <br> Password</font> <input type='password' class='text' name='parole'> <br> <input name="submit" type='submit' class='submit' value='Login'> </div> </form> Rekur login panelītis! Edited January 30, 2009 by waplet
airbus Posted January 30, 2009 Report Posted January 30, 2009 <?php 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']) { //izvadam kko shaadu: echo "Cau ".$udata->members_display_name.""; }else{ echo "tu neesi autorizeets"; //izvadam logina paneli } }else{ echo "tu neesi autorizeets1"; //izvadam logina paneli <form action='http://tava_ip/index.php?act=Login&CODE=01' method='post' name='theform'> <div align="left"><font size="1" face="Arial, Helvetica, sans-serif">Username <input type='text' class='text' name='username'> <br> Password</font> <input type='password' class='text' name='parole'> <br> <input name="submit" type='submit' class='submit' value='Login'> </div> </form> } ?> es ieliku shadi un man rada balto lapu
Aleksejs Posted January 30, 2009 Report Posted January 30, 2009 Vēlams pirms mysql_query()... Un vēlams izlasīt, ko par atkļūdošanu rakstīju šeit: http://php.lv/f/index.php?showtopic=12593&...st&p=100205
Recommended Posts