205 lines
11 KiB
PHP
Executable File
205 lines
11 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Variables
|
|
// -----------------------------------------------------
|
|
$tabLibPaie =array();
|
|
|
|
// -----------------------------------------------------
|
|
// Post
|
|
// -----------------------------------------------------
|
|
include ("mp.post.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Requete count langues
|
|
if (empty($tableLangueCode) or $refresh=='Oui') { include ($includePath. "/req/03-init.langueActives.php");}
|
|
|
|
// -----------------------------------------------------
|
|
// Upload
|
|
// -----------------------------------------------------
|
|
if (isset($_FILES['fileToUpload' .$theIdPaie]['tmp_name']) && $_FILES['fileToUpload' .$theIdPaie]['tmp_name']!='')
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['upload fait' => ''], '');}
|
|
else
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['upload :' => $_FILES['fileToUpload']['tmp_name'],'theIdPaie' => $theIdPaie ], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Update
|
|
// -----------------------------------------------------
|
|
if ($codeOpe==='upActiv') {include ("mp.reqUpActiv.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['update activ' => 'Non'], '');}
|
|
|
|
if ($codeOpe==='upLib') {include ("mp.reqUpLib.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['update lib' => 'Non'], '');}
|
|
|
|
if ($codeOpe==='upIco' && $uploadOk==1 ) {include ("mp.reqUpIco.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['update ico' => 'Non'], '');}
|
|
|
|
if ($codeOpe==='upIcoMPClass') {include ("mp.reqUpIco.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['update ico class' => 'non'], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Select
|
|
// Recup listes modes paie
|
|
include ("mp.reqSelect.php");
|
|
|
|
// // -----------------------------------------------------
|
|
// // Debug
|
|
// if (isset($debug[1]) && $debug[1] == '1') {include ("moyensP.debug.php");}
|
|
|
|
// -----------------------------------------------------
|
|
// Gestion avancement
|
|
// -----------------------------------------------------
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Veuillez configurer un moyen de paiement pour activer cette étape' => ''], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Form
|
|
// -----------------------------------------------------
|
|
echo '<form name="MPF" id="MPF" method="POST" enctype="multipart/form-data" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
echo '<input type="hidden" name="modifLg" id="modifLg" value="' .$modifLg. '" />';
|
|
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" />';
|
|
echo '<input type="hidden" name="lgCourante" id="lgCourante" value="' .$_SESSION['lgCouranteCode']. '" />';
|
|
echo '<input type="hidden" name="activPaie2" id="activPaie2" value="' .$activPaie2. '" />';
|
|
echo '<input type="hidden" name="theFichier" id="theFichier" value="' .$theFichier. '" />';
|
|
|
|
echo '<input type="hidden" name="theIdPaie" id="theIdPaie" value="' .$theIdPaie. '" />';
|
|
echo '<input type="hidden" name="libPaie2" id="libPaie2" value="' .$libPaie2. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// List box langues
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneRechercheWbm">';
|
|
$lgLien="affAdmin=6&optAff=1";
|
|
if ($_SESSION['nbLg']>1) {include ($includePathAdmin. "/drapeaux/drapeauxListBox.php");}
|
|
echo '</div>';
|
|
|
|
echo '<div id="gridT" style="display:grid; justify-items:left; font-size:1rem; align-items:center; justify-content:space-evenly; grid-template-columns: 1fr 1fr 1fr 2fr 1fr 2fr ; margin:auto; width:100%; padding-top:12px;" >';
|
|
echo '<span class="libelleLV" style="grid-column:1;width:100%; position:sticky; top:160px; z-index:10 ">Configurer</span>';
|
|
echo '<span class="libelleLV" style="grid-column:2;width:100%; position:sticky; top:160px; z-index:10 ">Description</span>';
|
|
echo '<span class="libelleLV" style="grid-column:3;width:100%; position:sticky; top:160px; z-index:10 ">Site prestataire</span>';
|
|
echo '<span class="libelleLV" style="grid-column:4;width:100%; position:sticky; top:160px; z-index:10 ">Libellé affiché</span>';
|
|
echo '<span class="libelleLV" style="grid-column:5;width:100%; position:sticky; top:160px; z-index:10 ">Activation</span>';
|
|
echo '<span class="libelleLV" style="grid-column:6;width:100%; position:sticky; top:160px; z-index:10 ">Icône</span>';
|
|
|
|
for ($i=0; $i<count($tabIdPaie); $i++) {
|
|
if ($i==0) echo '<br>';
|
|
|
|
//exlure les MP pas encore ready
|
|
if ($i!=0 && $i!=6 && $i!=7) {
|
|
|
|
// -----------------------------------------------------
|
|
// Pas de mangoPay du tout pour le moment, et credit agricole vad non plus
|
|
// -----------------------------------------------------
|
|
if ($tabIdPaie[$i]!=5 && $tabIdPaie[$i]!=9) {
|
|
|
|
// -----------------------------------------------------
|
|
// Bouton Réglages si pas cheque, pas virement bancaire
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:1;" >';
|
|
// if ($tabIdPaie[$i]==1) $action="window.location=\'./grilleTarifaire.modale.php\;";
|
|
if ($tabIdPaie[$i]!='2' && $tabIdPaie[$i]!='3') {
|
|
echo '<span class="fa-2x fad fa-cog" onClick="window.location=\'./frmModale.php?affModale=6-1&theIdPaie=' .$tabIdPaie[$i]. '\';"></span>';
|
|
}
|
|
else {
|
|
if ($tabIdPaie[$i]=='2') echo '<span onClick="window.location=\'./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=1\';" style="cursor:pointer; color:blue">Adresse pour le cheque</a></span>';//cheque
|
|
if ($tabIdPaie[$i]=='3') echo '<span onClick="window.location=\'./frmAdmin.php?affAdmin=6&optAff=5&typeOfCommercant=2\';" style="cursor:pointer; color:blue">Adresse pour le rib</a></span>';//rib
|
|
|
|
}
|
|
// echo ' ';
|
|
// echo $tabIdPaie[$i];
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Description
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:2;" >';
|
|
echo $tabDescPaie[$i];
|
|
//afficher i debug
|
|
// echo $tabDescPaie[$i].' ('.$i.')';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Type
|
|
// -----------------------------------------------------
|
|
// echo '<span class="inputLV" style="grid-column2;" >';
|
|
// echo '' .$tabTypeComptePaie[$i]. '';
|
|
// echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Lien site
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:3; " >';
|
|
$test='';
|
|
$test=strpos($tabLienMP[$i],"ttp");
|
|
|
|
// connerie anti patate car test vide et test0 son reconnus pareil par php
|
|
// if ($test==0) $test=1;
|
|
// echo 'test=' .$test;
|
|
if (!empty($tabLienMP[$i]) && $test!= false ) {
|
|
echo '<a href="' .$tabLienMP[$i]. '" target="_blank">' .$tabDescPaie[$i]. '</a>';
|
|
}
|
|
else {
|
|
echo $tabDescPaie[$i]. '';
|
|
}
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Libelle
|
|
// -----------------------------------------------------
|
|
echo '<span style="grid-column:4; " >';
|
|
// echo '<span style="border:0px;" >';
|
|
echo '<input class="inputLV" type="text" onChange="libMp(this.value,\'' .$tabIdPaie[$i]. '\')" name="libPaie" id="libPaie' .$tabIdPaie[$i]. '" value="' .$tabLibPaie[$i]. '" title="Libellé du mode de paiement" >';
|
|
// echo '</span>';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Activation
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:5;" >';
|
|
echo '<span >Activer :</span>';
|
|
if ($tabActivPaie[$i]==1)
|
|
{echo '<input class="inputLV" type="checkbox" checked onClick="activMp(\'' .$tabIdPaie[$i]. '\')" name="actPaie" id="actPaie' .$tabIdPaie[$i]. '" value="1" title="Activation du mode de paiement" >';
|
|
}
|
|
else
|
|
{echo '<input class="inputLV" type="checkbox" onClick="activMp(\'' .$tabIdPaie[$i]. '\')" name="actPaie" id="actPaie' .$tabIdPaie[$i]. '" value="0" title="Activation du mode de paiement" >';
|
|
}
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Ico
|
|
// -----------------------------------------------------
|
|
echo '<span style="width:100%; height:100%; grid-column:6; text-align: center; vertical-align: middle; " >';
|
|
$test=strtolower(substr($tabIconePaie[$i],-3));
|
|
if ($test=='jpg' || $test=='peg' || $test=='gif' || $test=='svg' || $test=='png' || $test=='bmp') {
|
|
echo '<img style="vertical-align: middle; max-width:20%; "" src=".' .$tabIconePaie[$i]. '" />';
|
|
echo ' ';
|
|
}
|
|
else {
|
|
echo '<span class="' .$tabIconePaie[$i]. '" style="fmargin:1px;" ></span>';
|
|
echo ' ';
|
|
}
|
|
echo '<input onChange="updateIcoMp(this.value,' .$tabIdPaie[$i]. ');" class="inputLV" type="text" name="icoPaie" id="icoPaie" value="' .$tabIconePaie[$i]. '" title="Saisir une icône de classe" style="margin-bottom:5px;" >';
|
|
echo ' ';
|
|
echo ' <label for="fileToUpload' .$tabIdPaie[$i]. '" >';
|
|
echo '<span class="boutonsWebmaster" style="padding:0px;" data-tooltip="Cliquez ici pour parcourir les dossiers de votre ordinateur. Formats : png, jpg, bmp, gif autorisés. " >';
|
|
echo ' <i class="fad fa-download""></i>';
|
|
echo '</span>';
|
|
echo '</label>';
|
|
// echo 'Choisir une icône (ou saisie)';
|
|
echo '<input style="display:none;" type="file" name="fileToUpload' .$tabIdPaie[$i]. '" id="fileToUpload' .$tabIdPaie[$i]. '" onChange="upIcoMp(' .$tabIdPaie[$i]. ');" >';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Séparation
|
|
// -----------------------------------------------------
|
|
echo '<br><span style="grid-column:1 / span 6; padding-bottom:2px; padding-top:2px; height:1px; width:100%; background-color:lightgrey;" >';
|
|
echo '</span><br>';
|
|
} //if pas mangopay
|
|
}
|
|
}
|
|
echo '</div>';
|
|
echo '</form>';
|
|
?>
|