                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box page-title-box-alt">
                                    <h4 class="page-title">  <?php if(isset($PackageData)){ ?>  Edit <?php } else {  ?> Add  <?php }   ?> Credit Package</h4>
                                    <div class="page-title-right">
                                        <ol class="breadcrumb m-0">
                                            <!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Minton</a></li>
                                            <li class="breadcrumb-item"><a href="javascript: void(0);">Forms</a></li>
                                            <li class="breadcrumb-item active">Advanced</li> -->
                                        </ol>
                                    </div>
                                </div>
                            </div>
                        </div>     
                        <!-- end page title --> 

                     


                        <div class="row">
                            <div class="col-12">
                            <div class="card">
                                    <div class="card-body">
                                      
                                        <form role="form" class="parsley-examples" method="post" 
                                        <?php if(isset($PackageData)){ ?>
                                            action="<?= base_url()."credits_pack_edit"; ?>"
                                        <?php } else {  ?>   action="<?= base_url()."credits_pack_add"; ?>" <?php }   ?> 
                                         />
                                        <?php if(isset($PackageData)){ ?>
                                            <input type="hidden" required   name="id" value="<?= $PackageData[0]['id']; ?>" >
                                        <?php } ?>
                                       
                                         

                                         
                     
                                        <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Package Name<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text" required  class="form-control"  name="package_name" value="<?php if(isset($PackageData)){echo $PackageData[0]['package_name'];} ?>" placeholder="Package Name">
                                                </div>
                                            </div>

                                            <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Package Type<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text" required  class="form-control" name="package_type" value="<?php if(isset($PackageData)){echo $PackageData[0]['package_type'];} ?>" placeholder="Package Type">
                                                </div>
                                            </div>

                                            <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Credit Points<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0');" required  class="form-control"  name="credit" value="<?php if(isset($PackageData)){echo $PackageData[0]['credit'];} ?>" placeholder="Credit Points">
                                                </div>
                                            </div>

                                            <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Cost<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0');" required  class="form-control"  name="cost" value="<?php if(isset($PackageData)){echo $PackageData[0]['cost'];} ?>" placeholder="Cost">
                                                </div>
                                            </div>

                                            <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Description<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text"  required  class="form-control"  name="discription" value="<?php if(isset($PackageData)){echo $PackageData[0]['discription'];} ?>" placeholder="Description">
                                                </div>
                                            </div>

                                            <div class="form-group row">
                                                <label for="inputEmail3" class="col-4 col-form-label">Offer Label<span class="text-danger">*</span></label>
                                                <div class="col-7">
                                                    <input type="text"  required  class="form-control"  name="offer_label" value="<?php if(isset($PackageData)){echo $PackageData[0]['offer_label'];} ?>" placeholder="Offer Label">
                                                </div>
                                            </div>

                                           
                                           
                                            <div class="form-group row">
                                                <div class="col-8 offset-4">
                                                    <button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
                                                    <?php if(isset($PackageData)){ ?>  Update <?php } else {  ?> Save  <?php }   ?>
                                                    </button>
                                                    <button type="reset" onclick="history.back()"
                                                            class="btn btn-secondary waves-effect">
                                                        Cancel
                                                    </button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div> <!-- end card-box -->
                              
                            </div> <!-- end col-->
                        </div> 
                        <!-- end row-->


                     