<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
// $year = date('Y');
?>

<script src="module/ground_water_ex/js/gwt_yearly_comp_graph.js"></script>

<!--graph print link start-->


<div id="cover-spin"></div>

<div class="table-header"><i class="fas fa-list"></i>&ensp;Ground Water (Weekly) Comparison Graph</div>
<div class="row-fluid" style="background-color:#f5f5f5; -webkit-box-shadow: 0px 8px 6px -6px black; -moz-box-shadow: 0px 8px 6px -6px black; box-shadow:0px 8px 6px -6px black;">
    <div class="span2" style="padding-left:25px; margin-top:5px; margin-bottom:10px">
        <div class="control-group">
            <label class="control-level"for="district"><b>District</b><font style="color:#FF0000"></font></label>
            <div class="controls" style="width: 100%">
                <select name="gwt_com_district" id="gwt_com_district" class="chosen-select" onchange="load_well_by_district_id(this.value)">
                    <option value=""></option>
					<?php
					$tbl_name="HYDROLOGY.DISTRICT_TBL@HYDRO10";
					$cols="DISTRICT_NO,DISTRICT_NAME";
					$where_cond="1=1 ORDER BY DISTRICT_NAME ASC";
						//SELECT DISTRICT_NO,DISTRICT_NAME FROM DISTRICT_TBL ORDER BY DISTRICT_NAME ASC
					foreach($obj->View_colmn_By_Cond($tbl_name,$cols,$where_cond)as $district_list){
					echo '<option value="'.$district_list['DISTRICT_NO'].'">'.$district_list['DISTRICT_NAME'].'</option>';
					}	
					?>
                </select>
            </div>
        </div>
    </div>
	<!--Old Id--> 
    <div class="span2" style="margin-top:5px; margin-bottom:10px">
        <div class="control-group">
            <label class="control-level"for="old-id"><b>Old Id</b></label>
                <div class="controls" id="gwt_com_old_id_list_holder">
                    <select class="chosen-select">
					    <option value="Select Old ID"></option>
						<option value=""></option>
					</select>
                </div>
         </div>
    </div>
    <!--Old Id--> 
    <!--Field For New ID-->
    <div class="span2" style="margin-top:5px; margin-bottom:3px;">
        <div class="control-group">
            <label class="control-label" for="well_id"><b>New ID<font color="#FF0000"></font></b></label>
            <div class="controls" style="width: 100%;" id="gwt_com_well_id_list_holder">
                <input type="text" style="width: 94%; height: 12px !important;" id="gwt_com_well_id" name="gwt_com_well_id"  value="" readonly />
            </div>
        </div>
    </div>
    <!--Field For New ID-->

    <!--From Year-->
    <div class="span2" style="margin-top:5px; margin-bottom:3px;">
        <div class="control-group">
            <label class="control-level" for="year"><b>From Year</b><font style="color:#FF0000"></font></label>
            <div class="controls" style="width: 100%;">
                <input type="text" style="width: 94%; height: 12px !important; font-weight:bold;" id="gwt_com_from_year" name="gwt_com_from_year"  value="" maxlength="4"/>
            </div>
        </div>
    </div>
    <!--From Year-->

	<!--To Year-->
    <div class="span2" style="margin-top:5px; margin-bottom:3px;">
        <div class="control-group">
            <label class="control-level" for="year"><b>To Year</b><font style="color:#FF0000"></font></label>
            <div class="controls" style="width: 100%;">
                <input type="text" style="width: 94%; height: 12px !important; font-weight:bold;" id="gwt_com_to_year" name="gwt_com_to_year"  value="" maxlength="4"/>
            </div>
        </div>
    </div>
    <!--To Year-->

    <!--Button download_gwt_weekly_yearly_graph-->
    <div class="span2" style="margin-top:25px; margin-bottom:2px;">
        <div class="control-group">
            <div class="controls">
                <button type="button"  class="btn btn-small btn-info"  onclick="load_gwt_weekly_com_graph()">
                <i class="icon-search"></i><b style="font-size: 12px;">Graph</b></button> 
            </div>
        </div>
    </div>
    <!--Button-->
</div>
</div>

<!--Show Data-->

<div id="gw_weekly_com_graph_holder" class="row-fluid" style="margin-top: 15px;"></div>



<!--Show Data-->
<script type="text/javascript">
	$(".date-picker").datepicker( {
		format: "mm-yyyy",
		viewMode: "months", 
		minViewMode: "months"
	});
    $('.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>