<?php
// This script and data application were generated by AppGini 5.81
// Download AppGini for free from https://bigprof.com/appgini/download/

	$currDir = dirname(__FILE__);
	include("$currDir/defaultLang.php");
	include("$currDir/language.php");
	include("$currDir/lib.php");

	handle_maintenance();

	header('Content-type: text/javascript; charset=' . datalist_db_encoding);

	$table_perms = getTablePermissions('formations');
	if(!$table_perms[0]) { die('// Access denied!'); }

	$mfk = $_GET['mfk'];
	$id = makeSafe($_GET['id']);
	$rnd1 = intval($_GET['rnd1']); if(!$rnd1) $rnd1 = '';

	if(!$mfk) {
		die('// No js code available!');
	}

	switch($mfk) {

		case 'matricule':
			if(!$id) {
				?>
				$j('#nom_prenom<?php echo $rnd1; ?>').html('&nbsp;');
				<?php
				break;
			}
			$res = sql("SELECT `dossier_individuel`.`iddindividuel` as 'iddindividuel', IF(    CHAR_LENGTH(`gestion_primes1`.`link`), CONCAT_WS('',   `gestion_primes1`.`link`), '') as 'option_prime', `dossier_individuel`.`matricule` as 'matricule', `dossier_individuel`.`nom_prenom` as 'nom_prenom', if(`dossier_individuel`.`date_naissance`,date_format(`dossier_individuel`.`date_naissance`,'%d/%m/%Y'),'') as 'date_naissance', `dossier_individuel`.`age` as 'age', `dossier_individuel`.`matrimoniale` as 'matrimoniale', `dossier_individuel`.`enfants` as 'enfants', `dossier_individuel`.`nni` as 'nni', `dossier_individuel`.`telephone` as 'telephone', `dossier_individuel`.`courriel` as 'courriel', `dossier_individuel`.`postale` as 'postale', if(`dossier_individuel`.`date_recrutement`,date_format(`dossier_individuel`.`date_recrutement`,'%d/%m/%Y'),'') as 'date_recrutement', IF(    CHAR_LENGTH(`statuts1`.`statut`), CONCAT_WS('',   `statuts1`.`statut`), '') as 'statut', IF(    CHAR_LENGTH(`directions1`.`direction`), CONCAT_WS('',   `directions1`.`direction`), '') as 'direction', IF(    CHAR_LENGTH(`fonctions1`.`fonction`), CONCAT_WS('',   `fonctions1`.`fonction`), '') as 'fonction', IF(    CHAR_LENGTH(`services1`.`service`), CONCAT_WS('',   `services1`.`service`), '') as 'service', IF(    CHAR_LENGTH(`divisions1`.`division`), CONCAT_WS('',   `divisions1`.`division`), '') as 'division', IF(    CHAR_LENGTH(`categories1`.`categorie`), CONCAT_WS('',   `categories1`.`categorie`), '') as 'categorie', `dossier_individuel`.`anciennete` as 'anciennete', REPLACE(FORMAT(`dossier_individuel`.`salaire`, 0), ',', ' ') as 'salaire', IF(    CHAR_LENGTH(`categories1`.`prime`), CONCAT_WS('',   `categories1`.`prime`), '') as 'prime', IF(    CHAR_LENGTH(`rythme_prime1`.`rythme`), CONCAT_WS('',   `rythme_prime1`.`rythme`), '') as 'qty', `dossier_individuel`.`total` as 'total', `dossier_individuel`.`compte` as 'compte', IF(    CHAR_LENGTH(`banques1`.`banque`), CONCAT_WS('',   `banques1`.`banque`), '') as 'banque', `dossier_individuel`.`cv` as 'cv', `dossier_individuel`.`dossier` as 'dossier', `dossier_individuel`.`contrat` as 'contrat', `dossier_individuel`.`photo` as 'photo', `dossier_individuel`.`observation` as 'observation' FROM `dossier_individuel` LEFT JOIN `gestion_primes` as gestion_primes1 ON `gestion_primes1`.`idgestion_prime`=`dossier_individuel`.`option_prime` LEFT JOIN `statuts` as statuts1 ON `statuts1`.`idstatut`=`dossier_individuel`.`statut` LEFT JOIN `directions` as directions1 ON `directions1`.`iddirection`=`dossier_individuel`.`direction` LEFT JOIN `fonctions` as fonctions1 ON `fonctions1`.`idfonction`=`dossier_individuel`.`fonction` LEFT JOIN `services` as services1 ON `services1`.`idservice`=`dossier_individuel`.`service` LEFT JOIN `divisions` as divisions1 ON `divisions1`.`iddivision`=`dossier_individuel`.`division` LEFT JOIN `categories` as categories1 ON `categories1`.`idcategorie`=`dossier_individuel`.`categorie` LEFT JOIN `banques` as banques1 ON `banques1`.`idbanque`=`dossier_individuel`.`banque` LEFT JOIN `rythme_prime` as rythme_prime1 ON `rythme_prime1`.`idrythme_prime`=`gestion_primes1`.`echeance`  WHERE `dossier_individuel`.`iddindividuel`='{$id}' limit 1", $eo);
			$row = db_fetch_assoc($res);
			?>
			$j('#nom_prenom<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['nom_prenom']))); ?>&nbsp;');
			<?php
			break;


	}

?>