fnk Posted March 29, 2009 Report Share Posted March 29, 2009 (edited) Man ir neliela problēma ar login skriptu! Man vajag sataisīt lai kad ielogojos profilā pazūd login rāmītis un sākumlapā rādās lietotāja cp! mans login skripts! <?php mysql_connect("foumzzzzz", "forumzzzz", "forumzzzz"); mysql_select_db("forumzzz"); 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><b>Sveiks ".$udata->members_display_name."</b></center><br> <a href= 'f/index.php?act=UserCP&CODE=00'>Labot Profilu</a><br> <a href= 'f/index.php?act=Members'>Lietotāji</a><br> <a href= 'f/index.php?act=Search&f=0'>Meklēt forumā</a><br> <a href= '/f/index.php?act=Login&CODE=03&k=4c92e878c20400996e743ad864f16e04'>[IZIET]</a>"; }else{ echo ""; } }else{ echo " "; } ?> <br> <br> <form action="http://gttex.woano.lv/f/index.php?act=Login&CODE=01&CookieDate=1" method="post"> <div align="center"> <p> <input type="text" class="forminput" size="12" name="UserName" onfocus="this.value=''" value='Username' /> <p><input type='password' class='forminput' size='12' name='PassWord' onfocus="this.value=''" value='Password' /></p> <input type='submit' class='forminput' value='Log In' /> </p> </div> </form> Vaig nodabūt login rāmīti nost kad ielogojas ! Ja kāds var palīdzēt izmaina kōdā ko tur vaig mainīt ! Un ja var tad noņemt bugus lai var normāli iziet no profila.. Edited March 29, 2009 by fnk Quote Link to comment Share on other sites More sharing options...
mounkuls Posted March 29, 2009 Report Share Posted March 29, 2009 Tāda pacaura tā autorizācija, bet tā vispār ideja tāda: ar to pašu IF, tikai pie nosacijuma, ka nav atrasts tāds member_login_key kūkijā, drukā formu. Ja atrod, nostrādās else un izvada tikai linkus. Quote Link to comment Share on other sites More sharing options...
fnk Posted March 30, 2009 Author Report Share Posted March 30, 2009 Bet varētu tajā kōdā izlabot kļūdu vai ko... Quote Link to comment Share on other sites More sharing options...
F3llony Posted March 30, 2009 Report Share Posted March 30, 2009 <?php mysql_connect("foumzzzzz", "forumzzzz", "forumzzzz"); mysql_select_db("forumzzz"); 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><b>Sveiks ".$udata->members_display_name."</b></center><br> <a href= 'f/index.php?act=UserCP&CODE=00'>Labot Profilu</a><br> <a href= 'f/index.php?act=Members'>Lietotāji</a><br> <a href= 'f/index.php?act=Search&f=0'>Meklēt forumā</a><br> <a href= '/f/index.php?act=Login&CODE=03&k=4c92e878c20400996e743ad864f16e04'>[IZIET]</a>"; }else{ ?> <br> <br> <form action="http://gttex.woano.lv/f/index.php?act=Login&CODE=01&CookieDate=1" method="post"> <div align="center"> <p> <input type="text" class="forminput" size="12" name="UserName" onfocus="this.value=''" value='Username' /> <p><input type='password' class='forminput' size='12' name='PassWord' onfocus="this.value=''" value='Password' /></p> <input type='submit' class='forminput' value='Log In' /> </p> </div> </form> <? } ?> vajag iet... ;) Quote Link to comment Share on other sites More sharing options...
fnk Posted March 30, 2009 Author Report Share Posted March 30, 2009 kkas nav tā :( izmet erroriņu Parse error: syntax error, unexpected $end in /home/public_html/login.php on line 30 Quote Link to comment Share on other sites More sharing options...
bubu Posted March 30, 2009 Report Share Posted March 30, 2009 Visbiežāk tas ir indikators tam, ka atverošo figuriekavu { skaits nesakrīt ar aizverošo figūriekavu } skaitu. Quote Link to comment Share on other sites More sharing options...
fnk Posted March 31, 2009 Author Report Share Posted March 31, 2009 un kā to visu var izlabot šajā kōdā lai viņš strādātu kā vajag... Quote Link to comment Share on other sites More sharing options...
cilveks Posted March 31, 2009 Report Share Posted March 31, 2009 Ielikt trūkstošo un/vai noņemt lieko figūriekavu. Quote Link to comment Share on other sites More sharing options...
fnk Posted March 31, 2009 Author Report Share Posted March 31, 2009 un varētu pateikt tieši kurā vietā kko pielikt/atņeemt? Quote Link to comment Share on other sites More sharing options...
cilveks Posted March 31, 2009 Report Share Posted March 31, 2009 (edited) Nevarētu. Pacenties pats izprast. Vai arī nenodarbojies ar lietām, kuras neproti. P.S. Ja es redzētu ka tu pūlies un tiešām nesanāktu, tad es labprāt palīdzētu. Bet te jau tu esi par slinku, lai pats kaut ko censtos panākt. Edited March 31, 2009 by cilveks Quote Link to comment Share on other sites More sharing options...
fnk Posted March 31, 2009 Author Report Share Posted March 31, 2009 (edited) jau 2 dienas mēģinu to izdarīt , man liekas ka pie <a href= '/f/index.php?act=Login&CODE=03&k=4c92e878c20400996e743ad864f16e04'>[IZIET]</a>"; }else{ ?> jānomaina uz <a href= '/f/index.php?act=Login&CODE=03&k=4c92e878c20400996e743ad864f16e04'>[IZIET]</a>"; }else{ echo " "; } ?> psc , bet vienalga nesanāk , iespējams tas arī varētu būt pie vainas , bet nezinu kā lai to tieši izlabo.. nu varētu kāds palīdzēt? Edited March 31, 2009 by fnk Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 31, 2009 Report Share Posted March 31, 2009 Kāds uz šo brīdi tas kods izskatās un kādu kļūdas paziņojumu rāda? Quote Link to comment Share on other sites More sharing options...
F3llony Posted March 31, 2009 Report Share Posted March 31, 2009 <?php mysql_connect("foumzzzzz", "forumzzzz", "forumzzzz"); mysql_select_db("forumzzz"); 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><b>Sveiks ".$udata->members_display_name."</b></center><br> <a href= 'f/index.php?act=UserCP&CODE=00'>Labot Profilu</a><br> <a href= 'f/index.php?act=Members'>Lietotāji</a><br> <a href= 'f/index.php?act=Search&f=0'>Meklēt forumā</a><br> <a href= '/f/index.php?act=Login&CODE=03&k=4c92e878c20400996e743ad864f16e04'>[IZIET]</a>"; }else{ die("Error: Hacking attempt! :D "); } }else{ ?> <br> <br> <form action="http://gttex.woano.lv/f/index.php?act=Login&CODE=01&CookieDate=1" method="post"> <div align="center"> <p> <input type="text" class="forminput" size="12" name="UserName" onfocus="this.value=''" value='Username' /> <p><input type='password' class='forminput' size='12' name='PassWord' onfocus="this.value=''" value='Password' /></p> <input type='submit' class='forminput' value='Log In' /> </p> </div> </form> <? } ?> pats parbaudiju , sim ir jāstrādā... Quote Link to comment Share on other sites More sharing options...
fnk Posted March 31, 2009 Author Report Share Posted March 31, 2009 (edited) Liels paldies , F3llony p.s āāā vienalga problēma , kad izlogojos nerāda login lodziņu un to die("Error: Hacking attempt! :D "); speciāli liki? Edited March 31, 2009 by fnk 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.