|
18 | 18 | $deletebounce = isset($_GET['deletebounce']); //BUGFIX #15286 - nickyoung
|
19 | 19 | $amount = isset($_GET['amount']) ? sprintf('%d', $_GET['amount']) : ''; //BUGFIX #15286 - CS2
|
20 | 20 | $unconfirm = isset($_GET['unconfirm']); //BUGFIX #15286 - CS2
|
| 21 | +$confirm = isset($_GET['confirm']); |
21 | 22 | $maketext = isset($_GET['maketext']); //BUGFIX #15286 - CS2
|
22 | 23 | $deleteuser = isset($_GET['deleteuser']); //BUGFIX #15286 - CS2
|
23 | 24 |
|
|
76 | 77 | }
|
77 | 78 | }
|
78 | 79 |
|
79 |
| - if (!empty($userid) && $unconfirm) { |
80 |
| - Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', |
| 80 | + if (!empty($userid) && ($unconfirm || $confirm)) { |
| 81 | + Sql_Query(sprintf('update %s set confirmed = ' . ($confirm ? '1' : '0') . ' where id = %d', |
81 | 82 | $tables['user'], $userid));
|
82 |
| - $actionresult .= sprintf($GLOBALS['I18N']->get('Made subscriber %s unconfirmed').'<br />', $userid); |
| 83 | + if ($confirm) { |
| 84 | + $actionresult .= sprintf(s('Made subscriber %s confirmed').'<br />', $userid); |
| 85 | + } else { |
| 86 | + $actionresult .= sprintf(s('Made subscriber %s unconfirmed').'<br />', $userid); |
| 87 | + } |
83 | 88 | }
|
84 | 89 |
|
85 | 90 | if (!empty($userid) && $maketext) {
|
|
164 | 169 | $GLOBALS['I18N']->get('Memo for this rule'));
|
165 | 170 | $newruleform .= '<tr><td colspan="2"><p class="submit"><input type="submit" name="add" value="'.$GLOBALS['I18N']->get('Add new Rule').'" /></p></td></tr>';
|
166 | 171 | $newruleform .= '</table></form>';
|
167 |
| - |
168 | 172 | $actionpanel = '';
|
169 | 173 | $actionpanel .= '<form method="get" action="">';
|
170 | 174 | $actionpanel .= '<input type="hidden" name="page" value="'.$page.'" />';
|
171 | 175 | $actionpanel .= '<input type="hidden" name="id" value="'.$id.'" />';
|
172 | 176 | $actionpanel .= '<input type="hidden" name="type" value="'.$type.'" />';
|
173 | 177 | $actionpanel .= '<table class="bounceActions">';
|
174 |
| - $actionpanel .= '<tr><td>'.$GLOBALS['I18N']->get('For subscriber with email').'</td><td><input type="text" name="useremail" value="'.$guessedemail.'" size="35" /></td></tr>'; |
| 178 | + list($msgDetails, $userDetails, $furtherDetails) = array('', '', ''); |
| 179 | + if (preg_match("#bounced list message ([\d]+)#", $bounce['status'], $regs)) |
| 180 | + $msgDetails = s('Campaign') . ' ' . PageLink2('message&id='.$regs[1], shortenTextDisplay(campaignTitle($regs[1]), 30)); |
| 181 | + if (isset($guessedid)) { |
| 182 | + $userDetails = Sql_Fetch_Assoc_Query(sprintf('select confirmed from %s where id = %d', $tables['user'], $guessedid)); |
| 183 | + if ($userDetails['confirmed'] && !isBlackListed(htmlspecialchars($guessedemail))) |
| 184 | + $ls_confirmed = $GLOBALS['img_tick']; |
| 185 | + else |
| 186 | + $ls_confirmed = $GLOBALS['img_cross']; |
| 187 | + $userDetails = s('User') . ' ' . PageLink2('user&id='.$guessedid, $guessedid) . ' ' . $ls_confirmed . '<br />(' . s('Subscribers with a red icon are either unconfirmed or blacklisted or both') . ')'; |
| 188 | + } |
| 189 | + if (!empty($msgDetails) || !empty($userDetails)) |
| 190 | + $furtherDetails = '<br />' . $msgDetails . (empty($msgDetails) ? '' : ' ') . $userDetails; |
| 191 | + $actionpanel .= '<tr><td>'.s('For subscriber with email').$furtherDetails.'</td><td><input type="text" name="useremail" value="'.$guessedemail.'" size="35" /></td></tr>'; |
175 | 192 | $actionpanel .= '<tr><td>'.$GLOBALS['I18N']->get('Increase bouncecount with').'<br />'.$GLOBALS['I18N']->get('(use negative numbers to decrease)').'</td><td><input type="text" name="amount" value="0" size="5" /></td></tr>';
|
176 |
| - $actionpanel .= '<tr><td>'.$GLOBALS['I18N']->get('Mark subscriber as unconfirmed').'<br />'.$GLOBALS['I18N']->get('(so you can resend the request for confirmation)').' </td><td><input type="checkbox" name="unconfirm" value="1" /></td></tr>'; |
| 193 | + $actionpanel .= '<tr><td>'.s('Mark subscriber as unconfirmed').'<br />'.s('(so you can resend the request for confirmation)').'<br />'.s('or confirmed').'<br />'.s('(so you can revert possible auto unconfirmation)'). ' </td><td>'.s('unconfirmed').'<input onclick="if (this.checked && form.confirm.checked) form.confirm.checked=false" type="checkbox" name="unconfirm" value="1" />'.s('confirmed').'<input onclick="if (this.checked && form.unconfirm.checked) form.unconfirm.checked=false" type="checkbox" name="confirm" value="1" /></td></tr>'; |
177 | 194 | $actionpanel .= '<tr><td>'.$GLOBALS['I18N']->get('Set subscriber to receive text instead of HTML').' </td><td><input type="checkbox" name="maketext" value="1" /></td></tr>';
|
178 | 195 | $actionpanel .= '<tr><td>'.$GLOBALS['I18N']->get('Delete subscriber').' </td><td><input type="checkbox" name="deleteuser" value="1" /></td></tr>';
|
179 | 196 | if (ALLOW_DELETEBOUNCE) {
|
|
0 commit comments