| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
require_once("../class/config.php"); |
|---|
| 31 |
|
|---|
| 32 |
include("head.php"); |
|---|
| 33 |
|
|---|
| 34 |
$r=$sympa->get_ml($id); |
|---|
| 35 |
|
|---|
| 36 |
$u=$sympa->get_ml_users($id,$offset); |
|---|
| 37 |
|
|---|
| 38 |
$count=$u["affiche"]; |
|---|
| 39 |
?> |
|---|
| 40 |
</head> |
|---|
| 41 |
<body> |
|---|
| 42 |
|
|---|
| 43 |
<div align="center"><h3><?php printf(_("Mailing list %s"),$r["list"]); ?></h3></div> |
|---|
| 44 |
|
|---|
| 45 |
<hr> |
|---|
| 46 |
<?php |
|---|
| 47 |
|
|---|
| 48 |
if ($offset+$count>$u["count"]) |
|---|
| 49 |
$top=$u["count"]; |
|---|
| 50 |
else |
|---|
| 51 |
$top=$offset+$count; |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
if ($u["count"]>$count) |
|---|
| 55 |
$lien="<a href='lst_affallsub.php?id=".$id."'>"._("Show all subscribed emails")."</a>"; |
|---|
| 56 |
else |
|---|
| 57 |
$lien=""; |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
printf(_("From %s to %s sur %s"),($offset+1),$top,$u["count"]); |
|---|
| 61 |
echo " ".$lien; |
|---|
| 62 |
?> |
|---|
| 63 |
<br> |
|---|
| 64 |
<!-- Affichage des boutons de navigation dans un tableau (en haut de page)--> |
|---|
| 65 |
<table cellspacing="0" cellpadding="4" border="0" cols="4" width="140"> |
|---|
| 66 |
<tr valign="top"> |
|---|
| 67 |
<td align="center" width="35"> |
|---|
| 68 |
<?php |
|---|
| 69 |
if ($offset>0) { |
|---|
| 70 |
?> |
|---|
| 71 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=0"> |
|---|
| 72 |
<input type="submit" class="inb" name="precedent" value="<< "> |
|---|
| 73 |
</form> |
|---|
| 74 |
<?php |
|---|
| 75 |
} else { |
|---|
| 76 |
echo " "; |
|---|
| 77 |
} |
|---|
| 78 |
?> |
|---|
| 79 |
</td> |
|---|
| 80 |
<td width="35" align="center"> |
|---|
| 81 |
<?php |
|---|
| 82 |
if ($offset>0) { |
|---|
| 83 |
?> |
|---|
| 84 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $offset-$count; ?>"> |
|---|
| 85 |
<input type="submit" class="inb" name="precedent" value=" < "> |
|---|
| 86 |
</form> |
|---|
| 87 |
<?php |
|---|
| 88 |
} else { |
|---|
| 89 |
echo " "; |
|---|
| 90 |
} |
|---|
| 91 |
?> |
|---|
| 92 |
</td><td width="35" align="center"> |
|---|
| 93 |
<?php |
|---|
| 94 |
if ($offset+$count<$u["count"]) { |
|---|
| 95 |
?> |
|---|
| 96 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $offset+$count; ?>"> |
|---|
| 97 |
<input type="submit" class="inb" name="precedent" value=" > "> |
|---|
| 98 |
</form> |
|---|
| 99 |
<?php |
|---|
| 100 |
} else { |
|---|
| 101 |
echo " "; |
|---|
| 102 |
} |
|---|
| 103 |
?> |
|---|
| 104 |
</td> |
|---|
| 105 |
<td align="center" width="30"> |
|---|
| 106 |
<?php |
|---|
| 107 |
if ($offset+$count<$u["count"]) { |
|---|
| 108 |
// Calcul de $fin argh, la boucle for ! |
|---|
| 109 |
for ($i=0;$i<$u["count"];$i+=$count){ |
|---|
| 110 |
$fin=$i; |
|---|
| 111 |
} |
|---|
| 112 |
?> |
|---|
| 113 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $fin; ?>"> |
|---|
| 114 |
<input type="submit" class="inb" name="precedent" value=" >>"> |
|---|
| 115 |
</form> |
|---|
| 116 |
<?php |
|---|
| 117 |
} else { |
|---|
| 118 |
echo " "; |
|---|
| 119 |
} |
|---|
| 120 |
?> |
|---|
| 121 |
</td></tr> |
|---|
| 122 |
</table> |
|---|
| 123 |
|
|---|
| 124 |
<!-- Tableau affichant la liste des mails inscrits --> |
|---|
| 125 |
<table cellspacing="0" cellpadding="4" border="0" cols="4"> |
|---|
| 126 |
<tr> |
|---|
| 127 |
<form method="post" action="lst_delsub.php?id=<?php echo $id ?>&offset=<?php echo $offset ?>"> |
|---|
| 128 |
<th width="35"><?php __("Delete"); ?></th><th><?php __("Email address"); ?></th><th><?php __("Name"); ?></th><th> </th></tr> |
|---|
| 129 |
<?php |
|---|
| 130 |
$col=1; |
|---|
| 131 |
for($i=0;$i<count($u["mail"]);$i++) { |
|---|
| 132 |
$c=$u["mail"][$i]; |
|---|
| 133 |
$d=$u["nom"][$i]; |
|---|
| 134 |
$col=3-$col; |
|---|
| 135 |
echo "<tr class=\"lst$col\"><td align=\"center\"><input type=\"checkbox\" class=\"inc\" name=\"del_".$i."\" value=\"".$c."\"></td>"; |
|---|
| 136 |
echo "<td>".$c."</td>"; |
|---|
| 137 |
echo "<td>".$d."</td>"; |
|---|
| 138 |
echo "<td align=\"center\"><a href='lst_editsub.php?id=".$id."&mail=".$c."&name=".$d."&offset=".$offset."'>"._("Edit")."</a></td></tr>"; |
|---|
| 139 |
} |
|---|
| 140 |
?> |
|---|
| 141 |
<tr valign="top"> |
|---|
| 142 |
<td align="left" colspan="4"> |
|---|
| 143 |
<input type="submit" class="inb" name="submit" value="<?php __("Delete the checked subscribers"); ?>"> |
|---|
| 144 |
</form></td> |
|---|
| 145 |
</tr> |
|---|
| 146 |
</table> |
|---|
| 147 |
|
|---|
| 148 |
<!-- Affichage des boutons de navigation dans un tableau (en bas de page)--> |
|---|
| 149 |
<table cellspacing="0" cellpadding="4" border="0" cols="4" width="140"> |
|---|
| 150 |
<td valign="top"> |
|---|
| 151 |
|
|---|
| 152 |
<?php |
|---|
| 153 |
if ($offset>0) { |
|---|
| 154 |
?> |
|---|
| 155 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=0"> |
|---|
| 156 |
<input type="submit" class="inb" name="precedent" value="<< "> |
|---|
| 157 |
</form> |
|---|
| 158 |
<?php |
|---|
| 159 |
} else { |
|---|
| 160 |
echo " "; |
|---|
| 161 |
} |
|---|
| 162 |
?> |
|---|
| 163 |
</td> |
|---|
| 164 |
<td width="35" align="center"> |
|---|
| 165 |
<?php |
|---|
| 166 |
if ($offset>0) { |
|---|
| 167 |
?> |
|---|
| 168 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $offset-$count; ?>"> |
|---|
| 169 |
<input type="submit" class="inb" name="precedent" value=" < "> |
|---|
| 170 |
</form> |
|---|
| 171 |
<?php |
|---|
| 172 |
} else { |
|---|
| 173 |
echo " "; |
|---|
| 174 |
} |
|---|
| 175 |
?> |
|---|
| 176 |
</td><td width="35" align="center"> |
|---|
| 177 |
<?php |
|---|
| 178 |
if ($offset+$count<$u["count"]) { |
|---|
| 179 |
?> |
|---|
| 180 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $offset+$count; ?>"> |
|---|
| 181 |
<input type="submit" class="inb" name="precedent" value=" > "> |
|---|
| 182 |
</form> |
|---|
| 183 |
<?php |
|---|
| 184 |
} else { |
|---|
| 185 |
echo " "; |
|---|
| 186 |
} |
|---|
| 187 |
?> |
|---|
| 188 |
</td> |
|---|
| 189 |
<td align="center" width="30"> |
|---|
| 190 |
<?php |
|---|
| 191 |
if ($offset+$count<$u["count"]) { |
|---|
| 192 |
// Calcul de $fin argh, la boucle for ! on teste ca pour voir... |
|---|
| 193 |
$fin=($count*intval($u["count"]/$count))+1; |
|---|
| 194 |
?> |
|---|
| 195 |
<form method="post" action="lst_affsub.php?id=<?php echo $id ?>&offset=<?php echo $fin; ?>"> |
|---|
| 196 |
<input type="submit" class="inb" name="precedent" value=" >>"> |
|---|
| 197 |
</form> |
|---|
| 198 |
<?php |
|---|
| 199 |
} else { |
|---|
| 200 |
echo " "; |
|---|
| 201 |
} |
|---|
| 202 |
?> |
|---|
| 203 |
</td></tr> |
|---|
| 204 |
</table> |
|---|
| 205 |
<br> |
|---|
| 206 |
<!-- Liens pour passer d'une table à l'autre en se basant sur le nom --> |
|---|
| 207 |
<?php |
|---|
| 208 |
|
|---|
| 209 |
$u=$sympa->get_ml_all_users($id); |
|---|
| 210 |
if ($u["count"]>$count) { |
|---|
| 211 |
echo "<p>"._("To access directly a page from a mail address:")."<br>"; |
|---|
| 212 |
for ($i=0;$i<$u["count"];$i+=$count){ |
|---|
| 213 |
if ($i+$count<$u["count"]) { |
|---|
| 214 |
|
|---|
| 215 |
$j=$i+$count-1; |
|---|
| 216 |
echo _("From ")."<a href='lst_affsub.php?id=".$id."&offset=".$i."'>".$u["mail"][$i]."</a> "._("to")." <a href='lst_affsub.php?id=".$id."&offset=".$i."'>".$u["mail"][$j]."</a><br>"; |
|---|
| 217 |
} |
|---|
| 218 |
else { |
|---|
| 219 |
// $j=$total-1; |
|---|
| 220 |
// $requete="SELECT mail FROM subscribers LIMIT $j,1"; |
|---|
| 221 |
$j=$u["count"]-1; |
|---|
| 222 |
echo _("From ")."<a href='lst_affsub.php?id=".$id."&offset=".$i."'>".$u["mail"][$i]."</a> "._("to")." <a href='lst_affsub.php?id=".$id."&offset=".$i."'>".$u["mail"][$j]."</a><br>"; |
|---|
| 223 |
} |
|---|
| 224 |
} |
|---|
| 225 |
} |
|---|
| 226 |
?> |
|---|
| 227 |
<hr> |
|---|
| 228 |
<a href="lst_subscribers.php?id=<?php echo $id; ?>"><?php __("Back to the subscription page"); ?></a> |
|---|
| 229 |
</body> |
|---|
| 230 |
</html> |
|---|