210 lines
9.3 KiB
PHP
Executable File
210 lines
9.3 KiB
PHP
Executable File
<?php
|
|
// $this->titre = "INTER-SANTE - Modification Client";
|
|
$idClient = $this->nettoyer($client['idClient']);
|
|
$idClientParent = $this->nettoyer($client['idClientParent']);
|
|
$clientLie = ($idClientParent>"0");
|
|
$aUnParent = ($clientLie && $idClientParent!=$idClient);
|
|
?>
|
|
|
|
<INPUT class="sr-only" TYPE="text" id="idClient" name="idClient" value="<?= $idClient ?>">
|
|
<INPUT class="sr-only" TYPE="text" id="idClientParent" name="idClientParent" value="<?= $idClientParent ?>">
|
|
|
|
<legend> <?= _("Liaisons du Client"). " : " . " " . $this->nettoyer($client['nom'] . " " . $client['prenoms']) ?> </legend>
|
|
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<tbody>
|
|
<tr>
|
|
<?php if($aUnParent): ?>
|
|
<td align="center"> <button id="btn_pop_parent_client" name="btn_pop_parent_client" type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#pop_parent_client" style='font-size:10pt;' > <?= _('Changer de parent') . '...' ?> </button> </td>
|
|
<?php else: ?>
|
|
<td align="center"> <button id="btn_pop_parent_client" name="btn_pop_parent_client" type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#pop_parent_client" style='font-size:10pt;' > <?= _('Lier à un parent') . '...' ?> </button> </td>
|
|
<?php endif; ?>
|
|
|
|
<td align="center"> <button id="btn_pop_enfant_client" name="btn_pop_enfant_client" type="button" class="form-control btn btn-info" data-bs-toggle="modal" data-bs-target="#pop_enfant_client" style='font-size:10pt;' > <?= _('Ajouter un enfant') . '...' ?> </button> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<?php if($clientLie): ?>
|
|
<?php
|
|
$nocliParent = $this->nettoyer($client_parent['numeroClientParent']);
|
|
if($nocliParent<="0")
|
|
{
|
|
$nocliParent = "0";
|
|
}
|
|
?>
|
|
|
|
<?php if($nocliParent>"0"): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="3" style="text-align:center" > <?= _("Parent") ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th style="text-align:center" > <?= _("Nom") ?> </th>
|
|
<th style="text-align:center" width="20%" > <?= _("No") ?> </th>
|
|
<th style='text-align:center' width="10%"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td align="center"> <?= $this->nettoyer($client_parent['clientParent']) ?> </td>
|
|
<td align="center"> <input type="button" class="form-control btn btn-primary" style="font-size:10pt;" value="<?= $nocliParent ?>" onClick="javascript:selectionner_client(<?= $idClientParent ?>,'<?= $nocliParent ?>');afficher_client_id();"> </td>
|
|
<td align='center'> <input type="button" class="form-control btn btn-danger" style="font-size:10pt;"value="X" onClick="javascript:supprimer_lien_parent_client('<?= $idClient ?>');"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php
|
|
$nocliEnfant = "0";
|
|
$nb_enfants = count($client_enfants);
|
|
?>
|
|
|
|
<?php if($nb_enfants>"0"): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="3" style="text-align:center" > <?= _("Enfants") ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<th style="text-align:center" > <?= _("Nom") ?> </th>
|
|
<th style="text-align:center" width="20%" > <?= _("No") ?> </th>
|
|
<th style='text-align:center' width="10%"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($client_enfants as $client_enfant):
|
|
$idClientEnfant = $this->nettoyer($client_enfant['idClientEnfant']);
|
|
$nocliEnfant = $this->nettoyer($client_enfant['numeroClientEnfant']);
|
|
?>
|
|
<tr>
|
|
<td align="center"> <?= $this->nettoyer($client_enfant['clientEnfant']) ?> </td>
|
|
<td align="center"> <input type="button" class="form-control btn btn-primary" style="font-size:10pt;" value="<?= $nocliEnfant ?>" onClick="javascript:selectionner_client(<?= $idClientEnfant ?>,'<?= $nocliEnfant ?>');afficher_client_id();"> </td>
|
|
<td align='center'> <input type="button" class="form-control btn btn-danger" style="font-size:10pt;"value="X" onClick="javascript:supprimer_lien_parent_client('<?= $idClientEnfant ?>');"></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
$nocliFrere = "0";
|
|
$nb_freres = count($client_freres);
|
|
?>
|
|
|
|
<?php if($nb_freres>"0"): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="3" style="text-align:center" > <?= _("Enfants du parent") ?> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th style="text-align:center" > <?= _("Nom") ?> </th>
|
|
<th style="text-align:center" width="20%" > <?= _("No") ?> </th>
|
|
<th style='text-align:center' width="10%"> <?= _("Suppr") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($client_freres as $client_frere):
|
|
$idClientFrere = $this->nettoyer($client_frere['idClientFrere']);
|
|
$nocliFrere = $this->nettoyer($client_frere['numeroClientFrere']);
|
|
?>
|
|
<tr>
|
|
<td align="center"> <?= $this->nettoyer($client_frere['clientFrere']) ?> </td>
|
|
<td align="center"> <input type="button" class="form-control btn btn-primary" style="font-size:10pt;" value="<?= $nocliFrere ?>" onClick="javascript:selectionner_client(<?= $idClientFrere ?>,'<?= $nocliFrere ?>');afficher_client_id();"> </td>
|
|
<td align='center'> <input type="button" class="form-control btn btn-danger" style="font-size:10pt;"value="X" onClick="javascript:supprimer_lien_parent_client('<?= $idClientFrere ?>');"></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:40px; padding:5px; text-align:center;" >
|
|
<H4><?= _("Pas de liaison!") ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="modal fade" id="pop_parent_client" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"> <?=_('Rechercher le parent') . '...' ?> </h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_liste_clients_parents" onkeypress="javascript:ctrlkeypress_parent_client(event);">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th width="20%" style="text-align:center" width="15%" > <?= _("Nunméro") ?> </th>
|
|
<th colspan="2" style="text-align:center" > <?= _("Nom contenant...") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="text" style="text-align:center;" class="form-control" id="numeroclientsearch" name="numeroclientsearch" > </td>
|
|
<td><input type="text" class="form-control" id="nomsearch" name="nomsearch" autofocus style='font-size:10pt;' ></td>
|
|
<td width="20%" ><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_parent_client();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="pop_enfant_client" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop_e" name="btn_close_pop_e" type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"> <?=_('Rechercher un enfant') . '...' ?> </h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_liste_clients_enfants" onkeypress="javascript:ctrlkeypress_enfant_client(event);">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th width="20%" style="text-align:center" width="15%" > <?= _("Nunméro") ?> </th>
|
|
<th colspan="2" style="text-align:center" > <?= _("Nom contenant...") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="text" style="text-align:center;" class="form-control" id="numeroclientsearch_e" name="numeroclientsearch_e" > </td>
|
|
<td><input type="text" class="form-control" id="nomsearch_e" name="nomsearch_e" autofocus style='font-size:10pt;' ></td>
|
|
<td width="20%" ><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_enfants_client();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop_e" name="close_pop_e" type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id ="div_wait">
|
|
</div>
|