<div class="container p-t-2">
	<div class="row">
		<div class="col-lg-3 col-md-12">
			<div class="card">
				<div class="list-group">					  
					<a href="<?php echo base_url().config_item("slug_user"); ?>" class="<?php if($page == ''){ echo 'active'; } ?> list-group-item"><?php echo __("Profile"); ?></a>					  
					<a href="<?php echo base_url().config_item("slug_user"); ?>/password" class="<?php if($page == 'password'){ echo 'active'; } ?> list-group-item"><?php echo __("Update Password"); ?></a>					  
					<a href="<?php echo base_url().config_item("slug_user"); ?>/bookmarks" class="<?php if($page == 'bookmarks'){ echo 'active'; } ?> list-group-item"><?php echo __("Bookmarks"); ?></a>					  					
				</div>
			</div> 
			<?php if($page == 'bookmarks'){ ?>
			<input type="text" class="search-to form-control" placeholder="<?php echo __("Search bookmarks"); ?>">
			<?php } ?>
		</div>

		<div class="col-lg-9 col-md-12">
		

			

				<?php
				if($message = $this->session->flashdata('update_message')){ ?>
			
				<div class="alert animated bounceIn alert-success alert-autoclose">
					<i class="zmdi zmdi-alert-circle-o"></i> <?php echo $message; ?>
				</div>
				<?php }	?>

				<?php
				if($error = $this->session->flashdata('update_error')){ ?>
			
				<div class="alert animated bounceIn alert-danger alert-autoclose">
					<i class="zmdi zmdi-alert-circle-o"></i> <?php echo $error; ?>
				</div>
				<?php }	?>


				<?php
					switch ($page) {
						case 'password':
							?>
							<div class="card card-block">

							<form  method="POST">
								

								<div class="form-group row">
									<label for="password" class="col-xs-3 col-form-label"><?php echo __("Password"); ?></label>
								  	<div class="col-xs-9">
								    	<input  required class="form-control" type="password"  id="password" name="password" value="">
								  	</div>
								</div>

								<div class="form-group row">
									<label for="password-r" class="col-xs-3 col-form-label"><?php echo __("Repeat Password"); ?></label>
								  	<div class="col-xs-9">
								    	<input  required class="form-control" type="password"  id="password-r" name="password-r" value="">
								  	</div>
								</div>
								<?php echo csrf(); ?>
								<button type="submit" class="btn btn-success pull-right"><?php echo __("Update"); ?></button>

							</form>
							</div>
							<?php
							break;			
						case 'bookmarks':
							if(count($bookmarks) == 0)
							{
								?>
								<h2 class="light text-xs-center">
									<i class="zmdi zmdi-star-outline text-lg"></i> 
									<br>
									<?php echo __("You no have anything here yet"); ?>
								</h2>
								<?php
							}
							?>
							
							
							<div class="search-me"><?php
							foreach ($bookmarks as $key => $value) {							
								?>
								<div class="col-md-4 search-item">
									<a class="card link-black" href="<?php echo base_url(); ?><?php echo $value->url; ?>">
								  		<span class="score"><?php echo $value->score; ?></span> 
								  		<img class="card-img-top img-fluid" src="http://free.pagepeeker.com/v2/thumbs.php?size=x&url=<?php echo $value->url; ?>" alt="Card image cap">
								  		
								  		<div class="card-block truncate">
								  			<progress class="progress progress-sm <?php echo getColorProgress($value->score,80); ?>" value="<?php echo $value->score; ?>" max="100"></progress>								    		
											<div class="truncate"><?php echo $value->metaTitle; ?></div>
											<div class="truncate text-success"><?php echo $value->url; ?></div>
										
											<div>
												<small class="text-muted"><?php echo __("Last Updated:"); ?> <?php echo ago($value->updated); ?></small>
											</div>
								  		</div>
									</a>
								</div>
								<?php
							}
							?></div><?php
							break;										
						default:
							?>
							<div class="card card-block">
							<form  method="POST">
								<div class="form-group row">
									<label for="email" class="col-xs-3 col-form-label"><?php echo __("Email"); ?></label>
								  	<div class="col-xs-9">
								    	<input  class="form-control disabled" disabled readonly type="email" value="<?php echo _user("email"); ?>">
								  	</div>
								</div>

								<div class="form-group row">
									<label for="names" class="col-xs-3 col-form-label"><?php echo __("Names"); ?></label>
								  	<div class="col-xs-9">
								    	<input  required class="form-control" type="text"  id="names" name="names" value="<?php echo _user("names"); ?>">
								  	</div>
								</div>
								<?php echo csrf(); ?>
								<button type="submit" class="btn btn-success pull-right"><?php echo __("Update"); ?></button>

							</form>
							</div>
							<?php
							break;
					}
				?>
			</div>
		

	</div>
</div>