Changeset 1147

Show
Ignore:
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
  • trunk/gui/client/add_mail_acc.php

    r1124 r1147  
    6666                    'MAIL_ALS_CHECKED' => ($_POST['dmn_type'] === 'als') ? "checked=\"checked\"" : "", 
    6767                    '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\"" : "", 
    7070                    'FORWARD_LIST' => $f_list)); 
    7171    } 
     
    224224    $mail_addr = ''; 
    225225 
    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'])) { 
    228228                        if ($_POST['dmn_type'] === 'dmn') { 
    229229                                $mail_pass = $_POST['pass']; 
     
    370370 
    371371function 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) { 
    373376        $pass = escapeshellcmd($_POST['pass']); 
    374377        $pass_rep = escapeshellcmd($_POST['pass_rep']); 
     
    380383    } 
    381384 
    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 == '') { 
    384387            set_page_message(tr('Password data is missing!')); 
    385388            return; 
     
    407410    } 
    408411 
    409     if ($_POST['mail_type'] === 'forward' && empty($_POST['forward_list'])) { 
     412    if ($mail_type_forward && empty($_POST['forward_list'])) { 
    410413        set_page_message(tr('Forward list is empty!')); 
    411414        return; 
  • trunk/gui/include/reseller-functions.php

    r1144 r1147  
    15581558        $search [] = '{DOMAIN}'; 
    15591559        $replace[] = $domain_name; 
     1560        $search [] = '{MAIL}'; 
     1561        $replace[] = $uemail; 
    15601562        $search [] = '{NAME}'; 
    15611563        $replace[] = $name; 
     
    15821584Please login into your ispCP control panel for more details. 
    15831585 
    1584 '); 
     1586', true); 
     1587 
    15851588        $search [] = '{RESELLER}'; 
    15861589        $replace[] = $from_name; 
    1587         $search [] = '{MAIL}'; 
    1588         $replace[] = $to; 
    15891590        $message = str_replace($search, $replace, $message); 
    15901591 
    1591         $mail_result = mail(encode($from), $subject, $message, $headers); 
     1592        $mail_result = mail($from, $subject, $message, $headers); 
    15921593} 
    15931594 
  • trunk/gui/orderpanel/address.php

    r1132 r1147  
    206206*/ 
    207207 
    208 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { 
     208if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { 
    209209        $user_id = $_SESSION['user_id']; 
    210210        $plan_id = $_SESSION['plan_id']; 
  • trunk/gui/orderpanel/chart.php

    r1132 r1147  
    194194*/ 
    195195 
    196 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { 
     196if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { 
    197197        $user_id = $_SESSION['user_id']; 
    198198        $plan_id = $_SESSION['plan_id']; 
  • trunk/gui/orderpanel/checkout.php

    r1132 r1147  
    146146*/ 
    147147 
    148 if (isset($_SESSION['user_id']) && $_SESSION['plan_id']) { 
     148if (isset($_SESSION['user_id']) && isset($_SESSION['plan_id']) && $_SESSION['plan_id']) { 
    149149        $user_id = $_SESSION['user_id']; 
    150150        $plan_id = $_SESSION['plan_id'];