alpha_full/admin/mails/mails.preview.modale.php
2026-04-06 22:58:51 +02:00

163 lines
3.9 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Etre admin
// -----------------------------------------------------
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
$idCde='';
$mailTotalCde='';
$status='';
$message_html='';
$nbArt ='';
$message_html='';
// -----------------------------------------------------
// POST
// -----------------------------------------------------
if (isset($_GET['affMails'])) {$affMails=$_GET['affMails'];}
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(2, ['affMails=' => $affMails,'prodServer=' => $prodServer], '');}
// -----------------------------------------------------
// req select
// pour clients
$adminMail=$_SESSION['adminMail'];
$validLogin='0';
// pour cdes de test
$idCde1=1;
$idCde=1;
$totalTtcCde=0;
$totalCde=0;
$libellesArt='';
$idModePaieCde='';
$libModePaie='';
$libModeLiv='';
$commentaire='';
$sujet='';
$theIdEtat='';
$msg='';
$oldEtat='';
// mail de test
if (isset($debug[1]) && $debug[1] == '1') {
if (isset($idMail)) $tmpMailCli=$idMail;
$idMail="testeur@123ventes.com";
}
include ("../pages/panier/_modePaiement/modePaie.takeDefaut.php");
include ("../pages/panier/_modeLivraison/modeLiv.takeDefaut.php");
$idPaysLiv=84; //france
$idPaysFact=84;
Switch ($affMails) {
case '1':
case '2':
case '3':
case '4':
include ($includePathCli. "/client.reqSelectFromMail.php");
break;
case '5':
case '6':
case '7':
case '8':
case '9':
case '10':
case '11':
include ($includePathCli. "/client.reqSelectFromMail.php");
include ($includePathCde. "/_reqPanier/panier.reqSelectCde.php");
include ($includePathCde. "/_reqPanier/panier.reqSelectLignes.php");
break;
default:
include ($includePathCli. "/client.reqSelectFromMail.php");
break;
}
if (isset($debug[1]) && $debug[1] == '1') {
if (isset($tmpMailCli)) $idMail=$tmpMailCli;
}
echo '<div id="zoneFormModales" >';
echo '<span style="font-size:11px;"';
Switch ($affMails) {
case '0':
include ($includePath. "/_mail/mailClient_pre_inscription.php");
break;
case '1':
include ($includePath. "/_mail/mailClient_inscription.php");
break;
case '2':
include ($includePath. "/_mail/mailClient_modif.php");
break;
case '3':
include ($includePath. "/_mail/mailClient_remise.php");
break;
case '4':
include ($includePath. "/_mail/mailClient_mdp.php");
break;
case '5':
include ($includePath. "/_mail/mail_commande.php");
break;
case '6':
$totalCde=30;
include ($includePath. "/_mail/mail_business.php");
break;
case '7':
$theIdEtat="Py";
$totalCde=30;
include ("./cdes/listeCde/makeClientMail.php");
break;
case '8':
$theIdEtat="En";
$totalCde=30;
include ("./cdes/listeCde/makeClientMail.php");
break;
case '9':
$theIdEtat="An";
$totalCde=30;
include ("./cdes/listeCde/makeClientMail.php");
break;
case '10':
$theIdEtat="Pe";
$totalCde=30;
include ("./cdes/listeCde/makeClientMail.php");
break;
case '11':
$theIdEtat="EP";
$totalCde=30;
include ("./cdes/listeCde/makeClientMail.php");
break;
// Business
case '20':
$theIdEtat="Rb";
$totalCde=30;
include ("./cdes/listeCde/makeAdminMail.php");
break;
default:
include ("./cdes/listeCde/makeClientMail.php");
break;
}
$test=str_replace("./","../",$message_html);
echo $test;
echo '</span>';
echo '</div>';
}
else {
$confPath="../_conf";
include ($includePathAdmin. "/redirectionAdmin.php");
}
?>