production/Vue/Ajaxaffectioncollegetm/index.php
2025-12-01 16:12:12 +00:00

126 lines
5.2 KiB
PHP
Executable File

<div id="div_complet">
<input class="sr-only" id="idCollege" name="idCollege" type="text" value="<?= $_SESSION['idCollege'] ?>">
<table class="table table-condensed table-responsive" style='font-size:10pt;'>
<tbody>
<tr valign="top">
<td width="8%" align='center'> <?= _("TM") ?> </td>
<?php if($_SESSION['idCollege'] != ""): ?>
<td><INPUT class="form-control" style='font-size:10pt;' value="<?= $this->nettoyer($college['ticketModerateurCollege']) ?>" readonly ></td>
<td width="13%" align='center'> <?= _("Appliquer plafond ?") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-select" id="appliquerPlafond" NAME="appliquerPlafond" readonly>
<?php liste_options($appliquerPlafond, "1"); ?>
</SELECT>
</td>
<?php else: ?>
<td><INPUT class="form-control" id="tm" name="tm" style='font-size:10pt;' value="" required AUTOCOMPLETE="OFF"></td>
<td width="13%" align='center'> <?= _("Appliquer plafond ?") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-select" id="appliquerPlafond" NAME="appliquerPlafond" required AUTOCOMPLETE="OFF">
<?php liste_options($appliquerPlafond, "1"); ?>
</SELECT>
</td>
<?php endif; ?>
</tr>
</tbody>
</table>
<div class="row">
<div id="div_reseau" class="col-5" style="padding-right:1px;">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:9pt;">
<thead>
<tr>
<th width="90%" style='text-align:center'> <?= _("Affections")." (".count($affections).")" ?> </th>
<th style='text-align:center'> => </th>
</tr>
</thead>
<tbody>
<?php foreach ($affections as $v):
$codeAffection=$this->nettoyer($v['code']);
?>
<tr valign="top">
<td ><?= $this->nettoyer($v['libelle']) ?></td>
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_une_affection_tm('<?=$codeAffection?>');" ></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_prestataires_en_plus" class="col-7" >
<?php if($_SESSION['idCollege'] != ""): ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:10pt;">
<thead>
<tr>
<th width="5%" style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Affection")." (".count($affectionstm).")" ?> </th>
<th width="15%" style='text-align:center'> <?= _("Plafond ?") ?> </th>
<th width="10%" style='text-align:center'> <?= _("T M") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($affectionstm as $v):
$idAffection=$this->nettoyer($v['id']);
?>
<tr valign="top">
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_une_affection_tm('<?=$idAffection?>');" ></td>
<td ><?= $this->nettoyer($v['libelle']) ?></td>
<td >
<SELECT style="font-size:10pt;" class="form-select" onChange="javascript:ajax_maj_plafond_affection('<?=$idAffection?>', this.value, this);">
<?php liste_options($appliquerPlafond, $this->nettoyer($v['appliquerPlafond'])); ?>
</SELECT>
</td>
<td>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($v['tm']) ?>"
onBlur="javascript:ajax_maj_tm_affection('<?=$idAffection?>', this.value, this);">
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:10pt;">
<thead>
<tr>
<!--<th width="5%" style='text-align:center'> <= </th>-->
<th style='text-align:center'> <?= _("Affection") ?> </th>
<th style='text-align:center'> <?= _("Collège (".count($affectionstm).")") ?> </th>
<th width="15%" style='text-align:center'> <?= _("Plafond ?") ?> </th>
<th width="10%" style='text-align:center'> <?= _("T M") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($affectionstm as $v):
$idAffection=$this->nettoyer($v['id']);
?>
<tr valign="top">
<!--<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_une_affection_tm('<?=$idAffection?>');" ></td>-->
<td ><?= $this->nettoyer($v['libelle']) ?></td>
<td ><?= $this->nettoyer($v['libelleCollege']) ?></td>
<td >
<SELECT style="font-size:10pt;" class="form-select" onChange="javascript:ajax_maj_plafond_affection('<?=$idAffection?>', this.value, this);">
<?php liste_options($appliquerPlafond, $this->nettoyer($v['appliquerPlafond'])); ?>
</SELECT>
</td>
<td>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($v['tm']) ?>"
onBlur="javascript:ajax_maj_tm_affection('<?=$idAffection?>', this.value, this);">
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
</div>