floop Posted April 3, 2011 Report Share Posted April 3, 2011 (edited) Labs vakars. Tātad man ir problēma sekojoša, es vēlos pievienot šim login skriptam, lai rāda avataru kas tiek izvilkt no ipb, un ja nav avatra tad atiecīga bilde kura tiek izvilkta no sekojošās mapes. Avataru vēlos ielikt zem kur rakstīts Čau ..... Ir kāds kas varētu palīdzēt man to istenot? KODS: if (!empty($user['member_login_key'])) { echo '<h2>Čau, '.$user['name'].'</h2>'; } else { echo '<h2>Ielogojies</h2>'; } ?> <? if (!empty($user['member_login_key'])) { ?> <table cellpadding="0" class="tabli red" cellspacing="0" width="100%" > <tr align="center"><td><a href="?do=video&daram=add"><b>Pievienot Video</b></a></td></tr> <tr align="center"><td><a href="/forums/index.php?act=UserCP&CODE=00">Labot Profilu</a></td></tr> <tr align="center"><td><a href="/forums/index.php?act=Msg&CODE=01">Vēstules</a></td></tr> <tr align="center"><td><a href="/forums/index.php?act=Search&f=0">Meklēt foruma</a> </td></tr> <tr align="center"><td><a href="/forums/index.php?act=Login&CODE=03&k=<?=md5($user['email']."&".$user['member_login_key']."&".$user['joined']);?>">Iziet</a></td></tr> </table> <? } else { ?> <form action="http://localhost/forums/index.php?act=Login&CODE=01&CookieDate=1" method="post" name="LOGIN" autocomplete="off" > <table> <tr><td><input class="login" size="33" type="text" name="UserName" /></td></tr> <tr><td><input class="pass" size="33" type="password" name="PassWord" /></td></tr> <tr><td align="right" ><span style="float:left; padding:4px;"><a href="http://localhost/forums/index.php?act=Reg&CODE=00" ><b>Reģistrēties</b></a></span><input type="submit" value="Ielogoties" /></td></tr> </table> </form> <? } Edited April 3, 2011 by floop Quote Link to comment Share on other sites More sharing options...
NBS Posted April 4, 2011 Report Share Posted April 4, 2011 Kas par ipb ? Vienkāršāk, izveidot datubāzē, ka glabājās tas avatars un vilkt viņu ārā. Ja nav avatara tad defaulto izsaukt. Quote Link to comment Share on other sites More sharing options...
floop Posted April 4, 2011 Author Report Share Posted April 4, 2011 IPB 2.3.6 nu jā, bet kā man to uzrakstīt kodā un ielikt tā lai arī tas stradā,esmu meģinājis ,bet nesanāk. Quote Link to comment Share on other sites More sharing options...
Aiviss Posted April 4, 2011 Report Share Posted April 4, 2011 (edited) // izvelkam no DB bildes adresi if ($DbBildesAdrese == "ar default vērtību, respektīvi bildes nav"){ // tad parādīt default bildi } else { // parādīt bildi } vienkāršakais variants Edited April 4, 2011 by Aiviss 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.