-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformation_suivi_autofill.php
44 lines (33 loc) · 1.73 KB
/
formation_suivi_autofill.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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('formation_suivi');
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 'competence_secondaire':
if(!$id) {
?>
$j('#competence_principale<?php echo $rnd1; ?>').html(' ');
<?php
break;
}
$res = sql("SELECT `competences_ref`.`id_competence` as 'id_competence', `competences_ref`.`titre_competence` as 'titre_competence', `competences_ref`.`description` as 'description', IF( CHAR_LENGTH(`domaine1`.`titre_domaine`) || CHAR_LENGTH(`filiere1`.`titre_filiere`), CONCAT_WS('', `domaine1`.`titre_domaine`, '>', `filiere1`.`titre_filiere`), '') as 'domaine_principal', `competences_ref`.`domaine` as 'domaine' FROM `competences_ref` LEFT JOIN `domaine` as domaine1 ON `domaine1`.`id_domaine`=`competences_ref`.`domaine_principal` LEFT JOIN `filiere` as filiere1 ON `filiere1`.`id_filiere`=`domaine1`.`rattache_a_filiere` WHERE `competences_ref`.`id_competence`='{$id}' limit 1", $eo);
$row = db_fetch_assoc($res);
?>
$j('#competence_principale<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['titre_competence'].' '.$row['domaine_principal']))); ?> ');
<?php
break;
}
?>