D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
job-post
/
Filename :
execute-jobs.php
back
Copy
<?php error_reporting(0); include("../include/config.php"); ########################################################################################## //For Insert Data if(array_key_exists("add_job_post",$_REQUEST)){ // echo "add_blogs_details vvbgbh"; die; $jobs_title = mysqli_real_escape_string($conn,$_POST['jobs_title']); $qualification = mysqli_real_escape_string($conn,$_POST['qualification']); $experience = mysqli_real_escape_string($conn,$_POST['experience']); $ckeditor_job_post_details = mysqli_real_escape_string($conn,$_POST['ckeditor_job_post']); $additionInfo = mysqli_real_escape_string($conn,$_POST['additionInfo']); $meta_title = mysqli_real_escape_string($conn,$_POST['meta_title']); $meta_desc = mysqli_real_escape_string($conn,$_POST['meta_descre']); $meta_keywords = mysqli_real_escape_string($conn,$_POST['meta_keywords']); $current_date = date("d-M-Y"); $c_date = date("d"); $c_month = date("M"); $url = create_slug($jobs_title); $permitted_chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $curr_year = date("y"); $job_code = trim("REG".substr(str_shuffle($permitted_chars), 0, 8).$curr_year); $query="INSERT INTO `job_post`(`job_title`, `url`, `job_code`, `qualification`, `experience`, `job_details`, `post_date`, `meta_title`, `meta_desc`, `meta_keywords`, `additionInfo`,`status`) VALUES ('$jobs_title', '$url', '$job_code', '$qualification', '$experience', '$ckeditor_job_post_details', '$current_date', '$meta_title', '$meta_desc', '$meta_keywords', '$additionInfo', 'active')"; // echo $query; die; if (mysqli_query($conn, $query)) { header("Location:". $admin_baseurl . "job-post/"); exit; } else { include('include/error-modal.php'); echo "error"; } mysqli_close($conn); } ########################################################################################## //For update Data if(array_key_exists("update_job_post",$_REQUEST)){ // echo "update_blogs_de tails"; die; $jobs_id = mysqli_real_escape_string($conn,$_POST['job_id']); $jobs_title = mysqli_real_escape_string($conn,$_POST['jobs_title']); $qualification = mysqli_real_escape_string($conn,$_POST['qualification']); $experience = mysqli_real_escape_string($conn,$_POST['experience']); $ckeditor_job_post_details = mysqli_real_escape_string($conn,$_POST['ckeditor_job_post']); $meta_title = mysqli_real_escape_string($conn,$_POST['meta_title']); $meta_desc = mysqli_real_escape_string($conn,$_POST['meta_descre']); $meta_keywords = mysqli_real_escape_string($conn,$_POST['meta_keywords']); $additionInfo = mysqli_real_escape_string($conn,$_POST['additionInfo']); $url = create_slug($jobs_title); $query1 = "UPDATE `job_post` SET `job_title` = '$jobs_title', `url` = '$url', `qualification` = '$qualification', `experience` = '$experience', `job_details` = '$ckeditor_job_post_details', `meta_title` = '$meta_title', `meta_desc` = '$meta_desc', `meta_keywords` = '$meta_keywords', `additionInfo`='$additionInfo' WHERE `job_post`.`id` = $jobs_id"; // echo $query1; die; if (mysqli_query($conn, $query1)) { header("Location:view-job-posted.php"); exit; } else { include('include/error-modal.php'); } mysqli_close($conn); } ########################################################################################## // status active data if(array_key_exists("status_active_jobs",$_REQUEST)){ $net_id = $_GET['id']; $query="UPDATE `job_post` SET `status` = 'active' WHERE `job_post`.`id` = '$net_id'"; if (mysqli_query($conn, $query)) { header("Location:view-job-posted.php"); } else { include('include/error-modal.php'); } mysqli_close($conn); } ########################################################################################## // status deactive data if(array_key_exists("status_deactive_jobs",$_REQUEST)){ $net_id = $_GET['id']; $query="UPDATE `job_post` SET `status` = 'deactive' WHERE `job_post`.`id` = '$net_id'"; if (mysqli_query($conn, $query)) { header("Location:view-job-posted.php"); } else { include('include/error-modal.php'); } mysqli_close($conn); } ################################################################################################## //For detete data if(array_key_exists("delete_jobs_details",$_REQUEST)){ $t_id = $_GET['id']; // echo $t_id; die; $query="DELETE FROM `job_post` WHERE `job_post`.`id` = '$t_id'"; if (mysqli_query($conn, $query)) { header("Location:view-job-posted.php"); } else { include('include/error-modal.php'); } mysqli_close($conn); } #################################################################################### ?>