<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
extract($_POST);
// $get_depth = $obj->Details_By_Cond("HYDROLOGY.BLPUMP_TBL@HYDRO10", "WELL_ID='$well_id'");
// $total_depth_meters = $get_depth['DEPTH'];
// $total_depth_feet = round($total_depth_meters * 3.28084);

// echo $total_depth_meters . ',' . $total_depth_feet;
if($well_data_type_id == 5){
?>

<label class="control-label" for="well_id"><b>Pump Test Well Id<font color="#FF0000"></font></b></label>
<select id="pump_test_id" name="pump_test_id" class="chosen-select" style="height:32px !important;" onchange="load_pump_test_well_observation(this.value)">
  <option style="text-align: center;" value="">----select----</option>
  <?php
  $table_name = "HYDROLOGY.BLPUMP_TBL@HYDRO10";
  $columns = "DISTINCT WELL_ID";
  $where_cond = "WELL_DATA_TYPE='$well_data_type_id'";
  // $table_name = "HYDROLOGY.BLPUMP_TBL@HYDRO10";
  // $columns = "*";
  // $where_cond = '1=1';

  foreach ($obj->View_colmn_By_Cond_hydro($table_name, $columns, $where_cond) as $wid_list) {
    echo '<option value="' . $wid_list['WELL_ID'] . '">' . $wid_list['WELL_ID'] . '</option>';
  }
  ?>
</select>
<?php }?>
<script>
	$('.chosen-select').chosen({
		allow_single_deselect: true
	});
	//resize the chosen on window resize
	$(window)
		.off('resize.chosen')
		.on('resize.chosen', function() {
			$('.chosen-select').each(function() {
				var $this = $(this);
				$this.next().css({
					'width': '100%'
				});
			})
		}).trigger('resize.chosen');
	//resize chosen on sidebar collapse/expand
	$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
		if (event_name != 'sidebar_collapsed') return;
		$('.chosen-select').each(function() {
			var $this = $(this);
			$this.next().css({
				'width': '100%'
			});
		})
	});
</script>