Snaip3Rs Posted September 6, 2009 Report Share Posted September 6, 2009 Es jau forumā atradu tādu lietu, bet nerāda bildi es zinu ka viņu kautkā vajag izvilkt bet kāds kods jaizmanto nezinu tik zinu ka jaliek pirms labot profilu lai būtu augšā! <? mysql_connect("localhost", "jzvac_admin", "")or die('<pre>OMG, mana oo.lv datubaze atkal nospraga</p>'); mysql_select_db("jzvac_db")or die('<pre>OMG, mana oo.lv datubaze atkal nospraga</p>'); function draw_login(){ echo ' <form method="post" action="http://vac.woano.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 value="Ienakt" type="submit" /> <a href="http://vac.woano.lv/index.php?act=Reg&CODE=00">Registreties</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> <li><a href="http://vac.woano.lv/f/index.php?act=UserCP&CODE=00">Labot Profilu</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Msg&CODE=01">Vestules</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Members">Lietotaji</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Search&f=0">Meklet foruma</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Login&CODE=03&k=%s">[iZIET]</a></li> </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(); } ?> Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted September 6, 2009 Report Share Posted September 6, 2009 Neko nesapratu no tā, ko tu tur savervelēji. Bildes HTML kodā liek šādi: <img src="biwzha.png" /> Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted September 6, 2009 Author Report Share Posted September 6, 2009 :D Sori ka tu nesaprati! Es vēlos lai būtu tā! man ir bez bildes bet šo es painta izgatavoju! :D kads kods jaliek lai no ipb iznes tā cilvēka bildi sākumā! un arī ja var tad kas par klasi vinš ir admin moderator user u.t.t. Lai zem janka rādas usera bilde! Quote Link to comment Share on other sites More sharing options...
briedis Posted September 6, 2009 Report Share Posted September 6, 2009 (edited) 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> <p> ' . !empty($row->avatar_location) ? '<br /><img src="'.$row->avatar_location.'" alt="" />' : '' . ' </p> <ul> <li><a href="http://vac.woano.lv/f/index.php?act=UserCP&CODE=00">Labot Profilu</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Msg&CODE=01">Vestules</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Members">Lietotaji</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Search&f=0">Meklet foruma</a></li> <li><a href="http://vac.woano.lv/f/index.php?act=Login&CODE=03&k=%s">[iZIET]</a></li> </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(); } ?? Edited September 6, 2009 by briedis Quote Link to comment Share on other sites More sharing options...
marcis Posted September 6, 2009 Report Share Posted September 6, 2009 briedis, jēga izvadīt 2 bildes? Skaties uzģenerēto sourci, kāds ir ceļš uz bildi un vai tas ir pareizs. Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted September 7, 2009 Author Report Share Posted September 7, 2009 Ta jau vinš neder ja izvada 2 bildes vajag tikai viņa profila! :) Quote Link to comment Share on other sites More sharing options...
briedis Posted September 7, 2009 Report Share Posted September 7, 2009 Nu bītīt matos, piesējāties pie vienas liekas rindiņas :) Galu galā, viņš nenorādīja, ka viņam vajag TIKAI VIENU bildi :p Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted September 8, 2009 Author Report Share Posted September 8, 2009 Vis kārtībā šis ir labs skripts ja kādam vajag Admin TC 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.