<?php 
include('inc/header.php');
include('inc/sidebar.php');
$manage_page = new website();
@$edit_id = (int)$_GET['id'];

if(isset($_POST['submit']) && $edit_id!=0)
{
    $manage_page->update_setup($_POST,$edit_id);
}
if($edit_id!=0)
{
    $get_category_info = $manage_page->fetch_rows("tbl_enquiry","where id=$edit_id");

    
} 

?>
   <div class="container">


 <div class="row">
                        <div class="col-xl-7 mx-auto">

                            <h6 class="mb-0 text-uppercase">Blog Form</h6>
                            <hr/>
                
                 <div class="card-body">
                        <form method="post" enctype="multipart/form-data">
                            <div class="row"> 
                            
                            <div class="col-md-12">
                                    <div class="form-group">
                                        <label> Name *</label>
                                        <input type="email" class="form-control" placeholder="Email Id" required  value="<?=$get_category_info['name']?>" readonly>

                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>
                            
                              <div class="col-md-12">
                                    <div class="form-group">
                                        <label>Email *</label>
                                        <input type="email" class="form-control" placeholder="Email Id" required value="<?=$get_category_info['email']?>" readonly>

                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>

                             
                                
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>Mobile No*</label>
                                        <input name="mobile" id="mobile_no" placeholder="Mobile No" type="text" class="form-control" required=""  value="<?=$get_category_info['mobile']?>" readonly>
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div> 
                                
                                  <div class="col-md-12">
                                    <div class="form-group">
                                        <label>Class*</label>
                                        <input name="class" id="Class" placeholder="Class" type="text" class="form-control" required=""  value="<?=$get_category_info['class']?>" readonly>
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div> 
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>Description</label>
                                        <textarea type="text" class="form-control" readonly="" placeholder="Address Here"><?=$get_category_info['message']?></textarea>
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>  
                                                           
                              
                              
                                                            
                            </div>                            
                           

                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- Page end  -->
    </div>
      </div>
    </div>
    <script type="text/javascript">

    CKEDITOR.replace('editor', {
        filebrowserUploadUrl: 'ck_upload.php',
        filebrowserUploadMethod: 'form'
    });
    /*CKEDITOR.replace('editor2', {
        filebrowserUploadUrl: 'ck_upload.php',
        filebrowserUploadMethod: 'form'
    });
    */
    $('#category_name').on('input',function(){
           var cat = $('#category_name').val();
           var cat = cat.replace(/ /gi,"-");
           $('#cat_url').val(cat.toLowerCase());
    });

    </script>
   <?php
    include('inc/footer.php'); ?>