-
Notifications
You must be signed in to change notification settings - Fork 0
/
gestionChamps.php
108 lines (90 loc) · 4.23 KB
/
gestionChamps.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/*
Copyright Laurent ROBIN CNRS - Universit� d'Orl�ans 2011
Distributeur : UGCN - http://chimiotheque-nationale.org
Laurent.robin@univ-orleans.fr
Institut de Chimie Organique et Analytique
Universit� d�Orl�ans
Rue de Chartre � BP6759
45067 Orl�ans Cedex 2
Ce logiciel est un programme informatique servant � la gestion d'une chimioth�que de produits de synth�ses.
Ce logiciel est r�gi par la licence CeCILL soumise au droit fran�ais et respectant les principes de diffusion des logiciels libres.
Vous pouvez utiliser, modifier et/ou redistribuer ce programme sous les conditions de la licence CeCILL telle que diffus�e par le CEA,
le CNRS et l'INRIA sur le site "http://www.cecill.info".
En contrepartie de l'accessibilit� au code source et des droits de copie, de modification et de redistribution accord�s par cette licence,
il n'est offert aux utilisateurs qu'une garantie limit�e. Pour les m�mes raisons, seule une responsabilit� restreinte p�se sur l'auteur du
programme, le titulaire des droits patrimoniaux et les conc�dants successifs.
A cet �gard l'attention de l'utilisateur est attir�e sur les risques associ�s au chargement, � l'utilisation, � la modification et/ou au d�veloppement
et � la reproduction du logiciel par l'utilisateur �tant donn� sa sp�cificit� de logiciel libre, qui peut le rendre complexe � manipuler et qui le
r�serve donc � des d�veloppeurs et des professionnels avertis poss�dant des connaissances informatiques approfondies. Les utilisateurs sont donc
invit�s � charger et tester l'ad�quation du logiciel � leurs besoins dans des conditions permettant d'assurer la s�curit� de leurs syst�mes et ou de
leurs donn�es et, plus g�n�ralement, � l'utiliser et l'exploiter dans les m�mes conditions de s�curit�.
Le fait que vous puissiez acc�der � cet en-t�te signifie que vous avez pris connaissance de la licence CeCILL, et que vous en avez accept� les
termes.
*/
include_once 'script/administrateur.php';
include_once 'script/secure.php';
include_once 'autoload.php';
include_once 'langues/'.$_SESSION['langue'].'/presentation.php';
include_once 'presentation/entete.php';
$menu=12;
include_once 'presentation/gauche.php';
require 'script/connectionb.php';
$sql="SELECT chi_statut,chi_id_chimiste,chi_id_equipe FROM chimiste WHERE chi_nom='".$_SESSION['nom']."'";
//les résultats sont retournées dans la variable $result
$result =$dbh->query($sql);
$row =$result->fetch(PDO::FETCH_NUM);
if ($row[0]=='{ADMINISTRATEUR}') {
if (isset($_POST['champs'])){
$sql="UPDATE parametres SET para_champs = '".$_POST['champs']."' WHERE para_id_parametre = 1";
$update=$dbh->exec($sql);
}
$sql_para="SELECT para_champs FROM parametres WHERE para_id_parametre = 1";
$result_para = $dbh->query($sql_para);
$rowPara=$result_para->fetch(PDO::FETCH_NUM);
?>
<div class="language-selector" style="text-align: center;">
<a id="fr-FR">Français</a> - <a id="en-US">English</a>
</div>
<div id="fb-editor"></div>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/form-builder.min.js"></script>
<script>
jQuery(function($) {
var options = {
i18n: {
locale: 'fr-FR'
},
disableFields: [
'file',
'hidden',
'button'
],
disabledAttrs: [
'className',
'access',
'name'
],
onSave: function(formData) {
document.getElementById('champs').value = formBuilder.actions.getData('json', true);
document.getElementById("formChamps").submit();
}
},
$fbTemplate = $(document.getElementById('fb-editor'));
formBuilder = $fbTemplate.formBuilder(options);
var formData = <?php echo $rowPara[0] ?>;
setTimeout(function(){ formBuilder.actions.setData(formData); }, 500);
$('.language-selector a').click(function() {
var lang = this.id;
formBuilder.actions.setLang(lang)
});
});
</script>
<form id="formChamps" method="post">
<input id="champs" type="hidden" name="champs" value="">
</form>
<?php
};
include_once 'presentation/pied.php';
?>