<?php include("../connection.php");
include("../user.php");
$cur_date=date('Y-m-d H:i:s');
$user=$_SESSION['user'];
$branch=$_SESSION['division_name']; ?>
<!doctype html>
 <html class="no-js" lang=""> 
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo TITLE;?></title>
    <meta name="description" content="Ela Admin - HTML5 Admin Template">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="apple-touch-icon" href="../images/bluebase.png">
    <link rel="shortcut icon" href="../images/bluebase.png">
   <style>
	input
		{
			text-transform:uppercase;	
		}
		textarea
		{
			text-transform:uppercase;	
		}
		.measurement-input {
            display: none;
        }
	</style>
	
    <script>
       function showMeasurementInput(value) {
        // Hide all measurement inputs
        document.getElementById('kg-input').style.display = 'none';
        document.getElementById('meter-input').style.display = 'none';
        document.getElementById('unit-input').style.display = 'none';

        // Show the relevant input based on selection
        if (value === 'kg') {
            document.getElementById('kg-input').style.display = 'block';
        } else if (value === 'meter') {
            document.getElementById('meter-input').style.display = 'block';
        } else if (value === 'unit') {
            document.getElementById('unit-input').style.display = 'block';
        }
    }
    </script>
</head>
<body>
  
		<div class="col-lg-8">
	<div class="card">
		<div class="card-header">
		<strong>Store Creation</strong>
			<a href="branch_master_view.php"><button class="btn btn-primary" style="width:50px;margin-left:400px;"onclick=""><i class="fa fa-backward"></i></button></a>			
		</div>
	<div class="card-body card-block">
	<form  method="post" enctype="multipart/form-data" class="form-horizontal" action="branch_submit.php">
		<div class="row form-group">
		<div class="col col-md-3"><label for="text-input" class=" form-control-label">Store Name</label><span style="color:red;">*</span></div>
		<div class="col-12 col-md-9"><input type="text" id="branch_name" name="branch_name" placeholder="Enter Branch Name" class="form-control" autocomplete="off" onchange="branchval(this.value)"></div>
		</div>
        <div class="row form-group">
		<div class="col col-md-3"><label for="text-input" class=" form-control-label">Division</label><span style="color:red;">*</span></div>
		<div class="col-12 col-md-9"><input type="text" id="division" name="division" placeholder="Enter Division" class="form-control" autocomplete="off" ></div>
		</div>
        <div class="row form-group">
            <div class="col col-md-3"><label for="text-input" class=" form-control-label">Tower</label><span style="color:red;">*</span></div>
		    <div class="col-12 col-md-9">
		        <select id="tower" name="tower" placeholder="SELECT TOWER" class="form-control select-search" autocomplete="off" >
					<option value="" selected disabled>SELECT TOWER</option>
					<?php
					$brn = mysqli_query($con, "SELECT id,location FROM location_master where  status='0' order by location asc");
					while ($brc = mysqli_fetch_array($brn)) {
					?>
						<option value="<?php echo $brc['id']; ?>"><?php echo strtoupper($brc['location']); ?></option>
					<?php
					}
					?>
				</select>
			</div>
		</div>
		<!--<div class="row form-group">-->
		<!--<div class="col col-md-3"><label for="text-input" class=" form-control-label">Room Name/No</label><span style="color:red;">*</span></div>-->
		<!--<div class="col-12 col-md-9"><input type="text" id="room_name" name="room_name" placeholder="Enter Room Name" class="form-control" autocomplete="off" required></div>-->
		<!--</div>-->

		<!--<div class="row form-group">-->
		<!--<div class="col col-md-3"><label for="text-input" class=" form-control-label">Shelf Name/No</label><span style="color:red;">*</span></div>-->
		<!--<div class="col-12 col-md-9"><input type="text" id="shelf_name" name="shelf_name" placeholder="Enter Shelf Name" class="form-control" autocomplete="off" required></div>-->
		<!--</div>-->

		<!--<div class="row form-group">-->
		<!--<div class="col col-md-3"><label for="text-input" class=" form-control-label">Rack Name/No</label><span style="color:red;">*</span></div>-->
		<!--<div class="col-12 col-md-9"><input type="text" id="rack_name" name="rack_name" placeholder="Enter Rack Name" class="form-control" autocomplete="off" required></div>-->
		<!--</div>-->

		<!--<div class="row form-group">-->
		<!--<div class="col col-md-3"><label for="text-input" class=" form-control-label">Item Name</label><span style="color:red;">*</span></div>-->
		<!--<div class="col-12 col-md-9"><input type="text" id="item_name" name="item_name" placeholder="Enter Item Name" class="form-control" autocomplete="off" required></div>-->
		<!--</div>-->

		<!--<div class="row form-group">-->
  <!--                      <div class="col col-md-3">-->
  <!--                          <label for="measurement-type" class="form-control-label">Measurement Type</label>-->
  <!--                          <span style="color:red;">*</span>-->
  <!--                      </div>-->
  <!--                      <div class="col-12 col-md-9">-->
  <!--                          <select id="measurement-type" name="measurement_type" class="form-control" onchange="showMeasurementInput(this.value)" required>-->
  <!--                              <option value="">Select Measurement Type</option>-->
  <!--                              <option value="kg">Kilogram (kg)</option>-->
  <!--                              <option value="meter">Meter (m)</option>-->
  <!--                              <option value="unit">Unit</option>-->
  <!--                          </select>-->
  <!--                      </div>-->
  <!--                  </div>-->


		<!--			<div class="row form-group measurement-input" id="kg-input">-->
  <!--                      <div class="col col-md-3">-->
  <!--                          <label for="kg" class="form-control-label">Kilogram (kg)</label>-->
  <!--                      </div>-->
  <!--                      <div class="col-12 col-md-9">-->
  <!--                          <input type="text" id="kg" name="measurement" placeholder="Enter weight in kg" class="form-control" autocomplete="off">-->
  <!--                      </div>-->
  <!--                  </div>-->
  <!--                  <div class="row form-group measurement-input" id="meter-input">-->
  <!--                      <div class="col col-md-3">-->
  <!--                          <label for="meter" class="form-control-label">Meter (m)</label>-->
  <!--                      </div>-->
  <!--                      <div class="col-12 col-md-9">-->
  <!--                          <input type="text" id="meter" name="measurement" placeholder="Enter length in meters" class="form-control" autocomplete="off">-->
  <!--                      </div>-->
  <!--                  </div>-->
  <!--                  <div class="row form-group measurement-input" id="unit-input">-->
  <!--                      <div class="col col-md-3">-->
  <!--                          <label for="unit" class="form-control-label">Unit</label>-->
  <!--                      </div>-->
  <!--                      <div class="col-12 col-md-9">-->
  <!--                          <input type="text" id="unit" name="measurement" placeholder="Enter units" class="form-control" autocomplete="off">-->
  <!--                      </div>-->
  <!--                  </div>-->

		

		<div style="">
		<button type="submit" name="submit" class="btn btn-success" ><i class="fa fa-dot-circle-o"></i> Submit</button>
		
		</div>
	</form>
	</div>
	</div>
    <div class="clearfix"></div>

    <footer class="site-footer">
        
    </footer>

</div><!-- /#right-panel -->
    <script>
        // Initialize Select2
        $(document).ready(function() {
            $('.select-search').select2({
                placeholder: "-- SELECT --",  // Optional placeholder text
                allowClear: true                // Optional: allows clearing the selection
            });
        });
    </script>
</body>
</html>


