<div class="wo_settings_page wow_content">
	<div class="avatar-holder security">
		<img src="<?php echo $wo['setting']['avatar']?>" alt="<?php echo $wo['setting']['name']?> Profile Picture" class="avatar">
		<div class="infoz">
			<h5 title="<?php echo $wo['setting']['name']?>"><a href="<?php echo Wo_SeoLink('index.php?link1=timeline&u=' . $wo['setting']['username'] . '');?>" data-ajax="?link1=timeline&u=<?php echo $wo['setting']['username'] ?>"><?php echo $wo['setting']['name']?></a></h5>
			<p><?php echo $wo['lang']['manage_sessions']; ?></p>
		</div>
	</div>
	<hr>
	<div class="text-center">
		<a href="javascript:void();" class="btn btn-danger btn-mat" id="upgrade-button" onclick="Wo_RemoveAllSessions();"><?php echo $wo['lang']['remove_all_sessions'];?></a>
	</div>
	<div class="active_sessions">
		<div class="table-responsive">
			<?php
				$get_sessions = Wo_GetAllSessionsFromUserID($wo['setting']['user_id']);
				if (count($get_sessions) > 0) {
					foreach ($get_sessions as $wo['key'] => $wo['session']) {
						echo Wo_LoadPage('setting/includes/sessions');
					}
				}
			?>
		</div>
	</div>
</div>
<script type="text/javascript">
function logOutSession(id) {
	if (!confirm('Are you sure you want to log out from this device?')) {
		return false;
	}
	$('#session_' + id).remove();
	$.post(Wo_Ajax_Requests_File() + '?f=delete_s', {id: id}, function () {
		Wo_IsLogged();
	});
}
function Wo_RemoveAllSessions() {
	if (!confirm('Are you sure you want to log out from this device and all devices ?')) {
		return false;
	}
	$.post(Wo_Ajax_Requests_File() + '?f=delete_all_sessions', function () {
		Wo_IsLogged();
	});
}
</script>