 <!-- Content Header (Page header) -->
 <style type="text/css">
   .info {
    color: #666;
    font-style: italic;
   }

   .required {
    color: #E62020
   }
 </style>
      <section class="content-header">
        <h1>
          Wizzard setup 
          <small></small>
        </h1>
        <ol class="breadcrumb">
          <li><a href="#"><i class="fa fa-dashboard"></i> Wizzard</a></li>
          <li class="">Setup</li>
          <li class="active">Configuration Setup</li>
        </ol>
      </section>

      <!-- Main content -->
      <section class="content">
        <div class="box box-warning">
        

          <div class="box-body">

          <div class="box box-widget widget-user-2">
            <!-- Add the bg color to the header using any of the bg-* classes -->
            <div class="widget-user-header bg-yellow">
              <div class="widget-user-image">
                <img class="img-circle" src="<?= BASE_ASSET . 'img/settings.jpg'; ?>" alt="User Avatar">
              </div>
              <!-- /.widget-user-image -->
              <h3 class="widget-user-username">System Configuration</h3>
            </div>
          </div>
          <!-- /.widget-user -->

          <?php if (isset($error) AND !empty($error)): ?>
            <div class="callout callout-danger">
              <h4>Warning!</h4>
              <p><?= $error; ?></p>
            </div>
          <?php endif; ?>
              <?= form_open('', [
                'class'   => 'form-horizontal', 
                'method'  => 'POST'
              ]); ?>
              <div class="form-group <?= form_error('permitted_uri_chars') ? 'has-error' :''; ?>">
                  <label for="permitted_uri_chars" class="col-md-3 control-label">Permitted Uri Chars <i class="required">*</i></label>

                  <div class="col-sm-6">
                    <input type="text" class="form-control" name="permitted_uri_chars" id="permitted_uri_chars" placeholder="Permitted Uri Chars" value="<?= set_value('permitted_uri_chars', $this->config->item('permitted_uri_chars')); ?>">
                    <small class="info help-block">The configured value is actually a regular expression character group and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i</small>
                  </div>
              </div>
              <div class="form-group">
                  <label for="url_suffix" class="col-md-3 control-label">URL Suffix</label>

                  <div class="col-sm-9">
                    <div class="input-group col-sm-3">
                      <input type="text" class="form-control" name="url_suffix" id="url_suffix" placeholder="URL Suffix" value="<?= set_value('url_suffix', $this->config->item('url_suffix')); ?>">
                      </div>
                      <small class="info help-block">
                         This option allows you to add a suffix to all URLs generated by CodeIgniter.
                         <br> Example : http://example.com/blog/article-1<b>.html</b>
                      </small>
                  </div>
              </div>
              <div class="form-group <?= form_error('encryption_key') ? 'has-error' :''; ?>">
                  <label for="encryption_key" class="col-md-3 control-label">Encryption Key <i class="required">*</i></label>

                  <div class="col-sm-6">
                    <input type="text" class="form-control" name="encryption_key" id="encryption_key" placeholder="Encryption Key" value="<?= set_value('encryption_key', str_shuffle(md5(time()).'*&*^%$#@')); ?>">
                     <small class="info help-block">
                       If you use the Encryption class, you must set an encryption key.
                    </small>
                  </div>
              </div>
              <div class="form-group <?= form_error('sess_expiration') ? 'has-error' :''; ?>">
                  <label for="sess_expiration" class="col-md-3 control-label">Session Expiration <i class="required">*</i></label>
                  <div class="col-sm-9">
                  <div class="input-group col-sm-6">
                    <div class="row">
                      <div class="col-md-8 ">
                        <select class="form-control" name="sess_expiration" id="sess_expiration">
                          <?php foreach ($times as $time): ?>
                            <option value="<?= $time['value']; ?>" <?= $time['value'] == $this->config->item('sess_expiration') ? 'selected' : ''; ?>><?= $time['label']; ?></option>
                          <?php endforeach; ?>
                        </select>
                      </div>
                    </div>
                    </div>
                     <small class="info help-block">
                       The number of SECONDS you want the session to last.
                       <br>Setting to 0 (zero) means expire when the browser is closed.
                    </small>
                  </div>
              </div>
              <div class="form-group <?= form_error('sess_time_to_update') ? 'has-error' :''; ?>">
                  <label for="sess_time_to_update" class="col-md-3 control-label">Session Time to Update <i class="required">*</i></label>
                  <div class="col-sm-9">
                  <div class="input-group col-sm-6">
                    <div class="row">
                      <div class="col-md-8 ">
                        <select class="form-control" name="sess_time_to_update" id="sess_time_to_update">
                          <?php foreach ($times as $time): ?>
                            <option value="<?= $time['value']; ?>" <?= $time['value'] == $this->config->item('sess_time_to_update') ? 'selected' : ''; ?>><?= $time['label']; ?></option>
                          <?php endforeach; ?>
                        </select>
                      </div>
                    </div>

                  </div>
                     <small class="info help-block">
                       How many seconds between CI regenerating the session ID.
                    </small>
                  </div>
              </div>

              <div class="form-group <?= form_error('global_xss_filtering') ? 'has-error' :''; ?>">
                  <label for="global_xss_filtering" class="col-md-3 control-label">Global XSS Filtering <i class="required">*</i></label>
                  <div class="col-sm-6">
                  <div class="col-md-4 input-group">
                    <select class="form-control" name="global_xss_filtering" id="global_xss_filtering" placeholder="Global XSS Filtering">
                    <?php
                    $global_xss_filtering = $this->config->item('global_xss_filtering');
                    ?>
                      <option value="TRUE" <?= $global_xss_filtering == TRUE ? 'selected' :'' ; ?>>YES</option>
                      <option value="FALSE" <?= $global_xss_filtering == FALSE ? 'selected' :'' ; ?>>NO</option>
                    </select>
                  </div>
                     <small class="info help-block">
                      Determines whether the XSS filter is always active when GET, POST or COOKIE data is encountered
                    </small>
                  </div>
              </div>
              <hr>
              <div class="col-md-2" style="padding-left: 0px !important; ">
              <a class="btn bg-green margin btn-lg btn-block pull-left" href="<?= BASE_URL . 'wizzard/setup/1'; ?>" >Back</a>
              </div>
              <div class="col-md-8">
                <center>
                    <div class="step">
                      <div class="line">
                        <div class="round-step success"></div>
                        <div class="round-step" style="margin-left: 100px !important"></div>
                        <div class="round-step" style="margin-left: 200px !important"></div>
                      </div>
                    </div>
                  </center>
              </div>
              <div class="col-md-2" style="padding-left: 0px !important; ">
                <input type="submit" class="btn bg-green margin btn-lg btn-block" value="Next" >
              </div>

          </div>
          <!-- /.box-body -->
        </div>
        <!-- /.box -->
          <?= form_close(); ?>
      </section>
      <!-- /.content -->