Changeset 1147
- Timestamp:
- 05/12/08 18:19:26
(4 months ago)
- Author:
- rats
- Message:
* Fixed #1207: new order mail to reseller
* Fixed #1208: mailer from reseller not working
* Fixed #1209: Undefined index: mail_type_forward
* Fixed #1236: Setup Email headers not correct
* Fixed #1243: adding mail aborts
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1124 |
r1147 |
|
| 66 | 66 | 'MAIL_ALS_CHECKED' => ($_POST['dmn_type'] === 'als') ? "checked=\"checked\"" : "", |
|---|
| 67 | 67 | 'MAIL_SUB_CHECKED' => ($_POST['dmn_type'] === 'sub') ? "checked=\"checked\"" : "", |
|---|
| 68 | | 'NORMAL_MAIL_CHECKED' => ($_POST['mail_type_normal']) ? "checked=\"checked\"" : "", |
|---|
| 69 | | 'FORWARD_MAIL_CHECKED' => ($_POST['mail_type_forward']) ? "checked=\"checked\"" : "", |
|---|
| | 68 | 'NORMAL_MAIL_CHECKED' => (isset($_POST['mail_type_normal'])) ? "checked=\"checked\"" : "", |
|---|
| | 69 | 'FORWARD_MAIL_CHECKED' => (isset($_POST['mail_type_forward'])) ? "checked=\"checked\"" : "", |
|---|
| 70 | 70 | 'FORWARD_LIST' => $f_list)); |
|---|
| 71 | 71 | } |
|---|
| … | … | |
| 224 | 224 | $mail_addr = ''; |
|---|
| 225 | 225 | |
|---|
| 226 | | if ($_POST['mail_type_normal'] || $_POST['mail_type_forward']) { |
|---|
| 227 | | if ($_POST['mail_type_normal']) { |
|---|
| | 226 | if (isset($_POST['mail_type_normal']) || isset($_POST['mail_type_forward'])) { |
|---|
| | 227 | if (isset($_POST['mail_type_normal'])) { |
|---|
| 228 | 228 | if ($_POST['dmn_type'] === 'dmn') { |
|---|
| 229 | 229 | $mail_pass = $_POST['pass']; |
|---|
| … | … | |
| 370 | 370 | |
|---|
| 371 | 371 | function check_mail_acc_data(&$sql, $dmn_id, $dmn_name) { |
|---|
| 372 | | if ($_POST['mail_type'] != 'forward') { |
|---|
| | 372 | $mail_type_normal = isset($_POST['mail_type_normal']) ? $_POST['mail_type_normal'] : false; |
|---|
| | 373 | $mail_type_forward = isset($_POST['mail_type_forward']) ? $_POST['mail_type_forward'] : false; |
|---|
| | 374 | |
|---|
| | 375 | if ($mail_type_normal) { |
|---|
| 373 | 376 | $pass = escapeshellcmd($_POST['pass']); |
|---|
| 374 | 377 | $pass_rep = escapeshellcmd($_POST['pass_rep']); |
|---|
| … | … | |
| 380 | 383 | } |
|---|
| 381 | 384 | |
|---|
| 382 | | if ($_POST['mail_type'] === 'normal') { |
|---|
| 383 | | if (!isset($pass) || $pass == null || !isset($pass_rep) || $pass_rep == null) { |
|---|
| | 385 | if ($mail_type_normal) { |
|---|
| | 386 | if (!isset($pass) || $pass == null || !isset($pass_rep) || $pass_rep == null || $pass_rep == '' || $pass == '') { |
|---|
| 384 | 387 | set_page_message(tr('Password data is missing!')); |
|---|
| 385 | 388 | return; |
|---|
| … | … | |
| 407 | 410 | } |
|---|
| 408 | 411 | |
|---|
| 409 | | if ($_POST['mail_type'] === 'forward' && empty($_POST['forward_list'])) { |
|---|
| | 412 | if ($mail_type_forward && empty($_POST['forward_list'])) { |
|---|
| 410 | 413 | set_page_message(tr('Forward list is empty!')); |
|---|
| 411 | 414 | return; |
|---|
| r1144 |
r1147 |
|
| 1558 | 1558 | $search [] = '{DOMAIN}'; |
|---|
| 1559 | 1559 | $replace[] = $domain_name; |
|---|
| | 1560 | $search [] = '{MAIL}'; |
|---|
| | 1561 | $replace[] = $uemail; |
|---|
| 1560 | 1562 | $search [] = '{NAME}'; |
|---|
| 1561 | 1563 | $replace[] = $name; |
|---|
| … | … | |
| 1582 | 1584 | Please login into your ispCP control panel for more details. |
|---|
| 1583 | 1585 | |
|---|
| 1584 | | '); |
|---|
| | 1586 | ', true); |
|---|
| | 1587 | |
|---|
| 1585 | 1588 | $search [] = '{RESELLER}'; |
|---|
| 1586 | 1589 | $replace[] = $from_name; |
|---|
| 1587 | | $search [] = '{MAIL}'; |
|---|
| 1588 | | $replace[] = $to; |
|---|
| 1589 | 1590 | $message = str_replace($search, $replace, $message); |
|---|
| 1590 | 1591 | |
|---|
| 1591 | | $mail_result = mail(encode($from), $subject, $message, $headers); |
|---|
| | 1592 | $mail_result = mail($from, $subject, $message, $headers); |
|---|
| 1592 | 1593 | } |
|---|
| 1593 | 1594 | |
|---|
| r1132 |
r1147 |
|
| 206 | 206 | */ |
|---|
| 207 | 207 | |
|---|
| 208 | | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { |
|---|
| | 208 | if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { |
|---|
| 209 | 209 | $user_id = $_SESSION['user_id']; |
|---|
| 210 | 210 | $plan_id = $_SESSION['plan_id']; |
|---|
| r1132 |
r1147 |
|
| 194 | 194 | */ |
|---|
| 195 | 195 | |
|---|
| 196 | | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { |
|---|
| | 196 | if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { |
|---|
| 197 | 197 | $user_id = $_SESSION['user_id']; |
|---|
| 198 | 198 | $plan_id = $_SESSION['plan_id']; |
|---|
| r1132 |
r1147 |
|
| 146 | 146 | */ |
|---|
| 147 | 147 | |
|---|
| 148 | | if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { |
|---|
| | 148 | if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { |
|---|
| 149 | 149 | $user_id = $_SESSION['user_id']; |
|---|
| 150 | 150 | $plan_id = $_SESSION['plan_id']; |
|---|
|
Download in other formats:
#########################################################################
# Site footer - Contents are automatically inserted after main Trac HTML
?>