<div class="content-wrapper">
 <section class="content-header">
  <h1>
    <?= $page_title ?>
    <small><?= $page_desc ?></small>
  </h1>
  <ol class="breadcrumb">
   <li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
   <li><?= $menu ?></li>
   <li class="active"><?= $sub_menu ?></li>
 </ol>
</section>
<section class="content">
  <div class="row">
     <div class="col-md-12">
      <?php if($this->session->flashdata('message')) { 
        $flashdata = $this->session->flashdata('message'); ?>
        <div class="alert alert-<?= $flashdata['class'] ?>">
         <button class="close" data-dismiss="alert" type="button">×</button>
         <?= $flashdata['message'] ?>
       </div>
     <?php } ?>
   </div>
   <div class="col-md-12">
    <div class="box box-warning">
      <div class="box-header with-border">
        <div class="col-md-6">
          <h3 class="box-title">Edit Basic Site Details</h3>
        </div>
        <div class="col-md-6" align="right">
          <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
        </div>
      </div>
      <form method="post" class="validate" role="form" action="<?= base_url().'Settings/change_settings'?>" enctype="multipart/form-data" data-parsley-validate="">
        <div class="box-body">
          <div class="row">
          
            <div class="form-group col-xs-4">
              <label>Site Title</label>
              <input type="text" name="title" class="form-control required" placeholder="Enter Site Title" value="<?= $data['title'] ?>">
            </div>
             <div class="form-group col-xs-3">
              <label>Title Short</label>
              <input type="text" name="title_short" class="form-control required" placeholder="Enter Site Title" value="<?= $data['title_short'] ?>">
            </div>
            <div class="form-group col-xs-5">
                <label>Site Logo</label>
                <div class="col-md-12">
                  <div class="col-md-3">
                    <img id="site_logo" src="<?= base_url($data['site_logo']) ?>" onerror="this.src='<?=base_url("assets/images/no_image.png")?>';" height="75" width="75">
                  </div>
                  <div class="col-md-9" style="padding-top: 25px;">
                    <input name="site_logo" type="file" accept="image/*" onchange="setImg(this,'site_logo');" />
                  </div>
                </div>
            </div>
          </div>
          <div class="row">
            <div class="form-group col-xs-4">
              <label>Country Code</label>
              <input type="text" name="country_flag" class="form-control required" placeholder="Enter SMTP Username" value="<?= $data['country_flag'] ?>">
            </div>
            <div class="form-group col-xs-3">
              <label>Currency</label>
              <input type="text" name="currency" class="form-control required" placeholder="Enter SMTP Password" value="<?= $data['currency'] ?>">
            </div>
            
            <div class="form-group col-xs-5">
                <label>Favicon Icon</label>
                <div class="col-md-12">
                  <div class="col-md-3">
                    <img id="fav_icon_image" src="<?= base_url($data['fav_icon']) ?>" onerror="this.src='<?=base_url("assets/images/no_image.png")?>';" height="75" width="75">
                  </div>
                  <div class="col-md-9" style="padding-top: 25px;">
                    <input name="fav_icon" type="file" accept="image/*" onchange="setImg(this,'fav_icon_image');" />
                  </div>
                </div>
            </div>
          </div>
          <div class="row">
            <div class="form-group col-xs-4">
              <label>SMTP Username</label>
              <input type="text" name="smtp_username" class="form-control required" placeholder="Enter SMTP Username" value="<?= $data['smtp_username'] ?>">
            </div>
            <div class="form-group col-xs-3">
              <label>SMTP Password</label>
              <input type="text" name="smtp_password" class="form-control required" placeholder="Enter SMTP Password" value="<?= $data['smtp_password'] ?>">
            </div>
            <div class="form-group col-xs-4">
              <label>Google API Key</label>
              <input type="text" name="google_api_key" class="form-control required" placeholder="Enter Google API" value="<?= $data['google_api_key'] ?>">
            </div>
          </div>
          <div class="row">
            <div class="form-group col-xs-4">
              <label>Vin Audit API</label>
              <input type="text" name="vin_audit_api" class="form-control required" placeholder="Enter Vin Audit API" value="<?= $data['vin_audit_api'] ?>">
            </div>
            <div class="form-group col-xs-3">
              <label>Web Url</label>
              <input type="text" name="web_url" class="form-control required" placeholder="Enter Web Url" value="<?= $data['web_url'] ?>">
            </div>
          </div>
        </div>
        <div class="box-footer" style="padding-left:46%">
          <button type="submit" class="btn btn-info">Update</button>
        </div>
      </form>
    </div>
  </section>
</div>