<? global $vis_language; ?>
<form enctype="multipart/form-data" method="post" id="vis_staff_profile_form" name="vis_staff_profile_form" class="form-horizontal">
	<div class="row">
		<div class="form-group">
			<label class="col-sm-2 control-label"><?= $vis_language['TXTPROFILEIMG']; ?></label>
			<div class="col-sm-10">
   <a >
<? if(defined('VIS_STAFF_IMAGE') && VIS_STAFF_IMAGE!='' && VIS_STAFF_IMAGE!='default.jpg'){?>
<div class="l-avatar pull-left" id="vis_staff_profile_img">
<img src="<? echo VIS_PATH_PROFILE.VIS_STAFF_IMAGE;?>" class="lg bg-white img-responsive">
</div>
<? }else{ ?>
<div class="l-avatar pull-left" id="vis_staff_profile_img">
<? if($staff['first_name']!=''){
	$firstname=preg_split('//u', $staff['first_name'], -1, PREG_SPLIT_NO_EMPTY);
$lastname=preg_split('//u', $staff['last_name'], -1, PREG_SPLIT_NO_EMPTY);
	?>
<div class="lg"><? echo ucfirst($firstname[0]).ucfirst($lastname[0]);?></div>
    <? }else{ ?>
    <img class="lg bg-white img-responsive" src="<?= VIS_PATH_PROFILE.'default.jpg';?>">
    <? }?>

</div>
<? }?>
</a>

			<!--	<div class="thumb-lg avatar pull-left">
				<a id="vis_staff_profile_img"><img src="<? //echo VIS_PATH_PROFILE; echo (defined('VIS_STAFF_IMAGE') && VIS_STAFF_IMAGE!='')?VIS_STAFF_IMAGE:'default.jpg'; ?>" class="bg-white img-responsive " /></a></div>	-->			
                <div class="clear m-t-xl">
				<input type="file" name=vis_pro_img class="filestyle" data-icon="false" data-classButton="btn btn-link link" data-buttonText="<? echo $vis_language['TXTUPLOADIMG']; ?>" data-input="false" onchange="$(this).visExecution('upload_file', {'vis_static_area':'#vis_profile_image', 'vis_form':'vis_staff_profile_form', 'vis_form_attachment_area':'#vis_attachments','vis_action':'index.php?vis_module=home&vis_operation=upload_file&vis_switch=2'});">							
				<input type="hidden" name="vis_location" value="<? echo VIS_DOMAIN; ?>" />
				<input type="hidden" name="vis_attachments" id="vis_attachments" value="" />
				<span id="clearImg">
				<? if(!defined('VIS_STAFF_IMAGE') || VIS_STAFF_IMAGE!='default.jpg') {?>	
					<button type="button" id="clearBtn" class="btn btn-primary btn-xs" onclick="javascript:clear_prof_image();"><? echo $vis_language['TXTCLEAR']; ?></button> 
				<? }?>
				</span>	
				</div>
			</div>	
		</div>
	</div>
	<div class="row">
	<div class="col-md-12">	
	<h4 class="b-b b-2x m-t-n-xxs padder padder-v"><? echo $vis_language['TXTPERSNDET'];?></h4>		
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTINITIALS']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" name="vis_initials" id="vis_initials" type="text" value="<? echo $staff['initials']; ?>">
			</div>	
		</div>	
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTFIRSTNAME']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_firstname" id="vis_firstname" value="<? echo $staff['first_name']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTLASTNAME']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_lastname" id="vis_lastname" value="<? echo $staff['last_name']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTGENDER']; ?></label>
			<div class="col-sm-10">
				<select class="form-control input-sm selectpicker" name="vis_gender" id="vis_gender" >
					<option value="0"><? echo $vis_language['TXTMALE']; ?></option>
					<option value="1"<? echo ($staff['gender']==1)?' selected="selected"':''; ?>><? echo $vis_language['TXTFEMALE']; ?></option>
				</select>
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTEMAIL']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_email" id="vis_email" value="<? echo $staff['email']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTUSERNAME']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $staff['user_name']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTMOBILENUMBER']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_mobile_number" id="vis_mobile_number" value="<? echo $staff['mobile_number']; ?>"  placeholder="<? echo $vis_language['TXTPHONEEG']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTPHONE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_contact_number" id="vis_contact_number" value="<? echo $staff['contact_number']; ?>"  placeholder="<? echo $vis_language['TXTPHONEEG']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTFAX']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_fax" id="vis_fax" value="<? echo $staff['fax']; ?>">
			</div>	
		</div>
	</div>
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTWEBSITE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_website" id="vis_website" value="<? echo $staff['website']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCURRENTADDRESS']; ?></label>
			<div class="col-sm-10">
				<textarea type="text" class="form-control input-sm" name="vis_caddress" id="vis_caddress"><? echo $staff['temporary_address']; ?></textarea>
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTPERMANETADDRESS']; ?></label>
			<div class="col-sm-10">
				<textarea type="text" class="form-control input-sm" name="vis_paddress" id="vis_paddress"><? echo $staff['permanent_address']; ?></textarea>
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCITY']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_city" id="vis_city" value="<? echo $staff['city']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTSTATE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_state" id="vis_state" value="<? echo $staff['state']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCOUNTRY']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_country" id="vis_country" value="<? echo $staff['country']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTZIPCODE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_zipcode" id="vis_zipcode" value="<? echo $staff['zip_code']; ?>">
			</div>	
		</div>
	</div>
	</div>
	</div>
	<div class="row">
	<div class="col-md-12">		
	<h4 class="b-b b-2x m-t-n-xxs padder padder-v"><? echo $vis_language['TXTCOMPDETAIL'];?></h4>	
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCOMPANYNAME']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_office_name" id="vis_office_name" value="<? echo $staff['office_name']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCOMPANYEMAIL']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_office_email" id="vis_office_email" value="<? echo $staff['office_email']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTOTHERFAX']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_office_fax" id="vis_office_fax" value="<? echo $staff['other_fax']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTCOMPANYWEBSITE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_office_website" id="vis_office_website" value="<? echo $staff['office_website']; ?>">
			</div>	
		</div>
	</div>
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTNETMEETINGID']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_netmeeting" id="vis_netmeeting" value="<? echo $staff['netmeetingid']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTOTHERIM']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_otherim" id="vis_otherim" value="<? echo $staff['other_im']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTJOBTITLE']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_job_title" id="vis_job_title" value="<? echo $staff['job_title']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTDEPARTMENT']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_department" id="vis_department" value="<? echo $staff['department']; ?>">
			</div>	
		</div>
	</div>
	</div>		
	</div>
	<div class="row">
	<div class="col-md-12">		
	<h4 class="b-b b-2x m-t-n-xxs padder padder-v"><? echo $vis_language['TXTSOCIALMEDIADETAILS'];?></h4>	
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTTWITTERID']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_twitter_id" id="vis_twitter_id" placeholder="<?php echo $vis_language['TXTPROFURL'];?>" value="<? echo $staff['twitter_id']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTGOOGLEID']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_google_id" id="vis_google_id" placeholder="<?php echo $vis_language['TXTPROFURL'];?>" value="<? echo $staff['google_id']; ?>">
			</div>	
		</div>
	</div>
	<div class="col-md-6">
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTFACEBOOKID']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_facebook_id" id="vis_facebook_id" placeholder="<?php echo $vis_language['TXTPROFURL'];?>"  value="<? echo $staff['facebook_id']; ?>">
			</div>	
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label p-d-sm"><?= $vis_language['TXTLINKEDINID']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_linkedin_id" id="vis_linkedin_id" placeholder="<?php echo $vis_language['TXTPROFURL'];?>" value="<? echo $staff['linkedin_id']; ?>">
			</div>	
		</div>
	</div>
	</div>		
	</div>
	<input type="hidden" name="vis_staff_id" id="vis_staff_id" value="<? echo $staff['staff_id']; ?>" />
	</div>	
</form>
<div class="line b-b line-lg pull-in"></div>
<br/>
<div class="col-lg-offset-1 col-lg-10">
	<button type="button" class="btn btn-primary" onclick="$(this).visExecution('submit_form',{'vis_module':'home', 'vis_operation':'update_staff', 'vis_form':'vis_staff_profile_form'})"><? echo $vis_language['TXTUPDATE']; ?></button>
</div>	
<script src="<?= VIS_PATH_SCRIPT; ?>file-input/bootstrap-filestyle.min.js"></script>
<script type="text/javascript">
	$(".selectpicker").selectpicker();
	function clear_prof_image()
	{
		$('#clearImg').visExecution('load_operations', {'vis_module':'home', 'vis_operation':'remove_profile_img'});
	}
</script>
