OverLord Shell
<?php
/*
@Purpose: Update company job
@Author: Rajahree
@CreatedOn: 6 may 2016
@ModifiedOn: 6 may 2016
*/
error_reporting(0);
session_start();
require_once("db/conn.php");
if(!isset($_SESSION['company_id']) || !isset($_SESSION['company_name'])){session_destroy();header("location:login.php");}
if(!in_array($_SESSION['loggedin_user'],array('admin','company'))){header("location:404.php");}
$job_description = htmlentities(trim($_POST['job_description']),ENT_QUOTES);
$patterns = array();
$patterns[0] = '/([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/';
$patterns[1] = '/([0-9]+[\- ]?[0-9]{9}+)/';
$patterns[2] = '/([0-9]{2,}-[0-9]{0,}-[0-9]{0,})/';
$patterns[3] = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
$replacements = array();
$replacements[0] = '';
$replacements[1] = '';
$replacements[2] = '';
$replacements[3] = '';
//should use just one call of preg_replace for perfomance issues
$string = preg_replace($patterns, $replacements, $job_description);
$data = array(
'job_title' => $_POST['job_title'],
'my_company_id'=>$_POST['my_company_id'],
'job_location' => $_POST['job_location'],
'no_of_position' => $_POST['no_of_position'],
'job_description' => $string,
'ctc' => $_POST['ctc'],
'workexp' => $_POST['workexp'],
'education' => $_POST['education'],
'job_description' =>$string,
'jobcategory' => $_POST['jobcategory'],
'education' => $_POST['education']
);
//print_r($data);exit;
$editresult = dbRowUpdate('busdir_mst_companyjob', $data,'job_id = '.$_POST['job_id'].'');
echo $editresult;
?>
xRyukZ - Copyright 2k19