Jump to content
php.lv forumi

Login


floop

Recommended Posts

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.

 

hknrc3uxy3frp532cknv.jpg

 

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

// 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 by Aiviss
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...