<?php
session_start();
// ============ this file shows data in form for user to update
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
$branch_id=$_SESSION['LOGIN_BRANCH'];
$selected_id_to_edit=addslashes(trim($_GET['_id']));
//echo $selected_id_to_edit;

$table_name="_pb_contact_info";
$where_cond="_id=".$selected_id_to_edit;
$selected_row_to_edit = $obj->Details_By_Cond($table_name,$where_cond);
extract($selected_row_to_edit);
?>
<div class="row-fluid" style="background-color:#f5f5f5;-webkit-box-shadow: 0 8px 6px -6px black; -moz-box-shadow: 0 8px 6px -6px black; box-shadow: 0 8px 6px -6px black; ">
	<form class="form-vertical" id="asd">
	<input type="hidden" id="selected_id_to_edit" name="selectedidtoedit" value="<?php echo $selected_id_to_edit;?>"/>
		<div class="row-fluid">
			<div class="span3">
				<div class="control-group">
					<label class="control-label" for="form-field-1">&nbsp;&nbsp;Group<font color="#FF0000">*</font></label>
					<select id="edit_load_grp_name">
					 <?php
						$table="_pb_group_info";
						$column="_id,_name";
						$where="_status='A'";
						$child_list=$obj->View_all_data_row_column_By_Cond($table,$column,$where);
						?>

						<option value="">---SELECT---</option>
							<?php
								foreach($child_list AS $index1=>$child){?>
								<option value="<?php echo $child['_id'];?>" <?php  if($selected_row_to_edit['_group_id']==$child['_id']){echo "selected";}?>>
								<?php echo $child['_name'];?></option>
								<?php }?>
						
					</select>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="control-group">
					<label class="control-label" for="form-field-1">&nbsp;&nbsp;Contact No.<font color="#FF0000">*</font></label>
					<input style="width:200px; height:20px;" type="text" value="<?php echo $selected_row_to_edit['_contact_no'];?>" name="name_contact_no" form="usrform" id="edit_contact_no">
				</div>
		</div>
		<div class="row-fluid">
			<div class="control-group">
					<label class="control-label" for="form-field-1">&nbsp;&nbsp;Name<font color="#FF0000">*</font></label>
					<input style="width:200px; height:20px;" type="text" value="<?php echo $selected_row_to_edit['_full_name'];?>" name="contact_name" form="usrform" id="edit_name">
			</div>
			
		</div>
		<div class="row-fluid">
			<div class="control-group">
					<label class="control-label" for="form-field-1">&nbsp;Email</label>
					<input style="width:200px;height:20px;" type="text" value="<?php echo $selected_row_to_edit['_email'];?>"  name="name_email_no" form="usrform" id="edit_contact_email">
						
			</div>
			
		</div>
		<div class="row-fluid">
			<label class="control-label" for="form-field-1">&nbsp;&nbsp;Status <font color="#FF0000">*</font></label>
					<select id="edit_con_status">
					  <option value="">--SELECT--</option>
					  <option value="A" <?php if($selected_row_to_edit['_status']=='A'){echo "selected";}?>>Active</option>
					  <option value="I" <?php if($selected_row_to_edit['_status']=='I'){echo "selected";}?>>Inactive</option>
					</select>
		</div>
		
	</form>
</div>	