<?php
session_start();
include 'session_check.php';
?>
	<head>
    <meta charset="UTF-8">
    <title>AdminLTE 2 | Dashboard</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- Bootstrap 3.3.2 -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />    
    <!-- FontAwesome 4.3.0 -->
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <!-- Ionicons 2.0.0 -->
    <link href="https://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/css" />    
    <!-- Theme style -->
    <link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- AdminLTE Skins. Choose a skin from the css/skins 
         folder instead of downloading all of them to reduce the load. -->
    <link href="dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
    <!-- iCheck -->
    <link href="plugins/iCheck/flat/blue.css" rel="stylesheet" type="text/css" />
    <!-- Morris chart -->
    <link href="plugins/morris/morris.css" rel="stylesheet" type="text/css" />
    <!-- jvectormap -->
    <link href="plugins/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
    <!-- Date Picker -->
    <link href="plugins/datepicker/datepicker3.css" rel="stylesheet" type="text/css" />
    <!-- Daterange picker -->
    <link href="plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
    <!-- bootstrap wysihtml5 - text editor -->
    <link href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />
	
	<!-----		sweet alert css and js link	---->
	<link rel="stylesheet" href="dist/sweetalert.css">
	<script src="dist/sweetalert.min.js"> </script>
   
   
	<link rel="stylesheet" type="text/css" href="custom/custom.css">
	
	<!---- Ck editor-->
	 <script src="ckeditor/ckeditor.js"></script>
	 
  </head>

<?php
include 'include/header.php';
include 'include/left-nav.php';
?>

      <?php


	  ?>
      <!-- Right side column. Contains the navbar and content of the page -->
      <div class="content-wrapper" style="min-height: 800px">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container">
            <?php
            $query="select * from company_details limit 1";
            $connection=mysqli_query($conn,$query);
            if(mysqli_num_rows($connection)>0)
            {
                while($rw=mysqli_fetch_array($connection))
                {
            ?>
                <form method="POST" action="company_details_edit_code.php">
                <input type="hidden" id="take_user_id2" name="take_user_id2" value="<?php echo $got_unique_id?>">
                <div class="well col-sm-6 col-sm-offset-3" style="margin-top: 20px">
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2 text-center">
                            <h3> Company Details Edit  </h3>
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="company_name" name="company_name" value="<?= $rw['company_name']; ?>" placeholder="Company name" required>
                            <span id="err_company_name" class="text-dengar"></span>
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="business_name" name="business_name" value="<?= $rw['business_name']; ?>" placeholder="Business name" required>
                            <span id="err_business_name" class="text-dengar"></span>
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="website_link" name="website_link" value="<?= $rw['website_link']; ?>" placeholder="Website link" required>
                            <span id="err_website_link" class="text-dengar"></span>
                        </div>
                    </div>
                     <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="prefix" name="prefix" maxlength="1" value="<?= substr($rw['default_admin_id'],0,1); ?>" placeholder="Enter one digit prefix character(ex: B)" required>
                            <span id="err_prefix" class="text-dengar"></span>
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="default_admin_id" maxlength="6" value="<?= $rw['default_admin_id']; ?>" name="default_admin_id" placeholder="Enter default admin id(with prefix)" required>
                            <span id="err_default_admin_id" class="text-dengar"></span>
                        </div>
                    </div>
                     <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="gst_number" name="gst_number"  value="<?= $rw['gst_number']; ?>" placeholder="GST number" required>
                            <span id="err_gst_number" class="text-dengar"></span>
                        </div>
                    </div>
                     <br>
                     <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="reg_number" name="reg_number"  value="<?= $rw['registration_number']; ?>" placeholder="Registration number" required>
                            <span id="err_reg_number" class="text-dengar"></span>
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="company_email" name="company_email"  value="<?= $rw['company_email']; ?>" placeholder="Company email" required>
                            <span id="err_company_email" class="text-dengar"></span>
                        </div>
                    </div>
                     <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="text" class="form-control" id="company_phone" name="company_phone"  value="<?= $rw['company_phone']; ?>" placeholder="Company phone number" required>
                            <span id="err_company_phone" class="text-dengar"></span>
                        </div>
                    </div>
                     <br>
                    <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <textarea class="form-control" name="company_addrress" rows="4" id="company_address" placeholder="Company address" required><?= $rw['company_address']; ?></textarea>
                            <span id="err_company_addrress" class="text-dengar"></span>
                        </div>
                    </div>
                    <br>
                     <div class="row">
                        <div class="col-sm-8 col-sm-offset-2">
                            <input type="submit" class="form-control" id="details_btn" name="details_btn" value="Save">
                        </div>
                    </div>
                </div>
               </form>
            <?php
                 }
            }
            
            ?>
            </div>
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->

	
		 <!-- jQuery 2.1.3 -->
    <script src="plugins/jQuery/jQuery-2.1.3.min.js"></script>
    <!------    custom js    -------->
    <script src="js/custom.js" type="text/javascript"></script>
    <!-- jQuery UI 1.11.2 -->
    <script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js" type="text/javascript"></script>
    <?php
    if($status=='Deactive')
    {
        include 'modal_show.php';
    }
    ?>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.2 JS -->
    <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>    
    <!-- Morris.js charts -->
   <!-- <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>-->
    <!---<script src="plugins/morris/morris.min.js" type="text/javascript"></script>-->
    <!-- Sparkline -->
    <script src="plugins/sparkline/jquery.sparkline.min.js" type="text/javascript"></script>
    <!-- jvectormap -->
    <script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js" type="text/javascript"></script>
    <script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js" type="text/javascript"></script>
    <!-- jQuery Knob Chart -->
    <script src="plugins/knob/jquery.knob.js" type="text/javascript"></script>
    <!-- daterangepicker -->
    <script src="plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
    <!-- datepicker -->
    <script src="plugins/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
    <!-- iCheck -->
    <script src="plugins/iCheck/icheck.min.js" type="text/javascript"></script>
    <!-- Slimscroll -->
    <script src="plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <!-- FastClick -->
    <script src='plugins/fastclick/fastclick.min.js'></script>
    <!-- AdminLTE App -->
    <script src="dist/js/app.min.js" type="text/javascript"></script>
    
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
   <!-- <script src="dist/js/pages/dashboard.js" type="text/javascript"></script>-->
	  
<?php
include 'include/footer.php';
?>