<?php
session_start();
include("../../php_crud/my_class.php");
$obj = new my_class();
// $year = date('Y');
extract($_GET);
$cols = "GWM.WELL_ID, GWM.OLD_ID, UPZ.UPZL_NAME,DIST.DISTRICT_NAME";
$tbl = "HYDROLOGY.GWM_TBL@HYDRO10 GWM LEFT JOIN HYDROLOGY.UPAZILA_TBL@HYDRO10 UPZ ON GWM.UPAZILA_CODE=UPZ.UPZL_CODE
LEFT JOIN HYDROLOGY.DISTRICT_TBL@HYDRO10 DIST ON UPZ.DST_CODE=DIST.DISTRICT_NO";
$cond = "GWM.WELL_ID='$well_id'";

$well_info = $obj->View_column_details_By_Cond($tbl,$cols,$cond);


$old_id = $well_info['OLD_ID'];
$district = $well_info['DISTRICT_NAME'];
$upzila = $well_info['UPZL_NAME'];

echo '<input type="hidden" id="com_grph_sel_well_id" value="'.$well_id.'"/>';
echo '<input type="hidden" id="com_grph_sel_old_id" value="'.$old_id.'"/>';
echo '<input type="hidden" id="com_grph_sel_from_year" value="'.$from_year.'"/>';
echo '<input type="hidden" id="com_grph_sel_to_year" value="'.$to_year.'"/>';
echo '<input type="hidden" id="com_grph_sel_district" value="'.$district.'"/>';
echo '<input type="hidden" id="com_grph_sel_upazila" value="'.$upzila.'"/>';
?>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script type="text/javascript" src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>

<div class="row-fluid">
	<button type="button" class="btn btn-small btn-success" style="float: right;" onclick="download_gwt_daily_yearly_com_graph()">
	<i class="icon-download"></i> Graph</button>	
	<canvas id='gw_daily_com_curve_chart'></canvas>                 
</div>

<script type="text/javascript">
show_gwt_daily_yearly_com_graph();
</script>