<?php
include_once 'header.php';

$obj=new Database();
$obj->select('organization','*',null,'id=1',null,null);
$result=$obj->getResult();                              
foreach($result as list("organization"=>$org,"email"=>$email,"website"=>$website,"address"=>$address,"mob_no"=>$mobile,"logo"=>$logo))
{
?>
<div class="page-wrapper">
        <!-- ============================================================== -->
        <!-- Bread crumb and right sidebar toggle -->
        <!-- ============================================================== -->
        <div class="page-breadcrumb">
          <div class="row">
            <div class="col-12 d-flex no-block align-items-center">
              <h4 class="page-title">Organization Details</h4>
              <div class="ms-auto text-end">
                <nav aria-label="breadcrumb">
                  <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="#">Dashboard</a></li>
                    <li class="breadcrumb-item active" aria-current="page">
                     Configuration
                    </li>
                  </ol>
                </nav>
              </div>
            </div>
          </div>
        </div>
        <!-- ============================================================== -->
        <!-- End Bread crumb and right sidebar toggle -->
   
        <!-- Container fluid  -->
        <!-- ============================================================== -->
        <div class="container-fluid row">
            <div class="col-md-12">
              <div class="card">
                <form class="form-horizontal" action="core/organization.php" method="post" enctype="multipart/form-data">
                  <div class="card-body">
                    <h4 class="card-title"></h4>
                    <div class="form-group row">
                      <label for="org" class="col-sm-3 text-end control-label col-form-label">
                        Organization Name</label>
                      <div class="col-sm-9">
                        <input type="text" class="form-control" name="org" value="<?php if(isset($org)){echo $org;}?>"/>
                      </div>
                    </div>
           
                    <div class="form-group row">
                      <label for="mobile"
                        class="col-sm-3 text-end control-label col-form-label">Contact No</label>
                      <div class="col-sm-9">
                        <input
                          type="text" class="form-control" name="mobile"
                          value="<?php if(isset($mobile)){echo $mobile;}?>"
                        />
                      </div>
                    </div>
                    <div class="form-group row">
                      <label
                        for="website"
                        class="col-sm-3 text-end control-label col-form-label">Website</label>
                      <div class="col-sm-9">
                        <input type="text" class="form-control" name="website"
                        value="<?php if(isset($website)){echo $website;}?>"/>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label for="email" class="col-sm-3 text-end control-label col-form-label"
                        >Email</label>
                      <div class="col-sm-9">
                        <input type="text" class="form-control"
                          name="email" value="<?php if(isset($email)){echo $email;}?>"/>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label for="address" class="col-sm-3 text-end control-label col-form-label">Address</label>
                      <div class="col-sm-9">
                        <input type="text" class="form-control" name="address" value="<?php if(isset($address)){echo $address;}?>"/>
                      </div>
                    </div>
                    <div class="form-group row">
                      <label for="file" class="col-sm-3 text-end control-label col-form-label">
                        Logo</label>
                      <div class="col-sm-5">
                        <input type="file" accept="image/png, image/gif, image/jpeg" value="<?php if(isset($logo)){echo $logo;}?>" class="form-control" name="file" placeholder="Logo here"/>
                      </div>
                      <div class="col-sm-4">
                        <img src="<?php if(($logo!=null)){echo 'images/'.$logo;}else{echo 'images/Default.jpg';}?>" class="form-control" id="logo" style="height:75px;width:125px;" object-fit: contain'>
                      </div>
                    </div>
              
                  <div class="border-top">
                    <div class="card-body">
                      <button type="submit" id="insert_data" class="btn btn-primary">
                        Save Configuration
                      </button>
                    </div>
                  </div>
                </form>
              </div>
      

      <?php
      }
      ?></div></div></div>
         <footer class="footer text-center">
          All Rights Reserved by ECI. Designed and Developed by
          <a href="https://www.ntlogix.in">NTLogix</a>.
        </footer>
       
   <!-- All Jquery -->
    <!-- ============================================================== -->
    <script src="../assets/libs/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap tether Core JavaScript -->
    <script src="../assets/libs/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <!-- slimscrollbar scrollbar JavaScript -->
    <script src="../assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
    <script src="../assets/extra-libs/sparkline/sparkline.js"></script>
    <!--Wave Effects -->
    <script src="../dist/js/waves.js"></script>
    <!--Menu sidebar -->
    <script src="../dist/js/sidebarmenu.js"></script>
    <!--Custom JavaScript -->
    <script src="../dist/js/custom.min.js"></script>
    <!-- this page js -->
    <script src="../assets/extra-libs/multicheck/datatable-checkbox-init.js"></script>
    <script src="../assets/extra-libs/multicheck/jquery.multicheck.js"></script>
    <script src="../assets/extra-libs/DataTables/datatables.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
   
  </body>
</html>