Server IP : 82.112.239.40 / Your IP : 18.116.60.124 Web Server : LiteSpeed System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64 User : u641149403 ( 641149403) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u641149403/domains/cabz4you.com/public_html/admin/web-admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include('include/header.php');?> <style> .anlite_table{ background: #fff!important; } </style> <?php $id=$_GET['id']; if(isset($_POST['update'])){ $image= uniqid().$_FILES['image']['name']; $title=$_POST['title']; $description = $_POST['description']; $meta_title = $_POST['meta_title']; $meta_description = $_POST['meta_description']; $keywords = $_POST['keywords']; $path=$_FILES['image']['tmp_name']; $location = 'upload/'.$image; $slug = strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $title))); if($path != "") { move_uploaded_file($path , $location); $que="UPDATE `web_blog` SET `img`='$location', `title`='$title', `slug`='$slug', `description`='$description', `meta_title`='$meta_title', `meta_description`='$meta_description', `keywords`='$keywords' WHERE `id`='$id' LIMIT 1"; }else{ $que="UPDATE `web_blog` SET `title`='$title', `slug`='$slug', `description`='$description', `meta_title`='$meta_title', `meta_description`='$meta_description', `keywords`='$keywords' WHERE `id`='$id' LIMIT 1"; } if($conn->query($que)){ echo '<script language="javascript">'; echo 'alert("Update Successful"); location.href="blog.php"'; echo '</script>'; } else{ echo '<script language="javascript">alert("Something Went Wrong");</script>'; } } $q = "select * from web_blog where id=$id"; $query = mysqli_query($conn,$q); $res = mysqli_fetch_array($query); ?> <div class="main_content_iner overly_inner "> <div class="container-fluid p-0 "> <!-- page title --> <div class="row"> <div class="col-12"> <div class="page_title_box flex-wrap align-items-center justify-content-between"> <div class="page_title_left"> <div class="row"> <div class="col-md-11"> <h3 class="mb-0" >Update Blog</h3> </div> </div> </div> </div> </div> </div> <div class="row "> <div class="col-xl-12"> <div class="white_card mb_30"> <div class="white_card_body anlite_table p-4"> <div class="QA_table mb_30"> <form method="POST" enctype="multipart/form-data"> <div class="row"> <div class="col-md-6 mt-3"> <label>Image:</label> <input type="file" name="image" placeholder="Image" class="form-control" > </div> <div class="col-md-6 mt-3"> <label>Title:</label> <input type="text" name="title" placeholder="Title" class="form-control" value="<?php echo $res['title'] ?>" required> </div> <div class="col-md-12 mt-3"> <label>Description:</label> <textarea class="form-control" rows="3" placeholder="Description" name="description" id="editor"><?php echo $res['description'] ?></textarea> </div> <div class="col-md-12 mt-3"> <label>Meta Title:</label> <input type="text" name="meta_title" placeholder="Meta Title" class="form-control" value="<?php echo $res['meta_title'] ?>"> </div> <div class="col-md-12 mt-3"> <label>Meta Description:</label> <textarea class="form-control" rows="3" placeholder="Meta Description" name="meta_description"><?php echo $res['meta_description'] ?></textarea> </div> <div class="col-md-12 mt-3"> <label>keywords:</label> <textarea class="form-control" rows="3" placeholder="Keywords" name="keywords"><?php echo $res['keywords'] ?></textarea> </div> <div class="ml-auto mt-3 mr-3"> <input class="btn btn-success slider_add mt-2 px-5" type="submit" name="update" value="Submit"> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> <script src="https://cdn.ckeditor.com/4.13.1/standard/ckeditor.js"></script> <script> CKEDITOR.replace( 'editor'); </script> <?php include('include/footer.php');?>