Şuanki Dizin: /home/wwwdreamtechnolo/www/vsacademysolapur.in/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/vsacademysolapur.in/admin/edit-blog-post.php |
<?php require_once("lib/functions.php"); $db = new login_function(); $flag = 0; $edit_id = ""; if(isset($_GET['edit_id'])){ $edit_id = $_GET['edit_id']; $_SESSION['edit_id'] = $edit_id; } $edit_id = $_SESSION['edit_id']; if(isset($_POST['title'])) { $title = $_POST['title']; $place = $_POST['place']; $description = $_POST['description']; if($db->update_blog_post($title,$place,$description,$edit_id)) { $flag = 1; } } $recorded_data = array(); $recorded_data = $db-> get_blog_post_details_from_id($edit_id); //print_r($recorded_data); if(!empty($recorded_data)) { $id =$recorded_data[0]; $title =$recorded_data[1]; $place =$recorded_data[2]; $description =$recorded_data[3]; $attachment1 =$recorded_data[4]; $attachment2 =$recorded_data[5]; $attachment3 =$recorded_data[6]; $attachment4 =$recorded_data[7]; $date =$recorded_data[8]; $time =$recorded_data[9]; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width initial-scale=1.0"> <title>Update Blog Post</title> <!-- GLOBAL MAINLY STYLES--> <link href="css/bootstrap.min.css" rel="stylesheet" /> <link href="css/font-awesome.min.css" rel="stylesheet" /> <link href="css/line-awesome.min.css" rel="stylesheet" /> <link href="css/themify-icons.css" rel="stylesheet" /> <link href="css/animate.min.css" rel="stylesheet" /> <link href="css/toastr.min.css" rel="stylesheet" /> <link href="css/bootstrap-select.min.css" rel="stylesheet" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"> <!-- THEME STYLES--> <link href="css/main.min.css" rel="stylesheet" /> <link href="datatable/datatables.min.css" rel="stylesheet" /> <link href="css/animate.css" rel="stylesheet" type="text/css" media="all"> <script src="js/wow.min.js"></script> <script> function validateForm() { var a = document.forms["myForm"]["customer_name"].value; var c = document.forms["myForm"]["primary_contact"].value; if (a == "") { alert("Enter Customer Name"); return false; } if (c == "") { alert("Enter Mobile Number"); return false; } } </script> </head> <body class="fixed-navbar"> <div class="page-wrapper" style="min-height:500px;"> <?php include('header.php'); ?> <?php include('side-bar.php'); ?> <div class="content-wrapper"> <div class="page-content fade-in-up"> <?php if($flag == 1) { ?> <div class="alert alert-success"> Updated Successfully. </div> <?php } if($flag == 2) { ?> <div class="alert alert-warning"> Failed to Add. </div> <?php } ?> <div class="ibox" style="border-radius:5px; padding:7px;"> <div class="ibox-body" style="padding:7px; padding-top:0px;"> <form class="form-pink" method="post" action="<?php echo $_SERVER['PHP_SELF']?>" name="myForm" onsubmit="return validateForm()" autocomplete="off" enctype="multipart/form-data"> <div class="ibox-head"> <div class="ibox-title"><i class="fas fa-user-tie" style="margin-right:10px;"></i>Update Blog Post</div> </div> <div class="ibox-body"> <div class="row"> <div class="col-lg-2"> <div class="form-group"> <label class="form-group mb-4 set-row label_marg"><b>Title</b></label> <input type="text" name="title" class="form-control form-control-air" placeholder="Enter Title " value="<?php echo $title ?>" /> </div> </div> <br/> <div class="col-lg-2"> <div class="form-group"> <label class="form-group mb-4 set-row label_marg"><b>Place</b></label> <input type="text" name="place" class="form-control form-control-air" placeholder="Enter Place " value="<?php echo $place ?>" /> </div> </div> <div class="col-lg-2"> <div class="form-group"> <label class="form-group mb-4 set-row label_marg"><b>Description</b></label> <input type="text" name="description" class="form-control form-control-air" placeholder="Enter Description" value="<?php echo $description ?>" /> </div> </div> <br/> <br/> </div> </div> <div class="col-sm-12 form-group mb-12" style="text-align:center; padding-left:0px; padding-right:0px; padding-top:20px;"> <div class="col-sm-4 form-group mb-4" style="margin:auto;"> <button class="btn btn-pink btn-air" type="submit" name="add" style="width:100%;">Update Blog Post</button> </div> <center><a href="report-blog-post.php" style="color:red;font-weight:bold;">Back To List</a></center> </div> </div> </div> </form> </div> </div> <?php include('footer.php'); ?> </div> </div> <?php //include('search.php'); ?> <div class="sidenav-backdrop backdrop"></div> <div class="preloader-backdrop"> <div class="page-preloader">Loading</div> </div> <script src="js/jquery.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/metisMenu.min.js"></script> <script src="js/jquery.slimscroll.min.js"></script> <script src="js/idle-timer.min.js"></script> <script src="js/toastr.min.js"></script> <script src="js/jquery.validate.min.js"></script> <script src="js/bootstrap-select.min.js"></script> <script src="datatable/datatables.min.js"></script> <script src="js/app.min.js"></script> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4