7 |
(isset($_GET['obj']) ? $obj = $_GET['obj'] : $obj = ""); |
(isset($_GET['obj']) ? $obj = $_GET['obj'] : $obj = ""); |
8 |
|
|
9 |
$f = new utils("nohtml"); |
$f = new utils("nohtml"); |
|
//$f->setFlag("htmlonly"); |
|
|
$f->disableLog(); |
|
10 |
|
|
11 |
$liste_gauche = ""; |
$liste_gauche = ""; |
12 |
|
|
14 |
$sql = |
$sql = |
15 |
"SELECT |
"SELECT |
16 |
ser_cat.service_categorie, ser_cat.libelle AS them_lib, |
ser_cat.service_categorie, ser_cat.libelle AS them_lib, |
17 |
ser.service, ser.libelle AS ser_lib |
ser.service, ser.libelle AS ser_lib, ser.consultation_papier |
18 |
FROM |
FROM |
19 |
public.lien_service_service_categorie lie, |
public.lien_service_service_categorie lie, |
20 |
public.service_categorie ser_cat, |
public.service_categorie ser_cat, |
39 |
|
|
40 |
$temp_ser_cat = $row['service_categorie']; |
$temp_ser_cat = $row['service_categorie']; |
41 |
$liste_gauche .= ' |
$liste_gauche .= ' |
42 |
<div id="them_'.$row['service_categorie'].'" class="liste_gauche_them" onclick="changeCSS();">'. |
<div id="them_'.$row['service_categorie'].'" class="liste_gauche_them" >'. |
43 |
$row['them_lib']. |
$row['them_lib']. |
44 |
'</div> |
'</div> |
45 |
<div |
<div |
46 |
class="liste_gauche_service" |
class="liste_gauche_service" |
47 |
id="'.$row['service_categorie'].'_'.$row['service'].'" onclick="changeCSS();"> |
id="'.$row['service_categorie'].'_'.$row['service'].'_" > |
48 |
'.$row['ser_lib'].' |
'.$row['ser_lib'].' |
49 |
|
<input type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
50 |
</div> |
</div> |
51 |
'; |
'; |
52 |
} |
} |
57 |
$liste_gauche .= ' |
$liste_gauche .= ' |
58 |
<div |
<div |
59 |
class="liste_gauche_service" |
class="liste_gauche_service" |
60 |
id="'.$row['service_categorie'].'_'.$row['service'].'" onclick="changeCSS();"> |
id="'.$row['service_categorie'].'_'.$row['service'].'_" > |
61 |
'.$row['ser_lib'].' |
'.$row['ser_lib'].' |
62 |
|
<input type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
63 |
</div> |
</div> |
64 |
'; |
'; |
65 |
} |
} |
68 |
|
|
69 |
/*Requête qui récupère les services qui ne sont pas dans une thématique*/ |
/*Requête qui récupère les services qui ne sont pas dans une thématique*/ |
70 |
$sql = |
$sql = |
71 |
"SELECT service, libelle |
"SELECT service, libelle, consultation_papier |
72 |
FROM public.service |
FROM public.service |
73 |
WHERE service NOT IN |
WHERE service NOT IN |
74 |
( |
( |
94 |
$liste_gauche .= ' |
$liste_gauche .= ' |
95 |
<div |
<div |
96 |
class="liste_gauche_service" |
class="liste_gauche_service" |
97 |
id="0_'.$row['service'].'" onclick="changeCSS();"> |
id="0_'.$row['service'].'_" > |
98 |
'.$row['libelle'].' |
'.$row['libelle'].' |
99 |
|
<input type="checkbox" '.(($row['consultation_papier'] == '' || $row['consultation_papier'] == FALSE ) ? '' : 'checked' ).'/> |
100 |
</div> |
</div> |
101 |
'; |
'; |
102 |
} |
} |
105 |
echo '<div class="subtitle">'; |
echo '<div class="subtitle">'; |
106 |
echo '<h3>'; |
echo '<h3>'; |
107 |
echo _("Application"); |
echo _("Application"); |
108 |
echo '<span class="om-icon om-icon-16 om-icon-fix arrow-right-16">></span>'; |
echo '<span class="om-icon om-icon-16 om-icon-fix arrow-right-16"></span>'; |
109 |
echo _("consultation"); |
echo _("consultation"); |
110 |
echo '</h3>'; |
echo '</h3>'; |
111 |
echo '</div>'; |
echo '</div>'; |
129 |
echo '</label>'; |
echo '</label>'; |
130 |
echo '</div>'; |
echo '</div>'; |
131 |
echo '<div class="form-content">'; |
echo '<div class="form-content">'; |
132 |
echo '<input id="dossier" class="champFormulaire" type="hidden" value="PC12R0001" name="dossier">'; |
echo '<input id="dossier" class="champFormulaire" type="hidden" value="'.$idx.'" name="dossier">'; |
133 |
echo $idx; |
echo $idx; |
134 |
echo '</div>'; |
echo '</div>'; |
135 |
echo '</div>'; |
echo '</div>'; |
161 |
echo '</div>'; |
echo '</div>'; |
162 |
echo '<div class="form-content">'; |
echo '<div class="form-content">'; |
163 |
echo '<input id="date_envoi" class="champFormulaire datepicker" |
echo '<input id="date_envoi" class="champFormulaire datepicker" |
164 |
type="text" onclick="" onkeyup="" onchange="fdate(this)" |
type="text" onkeyup="" onchange="fdate(this)" |
165 |
maxlength="10" size="12" value="'.date("d/m/Y").'" |
maxlength="10" size="12" value="'.date("d/m/Y").'" |
166 |
name="date_envoi">'; |
name="date_envoi">'; |
167 |
echo '</div>'; |
echo '</div>'; |
188 |
echo '</div>'; |
echo '</div>'; |
189 |
echo '</form>'; |
echo '</form>'; |
190 |
echo '</div>'; |
echo '</div>'; |
191 |
|
|
192 |
|
echo " |
193 |
|
<script> |
194 |
|
$(function(){ |
195 |
|
$('.liste_gauche_them').click( |
196 |
|
function(){ |
197 |
|
|
198 |
|
var id = $(this).attr('id').split('_')[1]; |
199 |
|
$('.list-ser-them div').each( |
200 |
|
function() { |
201 |
|
|
202 |
|
if ( $(this).attr('id').indexOf('them') == -1 && |
203 |
|
$(this).attr('id').indexOf(id) == 0 ){ |
204 |
|
$(this).toggleClass('liste_gauche_service_selected'); |
205 |
|
} |
206 |
|
} |
207 |
|
); |
208 |
|
} |
209 |
|
); |
210 |
|
|
211 |
|
$('.liste_gauche_service').click( |
212 |
|
function(){ |
213 |
|
$(this).toggleClass('liste_gauche_service_selected'); |
214 |
|
} |
215 |
|
); |
216 |
|
|
217 |
|
$('.liste_droite_service').live( |
218 |
|
'click', |
219 |
|
function(){ |
220 |
|
$(this).toggleClass('liste_droite_service_selected'); |
221 |
|
} |
222 |
|
); |
223 |
|
|
224 |
|
$('#add-ser-them').click( |
225 |
|
function() { |
226 |
|
|
227 |
|
$('.list-sel-ser-them').empty(); |
228 |
|
|
229 |
|
$('.liste_gauche_service_selected').each( |
230 |
|
function(i) { |
231 |
|
|
232 |
|
( i == 0 ) ? |
233 |
|
$('.list-sel-ser-them').append(''+ |
234 |
|
'<div class=\'row\'>'+ |
235 |
|
'<div class=\'cell1\' id=\'list-sel-ser-them-title\'>"._('Service à consulter')."</div>'+ |
236 |
|
'<div class=\'cell2\' id=\'list-sel-ser-them-title\'>"._('Version papier')."</div>'+ |
237 |
|
'</div>') |
238 |
|
: '' ; |
239 |
|
|
240 |
|
$('.list-sel-ser-them').append( |
241 |
|
'<div class=\'row liste_droite_service\' id=\'' + i + '\'>'+ |
242 |
|
'<div class=\'cell1\'>'+ |
243 |
|
'<div id=\'' + $(this).attr('id') + '\'>'+ |
244 |
|
$(this).html().split('<')[0]+ |
245 |
|
'</div>'+ |
246 |
|
'</div>' + |
247 |
|
'<div class=\'cell2\'>'+ |
248 |
|
'<div>'+ |
249 |
|
'<'+$(this).html().split('<')[1]+ |
250 |
|
'</div>'+ |
251 |
|
'</div>'+ |
252 |
|
'</div>' |
253 |
|
); |
254 |
|
|
255 |
|
$(this).hide(); |
256 |
|
var id = $(this).attr('id'); |
257 |
|
$('.list-ser-them div').each( |
258 |
|
function() { |
259 |
|
|
260 |
|
if ( $(this).attr('id').indexOf('them') == -1 && |
261 |
|
$(this).attr('id').indexOf('_' + id.split('_')[1] + '_') != -1 ){ |
262 |
|
|
263 |
|
$(this).hide(); |
264 |
|
} |
265 |
|
} |
266 |
|
); |
267 |
|
} |
268 |
|
); |
269 |
|
} |
270 |
|
); |
271 |
|
|
272 |
|
$('#del-ser-them').click( |
273 |
|
function() { |
274 |
|
$('.liste_droite_service_selected').each( |
275 |
|
function() { |
276 |
|
|
277 |
|
var id = $('#'+ $(this).attr('id') + ' .cell1 div').attr('id'); |
278 |
|
|
279 |
|
$('.list-ser-them div').each( |
280 |
|
function() { |
281 |
|
|
282 |
|
if ( $(this).attr('id').indexOf('them') == -1 && |
283 |
|
$(this).attr('id').indexOf('_' + id.split('_')[1] + '_') != -1 ){ |
284 |
|
|
285 |
|
$(this).show(); |
286 |
|
} |
287 |
|
} |
288 |
|
); |
289 |
|
|
290 |
|
$(this).remove(); |
291 |
|
} |
292 |
|
); |
293 |
|
} |
294 |
|
); |
295 |
|
}); |
296 |
|
</script>"; |
297 |
?> |
?> |