46 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <div class="profile">
 | |
| 	<h3><?=$userData['userName'].($me ? ' <a href="'.get_current_link().'/edit" class="edit">{locale:profile_edit}</a>' : '')?></h3>
 | |
| 
 | |
| 	<div id="profile_pic" style="background-image: url('<?=get_profile_picture($userData)?>')">
 | |
| 	<?php if ($me) : ?>
 | |
| 		<form action="<?=get_current_link()?>" method="post" name="userpic-upload" enctype="multipart/form-data">
 | |
| 			<input type="file" name="userPic" id="userPicInput" style="display: none" />
 | |
| 			<button type="button" onclick="$('#userPicInput').focus().click()">{locale:browse}</button><button type="submit" id="userPicSaveBtn" class="orange">{locale:delete}</button>
 | |
| 		</form>
 | |
| 		<script>
 | |
| 			$("#userPicInput").change(function() {
 | |
| 				$("#userPicSaveBtn").html('{locale:save}').removeClass('orange');
 | |
| 			});
 | |
| 		</script>
 | |
| 	<?php endif ?>
 | |
| 	</div>
 | |
| 	<?php if (LOGGEDIN) : ?>
 | |
| 	<div class='box contact'>
 | |
| 		<p><strong>{locale:name}:</strong> <?=$userData['userRealName']?></p>
 | |
| 		<p><strong>{locale:email}:</strong> <?=$userData['userEmail']?></p>
 | |
| 		<?=($userData['userWeb'] ? '<p><strong>{locale:web}:</strong> '.$userData['userWeb'].'</p>' : null)?>
 | |
| 	</div>
 | |
| 	<?php endif ?>
 | |
| 
 | |
| 	<?php
 | |
| 	$recent = $_sql->query("SELECT entrySlug, entryTitle FROM entries WHERE entryBy = $userData[userId] AND entryPublished <= ".time()." ORDER BY entryPublished DESC LIMIT 5");
 | |
| 	if ($recent->num_rows) : ?>
 | |
| 	<div class='box recent'>
 | |
| 		<?php
 | |
| 		while ($data = $recent->fetch_assoc())
 | |
| 			echo "<p><a href='".get_entry_link($data['entrySlug'])."'>".trimlink($data['entryTitle'], 42)."</a></p>\n";
 | |
| 		?>
 | |
| 	</div>
 | |
| 	<?php endif; unset($recent); ?>
 | |
| 	<div style="clear: both"></div>
 | |
| 
 | |
| 	<?php if ($userData['userIntroduction']) : ?>
 | |
| 	<div class='box introduction'>
 | |
| 		<p><?=$userData['userIntroduction']?></p>
 | |
| 	</div>
 | |
| 	<div style="clear: both"></div>
 | |
| 	<?php endif ?>
 | |
| 
 | |
| 	<div class="clear"></div>
 | |
| </div>
 | |
| <div class="clear"></div>
 |