
include("../mu-admin/includes/config.inc.php");
@extract($_POST);
function gtxt($txt)
{
$txt1=str_replace("–"," - ",strip_tags($txt));
$txt1=str_replace("’","'",$txt1);
$txt1=addslashes($txt1);
return $txt1;
}
$ARR_MARTIAL['1']='Married';
$ARR_MARTIAL['2']='Un Married';
$ARR_MARTIAL['3']='Widow';
$ARR_MARTIAL['4']='Widower';
$ARR_MARTIAL['5']='Divorced';
$arr_month['01']='Jan';
$arr_month['02']='Feb';
$arr_month['03']='Mar';
$arr_month['04']='Apr';
$arr_month['05']='May';
$arr_month['06']='June';
$arr_month['07']='July';
$arr_month['08']='Aug';
$arr_month['09']='Sep';
$arr_month['10']='Oct';
$arr_month['11']='Nov';
$arr_month['12']='Dec';
//print_r($_POST);
if(count($_POST)>0)
{
$str_dob=$emp_dob_year.'-'.$emp_dob_month.'-'.$emp_dob_day;
$emp_resume=file_upload('emp_resume','emp_resume','emp_resume','');
$error=0;
$sql_chk="select * from mu_employee where emp_phone='".gtxt($emp_mobile)."' order by emp_ins_date desc limit 0,1";
$rs_chk=$db->db_query($sql_chk);
$data_chk=$db->db_fetch_array($rs_chk);
$emp_phone_db=$data_chk['emp_phone'];
$emp_ins_date=$data_chk['emp_ins_date'];
$expire_date=$db->db_scalar("SELECT DATE_ADD('$emp_ins_date', INTERVAL 30 DAY);");
$cur_date=date("Y-m-d h:i:s");
$no_days=$db->db_scalar("SELECT DATEDIFF('$cur_date', '$emp_ins_date')");
if($expire_date>$cur_date) { $error=1; }
//echo $error; exit;
if($error==0)
{
$sql_ins="insert into mu_employee set emp_applied_post='".gtxt($emp_applied_post)."',emp_name='".gtxt($emp_name)."',emp_pres_add='".gtxt($emp_pres_add)."',emp_phone='".gtxt($emp_phone)."',
emp_mobile='".gtxt($emp_mobile)."',
emp_email='".gtxt($emp_email)."',emp_dob='".gtxt($str_dob)."',emp_martial_status='".gtxt($emp_martial_status)."',emp_tot_exp='".gtxt($emp_tot_exp)."',
emp_present_salary='".gtxt($emp_present_salary)."',emp_expected_salary='".gtxt($emp_expected_salary)."',emp_local_address_year='".gtxt($emp_local_address_year)."',
emp_relocate='".gtxt($emp_relocate)."',emp_relocate_family='".gtxt($emp_relocate_family)."',
emp_time_required_to_join='".gtxt($emp_time_required_to_join)."',emp_ins_date=now() $emp_resume";
$rs=$db->db_query($sql_ins);
//echo $sql_ins; exit;
$emp_id=$db->db_insert_id();
foreach($emp_exam as $key=>$val)
{
if($val!='')
{
$sql_edu="insert into emp_education set edu_emp_id='$emp_id',edu_exam='".gtxt($emp_exam[$key])."',edu_board='".gtxt($emp_exam_board[$key])."',edu_sub='".gtxt($emp_exam_sub[$key])."',
edu_year_pass='".gtxt($emp_exam_year_pass[$key])."',edu_perc='".gtxt($emp_exam_year_perc[$key])."'";
$db->db_query($sql_edu);
}
}
foreach($emp_exp_org as $key=>$val)
{
if($val!='')
{
$sql_exp="insert into emp_exp set exp_emp_id='$emp_id',exp_org='".gtxt($emp_exp_org[$key])."',emp_exp_from='".gtxt($emp_exp_from[$key])."',emp_exp_to='".gtxt($emp_exp_to[$key])."',
emp_exp_position='".gtxt($emp_exp_position[$key])."',emp_exp_salary='".gtxt($emp_exp_salary[$key])."'";
//echo $sql_exp; echo "
";
$db->db_query($sql_exp);
}
}
header("location:career_thanks.php"); exit;
} else { // end chk resume
$error_msg="You have Already Apllied. Please try After 30 days";
}
}
?>
WELCOME TO MANGALAYATAN UNIVERSITY ALIGARH
QUICK LINK
IMPORTANT LINKS