<?php
	session_start();
	$user_id=$_SESSION['LOGIN_USERID'];
	extract($_REQUEST);
	include("../../php_crud/my_class.php");
	$obj = new my_class();
	// if ($_SESSION['add'] == 'Y') {
?>
<div class="row-fluid" id="">
    <form action="" id="stationForm" method="post">    
		<div class="row-fluid">
			<div class="row-fluid">
				<legend>STATION INFORMATION</legend> 	
			</div>
			<div class="row-fluid">
				<div class="span4">
					<div class="control-group">
						<label class="control-label" for="form-field-1"><b>Zone <font color="#FF0000">*</font></b></label>
						<div class="controls">
							<select class="form_control" name="zone_code" id="zone_code">
								<option value="">Select Zone</option>
								<?php
									$table_name = "AQUATIC.TBLGWH_ZONEINFO@aquatic227";
									$where_cond = "FLAG='A' ORDER BY ZONENAME ASC";
									$row = $obj->View_all_data_row_column_By_Cond($table_name,' * ',$where_cond);
									foreach($row AS $index=>$value){?>
										<option value="<?php echo $value['ID']; ?>"><?php echo $value['ZONENAME'];?></option>
									<?php }
								?>
							</select>
						</div> 
					</div>
				</div>
				<div class="span4">	
					<div class="control-group">
						<label class="control-label" for="form-field-1"><b>Division <font color="#FF0000">*</font></b></label>
						<div class="controls">
							<select class="form_control" name="division_code" id="division_code" onchange="load_sub_div(this.value)">
								<option value="">Select Division</option>
								<?php
									$table_name = "AQUATIC.TBLGWH_DIVISIONINFO@aquatic227";
									$where_cond = "FLAG='A' ORDER BY DIVISIONNAME ASC";
									$row = $obj->View_all_data_row_column_By_Cond($table_name,' * ',$where_cond);
									foreach($row AS $index=>$value){?>
										<option value="<?php echo $value['ID']; ?>"><?php echo $value['DIVISIONNAME'];?></option>
									<?php }
								?>
							</select>
						</div> 
					</div>
				</div>
				<div class="span4">	
					<div class="control-group">
						<label class="control-label" for="form-field-1"><b>Sub Division <font color="#FF0000">*</font></b></label>
						<div class="controls" id="sub_div_code_holder">
							<select class="form_control">
								<option value="">---</option>
							</select>
						</div> 
					</div>
				</div>
				
			</div>
			<div class="row-fluid">
				<div class="span4">
					<div class="control-group">
						<label class="control-label" for="form-field-1"><b>District <font color="#FF0000">*</font></b></label>
						<div class="controls" id="sub_dist_code_holder">
							<select class="form_control">
								<option value="">---</option>
							</select>
						</div> 
					</div>
				</div>
				<div class="span4">
					<div class="control-group">
						<label class="control-label" for="form-field-1"><b>Upazila <font color="#FF0000">*</font></b></label>
						<div class="controls" id="upz_code_holder">
							<select class="form_control">
								<option value="">---</option>
							</select>
						</div> 
					</div>
				</div>
				
			</div>
		</div>
		<div class="row-fluid">
			<div class="span4">	
				<div class="control-group">
					<label class="control-label" for="form-field-1">Station New Id<font color="#FF0000">*</font></label>
					<div class="controls">
						<input type="text" name="new_station_id" id="new_station_id" class="form-control" placeholder="Station New Id" value="">
					</div> 
				</div> 
				<div class="control-group">
					<label class="control-label" for="form-field-1">Station Name<font color="#FF0000">*</font></label>
					<div class="controls">
						<input type="text" name="name" id="name" class="form-control" placeholder="Station Name">
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Station Address<font color="#FF0000">*</font></label>
					<div class="controls">
						<textarea class="form-control" name="address" id="address" class="form-control" placeholder="Station Address"></textarea>
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Latitude<font color="#FF0000">*</font></label>
					<div class="controls">
						<input type="text" name="lattitude" id="lattitude" class="form-control" placeholder="Latitude">
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Longitude<font color="#FF0000">*</font>
					</label>

					<div class="controls">
						<input type="text" name="longitude" id="longitude" class="form-control" placeholder="Longitude">
					</div> 
				</div>
			</div>
			<div class="span4">	
				<div class="control-group">
					<label class="control-label" for="form-field-1">Station Old Id</label>
					<div class="controls">
						<input type="text" name="old_id" id="old_id" class="form-control" placeholder="Station Old Id">
					</div> 
				</div> 
				<div class="control-group">
					<label class="control-label" for="form-field-1">Geologist</label>
					<div class="controls">
						<input type="text" name="geologist" id="geologist" class="form-control" placeholder="Geologist">
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Contact No.</label>
					<div class="controls">
						<input type="text" name="contact_no" id="contact_no" class="form-control" placeholder="Contact No.">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Problem Type</label>
					<div class="controls">
						<select name="problem_type" id="problem_type" class="form-control">
							<option value=""> SELECT PROBLEM TYPE</option>
							<?php 
								$table_name =  "AQUATIC.TBLGWH_PROBLEMTYPE@aquatic227";
								$where_cond = " FLAG='A' ORDER BY  ID ASC";
								$row=$obj->View_all_data_row_column_By_Cond($table_name,' * ',$where_cond);
								$i = 1;
								foreach($row AS $index=>$val){ 
							?>
							<option name="" value="<?php echo $val['ID'];?>"><?php echo $val['PROBLEMTYPE']; ?></option>
						<?php } ?>
						</select>
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Remarks</label>
					<div class="controls">
						<textarea class="form-control" name="remarks" id="remarks" class="form-control" placeholder="Remarks"></textarea>
					</div> 
				</div>
			</div>
			<div class="span4">	
				<div class="control-group">
					<label class="control-label" for="form-field-1">Installation Date</label>
					<div class="controls">
						<input type="text" name="install_date" id="install_date" class="date-picker" data-date-format="dd-mm-yyyy" class="form-control" placeholder="Installation Date">
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Device Id Sl. No.</label>
					<div class="controls">
						<input type="text" name="dev_ins_id" id="dev_ins_id" class="form-control" placeholder="Device Id Sl. No.">
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Station Status</label>
					<div class="controls">
						<select name="status" id="status">
							<option value="1">Functioning</option>
							<option value="2">Non Functioning</option>
						</select>
					</div> 
				</div>
				<div class="control-group">
					<label class="control-label" for="form-field-1">Note</label>
					<div class="controls">
						<textarea class="form-control" name="note" id="note" class="form-control" placeholder="Note"></textarea>
					</div> 
				</div>
			</div>
		</div>
	</div>
			
			<div class="row-fluid">
				<div class="row-fluid">
					<legend>PARAMETER INFORMATION</legend> 	
				</div>
                <div class="row-fluid">
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Parameter Type</label>
							<div class="controls">
								<select class="form-control" name="parameter_type" id="parameter_type">
									<option value="wlt">WLT</option>
									<option value="wltc">WLTC</option>
									<option value="ptec">PTEC</option>
								</select>
							</div> 
						</div> 
						<div class="control-group">
							<label class="control-label" for="form-field-1">Sensor Depth(m)</label>
							<div class="controls">
								<input type="text" name="sensor_depth" id="sensor_depth" class="form-control" placeholder="Sensor Depth">
							</div> 
						</div>
						
						<div class="control-group">
							<label class="control-label" for="form-field-1">Parapet Height(m)</label>
							<div class="controls">
								<input type="text" name="parapet_height" id="parapet_height" class="form-control" placeholder="Parapet Height(m)">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Well Dia (inch)</label>

							<div class="controls">
								<input type="text" name="well_dia_inch" id="well_dia_inch" class="form-control" placeholder="Well Dia (inch)">
							</div> 
						</div> 
						<div class="control-group">
							<label class="control-label" for="form-field-1">Current Well Depth</label>
							<div class="controls">
								<input type="text" name="curr_well_depth" id="curr_well_depth" class="form-control" placeholder="Current Well Depth">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">Previous Well Depth</label>
							<div class="controls">
								<input type="text" name="prev_well_depth" id="prev_well_depth" class="form-control" placeholder="Previous Well Depth">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">GW Table From Top</label>
							<div class="controls">
								<input type="text" name="gw_table_top" id="gw_table_top" class="form-control" placeholder="Problem Type">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">RL To Top of The Pipe</label>
							<div class="controls">
								<input type="text" name="rl_top_pipe" id="rl_top_pipe" class="form-control" placeholder="RL To Top of The Pipe">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">Dest Sob To GWL</label>
							<div class="controls">
								<input type="text" name="dest_sob_gwl" id="dest_sob_gwl" class="form-control" placeholder="Device Id Sl. No.">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">RL Value</label>
							<div class="controls">
								<input type="text" name="rl_value" id="rl_value" class="form-control" placeholder="RL Value">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">Level Book No.</label>
							<div class="controls">
								<input type="text" name="level_book_no" id="level_book_no" class="form-control" placeholder="Level Book No.">
							</div> 
						</div>
					</div>
                </div>
            </div>
			
			<div class="row-fluid">
				<div class="row-fluid">
					<legend>MODEM INFORMATION</legend> 	
				</div>
                <div class="row-fluid">
					<div class="span4">
						<div class="control-group">
							<label class="control-label" for="form-field-1">OLE Time</label>
							<div class="controls">
								<input type="text" name="ole_time" id="ole_time" class="form-control" placeholder="OLE Time">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">OLE Day</label>
							<div class="controls">
								<input type="text" name="ole_day" id="ole_day" class="form-control" placeholder="OLE Day">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">Data Logger Id</label>
							<div class="controls">
								<input type="text" name="data_logger_id" id="data_logger_id" class="form-control" placeholder="Data Logger Id">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Modem Sim No.</label>

							<div class="controls">
								<input type="text" name="modem_sim_no" id="modem_sim_no" class="form-control" placeholder="Modem Sim No.">
							</div> 
						</div> 
						<div class="control-group">
							<label class="control-label" for="form-field-1">Mobile Operator</label>
							<div class="controls">
								<input type="text" name="mobile_operator" id="mobile_operator" class="form-control" placeholder="Mobile Operator">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Modem Id</label>
							<div class="controls">
								<textarea class="form-control" name="modem_id" id="modem_id" class="form-control" placeholder="Modem Id"></textarea>
							</div> 
						</div>
					</div>
                </div>
            </div>
			
			<div class="row-fluid">
				<div class="row-fluid">
					<legend>OBSERVER INFORMATION</legend> 	
				</div>
                <div class="row-fluid">
					<div class="span4">
						<div class="control-group">
							<label class="control-label" for="form-field-1">Observer Name
							</label>

							<div class="controls">
								<input type="text" name="observer_name" id="observer_name" class="form-control" placeholder="Observer Name">
							</div> 
						</div>
						<div class="control-group">
							<label class="control-label" for="form-field-1">Installation Engine
							</label>

							<div class="controls">
								<input type="text" name="installation_engine" id="installation_engine" class="form-control" placeholder="Installation Engine">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Contact
							</label>

							<div class="controls">
								<input type="text" name="obs_contact" id="obs_contact" class="form-control" placeholder="Mobile No.">
							</div> 
						</div> 
						<div class="control-group">
							<label class="control-label" for="form-field-1">Alternate Contact
							</label>

							<div class="controls">
								<input type="text" name="alternate_obs_contact" id="alternate_obs_contact" class="form-control" placeholder="Alternate Mobile No.">
							</div> 
						</div>
					</div>
					<div class="span4">	
						<div class="control-group">
							<label class="control-label" for="form-field-1">Address
							</label>

							<div class="controls">
								<textarea class="form-control" name="obs_address" id="obs_address" class="form-control" placeholder="Observer Address"></textarea>
							</div> 
						</div>
					</div>
                </div>
                
            </div>
		</form>
</div>
<!-- <?php // } ?>		 -->
<script>
	$('.date-picker').datepicker().next().on(ace.click_event, function(){
     	$(this).prev().focus();
    });	
</script>