if (sizeof($subscribers)) { echo "<h4 class='alert_info'>Rechercher un abonné pour suppression définitive</h4>\n <br><div align='center'>\n <form action='" . $_SERVER['PHP_SELF'] . "' method='post'>\n <input type='hidden' name='op' value='subscriber_del' />\n <input type='hidden' name='action' value='manage' />\n <input type='hidden' name='page' value='subscribers' />\n <input type='hidden' name='list_id' value='{$list_id}' />\n <input type='hidden' name='token' value='{$token}' />\n <input type='hidden' name='t' value='s' />\n <select name='del_addr' class='input'>"; foreach ($subscribers as $row) { echo "<option value='" . $row['email'] . "' >" . $row['email'] . "</option>"; } echo "</select>\n <input type='submit' value='" . translate("SUBSCRIBER_DELETE_BTN") . "' />\n </form>"; echo @$subscriber_op_msg; "</div>"; } } elseif ($cpt_suscribers > 500) { echo "<h4 class='alert_info'>Rechercher un abonné pour suppression définitive</h4>\n <br><div align='center'>\n <form>\n <input type='input' id='searchid' placeholder='Rechercher une adresse' size='30' maxlength='255' style='width:300px' />\n <input type='button' name='action' class='actionMail' value='DELETE' id='delete' />\n <span id='resultdel'></span>\n </form>\n <div id='result'></div>\n </div>\n <script>\n \$('input.actionMail').click(function(){\n var searchid = \$('#searchid').val();\n var token = '{$token}';\n var list_id = '{$list_id}';\n var dataString = 'search='+ searchid +'&token='+token+'&list_id='+list_id;\n \$.ajax({type:'POST',\n url: 'del_mails.php',\n data: dataString,\n success: function(data){\n \$('#resultdel').html(data).show();\n \$('#resultdel').delay(3000).fadeOut('slow');\n \$('#searchid').val('');\n }\n });\n });\n </script>"; } echo "</div>"; break; case 'e': $cpt_suscribers = getSubscribersNumbers($cnx, $row_config_globale['table_email'], $list_id); echo "<header><h3>" . translate("SUBSCRIBER_EXPORT_TITLE") . "</h3></header>\n <div class='module_content'>"; if ($cpt_suscribers > 0) { echo "<h4 class='alert_info'>NB : Sauvegardez régulièrement votre liste d'abonnés !</h4>\n <form action='export.php' method='post'><input type='hidden' name='list_id' value='{$list_id}' />\n <input type='hidden' name='token' value='{$token}' />\n <br><div align='center'>\n <input type='submit' name='Submit' value='" . translate("SUBSCRIBER_EXPORT_BTN") . "' />\n </div></form>"; } else { echo "<h4 class='alert_info'>" . translate("NO_SUBSCRIBER") . "</h4>"; } echo "</div>"; break; case 't': if ($op == "subscriber_del_temp") { echo "<header><h3>" . translate("SUBSCRIBER_TEMP_TITLE") . "</h3></header>\n <div class='module_content'>"; $del_tmpaddr = empty($_POST['del_tmpaddr']) ? "" : $_POST['del_tmpaddr']; $deleted_temp = delete_subscriber($cnx, $row_config_globale['table_temp'], $list_id, $del_tmpaddr); if ($deleted_temp) { echo "<h4 class='alert_success'>" . translate("SUBSCRIBER_TEMP_DELETED") . "</h4>";
echo '<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>Liste N°</th> <th>Nom de la liste</th> <th>Nombre d\'abonnés</th> <th>Supprimer</th> </tr> </thead> <tbody>'; foreach ($list as $item) { echo '<tr>'; echo '<td>' . ($item['list_id'] == $list_id ? "<b>{$list_id}</b>" : $item['list_id']) . '</td>'; echo $item['list_id'] == $list_id ? '<td><a href="?list_id=' . $item['list_id'] . '&token=' . $token . '" style="padding-left:4px;padding-right:6px;color:rgb(255,255,255);background-color:rgb(22,167,101);font:12px arial,sans-serif;" class="tooltip" title="Liste sélectionnée" >' . $item['newsletter_name'] . '</a></td>' : '<td><a href="?list_id=' . $item['list_id'] . '&token=' . $token . '" class="tooltip" title="Sélectionner cette liste">' . $item['newsletter_name'] . '</a></td>'; echo '<td>' . getSubscribersNumbers($cnx, $row_config_globale['table_email'], $item['list_id']) . '</td>'; echo '<td><a href="?page=listes&l=l&action=delete&list_id=' . $item['list_id'] . '&token=' . $token . '" class="tooltip" title="Supprimer cette lettre d\'information" onclick="return confirm(\'Supprimer toutes les informations relatives à cette liste ?\\nCette action est iiréversible !\')"><input type="image" src="css/icn_trash.png"></a></td>'; echo '</tr>'; } echo '</table>'; } elseif ($list_name == -1) { $error_list = true; } elseif (empty($list) && $page != "newsletterconf" && $page != "config") { echo "<div align='center' class='tooltip critical'>" . translate("ERROR_NO_NEWSLETTER_CREATE_ONE") . "</div>"; $error_list = true; exit; } else { // dummy ! } echo '</article>'; break;