Jump to content
php.lv forumi

ipb login image iznešana


Snaip3Rs

Recommended Posts

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();
}
?>

Link to comment
Share on other sites

: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.

tu3zt2dznbanyz0ecyb.jpg

Lai zem janka rādas usera bilde!

Link to comment
Share on other sites

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 by briedis
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...