<script type="text/javascript">
	$( document ).ready(function() {
	  	$(":file").filestyle({
	  		input: false,
	  		icon: false,
	  		buttonName: "btn-primary",
	  		buttonText: "<i class='fa fa-camera'"
	  	});
	});

	function toggleDiv(divId) {
		$("#"+divId).toggle();
	}
</script>
<div id="content">
    <div id="top">
		<?php readparameter(getlastusergifts); ?>
      	<div id="profile">
      		<div id="cover">
		      	<?php if(PROFILE_COVER!='' && file_exists('../../media/images/users/'.PROFILE_COVER.'')) { ?>
					<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/<?php echo PROFILE_COVER; ?>" class="cover">
				<?php } else { ?>
				
				<?php } ?>
				<?php if(PROFILE_COVER=='' && PROFILE_USER == USER_USERNAME) { ?>
					<span class="editcover" style="float:right;padding:20px"><a href="account/settings" style="color:#000;font-size:16px"><i class="fa fa-cogs"></i> <?php getLanguage(809)?></a></span>
				<?php } ?>
			</div>
			<div id="profilephoto">
				<a href="http://<?php echo SITE_DOMAIN; ?>/image/<?php echo PROFILE_USER; ?>/photo">
				    <div class="img imgLiquid" style="width:150px; height:150px; margin: 0 auto;">
						<?php if(file_exists('../../media/images/users/'.PROFILE_PHOTO.'')) { ?>
							<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/<?php echo PROFILE_PHOTO; ?>" alt="<?php echo PROFILE_USER; ?>" />
						<?php } elseif(file_exists('../../media/images/users/tt_'.PROFILE_PHOTO.'')) { ?>
							 <img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/tt_<?php echo PROFILE_PHOTO; ?>" alt="<?php echo PROFILE_USER; ?>" />
						<?php } else  {?>
							<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/photo_default.png" alt="<?php echo PROFILE_USER; ?>" />
						<?php } ?>
					</div>
				</a>
			</div>

			<div id="counters">
					  	<a href="http://<?php echo SITE_DOMAIN; ?>/<?php echo PROFILE_USER; ?>/follows/0">
					  		<span><?php echo FOLLOW; ?></span>
					  		<br>
					  		<?php getLanguage(407)?>
					  	</a>
					  	<a href="http://<?php echo SITE_DOMAIN; ?>/<?php echo PROFILE_USER; ?>/followers/0">
					  		<span><?php echo FOLLOWERS; ?></span>
					  		<br>
					  		<?php getLanguage(408)?>
					  	</a>
					  	<a onclick="return false;">
					  		<span><?php echo PROFILE_POSTS; ?></span>
					  		<br>
					  		<?php getLanguage(409)?>
					  	</a>
					  	<a href="http://<?php echo SITE_DOMAIN; ?>/<?php echo PROFILE_USER; ?>/gifts/0">
					  		<span><?php echo GIFTS; ?></span>
					  		<br>
					  		<?php getLanguage(813)?>
					  	</a>
					<?php if(SESSION_STATUS == true && PROFILE_USER == USER_USERNAME) { ?>
						<a href="http://<?php echo SITE_DOMAIN; ?>/account/points">
							<span><?php echo POINTS; ?></span>
							<br>
							<?php getLanguage(840)?>
						</a>
					<?php } else { ?>
						<a onclick="return false;">
							<span><?php echo POINTS; ?></span>
							<br>
							<?php getLanguage(840)?>
						</a>
					<?php } ?>
			</div>

          	<div id="profileinfo">
          		<div class="row">
	                <div class="col-md-3 text-left" id="profileinfoleft">
	          			<a href="http://<?php echo SITE_DOMAIN; ?>/<?php echo PROFILE_USER; ?>" class="hashuser">@<?php echo PROFILE_USER; ?></a>
		          		<?php if(VERIFIED==1) { ?>
		          			<span class="verified" title="<?php getLanguage(399)?>"></span>
		          		<?php } ?>
		          		<br>
		          		<small>
		          			<?php echo PROFILE_REAL_NAME; ?> <?php echo PROFILE_REAL_SURNAME; ?> 
		          		</small>
		          	</div>
		          	<div class="col-md-9 text-right" id="userbuttons" style="padding-top:10px">
		          		<?php if(SESSION_STATUS == true && PROFILE_USER != USER_USERNAME && PROFILE_FRIENDS == 0) { ?>
							<a id="followbutton" class="btn btn-primary" name="addfriend" onclick="addf('<?php echo PROFILE_USER; ?>'); return false;"><i class="fa fa-plus-circle"></i> <?php getLanguage(410)?></a>
					  	<?php } ?>
					 	<?php if(SESSION_STATUS == true && PROFILE_USER != USER_USERNAME && PROFILE_FRIENDS == 1) { ?>
					  		<a id="followbutton" class="btn btn-primary" name="removefriend" onclick="removef('<?php echo PROFILE_USER; ?>'); return false;"><i class="fa fa-minus-circle"></i> <?php getLanguage(411)?></a>
					  	<?php } ?>

		          		<?php if(SESSION_STATUS == true && PROFILE_USER != USER_USERNAME && PROFILE_ACCESS == 0) { ?>
					  		<a id="blockbutton" class="btn btn-primary" name="blockuser" class="blockuser" onclick="lock('<?php echo PROFILE_USER; ?>'); return false;"><i class="fa fa-lock"></i> <?php getLanguage(412)?></a>
					   	<?php } ?>
					  	<?php if(SESSION_STATUS == true && PROFILE_USER != USER_USERNAME && PROFILE_ACCESS == 1) { ?>
					  		<a id="blockbutton" class="btn btn-primary" name="unblockuser" class="unblockuser" onclick="unlock('<?php echo PROFILE_USER; ?>'); return false;"><i class="fa fa-unlock"></i> <?php getLanguage(413)?></a>
					   	<?php } ?>

		          		<?php if(SESSION_STATUS == true && PROFILE_USER != USER_USERNAME) { ?>
					   		<a id="sendgift" href="http://<?php echo SITE_DOMAIN; ?>/<?php echo PROFILE_USER; ?>/gift" class="btn btn-primary" style="color:#fff"><i class="fa fa-gift"></i> <?php getLanguage(843)?></a>
					   	<?php } ?>

					   	<a id="openinfo" onclick="javascript:toggleDiv('userinfo');" class="btn btn-primary" style="color:#fff"><i class="fa fa-info-circle"></i> <?php getLanguage(88)?></a>

					</div>
				</div>
				<?php if(PROFILE_STATUS!="" && PROFILE_STATUS!=" ") { ?>
		          	<div id="bio">
		          		<h3><?php echo PROFILE_STATUS; ?></h3>
					</div>
		       	<?php } ?>
				<div id="userinfo" style="display:none">
		          	<div class="row">
		                <div class="col-md-6 text-left" id="profileinfoleft">
		                	<div class="profileinfoitem">
			                    <?php 
									$time = counttime(usertime(PROFILE_VISIT));
									$now = getLanguage(861,1);
									$somesecondsago = getLanguage(855,1);
									if($time==$now || strlen(strstr($time,$somesecondsago))>0)
									{ ?>
										<span style="display:block"><i class="fa fa-clock-o"></i> <img src="http://<?php echo SITE_DOMAIN; ?>/media/images/online.gif"></span>
									<?php } else { ?>
										<span style="display:block"><i class="fa fa-clock-o"></i> <?php getLanguage(34)?>: <?php echo counttime(usertime(PROFILE_VISIT)); ?></span>
								<?php } ?>
							</div>
							<?php if(PROFILE_LOCAL!="") { ?>
								<div class="profileinfoitem">
									<i class="fa fa-location-arrow"></i> <?php echo PROFILE_LOCAL; ?>
								</div>
							<?php } ?>
			          		<?php if(PROFILE_WEB!="") { ?>
			          			<div class="profileinfoitem">
						  			<i class="fa fa-globe"></i> <a href="<?php echo PROFILE_WEB; ?>" target="_blank" rel="nofollow" style="color:#fff"><?php echo PROFILE_WEB; ?></a>
						  		</div>
						  	<?php } ?>
		                </div>
		                <div class="col-md-6 text-left" id="profileinforight">
		                	<?php if(PROFILE_BIO!="" && PROFILE_BIO!=" ") { ?>
		                		<div class="profileinfoitem">
		                   			<p><i class="fa fa-bullhorn"></i> <?php echo PROFILE_BIO; ?></p>
		                   		</div>
		                   	<?php } ?>
		                </div>
		            </div>
		        </div>
          		<div class="clear"></div>
          	</div>
			<div id="add">
        		<form method="post" id="addForm" action="ajax/addpost" enctype="multipart/form-data">
        			<div id="postimage">
        					<?php if(PROFILE_ANONYMOUS == 1 && SESSION_STATUS == true) { ?>
        						<div class="img imgLiquid byuser" style="width:60px; height:60px">
	          						<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/<?php echo USER_PHOTO; ?>" id="postavatar">
	          					</div>
								<div class="img imgLiquid none byanon" style="width:60px; height:60px">
									<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/photo_anonymous.png" id="postavatar">
								</div>
					       	<?php } else if(PROFILE_ANONYMOUS == 0) { ?>
						       	<div class="img imgLiquid byuser" style="width:60px; height:60px">
	          						<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/<?php echo USER_PHOTO; ?>" id="postavatar">
	          					</div>
								<div class="img imgLiquid none byanon" style="width:60px; height:60px">
									<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/photo_anonymous.png" id="postavatar">
								</div>       
	          				<?php } else if(SESSION_STATUS == false) { ?>
	         		 			<div class="img imgLiquid none byuser" style="width:60px; height:60px">
	          						<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/<?php echo USER_PHOTO; ?>" id="postavatar">
	          					</div>
								<div class="img imgLiquid byanon" style="width:60px; height:60px">
									<img src="http://<?php echo SITE_DOMAIN; ?>/media/images/users/photo_anonymous.png" id="postavatar">
								</div>
	          				<?php } ?>
					</div>
					<div id="postbody">
						<textarea rows="3" cols="60" name="post" data-maxsize="<?php echo O_LENGTH; ?>" data-output="numcount" id="post" placeholder="<?php getLanguage(168)?> <?php echo PROFILE_USER; ?>" style="float:left;resize:none"></textarea>
						<input type="file" class="filestyle" name="photo" id="photo" data-input="false" data-icon="false" data-buttonName="btn-primary" data-buttonText="<i class='fa fa-camera'></i>">
					</div>
					<div id="postsend">
						<input type="submit" id="sendButton" class="btn btn-primary" value="<?php getLanguage(328)?>">
					</div>
					<div id="postInfo">
						<a title=" :)" onclick="emoticons();" ><img alt=":)" border="0" style="float:left;padding-top:5px;padding-left:10px;cursor:pointer" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/1.gif"></a>
						<div style="float:left;text-align:right;width:200px;margin-top:2px;" class="postutype">
			  				<?php if(PROFILE_ANONYMOUS == 1 && SESSION_STATUS == true) { ?>
	          					<input type="radio" name="anonymous" id="anonymous0" value="0" checked="checked" onclick="changepostauthor(0)">
						       	<label for="anonymous0"><?php getLanguage(299)?></label>
						       	<input type="radio" name="anonymous" id="anonymous1" value="1" onclick="changepostauthor(1)">
						       	<label for="anonymous1"><?php getLanguage(300)?></label>
					       	<?php } else if(PROFILE_ANONYMOUS == 0) { ?>
						       	<input type="radio" name="anonymous" id="anonymous0" value="0" checked="checked" onclick="changepostauthor(0)">
						       	<label for="anonymous0"><?php getLanguage(299)?></label>         
	          				<?php } else if(SESSION_STATUS == false) { ?>
	         		 			<input type="radio" name="anonymous" id="anonymous1" value="1"  checked="checked" onclick="changepostauthor(1)">
	          					<label for="anonymous1"><?php getLanguage(300)?></label>
	          				<?php } ?>          
			  			</div>
			  			<div id="likesbox">
			  				<span id="numcount"></span>
			  			</div>
					</div>
		 			
		  			<input type="hidden" name="username" value="<?php echo PROFILE_USER; ?>">
          			<img id="sendIndicator" src="media/images/indicator.gif" alt="." class="indicator" style="display:none" />
		  			<div class="clear"></div>
		  			<span class="emoticons">
						<a title=" :) "><img alt=":)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/1.gif" /></a>
						<a title=" :* "><img alt=":*" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/2.gif" /></a>
						<a title=" (:| "><img alt="(:|" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/3.gif" /></a>
						<a title=" :( "><img alt=":(" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/4.gif" /></a>
						<a title=" -_ "><img alt="-_" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/5.gif" /></a>
						<a title=" :D "><img alt=":D" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/6.gif" /></a>
						<a title=" (o.o) "><img alt="(o.o)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/7.gif" /></a>
						<a title=" ;) "><img alt=";)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/8.gif" /></a>
						<a title=" :P "><img alt=":P" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/9.gif" /></a>
						<a title=" (:S) "><img alt="(:S)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/10.gif" /></a>
						<a title=" (8)) "><img alt="(8))" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/11.gif" /></a>
						<a title=" ]:) "><img alt="]:)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/12.gif" /></a>
						<a title=" (envy) "><img alt="(envy)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/13.gif" /></a>
						<a title=" (lol) "><img alt="(lol)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/14.gif" /></a>
						<a title=" (love) "><img alt="(love)" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/15.gif" /></a>
						<a title=" :/ "><img alt=":/" border="0" src="http://<?php echo SITE_DOMAIN; ?>/media/images/smiles/16.gif" /></a>
					</span>
       			</form>
				<div class="clear"></div>
      		</div>
        </div>
      	<div class="clear"></div>
    </div>
    <div id="questions">
	  <div id="questionpage">
      <?php getposts(PROFILE_USER,0,5); ?>
	  </div>
	  <?php if(PROFILE_POSTS==0) { ?>
	  	<div class="post"><h4><?php getLanguage(430)?></h4></div>
	  <?php } ?>
	  <br>
    </div>
  </div>
  <div id="footerspace"></div>
</div>