    <div class="p-a white lt p-t-lg box-shadow">
    	<div class="row">
    		<div class="col-sm-6">
    			<h4 class="m-b-0 _300">Welcome <?php echo user_names($_SESSION['user_login']); ?></h4>
    			<small class="text-muted">
    			<?php
                $lastlogin = last_login($_SESSION['user_login']);
                foreach($lastlogin as $last){
                    if ($last['last_ts'] == '0000-00-00 00:00:00') {
                        echo '';
                    }else{
                        $lastdate = date('l jS F Y', strtotime($last['last_ts']));
                        $lastip = $last['last_ip'];
                        echo'Last login: <strong>'.$lastdate.'</strong> |';
                        echo' From: <strong>'.$lastip.'</strong> ';
                        echo' <a href="http://api.hostip.info/get_html.php?ip='.$lastip.'" target="_blank"><img src="http://api.hostip.info/flag.php?ip='.$lastip.'" alt="Country" width="39" height="24"></a> ';
                    }
                } ?>
                </small>
    		</div>
    	</div>
    </div>