68 lines
2.2 KiB
PHP
Executable File
68 lines
2.2 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
//
|
|
function checkSms($idListeSMS, $idSms, $statutSMS) {
|
|
//
|
|
$trouve=false;
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['P' => $idListeSMS, ' idSms' => $idSms, ' Statut' => $statutSMS], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Recup profil
|
|
// -----------------------------------------------------
|
|
switch ($idSms) {
|
|
|
|
case 1:
|
|
$desc='Pack 800 SMS';
|
|
$optionExist=true;
|
|
break;
|
|
|
|
case 2:
|
|
$desc='Pack 2000 SMS';
|
|
$optionExist=true;
|
|
break;
|
|
|
|
case 0:
|
|
case '':
|
|
default:
|
|
$desc='Pas de pack';
|
|
$optionExist=false;
|
|
break;
|
|
}
|
|
|
|
// pack 800 sms
|
|
if ($idSms==$idListeSMS && $statutSMS=='actif') {
|
|
$trouve=true;
|
|
if ($_SESSION['isDemo']==1) {
|
|
echo '<input type="checkbox" disabled checked>';
|
|
echo '<span class="boutonsWebmaster" onClick="alert(\'Pas disponible en démo\');" style="color:grey;" >';
|
|
echo '<i class="fad fa-trash-alt" style="color:grey;fill:red;" ></i>';
|
|
echo 'Désactiver </span>';
|
|
}
|
|
else {
|
|
echo '<input type="checkbox" onClick="cancelSms(1);" checked>';
|
|
echo '<span class="boutonsWebmaster" onClick="cancelSms(1);" style="color:black;" >';
|
|
echo '<i class="fad fa-trash-alt" style="color:red;fill:red;cursor:pointer;" ></i>';
|
|
echo 'Désactiver </span>';
|
|
}
|
|
}
|
|
|
|
// profil pas activé : lien vers abonnement
|
|
|
|
if ($trouve==false) {
|
|
if ($optionExist==true) {
|
|
echo '<input type="checkbox" disabled " >';
|
|
echo '<span class="boutonsWebmaster" onClick="alert(\'Veuillez désactiver votre abonnement existant.\');" >';
|
|
echo '<i class="fad fa-square" style="color:green; fill:green; cursor:pointer;" ></i>';
|
|
echo 'Activation </span>';
|
|
}
|
|
else {
|
|
echo '<input type="checkbox" onClick="window.open(\'./extensions/sms/0.1createSmsChapeau.php?adminMail=' .$_SESSION['adminMail']. '&idSms=' .$idListeSMS. '\', \'_blank\');" >';
|
|
echo '<span class="boutonsWebmaster" onClick="window.open(\'./extensions/sms/0.1createSmsChapeau.php?adminMail=' .$_SESSION['adminMail']. '&idSms=' .$idListeSMS. '\', \'_blank\');" >';
|
|
echo '<i class="fad fa-square" style="color:green; fill:green; cursor:pointer;" ></i>';
|
|
echo 'Activer </span>';
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
|