Changeset 1020

Show
Ignore:
Timestamp:
02/25/08 02:39:40 (9 months ago)
Author:
joximu
Message:

fixed several bugs, #747, #1047, #1068 a.o.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1019 r1020  
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    33 
    4 2008-02-19 Christian Hernmarck 
     42008-02-25 Christian Hernmarck 
     5        - GUI: 
     6                * Fixed #1068: Patch to fix icon position in WebFTP 
     7                * Fixed #1047: alias emails not deleted 
     8                * Fixed  #747: use of unused field mail_addr in table mail_users 
     9                * Some smaller fixes (FTP_SHELL->CMD_SHELL, TR_MENU... missing string) 
     10 
     112008-02-25 Jochen Manz 
     12        - GUI: 
     13                * Corrected some small issues and increased the speed of the db update 
     14 
     152008-02-24 Christian Hernmarck 
    516        - GUI: 
    617                * Some small fixes: domain_statistics & some "remove this" messages 
    7  
    8 2008-02-25 Jochen Manz 
    9         - GUI: 
    10                 * Corrected some small issues and increased the speed of the db update 
    1118 
    12192008-02-24 Benedikt Heintel 
  • trunk/gui/client/add_alias.php

    r1014 r1020  
    227227        $status = $cfg['ITEM_ORDERED_STATUS']; 
    228228 
    229   $query = "insert into domain_aliasses(domain_id, alias_name, alias_mount, alias_status, alias_ip_id, url_forward) values (?, ?, ?, ?, ?, ?)"; 
     229       $query = "insert into domain_aliasses(domain_id, alias_name, alias_mount, alias_status, alias_ip_id, url_forward) values (?, ?, ?, ?, ?, ?)"; 
    230230        exec_query($sql, $query, array($cr_user_id, $alias_name, $mount_point, $status, $domain_ip, $forward)); 
    231231 
    232232        $als_id = $sql->Insert_ID(); 
    233233 
    234       if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
     234/*    if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
    235235 
    236236            $reseller_id = who_owns_this(who_owns_this($cr_user_id, 'dmn_id'), 'user'); 
     
    284284                '_no_')); 
    285285        } 
    286  
     286*/ 
    287287        $admin_login = $_SESSION['user_logged']; 
    288288 
  • trunk/gui/client/add_ftp_acc.php

    r1014 r1020  
    412412    if ($ftp_uid == -1) return; 
    413413 
    414     $ftp_shell = $cfg['FTP_SHELL']; 
     414    $ftp_shell = $cfg['CMD_SHELL']; 
    415415    $ftp_passwd = crypt_user_ftp_pass($_POST['pass']); 
    416416 
  • trunk/gui/client/add_mail_acc.php

    r1014 r1020  
    33 * ispCP ω (OMEGA) a Virtual Hosting Control System 
    44 * 
    5  * @copyright         2001-2006 by moleSoftware GmbH 
    6  * @copyright         2006-2008 by ispCP | http://isp-control.net 
    7  * @version   SVN: $ID$ 
    8  * @link              http://isp-control.net 
    9  * @author            ispCP Team 
     5 * @copyright 2001-2006 by moleSoftware GmbH 
     6 * @copyright 2006-2008 by ispCP | http://isp-control.net 
     7 * @version   SVN: $ID$ 
     8 * @link      http://isp-control.net 
     9 * @author    ispCP Team 
    1010 * 
    1111 * @license 
     
    208208    global $cfg; 
    209209 
     210    // 20080218: added support for the mail_addr field: complete mail address in the db 
     211 
    210212    // standard whithout encoding 
    211213    // $mail_acc = $_POST['username']; 
     
    219221    } 
    220222    $mail_auto_respond = '_no_'; 
     223    $mail_addr = ''; 
    221224 
    222225    if ($_POST['mail_type'] === 'normal') { 
     
    226229            $mail_type = 'normal_mail'; 
    227230            $sub_id = '0'; 
     231            $mail_addr = $mail_acc.'@'.$dmn_name; // the complete address 
    228232        } 
    229233        else if ($_POST['dmn_type'] === 'sub') { 
     
    232236            $mail_type = 'subdom_mail'; 
    233237            $sub_id = $_POST['sub_id']; 
     238            // search the complete address 
     239            $query = <<<SQL_QUERY 
     240                SELECT 
     241                    `subdomain_name` 
     242                FROM 
     243                    `subdomain` 
     244                WHERE 
     245                    `subdomain_id` = ? 
     246SQL_QUERY; 
     247            $rs = exec_query($sql, $query, array($sub_id)); 
     248            $mail_addr = $mail_acc.'@'.decode_idna($rs->fields['subdomain_name']).'.'.$dmn_name; // the complete address 
    234249        } 
    235250        else if ($_POST['dmn_type'] === 'als') { 
     
    238253            $mail_type = 'alias_mail'; 
    239254            $sub_id = $_POST['als_id']; 
     255            // search the complete address 
     256            $query = <<<SQL_QUERY 
     257                SELECT 
     258                    `alias_name` 
     259                FROM 
     260                    `domain_aliasses` 
     261                WHERE 
     262                    `alias_id` = ? 
     263SQL_QUERY; 
     264            $rs = exec_query($sql, $query, array($sub_id)); 
     265            $mail_addr = $mail_acc.'@'.decode_idna($rs->fields['alias_name']); // the complete address 
    240266        } else { 
    241267            set_page_message(tr('Unknown domain type')); 
     
    330356             sub_id, 
    331357             status, 
    332              mail_auto_respond) 
     358             mail_auto_respond, 
     359             mail_addr) 
    333360        VALUES 
    334             (?, ?, ?, ?, ?, ?, ?, ?
     361            (?, ?, ?, ?, ?, ?, ?, ?, ?
    335362SQL_QUERY; 
    336363 
     
    342369            $sub_id, 
    343370            $cfg['ITEM_ADD_STATUS'], 
    344             $mail_auto_respond)); 
    345  
    346     if ($_POST['dmn_type'] === 'als') { 
    347         $query = <<<SQL_QUERY 
    348                                 SELECT 
    349                                         `alias_name` 
    350                                 FROM 
    351                                         `domain_aliasses` 
    352                                 WHERE 
    353                                         `alias_id` = ? 
    354                                 LIMIT 
    355                                         1 
    356 SQL_QUERY; 
    357  
    358         $rs = exec_query($sql, $query, array($sub_id)); 
    359         $dmn_name = $rs->fields['alias_name']; 
    360     } 
    361         else if ($_POST['dmn_type'] === 'sub') { 
    362         $query = <<<SQL_QUERY 
    363                                 SELECT 
    364                                         `subdomain_name` 
    365                                 FROM 
    366                                         `subdomain` 
    367                                 WHERE 
    368                                         `subdomain_id` = ? 
    369                                 LIMIT 
    370                                         1 
    371 SQL_QUERY; 
    372  
    373         $rs = exec_query($sql, $query, array($sub_id)); 
    374         $dmn_name = $rs->fields['subdomain_name'].$dmn_name; 
    375     } 
    376  
    377     write_log($_SESSION['user_logged'] . ": add new mail account: " . $mail_acc . "@" . $dmn_name); 
     371            $mail_auto_respond, 
     372            $mail_addr)); 
     373 
     374    write_log($_SESSION['user_logged'] . ": add new mail account: " . $mail_addr); 
    378375    set_page_message(tr('Mail account scheduled for addition!')); 
    379376    send_request(); 
  • trunk/gui/include/admin-functions.php

    r1011 r1020  
    105105                        'TR_MENU_SERVER_STATUS' => tr('Server status'), 
    106106                        'TR_MENU_ISPCP_UPDATE' => tr('ispCP updates'), 
     107                        'TR_MENU_ISPCP_DATABASE_UPDATE' => tr('ispCP database updates'), 
    107108                        'TR_MENU_ISPCP_DEBUGGER' => tr('ispCP debugger'), 
    108109                        'TR_CUSTOM_MENUS' => tr('Custom menus'), 
  • trunk/gui/include/ispcp-lib.php

    r1016 r1020  
    3939require_once(INCLUDEPATH.'/sql.php'); 
    4040 
    41 // variable for developmetn edition => shows all php variables under the pages 
     41// variable for development edition => shows all php variables under the pages 
    4242// false = disable, true = enable 
    4343$cfg['DUMP_GUI_DEBUG'] = false; 
  • trunk/gui/include/reseller-functions.php

    r1008 r1020  
    16611661} 
    16621662 
     1663// add the 3 mail accounts/forwardings to a new domain... 
     1664function client_mail_add_default_accounts($dmn_id, $user_email, $dmn_part, $dmn_type = 'domain', $sub_id = 0) 
     1665{ 
     1666        global $cfg, $sql; 
     1667 
     1668        if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
     1669 
     1670                $forward_type = ($dmn_type == 'alias') ? 'alias_forward': 'normal_forward'; 
     1671 
     1672                // prepare SQL 
     1673                $query = <<<SQL_QUERY 
     1674        INSERT INTO mail_users 
     1675                (mail_acc, 
     1676                 mail_pass, 
     1677                 mail_forward, 
     1678                 domain_id, 
     1679                 mail_type, 
     1680                 sub_id, 
     1681                 status, 
     1682                 mail_auto_respond, 
     1683                 quota, 
     1684                 mail_addr) 
     1685        VALUES 
     1686                (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
     1687SQL_QUERY; 
     1688 
     1689                // create default forwarder for webmaster@domain.tld to the account's owner 
     1690                $rs = exec_query($sql, $query,  
     1691                        array('webmaster', 
     1692                                '_no_', 
     1693                                $user_email, 
     1694                                $dmn_id, 
     1695                                $forward_type, 
     1696                                $sub_id, 
     1697                                $cfg['ITEM_ADD_STATUS'], 
     1698                                '_no_', 
     1699                                10485760, 
     1700                                'webmaster@'.$dmn_part 
     1701                        ) 
     1702                ); 
     1703 
     1704                // create default forwarder for postmaster@domain.tld to the account's reseller 
     1705                $rs = exec_query($sql, $query,  
     1706                        array('postmaster', 
     1707                                '_no_', 
     1708                                $_SESSION['user_email'], 
     1709                                $dmn_id, 
     1710                                $forward_type, 
     1711                                $sub_id, 
     1712                                $cfg['ITEM_ADD_STATUS'], 
     1713                                '_no_', 
     1714                                10485760, 
     1715                                'postmaster@'.$dmn_part 
     1716                        ) 
     1717                ); 
     1718 
     1719                // create default forwarder for abuse@domain.tld to the account's reseller 
     1720                $rs = exec_query($sql, $query,  
     1721                        array('abuse', 
     1722                                '_no_', 
     1723                                $_SESSION['user_email'], 
     1724                                $dmn_id, 
     1725                                $forward_type, 
     1726                                $sub_id, 
     1727                                $cfg['ITEM_ADD_STATUS'], 
     1728                                '_no_', 
     1729                                10485760, 
     1730                                'abuse@'.$dmn_part 
     1731                        ) 
     1732                ); 
     1733 
     1734        } 
     1735 
     1736} // end client_mail_add_default_accounts 
     1737 
     1738 
    16631739?> 
  • trunk/gui/reseller/add_alias.php

    r1014 r1020  
    193193                $user_email = $rs->fields['email']; 
    194194 
     195        // Create the 3 default addresses if wanted 
     196        if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) client_mail_add_default_accounts($cr_user_id, $user_email, $alias_name, 'alias', $als_id); 
     197/* 
    195198    if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
    196199        $query = <<<SQL_QUERY 
     
    238241                '_no_')); 
    239242    } 
    240  
     243*/ 
    241244        send_request(); 
    242245        $admin_login = $_SESSION['user_logged']; 
  • trunk/gui/reseller/domainaliasorder.php

    r1014 r1020  
    5757        $query = "SELECT alias_name FROM domain_aliasses WHERE alias_id=?"; 
    5858        $rs = exec_query($sql, $query, $act_id); 
    59                if ($rs -> RecordCount() == 0) { 
    60                        header('Location: domain_alias.php'); 
    61                        die(); 
    62                
     59        if ($rs -> RecordCount() == 0) { 
     60                header('Location: domain_alias.php'); 
     61                die(); 
     62       
    6363        $alias_name = $rs -> fields['alias_name']; 
    6464 
     
    6666        $rs = exec_query($sql, $query, $act_id); 
    6767 
     68        $domain_id = who_owns_this($act_id, 'als_id', true); 
     69        $query = 'SELECT `email` FROM `admin`, `domain` WHERE `admin`.`admin_id` = `domain`.`domain_admin_id` AND `domain`.`domain_id`= ?'; 
     70        $rs = exec_query($sql, $query, $domain_id); 
     71        if ($rs -> RecordCount() == 0) { 
     72                header('Location: domain_alias.php'); 
     73                die(); 
     74        } 
     75        $user_email = $rs -> fields['email']; 
     76        // Create the 3 default addresses if wanted 
     77        if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) client_mail_add_default_accounts($domain_id, $user_email, $alias_name, 'alias', $act_id); 
     78 
    6879        // enable "ordered"/pending email accounts 
    69         $domain_id = who_owns_this($act_id, 'als_id', true); 
     80// ??? are there pending mail_adresses ???, joximu 
    7081        $query = "UPDATE mail_users SET status=? WHERE sub_id=? AND domain_id = ? AND status=? AND mail_type LIKE 'alias%'"; 
    7182        $rs = exec_query($sql, $query, array($cfg['ITEM_ADD_STATUS'], $act_id, $domain_id, $cfg['ITEM_ORDERED_STATUS'])); 
  • trunk/gui/reseller/rau3.php

    r1015 r1020  
    327327        $dmn_id = $sql->Insert_ID(); 
    328328 
     329        // Create the 3 default addresses if wanted 
     330        if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) client_mail_add_default_accounts($dmn_id, $user_email, $dmn_name); // 'domain', 0 
     331 
     332/* 
    329333        if ($cfg['CREATE_DEFAULT_EMAIL_ADDRESSES']) { 
    330334                $query = <<<SQL_QUERY 
     
    372376                                '_no_')); 
    373377        } 
    374  
     378*/ 
    375379        // add_domain_extras($dmn_id, $record_id, $sql); 
    376380        // lets send mail to user 
  • trunk/gui/tools/filemanager/skins/omega/css/main.css.php

    r371 r1020  
    363363 
    364364#buttonsright { 
    365         margin-top: 88px; 
    366          
     365        position: relative;  
     366        top: 68px;  
    367367} 
    368368.login {