MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/apoorvaleasingfinance/Admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/apoorvaleasingfinance/Admin/details_edit.php
<?php
session_start();
$se = $_SESSION["id"];
if (!isset($_SESSION['id'])) {
    header("Location: login.php");
}
include("Includes/db.php");

$bid  = $_GET['id'];

  $sql = "select * from tbl_details where id='$bid'";
  $sql_res = mysqli_query($con, $sql) or die(mysqli_error($con));
  $sql_row = mysqli_fetch_assoc($sql_res);
  $fe_img = $sql_row['img1'];
  $fe_img1 = $sql_row['img2'];

      $shaps = $sql_row['sadd'];

              $shapse = explode(",", $shaps);
?>

<!doctype html>
<html lang="en">
<head>
        
     <?php include 'Includes/head.php'; ?>

    </head>

    <body data-sidebar="dark">

    <!-- <body data-layout="horizontal" data-topbar="dark"> -->

        <!-- Begin page -->
        <div id="layout-wrapper">

            
            <?php include 'Includes/header.php'; ?>

            <!-- ========== Left Sidebar Start ========== -->
            <div class="vertical-menu">

                <div data-simplebar class="h-100">

                    <!--- Sidemenu -->
                   <?php include 'Includes/sidebar.php'; ?>
                    <!-- Sidebar -->
                </div>
            </div>
            <!-- Left Sidebar End -->

            

            <!-- ============================================================== -->
            <!-- Start right Content here -->
            <!-- ============================================================== -->
            <div class="main-content">

                <div class="page-content">
                    <div class="container-fluid">

                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                                    <h4 class="mb-sm-0 font-size-18">Edit Details</h4>

                                  

                                </div>
                            </div>
                        </div>
                        <!-- end page title -->

                       <div class="row">
                    
                        <div class="card">
                            <div class="card-body">
                                <h4 class="card-title"></h4>
                               
                                <form class="needs-validation" method="POST" action="action/edit_details.php?id=<?php echo $bid; ?>" enctype="multipart/form-data">
                                    <div class="row">
                                        <div class="col-md-6">
                                        <div class="mb-3">
                                            <label for="validationCustom01" class="form-label"> category </label>
                                             <select class="form-select" id="cat" name="cat">

                                        <option value="">Choose</option>
                                                                <?php
                                                        $new_qu = "select * from tbl_categories";
                                                        $new_res = mysqli_query($con, $new_qu) or die(mysqli_error($con));

                                                        while ($new_row = mysqli_fetch_assoc($new_res)) { ?>
                                                            <?php if ($new_row['id'] == $sql_row['cat']) { ?>
                                                                <option value="<?php echo $new_row['id']; ?>" selected><?php echo $new_row['name']; ?></option>
                                                            <?php } else { ?>
                                                                <option value="<?php echo $new_row['id']; ?>"><?php echo $new_row['name']; ?></option>
                                                            <?php } ?>
                                                        <?php } ?>

                                      </select>
                                                
                                                
                                            </div>
                                        </div>
                                        
                                        <div class="col-md-6">
                                            <div class="mb-3">
                                                <label for="validationCustom01" class="form-label"> Name </label>
                                                <input type="text"  class="form-control "  name="name" id="name"  value="<?php echo $sql_row['name']; ?>">
                                               
                                              
                                                
                                            </div>
                                        </div>
                                        
                                        <div class="col-md-6">
                                            <div class="mb-3">
                                                <label for="validationCustom01" class="form-label"> Short Description </label>
                                                 <textarea class="form-control "  name="desc1" id="desc" ><?php echo $sql_row['desc1']; ?></textarea>
                                               
                                              
                                                
                                            </div>
                                        </div>
                                        

                                        <div class="col-md-6">
                                            <div class="mb-3">
                                                <label for="validationCustom01" class="form-label"> Image</label>
                                               <input type="file" name="do_photo" class="form-control "  id="images" onchange="readThumb(this, 'thumb-error')" class="" accept="image/*">
                                        <img id="thumb" src="details/<?php echo $fe_img; ?>" alt=""  style="width: 100px;height: 100px;">
                                        <div id="thumb-error" style="color: red; margin: 10px 0px 0 10px; display: none;">
                                         Please upload file having extensions .jpeg / .jpg / .png only.</div>
                                                </div>
                                                
                                            </div>

                                        <div class="col-md-12">
                                            <div class="mb-3">
                                            <label for="validationCustom01" class="form-label"> Description </label>
                                             <textarea class="form-control "  name="desc2" id="option_text_1" ><?php echo $sql_row['desc2']; ?></textarea>
                                                
                                                
                                            </div>
                                        </div>
                                        
                                        <div class="col-md-6">
                                            <div class="mb-3">
                                                <label for="validationCustom01" class="form-label"> Description 1  </label>
                                                 <textarea class="form-control "  name="desc3" id="option_text_2" ><?php echo $sql_row['desc3']; ?></textarea>
                                               
                                              
                                                
                                            </div>
                                        </div>
                                        

                                        <div class="col-md-6">
                                            <div class="mb-3">
                                                <label for="validationCustom01" class="form-label"> Image</label>
                                               <input type="file" name="do_photo1" class="form-control "  id="images" onchange="readThumb(this, 'thumb-error')" class="" accept="image/*">
                                        <img id="thumb" src="details/<?php echo $fe_img1; ?>" alt=""  style="width: 100px;height: 100px;">
                                        <div id="thumb-error" style="color: red; margin: 10px 0px 0 10px; display: none;">
                                         Please upload file having extensions .jpeg / .jpg / .png only.</div>
                                                </div>
                                                
                                            </div>
                                            
                                            <div class="col-md-12">
                                            <div class="mb-3">
                                            <label for="validationCustom01" class="form-label"> Last Description </label>
                                             <textarea class="form-control "  name="desc4" id="option_text_3" ><?php echo $sql_row['desc4']; ?></textarea>
                                                
                                                
                                            </div>
                                        </div>

                                        
                                    </div>


                                   



                                        
                                    </div>

                                    </div>

                                    

                                    
                                    
                                   
                                    
                                  
                                     
                                        
                                    </div>

                                  
           
                                    
                                    <div>
                                        <button class="btn btn-primary" type="submit">Submit </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- end card -->
                     <!-- end col -->

                   
                </div>
                        <!-- end row -->

                       
                        <!-- end row -->

                       
                        <!-- end row -->
                    </div>
                    <!-- container-fluid -->
                </div>
                <!-- End Page-content -->

                

                <footer class="footer">
                     <?php include 'Includes/footer.php'; ?>
                </footer>
            </div>
            <!-- end main content-->

        </div>
        <!-- END layout-wrapper -->

        <!-- Right Sidebar -->
        
        <!-- /Right-bar -->

        <!-- Right bar overlay-->
        <div class="rightbar-overlay"></div>

     
        <?php include 'Includes/bscript.php'; ?>
    </body>
   <script type="text/javascript" src="ckeditor/ckeditor.js"></script>

 <script>
CKEDITOR.replace('option_text_1');
CKEDITOR.replace('option_text_2');
CKEDITOR.replace('option_text_3');
</script>
</html>

MMCT - 2023