D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
Filename :
about-us.php
back
Copy
<?php include('include/header.php'); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="container-full"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="d-flex align-items-center"> <div class="me-auto"> <h4 class="page-title">Edit About us</h4> </div> </div> </div> <!-- Main content --> <div class="row"> <div class="col-xl-12 dash-xl-100"> <div class="card "> <div class="card-body"> <?php $sql1 = "select * from about where id = '1'"; $query1 = mysqli_query($conn, $sql1); $row1 = mysqli_fetch_array($query1); ?> <div class="theme-form mega-form" > <div class="row"> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">Meta Title</label> <textarea class="form-control" type="text" value="" id="meta1"><?= $row1['meta1'];?></textarea> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">Meta Keyword</label> <textarea class="form-control" type="text" value="" id="meta2"><?= $row1['meta2'];?></textarea> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">Meta description</label> <textarea class="form-control" type="text" value="" id="meta3"><?= $row1['meta3'];?></textarea> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">Meta slug</label> <textarea class="form-control" type="text" value="" id="meta4"><?= $row1['meta4'];?></textarea> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">SEO Syntex</label> <textarea class="form-control" value="" id="pixcel"><?= $row1['pixcel'];?></textarea> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="col-form-label">Script</label> <textarea class="form-control" type="text" value="" id="script"><?= $row1['script'];?></textarea> </div> </div> <div class="col-3"> <div class="mb-3"> <label class="col-form-label">About Us Image</label> <input class="form-control" type="file" id="banner"> <input class="form-control" type="hidden" value="<?= $row1['banner'];?>" id="bannerold"> <div class="row"> <div class="col"> <img src="images/new/<?= $row1['banner'];?>" alt="zo-th-1" height="100"/> </div> </div> </div> </div> <div class="col-3"> <label class="col-form-label">Alt Banner</label> <input class="form-control" type="text" value="<?= $row1['altb'];?>" id="altb"> </div> </div> <div class="mb-3"> <label class="col-form-label">About us Content</label> <div id="editor1"><?= html_entity_decode($row1['description']);?></div> </div> <div class="mb-3"> <label class="col-form-label">Our Mission & Vission</label> <div id="editor3"><?= html_entity_decode($row1['mission']);?></div> </div> <div class="card-footer"> <input type="Submit" value="Update" id="update" class="btn btn-primary"> </div> </div> </div> </div> </div> </div> <!-- /.content --> </div> </div> <!-- /.content-wrapper --> <?php include('include/footer.php') ?> <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>--> <script src="https://cdn.ckeditor.com/ckeditor5/40.0.0/classic/ckeditor.js"></script> <script> let editor1; ClassicEditor .create( document.querySelector( '#editor1' ) ) .then( newEditor => { editor1 = newEditor; } ) .catch( error => { console.error( error ); } ); let editor3; ClassicEditor .create( document.querySelector( '#editor3' ) ) .then( newEditor => { editor3 = newEditor; } ) .catch( error => { console.error( error ); } ); $(document).ready(function(){ $("#Submit").click(function(){ var meta1 = $("#meta1").val(); var meta2 = $("#meta2").val(); var meta3 = $("#meta3").val(); var meta4 = $("#meta4").val(); var script = $("#script").val(); var pixcel = $("#pixcel").val(); var banner = $("#banner")[0].files[0]; const editordata1 = editor1.getData(); const editordata3 = editor3.getData(); var altb = $("#altb").val(); var fd = new FormData(); fd.append("meta1", meta1); fd.append("meta2", meta2); fd.append("meta3", meta3); fd.append("meta4", meta4); fd.append("script", script); fd.append("pixcel", pixcel); fd.append("banner", banner); fd.append("editordata1", editordata1); fd.append("editordata3", editordata3); fd.append("altb", altb); $.ajax({ url:"ajax/about-ajax.php", type:"POST", data:fd, dataType: 'json', contentType: false, processData: false, success:function(resp){ if(resp == 1){ alert('Good Job !'); location.reload(); }else{ alert('something Went Wrong!'); } } }) }); $("#update").click(function(){ var id = '<?= $id;?>'; var meta1 = $("#meta1").val(); var meta2 = $("#meta2").val(); var meta3 = $("#meta3").val(); var meta4 = $("#meta4").val(); var script = $("#script").val(); var pixcel = $("#pixcel").val(); var banner = $("#banner")[0].files[0]; var bannerold = $("#bannerold").val(); const editordata1 = editor1.getData(); const editordata3 = editor3.getData(); var altb = $("#altb").val(); console.log(bannerold); console.log(banner); var fd = new FormData(); fd.append("id", id); fd.append("meta1", meta1); fd.append("meta2", meta2); fd.append("meta3", meta3); fd.append("meta4", meta4); fd.append("script", script); fd.append("pixcel", pixcel); fd.append("banner", banner); fd.append("bannerold", bannerold); fd.append("editordata1", editordata1); fd.append("editordata3", editordata3); fd.append("altb", altb); $.ajax({ url:"ajax/about-ajax.php", type:"POST", data:fd, dataType: 'json', contentType: false, processData: false, success:function(resp){ if(resp == 1){ alert('Good Job !'); location.reload(); }else{ alert('something Went Wrong!'); } } }) }); }); </script>