prestation/Vue/Ajaxprestatairesreseau/index.php
2025-12-05 10:42:46 +00:00

120 lines
4.6 KiB
PHP
Executable File

<?php
$codeReseau = $this->nettoyer($reseau['codeReseau']);
$idReseau = $this->nettoyer($reseau['id']);
$nomReseau = $this->nettoyer($reseau['libelle']);
?>
<input class="sr-only" type="text" id="codeReseau" name="codeReseau" value="<?= $codeReseau ?>" >
<input class="sr-only" type="text" id="idReseau" name="idReseau" value="<?= $idReseau ?>" >
<div id="div_prestataires_reseau" class="col-lg-20">
<div id="div_prestataire_1" class="table-responsive">
<table id="tab_ent_prestataire_1" class="table table-condensed table-responsive">
<tbody>
<tr valign="top">
<td align='center' colspan="2">
<button type="button" style="font-size:10pt;" class="form-control btn btn-primary"
onclick="javascript:afficher_prestataires_reseau();" > <?= _("Actualiser...") ?>
</button>
</td>
</tr>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;"><?= _("Prestataires disponibles") ?></td>
<td>
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne1" name="nbligne1" value="Nbre Lignes :<?= format_N(count($prestatairesdispo));?>" readonly>
</td>
</tr>
</tbody>
</table>
<table id="tab_prestataire_1" class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <?= _("Nom") ?> </th>
<th style='text-align:center'> <?= _("Type") ?> </th>
<th style='text-align:center'> <?= _("Ville") ?> </th>
<th style='text-align:center'> => </th>
</tr>
<tr>
<td colspan="4">
<button type="button" style="font-size:10pt; width:100%;" class="form-control btn btn-primary"
onclick="javascript:ajouter_tous_prestataires_reseau();" >
<?= "============================ "._("Ajouter Tous")." ============================>" ?>
</button>
</td>
</tr>
</thead>
<tbody>
<?php foreach ($prestatairesdispo as $v):
$idPrestataire = $v['id'];
$codePrestataire = $v['codePrestataire'];
?>
<tr ondblclick="javascript:prestatairereseausoins_id(<?= $idPrestataire ?>);" valign="top">
<td><?= $this->nettoyer($v['libelle']) ?></td>
<td><?= $this->nettoyer($v['typeprestataire']) ?></td>
<td><?= $this->nettoyer($v['localite']) ?></td>
<td align='center'>
<input type="button" value="=>" onClick="javascript:ajouter_un_prestataire_reseau('<?=$codePrestataire?>');"
style="font-size:10pt; width:30px;" >
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_prestataire_2" class="table-responsive">
<table class="table table-condensed table-responsive">
<tbody>
<tr>
<td align='center' colspan="2"><INPUT style="font-size:12pt;" class="form-control text-center" TYPE="text" value="Réseau: <?= $nomReseau ?> " disabled ></td>
</tr>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;">
<?= _("Prestataires ajoutés") ?>
</td>
<td >
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne2" name="nbligne2"
value="Nbre Lignes : <?= Format_N(count($prestatairesreseau))?>" readonly>
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Nom") ?> </th>
<th style='text-align:center'> <?= _("Ville") ?> </th>
</tr>
<tr>
<td colspan="4">
<button type="button" style="font-size:10pt; width:100%;" class="form-control btn btn-danger" onclick="javascript:retirer_tous_prestataires_du_site();" >
<?= "<================== " . _("Retirer Tous")." ==================" ?>
</button>
</td>
</tr>
</thead>
<tbody>
<?php foreach ($prestatairesreseau as $v):
$idPrestataire = $v['id'];
$codePrestataire = $v['codePrestataire'];
?>
<tr valign="top">
<td align='center'>
<input type="button" value="<=" onclick="javascript:retirer_un_prestataire_reseau('<?=$codePrestataire?>');"
style="font-size:10pt; width:30px;">
</td>
<td><?= $this->nettoyer($v['libelle']) ?></td>
<td><?= $this->nettoyer($v['localite']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>