<div class="breadcrumbs">
    <div class="breadcrumbs-inner">
        <div class="row m-0">
            <div class="col-sm-4">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><?= $pTitle ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li><a href="<?= base_url() ?>">Dashboard</a></li>
                            <li><a ><?= $menu ?></a></li>
                            <li class="active"><?= $smenu ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- PAGE-INDEX-ENDS -->
<!-- PAGE-CONTENT-STARTS -->

<div class="content">
    <div class="animated fadeIn">

        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header">
                        <strong class="card-title"> <?= $smenu ?></strong>
                    </div>
                    <div class="card-body">
                        <!-- Credit Card -->
                        <div id="pay-invoice">
                           <?php 
            $url = (!isset($ads_id)||empty($ads_id))
            ?'Ads/create_Ads':'Ads/edit_Ads/'.$ads_id;
            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 } ?>
           <form role="form"  action="<?= base_url($url) ?>" method="post" class="validate"  data-parsley-validate="" enctype="multipart/form-data">
                                   
                                   
                                    <div class="row">
                                        <div class="col-12">
                                            <div class="form-group">
                                              <label for="x_card_code" class="control-label mb-1">Title</label>
                                            
                                              
                                                <input name="title" type="tel" placeholder="Title" class="form-control required" value="<?= (isset($adsData->title))?$adsData->title:'' ?>" data-parsley-minlength="2" data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$"  autocomplete="off">
                                               <span class="help-block" data-valmsg-for="cc-exp" data-valmsg-replace="true"></span>
                                            </div>
                                        </div>
                                        <?php $req = (!isset($ads_id)||empty($ads_id))
                  ?'form-control required':'form-control';?>
                                        <div class="col-6">
                                             <div class="form-group">
                                               <label>Ads Picture</label><br>
                        <img id="image_id_1" src="<?= (isset($adsData->ads_pic))?base_url($adsData->ads_pic):'' ?>" onerror="this.src='<?=base_url("assets/images/no_image.png")?>';" height="375" width="575" />
                        <input name="ads_pic" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="<?= base_url($req) ?>"/>
                    
                                            </div>
                                        </div>
                                    </div>
                                    <div>
                                        
                                    
                                    <div>
                    <div class="form-group">
                      <div class="row">
                        <div class="col-md-12">
                          <button type="submit" class="btn btn-primary">
                            <i class="fa fa-dot-circle-o"></i> Submit
                          </button>
                        </div>
                    </div>
                  </div>  
                                    </div>
                                </form>
                            </div>
                        </div>

                    </div>
                </div>
                <!-- .card -->

            </div>
            <!--/.col-->

     

<!-- PAGE-CONTENT-ENDS -->