include("config.php");
include_once("fct_gestion.php");
include_once("fct_upload.php");
$newid = createovid("hr_forms", "hr_id");
// UPLOAD FICHIER
if($file_req){
$file_name = $_FILES['file_req']['name'];
// $taille = $_FILES['file_req']['size'];
$tmp = $_FILES['file_req']['tmp_name'];
$chemin = $target.$_FILES['fichier']['name'];
$extension = substr($file_name,-3);
$the_path = "uploaded_forms/";
$new_file_name = $formshortcut."_".$language."_".$newid.".".$extension;
$file_path = $root_dir.$the_path.$new_file_name;
$upload_result = upload($file_req, $the_path, $new_file_name, '5000000');
} else $file_path = "";
$table = "hr_forms";
if($action == "1")
{
$query = "INSERT INTO ".$table." VALUES (
'".$newid."',
'".$formtype."',
'".$language."',
'".date("d/m/Y")."',
'".$formshortcut."',
'".$lastname."',
'".$firstname."',
'".$service."',
'".$service2."',
'".$division."',
'".$departmentnbr."',
'".$jobtitle."',
'".$mainmission."',
'".$contracttype."',
'".$duration."',
'".$startdate."',
'".$enddate."',
'".$reason."',
'".$fullreason.$fullreason2."',
'".$employeename."',
'".$officelocation."',
'".$status."',
'".$compensation."',
'".$working_hours."',
'".$bonus."',
'".$education_req."',
'".$experience_req."',
'".$englishlevel."',
'".$computerskills."',
'".$specific_req."',
'".$personal_req."',
'".$comments."',
'".$file_path."'
);";
$go_query = mysql_query($query) or die ("SQL Request error: $query");
if($go_query) $result = "OK";
}
?>
|
|
|
|
|
if($language == "fr"){
if($result == "OK"){
echo " Votre formulaire a bien été transmis le ".date("d/m/Y").".";
} else {
echo " Echec lors de l\'enregistrement";
}
} else {
if($result == "OK"){
echo " Your request has been submitted successfully on ".date("d/m/Y").".";
} else {
echo " Registration failed";
}
}
?>
|
|
|
|