<? global $vis_language; ?>
<form class="form-horizontal" data-validate="parsley" id="vis_staff_profile_form" name="vis_staff_profile_form" method="post" >
    <input type="hidden" name="vis_staff_id" id="vis_staff_id" value="<? echo $staff['staff_id']; ?>" /> 
    <div class="row">
	<div class="col-md-12">	
		 <div class="form-group">
               <div class="col-sm-12"><h5><? echo $vis_language['TXTPERSNDET']; ?></h5></div>
            </div>
            <div class="line b-b line-lg pull-in"></div>
            <br/> 
	<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 class="form-group">
		<label class="col-sm-2 text-right"><?= $vis_language['TXTTIMEZONE']; ?></label>
		<div class="col-sm-10">
			<span id="vis_staff_timezone_value" style="margin-top:20px;"><? echo "GMT".calulate_timezone($staff['timezone']); ?> <span class="vis_button label vh-success-bg m vis-pointer" onclick="$('#vis_staff_timezone_setting').toggle(); $('#vis_staff_timezone_value').toggle(); $('#vis_change_timezone').val(1); "><? echo $vis_language['TXTCHANGE']; ?></span></span><span id="vis_staff_timezone_setting" style="display:none">
			<select name="vis_timezone" id="vis_timezone" class='form-control input-sm selectpicker' data-live-search="true"> 
				<option value="-12:00#International Date Line West">(GMT-12:00) International Date Line West</option>
				<option value="-11:00#Apia, Midway, Niue, Pago Pago" <?php ?>>(GMT-11:00) Apia, Midway, Niue, Pago Pago</option>
				<option value="-10:00#Fakaofo, Hawaii Time, Johnston, Rarotonga, Tahiti">(GMT-10:00) Fakaofo, Hawaii Time, Johnston, Rarotonga, Tahiti</option>
				<option value="-9:30#Marquesas, Alaska Time">(GMT-09:30) Marquesas, Alaska Time</option>
				<option value="-9:00#Gambier">(GMT-09:00) Gambier</option>
				<option value="-8:00#Pacific Time, Tijuana, Vancouver, Whitehorse, Pitcairn">(GMT-08:00) Pacific Time, Tijuana, Vancouver, Whitehorse, Pitcairn</option>
				<option value="-7:00#Mountain Time, Arizona, Chihuahua, Mazatlan">(GMT-07:00) Mountain Time, Arizona, Chihuahua, Mazatlan</option>
				<option value="-7:00#Dawson Creek, Edmonton, Hermosillo, Yellowknife">(GMT-07:00) Dawson Creek, Edmonton, Hermosillo, Yellowknife</option>
				<option value="-6:00#Belize, Central Time, Central Time, Mexico City, Regina, Winnipeg">(GMT-06:00) Belize, Central Time, Central Time, Mexico City, Regina, Winnipeg</option>
				<option value="-6:00#Costa Rica, Easter Island, El Salvador, Galapagos, Guatemala, Managua">(GMT-06:00) Costa Rica, Easter Island, El Salvador, Galapagos, Guatemala, Managua</option>
				<option value="-5:00#Bogota, Cayman, Eastern Time, Iqaluit, Montreal, Toronto, Grand Turk">(GMT-05:00) Bogota, Cayman, Eastern Time, Iqaluit, Montreal, Toronto, Grand Turk</option>
				<option value="-5:00#Guayaquil, Havana, Jamaica, Lima, Nassau, Panama, Port-au-Prince">(GMT-05:00) Guayaquil, Havana, Jamaica, Lima, Nassau, Panama, Port-au-Prince</option>
				<option value="-4:30#Caracas, Anguilla">(GMT-04:30) Caracas, Anguilla</option>
				<option value="-4:00#Antigua, Aruba, Asuncion, Atlantic Time - Halifax, Barbados, Bermuda">(GMT-04:00) Antigua, Aruba, Asuncion, Atlantic Time - Halifax, Barbados, Bermuda</option>
				<option value="-4:00#Boa Vista, Campo Grande, Cuiaba, Curacao, Dominica, Grenada, Guadeloupe, Guyana, La Paz, Manaus">(GMT-04:00) Boa Vista, Campo Grande, Cuiaba, Curacao, Dominica, Grenada, Guadeloupe, Guyana, La Paz, Manaus</option>
				<option value="-4:00#Martinique, Montserrat, Palmer, Port of Spain, Porto Velho, Puerto Rico, Rio Branco, Santiago">(GMT-04:00) Martinique, Montserrat, Palmer, Port of Spain, Porto Velho, Puerto Rico, Rio Branco, Santiago</option>
				<option value="-4:00#Santo Domingo, St. Kitts, St. Lucia, St. Thomas, St. Vincent, Stanley, Thule, Tortola">(GMT-04:00) Santo Domingo, St. Kitts, St. Lucia, St. Thomas, St. Vincent, Stanley, Thule, Tortola</option>
				<option value="-3:30#Newfoundland Time - St. Johns, Araguaina">(GMT-03:30) Newfoundland Time - St. Johns, Araguaina</option>
				<option value="-3:00#Belem, Buenos Aires, Cayenne, Fortaleza, Godthab, Maceio">(GMT-03:00) Belem, Buenos Aires, Cayenne, Fortaleza, Godthab, Maceio</option>
				<option value="-3:00#Miquelon, Montevideo, Paramaribo, Recife, Rothera, Salvador, Sao Paulo">(GMT-03:00) Miquelon, Montevideo, Paramaribo, Recife, Rothera, Salvador, Sao Paulo</option>
				<option value="-2:00#Noronha, South Georgia">(GMT-02:00) Noronha, South Georgia</option>
				<option value="-1:00#Azores, Cape Verde, Scoresbysund">(GMT-01:00) Azores, Cape Verde, Scoresbysund</option>
				<option value="+0:00#Abidjan, Accra, Bamako, Banjul, Bissau">(GMT+00:00) Abidjan, Accra, Bamako, Banjul, Bissau</option>
				<option value="+0:00#Canary Islands, Casablanca, Conakry, Dakar, Danmarkshavn, Dublin, El Aaiun, Faeroe, Freetown, Lisbon, Lome">(GMT+00:00) Canary Islands, Casablanca, Conakry, Dakar, Danmarkshavn, Dublin, El Aaiun, Faeroe, Freetown, Lisbon, Lome</option>
				<option value="+0:00#London, Monrovia, Nouakchott, Ouagadougou, Reykjavik, Sao Tome, St Helena">(GMT+00:00) London, Monrovia, Nouakchott, Ouagadougou, Reykjavik, Sao Tome, St Helena</option>
				<option value="+1:00#Algiers, Amsterdam, Andorra, Bangui, Berlin">(GMT+01:00) Algiers, Amsterdam, Andorra, Bangui, Berlin</option>
				<option value="+1:00#Brazzaville, Brussels, Budapest, Central European Time, Central European Time">(GMT+01:00) Brazzaville, Brussels, Budapest, Central European Time, Central European Time</option>
				<option value="+1:00#Ceuta, Copenhagen, Douala, Gibraltar, Kinshasa, Lagos, Libreville, Luanda, Luxembourg">(GMT+01:00) Ceuta, Copenhagen, Douala, Gibraltar, Kinshasa, Lagos, Libreville, Luanda, Luxembourg</option>
				<option value="+1:00#Madrid, Malabo, Malta, Monaco, Ndjamena, Niamey, Oslo, Paris, Porto-Novo, Rome">(GMT+01:00) Madrid, Malabo, Malta, Monaco, Ndjamena, Niamey, Oslo, Paris, Porto-Novo, Rome</option>
				<option value="+1:00#Stockholm, Tirane, Tunis, Vaduz, Vienna, Warsaw, Windhoek, Zurich">(GMT+01:00) Stockholm, Tirane, Tunis, Vaduz, Vienna, Warsaw, Windhoek, Zurich</option>
				<option value="+2:00#Amman, Athens, Beirut, Blantyre, Bucharest, Bujumbura">(GMT+02:00) Amman, Athens, Beirut, Blantyre, Bucharest, Bujumbura</option>
				<option value="+2:00#Cairo, Chisinau, Damascus, Gaborone, Gaza, Harare, Helsinki, Istanbul">(GMT+02:00) Cairo, Chisinau, Damascus, Gaborone, Gaza, Harare, Helsinki, Istanbul</option>
				<option value="+2:00#Jerusalem, Johannesburg, Kiev, Kigali, Lubumbashi, Lusaka, Maputo, Maseru">(GMT+02:00) Jerusalem, Johannesburg, Kiev, Kigali, Lubumbashi, Lusaka, Maputo, Maseru</option>
				<option value="+2:00#Mbabane, Minsk, Moscow-01 - Kaliningrad, Nicosia">(GMT+02:00) Mbabane, Minsk, Moscow-01 - Kaliningrad, Nicosia</option>
				<option value="+2:00#Riga, Sofia, Tallinn, Tripoli, Vilnius">(GMT+02:00) Riga, Sofia, Tallinn, Tripoli, Vilnius</option>
				<option value="+3:00#Addis Ababa, Aden, Antananarivo">(GMT+03:00) Addis Ababa, Aden, Antananarivo</option>
				<option value="+3:00#Asmera, Baghdad, Bahrain, Comoro, Dar es Salaam, Djibouti">(GMT+03:00) Asmera, Baghdad, Bahrain, Comoro, Dar es Salaam, Djibouti</option>
				<option value="+3:00#Kampala, Khartoum, Kuwait, Mayotte, Mogadishu, Moscow+00">(GMT+03:00) Kampala, Khartoum, Kuwait, Mayotte, Mogadishu, Moscow+00</option>
				<option value="+3:00#Nairobi, Qatar, Riyadh, Syowa">(GMT+03:00) Nairobi, Qatar, Riyadh, Syowa</option>
				<option value="+3:30#Tehran">(GMT+03:30) Tehran</option>
				<option value="+4:00#Baku, Dubai, Mahe, Mauritius, Moscow+01 - Samara">(GMT+04:00) Baku, Dubai, Mahe, Mauritius, Moscow+01 - Samara</option>
				<option value="+4:00#Muscat, Reunion, Tbilisi, Yerevan">(GMT+04:00) Muscat, Reunion, Tbilisi, Yerevan</option>
				<option value="+4:30#Kabul">(GMT+04.30) Kabul</option>
				<option value="+5:00#Aqtau, Aqtobe, Ashgabat, Dushanbe">(GMT+05:00) Aqtau, Aqtobe, Ashgabat, Dushanbe</option>
				<option value="+5:00#Karachi, Kerguelen, Maldives, Moscow+02 - Yekaterinburg, Tashkent">(GMT+05:00) Karachi, Kerguelen, Maldives, Moscow+02 - Yekaterinburg, Tashkent</option>
				<option value="+5:30#Colombo, India Standard Time">(GMT+05:30) Colombo, India Standard Time</option>
				<option value="+6:00#Almaty, Bishkek, Chagos, Dhaka, Mawson">(GMT+06:00) Almaty, Bishkek, Chagos, Dhaka, Mawson</option>
				<option value="+6:00#Moscow+03 - Omsk, Novosibirsk, Thimphu, Vostok">(GMT+06:00) Moscow+03 - Omsk, Novosibirsk, Thimphu, Vostok</option>
				<option value="+6:30#Cocos, Rangoon">(GMT+06:30) Cocos, Rangoon</option>
				<option value="+7:00#Bangkok, Christmas, Davis, Hanoi, Hovd, Jakarta">(GMT+07:00) Bangkok, Christmas, Davis, Hanoi, Hovd, Jakarta</option>
				<option value="+7:00#Moscow+04 - Krasnoyarsk, Phnom Penh, Vientiane">(GMT+07:00) Moscow+04 - Krasnoyarsk, Phnom Penh, Vientiane</option>
				<option value="+8:00#Brunei, Casey, China Time - Beijing, Choibalsan">(GMT+08:00) Brunei, Casey, China Time - Beijing, Choibalsan</option>
				<option value="+8:00#Hong Kong, Kuala Lumpur, Macau, Makassar, Manila, Moscow+05 - Irkutsk">(GMT+08:00) Hong Kong, Kuala Lumpur, Macau, Makassar, Manila, Moscow+05 - Irkutsk</option>
				<option value="+8:00#Singapore, Taipei, Ulaanbaatar, Western Time - Perth">(GMT+08:00) Singapore, Taipei, Ulaanbaatar, Western Time - Perth</option>
				<option value="+9:00#Dili, Jayapura, Moscow+06 - Yakutsk, Palau, Pyongyang, Seoul, Tokyo">(GMT+09:00) Dili, Jayapura, Moscow+06 - Yakutsk, Palau, Pyongyang, Seoul, Tokyo</option>
				<option value="+9:30#Central Time - Adelaide, Central Time - Darwin">(GMT+09:30) Central Time - Adelaide, Central Time - Darwin</option>
				<option value="+10:00#Eastern Time, Brisbane, Hobart, Melbourne, Sydney, Guam">(GMT+10:00) Eastern Time, Brisbane, Hobart, Melbourne, Sydney, Guam</option>
				<option value="+10:00#Moscow+07 - Yuzhno-Sakhalinsk, Port Moresby, Saipan, Truk">(GMT+10:00) Moscow+07 - Yuzhno-Sakhalinsk, Port Moresby, Saipan, Truk</option>
				<option value="+11:00#Efate, Guadalcanal, Kosrae, Moscow+08 - Magadan, Noumea, Ponape">(GMT+11:00) Efate, Guadalcanal, Kosrae, Moscow+08 - Magadan, Noumea, Ponape</option>
				<option value="+12:00#Antarctica/McMurdo, Antarctica/South_Pole, Auckland, Fiji">(GMT+12:00) Antarctica/McMurdo, Antarctica/South_Pole, Auckland, Fiji</option>
				<option value="+12:00#Funafuti, Kwajalein, Majuro, Moscow+09 - Petropavlovsk-Kamchatskiy, Nauru, Tarawa, Wake, Wallis">(GMT+12:00) Funafuti, Kwajalein, Majuro, Moscow+09 - Petropavlovsk-Kamchatskiy, Nauru, Tarawa, Wake, Wallis</option><option value="+13:00#Enderbury, Tongatapu">(GMT+13:00) Enderbury, Tongatapu</option>
			</select>
		</span>
		</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">	
	<div class="form-group">
       <div class="col-sm-12"><h5><? echo $vis_language['TXTCOMPDETAIL']; ?></h5></div>
    </div>
    <div class="line b-b line-lg pull-in"></div>
    <br/> 	
	<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['TXTOTHERCONTACT']; ?></label>
			<div class="col-sm-10">
				<input class="form-control input-sm" type="text" name="vis_office_phone" id="vis_office_phone" value="<? echo $staff['other_contact_no']; ?>">
			</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">	     	
	<div class="col-md-6">
	<?php if( $staff['staff_id']!=1) { ?>
  <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
               <div class="col-sm-1">
                  <label class="switch <? if($staff['is_enabled']==0) echo 'radio-no-uncheck'; ?>" >
                  <input type="checkbox"  name="vis_status"  id="vis_status" <? if($staff['is_enabled']==1) echo ' checked="checked"'; ?>> 
                  <span ></span>
                  </label>
               </div>
            </div>
	<?php } ?>
	</div>
	</div>		
	</div> 	
	<div class="line b-b line-lg pull-in"></div>
   <br/>
	<div class="col-lg-offset-1 col-lg-10">
		  <input type="hidden" name="vis_profile" id="vis_profile" value="0" />
		  <input type="hidden" name="vis_change_timezone" id="vis_change_timezone" value="1" />	
		  <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>
</form>
<script>
var tes = '<? echo calulate_timezone($staff['timezone'])."#".$staff['timezone_name']; ?>';
$("#vis_timezone").val(tes);
$(".selectpicker").selectpicker();
</script>
