<?php

	include("../../../dbconnection/dbconnection.php");
	include("../../../steam_functions/steam_functions.php");

foreach(few_latest_notes($connect) AS $row){
	$id=$row["id"];
	$tp=$row["topic"];
	$notes=$row["notes"];
	$img=$row["cover_sm"];
	// $strlength=strlen($notes);
	$strlength=strlen(trim($notes));
	if($strlength>225){
		$n="<img src='pages/notes/".$img."' style='max-width:80px;margin-right:5px' class='pull-left'> ".substr($notes,0,225)."<span style='font-size:20px'>.... </span> <label class='btn btn-sm bg-blue pull-right' >Open</label>";
		
		
	}else{
		$n="<img src='pages/notes/".$img."' style='max-width:80px;margin-right:5px' class='pull-left'> ".$notes."<label class='btn btn-sm bg-blue pull-right' >Open</label>";
	}
	
	
?>
			<div class="box box-default " id="<?php echo $id;?>" style='margin:0px'>
			  <div class="box-header with-border">
				<h3 class="box-title text-blue"><b><?php echo ucwords(strtolower($tp));?></b></h3>
			  </div>
			  <div class="box-body">
				<?php echo $n;?>
			  </div>
			  <!-- /.box-body -->
			</div>
			
			<?php }?>