Snaip3Rs Posted October 11, 2009 Report Share Posted October 11, 2009 (edited) Man ir šāds skripts bet galīgi neiebraucu kā nomainīt submit pogas izskatu! <? mysql_connect("localhost", "root", "gribetu_zinats_:D")or die('<pre>OMG, mana oo.lv datubaze atkal nospraga</p>'); mysql_select_db("db")or die('<pre>OMG, mana oo.lv datubaze atkal nospraga</p>'); function draw_login(){ echo ' <form method="post" action="http://vacklan.wos.lv/f/index.php?act=Login&CODE=01"> <p> <b>Lietotajvards:</b><br /> <input name="UserName" type="text" /><br /> <b>Parole:</b><br /> <input name="PassWord" type="password" /><br /> <input name="CookieDate" value="1" type="checkbox" /> <b>acereties mani?</b><br /> <input type="submit" /> <a href="http://vacklan.wos.lv/f/index.php?act=Reg&CODE=00"><img border="0" src="images/registreties.jpg"></a> </p> </form> '; } if(!empty($_COOKIE['member_id']) && is_numeric($_COOKIE['member_id']) && !empty($_COOKIE['pass_hash'])){ $sql = sprintf("SELECT m.id, m.members_display_name, m.email, m.member_login_key, m.joined, e.avatar_location FROM `ibf_members` m, `ibf_member_extra` e WHERE m.id=%d AND m.member_login_key='%s' AND e.id=m.id LIMIT 1", (int)$_COOKIE['member_id'], mysql_real_escape_string($_COOKIE['pass_hash'])); $res = mysql_query($sql); if(mysql_num_rows($res)>0){ $row = mysql_fetch_object($res); printf(' <p style="text-align:center;"> Sveiks %s%s </p> <ul> <img src="images/repair.png" /> <a href="http://vacklan.wos.lv/f/index.php?act=UserCP&CODE=00">Labot Profilu</a><br> <img src="images/mail1.png" /> <a href="http://vacklan.wos.lv/f/index.php?act=Msg&CODE=01">Vestules</a><br> <img src="images/users.png" /> <a href="http://vacklan.wos.lv/f/index.php?act=Members">Lietotaji</a><br> <img src="images/serch.png" /> <a href="http://vacklan.wos.lv/f/index.php?act=Search&f=0">Meklet foruma</a><br> <img src="images/key.png" /> <a href="http://vacklan.wos.lv/f/index.php?act=Login&CODE=03&k=%s">Iziet</a><br> </ul> ', $row->members_display_name, !empty($row->avatar_location) ? '<br /><img src="'.$row->avatar_location.'" alt="" />' : '', md5($row->email.'&'.$row->member_login_key.'&'.$row->joined)); }else{ draw_login(); } }else{ draw_login(); } ?> register pogu uztaisīju jo tas bija liks bet kā utaisīt submit pogu? Edited October 11, 2009 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted October 11, 2009 Report Share Posted October 11, 2009 <input type="submit" /> vietā ieliec: <button type="submit"><img src="celsuzbildi"/></button> Quote Link to comment Share on other sites More sharing options...
Kemito Posted October 12, 2009 Report Share Posted October 12, 2009 Var jau izmantot arī style reāli aprakstot Stilu kā CSS! Quote Link to comment Share on other sites More sharing options...
ziemelis Posted October 12, 2009 Report Share Posted October 12, 2009 :D "acereties" pogai background-image stils css valodā dod iespēju aizmugrē ielikt bildi Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted October 12, 2009 Author Report Share Posted October 12, 2009 Paldies aleksej un tu vel teici ka nemaki pa vēstuli bet tikai viena ķibelīte sanāca šādi! Un velvienu lietu gribu pajautāt kā varēja uzlikt piemēram tu nesi ielogojies un ej iekšā www.mansklan.lv tevi pārmet uz www.mansklan.lvlogin.php bet ja esi saglabājis cepumi;nus tevi parmet uz sakumlapu! Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted October 12, 2009 Report Share Posted October 12, 2009 Es pateicu tik daudz, cik sapratu no uzdotā jautājuma. ;) Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted October 12, 2009 Author Report Share Posted October 12, 2009 Jā lai ielogoties būtu image tapar kā registrēties nevis pusuzpus! :D un ar 2 jautājumu varēsi palīdzēt vai linku pasviest? Quote Link to comment Share on other sites More sharing options...
briedis Posted October 12, 2009 Report Share Posted October 12, 2009 http://www.codeave.com/HTML/code.asp?u_log=5018 Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted October 12, 2009 Report Share Posted October 12, 2009 function is_logged_in() { if(...te raksti kam vajag izpildīties, lai skaitītos, ka lietotājs ir ielogojies...) { return true; } return false; } ... //šitais jāraksta pirms jebkāda output`a. if(!is_logged_in()) { header("Location: http://mans_krutais_cs_mu_wow_nfs_pacman_mario_legendOfZelda_klans.lv/login.php"); } Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted October 12, 2009 Author Report Share Posted October 12, 2009 (edited) Liels paldies briedi man tikai tagad jasataisa tas login page pec si skripta kautka! Un ar to login skriptu izdarīju šādi bet nekāda kustība neparmet ne ko! <php function is_logged_in() { if(!empty($_COOKIE['member_id']) && is_numeric($_COOKIE['member_id']) && !empty($_COOKIE['pass_hash'])){ $sql = sprintf("SELECT m.id, m.members_display_name, m.email, m.member_login_key, m.joined, e.avatar_location FROM `ibf_members` m, `ibf_member_extra` e WHERE m.id=%d AND m.member_login_key='%s' AND e.id=m.id LIMIT 1", (int)$_COOKIE['member_id'], mysql_real_escape_string($_COOKIE['pass_hash'])); { return true; } return false; } ... //šitais jāraksta pirms jebkāda output`a. if(!is_logged_in()) { header("Location: http://vacklan.wos.lv/login.php"); } /> Varu derēt ka nepareizi bet varbūt kāds pateiks kā! :( Man liekās ka viņš saglabā cepumiņus un cepumiņi ir burti ar cipariem kopā noslēpta parole! piemēram tāpat kā ja tu nēsi ielogojies tev rādās ielogojies un kad esi ielogojies tev rāda profilu savu un es vēlos uz tādu pašu principu login lapu restrick kas nav ielogojušies! Edited October 12, 2009 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted October 12, 2009 Report Share Posted October 12, 2009 Un Tu arī saproti, ko tas skripts dara? Vai tikai joka pēc kaut ko pieliki? ;) Quote Link to comment Share on other sites More sharing options...
Cibiņš Posted October 13, 2009 Report Share Posted October 13, 2009 Me jau labāk ar CSS, tā vieglāk..samet bacgroundus un aiziet! Paņem tak izmēru pogai pieliec un fonta izmēru! To melno pogu liec bez teksta backgroundaa vai arī ņem un mērogo attēlu! Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted October 13, 2009 Author Report Share Posted October 13, 2009 Vis tak kārtība tagad es pūlos ar 2 jautājumu! 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.