anonīms Posted March 12, 2010 Report Share Posted March 12, 2010 (edited) Gribēju painteresēties kā cilvēki, kuri apvieno savas lapas ar IPB loginu, veic autorizācijas pārbaudes? Neticu, ka if($_COOKIE['member_id']) { // logged } ir drošs variants. Edited March 12, 2010 by anonīms Quote Link to comment Share on other sites More sharing options...
2easy Posted March 12, 2010 Report Share Posted March 12, 2010 viss ir drošs, kamēr to neviens nezin ;) Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted March 12, 2010 Report Share Posted March 12, 2010 Domāju, ka pārbauda attiecīgo sesijas mainīgo esamību un vērtību korektumu. Quote Link to comment Share on other sites More sharing options...
2easy Posted March 12, 2010 Report Share Posted March 12, 2010 Indijā gan pārbauda cepumu, nevis sesiju :)) Quote Link to comment Share on other sites More sharing options...
mounkuls Posted March 12, 2010 Report Share Posted March 12, 2010 Lielā mērā laikam atkarīgs, ko tajā $_COOKIE['member_id'] iecep, pliku int tipa no bāzes jau nu būtu dumji. Bet kautkādu tikai Tavai lapai un Tev vien zināmai hashu kombinācijai nebūs ne kādas vainas. Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 13, 2010 Author Report Share Posted March 13, 2010 tur iecep tīri ID :D Ok, laikam atradu pass_hash Tagad derētu iegūt kkur kā veic pārbaudi, ko prāta darbs nebūtu līst iekšā forumā un skatīties katru failu. P.S. Te tak bija tik daudzi ar IPB loginiem? WHERE = ARE order by YOU ? Quote Link to comment Share on other sites More sharing options...
chizijs Posted March 13, 2010 Report Share Posted March 13, 2010 $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']) { //logged } else { //login_form } ? Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 13, 2010 Author Report Share Posted March 13, 2010 (edited) O, varētu būt īstais. Varbūt vēl varēsi pateikt, kuru failu jāinklūdo klāt? (Kurš satur member_login_key?) Edited March 13, 2010 by anonīms Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted March 20, 2010 Report Share Posted March 20, 2010 Man ir error un nezinu kā sataisīt tādu lietu! Heder alredi send tas tāpēc ka man ir heder redirect, bet kā var to izdarīt savādāk? <? mysql_connect("localhost", "admin", "")or die('<pre></p>'); mysql_select_db("db")or die('<pre></p>'); $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']) { //logged } else { header('Location: http://www.tavalapa.lv/login.php/'); } ?> Un man ir login skripts ja piemēram nav ielogojies tas nozīmē tev nav cepumi saglabāti un tevi redirect uz login.php Zinu ka esmu uzbāzīgs, bet kā savādāk iemācīsies ja kāds skolotājs nelabos kļūdas! :) Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 20, 2010 Author Report Share Posted March 20, 2010 Izlasi foruma saturā "Pinned" tematu. Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted March 20, 2010 Report Share Posted March 20, 2010 (edited) Cepums tev! Ka piespiedi apskatīt un izlasīt tagad zinu ka heder alredy sent nozīmē ka html sāk savu darbu un neļauj php un heder uzsākt savu darbu un viņam ir jābūt lapas pašā sakumā! Un piemēram cilvēks joka pēc grib apskatīt login.php kas jau ir ielogjies. Kā uzlikt lai viņu redirektē uz index.php <? mysql_connect("localhost", "lockerz", "")or die('<pre></p>'); mysql_select_db("db")or die('<pre></p>'); $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']) { //logged } else { header('Location: http://www.lockerz.hostplex.lv/login.php/'); } else {('Location: http://www.lockerz.hostplex.lv'); } ?> Edited March 20, 2010 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
chizijs Posted March 20, 2010 Report Share Posted March 20, 2010 Pēc echo arī nevar būt Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted March 20, 2010 Report Share Posted March 20, 2010 Paskatieties tādu lietu kā IPBWI, lieliski noder integrācijai ar IPB. Ir iznākusi arī BETA versija priekš 3.x IPB 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.