<style>
	th, td { text-align: center; }
</style>
<div class="row">
	<div class="col-md-12">
		<div class="portlet box blue-hoki">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa fa-cogs"></i><strong>Company List</strong> 
				</div>
				<ul class="nav nav-tabs">
					<li>  
						<a href="/contacts"> Contacts <?php if(getContactUnread() <> ""){ ?><span class="badge badge-danger pull-right"><?php echo getContactUnread();?></span><?php } ?> </a>
					</li>
					<?php if($_SESSION['group_id'] == 1){ ?>
					<li class="active">
						<?php 
							if(getStatusCompanyFriend($_SESSION['company_id']) > 0 && $_SESSION['group_id'] == 1){ 
								$unread_contact = getStatusCompanyFriend($_SESSION['company_id']);
							}else{
								$unread_contact = "";
							}
						?>
						
						<a href="/companies"> Importers <?php if($unread_contact <>  ""){?><span class="badge badge-danger pull-right"><?php echo $unread_contact; ?> </span><?php }?></a>
					</li>
					<?php }else{ ?>
					<li class="active">
						<a href="/companies"> Freight Forwarders <?php if($unread_contact <>  ""){?><span class="badge badge-danger pull-right"><?php echo $unread_contact; ?> </span><?php }?></a>
					</li>
					<?php } ?>
				</ul>
			</div>
			<div class="portlet-body">
				<?php if($_SESSION['group_id'] == 2){ ?>
				<div class="row" style="margin-bottom:10px;">
					<div class="col-md-6 col-sm-6">
					</div>
					<div class="col-md-6 col-sm-6">
						<div class="pull-right">
							<button class="btn blue btn-circle add-user"> Add New <i class="fa fa-plus"></i></a></button>					
						</div>
					</div>
				</div>
				<?php } ?>
				<div class="row">
					<div class="col-md-6 col-sm-6">
					</div>
					<div class="col-md-6 col-sm-6">
						<div class="pull-right">
							<label>Search :&nbsp;&nbsp;<input type="text" data-column="0" class="search-input-text input-sm input-small input-inline form-control form-filter"></label>
						</div>
					</div>
				</div>
				<div id='suksesupdate' class="alert alert-success alert-block fade in" style='display:none;'>
					<strong><i class="icon-ok-sign"></i>Success! </strong>Yehaa.. Your profile has been updated
				</div>
				<div id='gagalupdate' class="alert alert-danger alert-block fade in" style='display:none;'>
					<strong><i class="icon-ok-sign"></i>Whoops! </strong>Your profile cant be updated, please try again later ( Make sure you make any changes to your profile when update )
				</div>
				<table class="table table-striped table-hover table-bordered" id="contact">
					<thead>
						<tr>
							<th>
								<center>Company Logo</center>
							</th>
							<th>
								<center>Name</center>
							</th>
							<th>
								<center>Office Number</center>
							</th>
							<th>
								<center>Branch</center>
							</th>
							<th>
								<center>Marking Number</center>
							</th>
							<th>
								<center>Action</center>
							</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="table-status"></td>
							<td class="table-title"></td>
							<td class="table-title"></td>
							<td class="table-title"></td>
							<td class="table-title"></td>
							<td class="table-title"></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>

<div class="modal fade in" id="approve-user" tabindex="-1" role="basic" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content form">
			<form id="marking-no-add"  class="form-horizontal form-bordered">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
					<h4 class="modal-title">Approve Company</h4>
				</div>
				<div class="modal-body">
					<div>
						<div class="form-body" id="getCodeApprove">
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<a class="btn btn-primary" id="submitmarking">Submit</a>
					<button class="btn btn-default" type="button" id="waitingpin" disabled="" style="display:none;">Please Wait...</button>
				</div>
			</form>
		</div>
	</div>
</div>
<div class="modal fade in" id="edit-approve-user" tabindex="-1" role="basic" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content form">
			<form id="marking-no-add2"  class="form-horizontal form-bordered">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
					<h4 class="modal-title">Edit Company</h4>
				</div>
				<div class="modal-body">
					<div>
						<div class="form-body" id="getEditCodeApprove">
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<a class="btn btn-primary" id="submitmarking2">Submit</a>
					<button class="btn btn-default" type="button" id="waitingpin" disabled="" style="display:none;">Please Wait...</button>
				</div>
			</form>
		</div>
	</div>
</div>
<div class="modal fade in" id="user-detail" tabindex="-1" role="basic" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			</div>
			<div class="modal-body" id="getCode"> 
			</div>
		</div>
	</div>
</div>
<div class="modal fade in" id="add-user" tabindex="-1" role="basic" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			</div>
			<div class="modal-body form">
				<div class="form-horizontal form-row-seperated">
					<div class="form-group">
						<div class="col-md-12">
							<div class="input-group">
								<input type="text" id="typeahead_example_modal_3" name="typeahead_example_modal_3" class="form-control" placeholder="Find company by using Company Name" />
								<span class="input-group-addon">
								<i class="fa fa-search" aria-hidden="true"></i>
								</span>
							</div>
						</div>
					</div>
					<div id="getCode2">
						<div class="row">
							<br>
							<center>No result found.</center>
							<br>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>