Changeset 1014

Show
Ignore:
Timestamp:
02/22/08 12:25:49 (9 months ago)
Author:
rats
Message:

* Fixed #1064: DisplayChdir? in proftpd.conf doesn't work

  • Fixed #1050: Error when adding User whith Hostingplan

* Undefined index: ISPCP_LICENSE
* Updated ADOdb to version 4.98
* Trim whitespaces on login and lost password

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1013 r1014  
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    33 
     42008-02-22 Benedikt Heintel 
     5        - CONFIGS: 
     6                * Fixed #1064: DisplayChdir in proftpd.conf doesn't work 
     7        - GUI: 
     8                * Fixed #1050: Error when adding User whith Hostingplan 
     9                * Undefined index: ISPCP_LICENSE 
     10        - TOOLS: 
     11                * Updated ADOdb to version 4.98 
     12 
     13 
     142008-02-21 Benedikt Heintel 
     15        - GUI: 
     16                * Trim whitespaces on login and lost password 
     17 
    4182008-02-20 Benedikt Heintel 
    519        - GUI: 
    620                * Fixed Warning: Undefined index: ISPCP_LICENSE 
     21                * Fixed design error: Update news not in red 
    722        - SETUP: 
    823                * Fixed #1059: ERROR: Undefined rwith! in setup 
  • trunk/configs/proftpd/proftpd1.3.conf

    r1007 r1014  
    2929 
    3030DisplayLogin                    welcome.msg 
    31 DisplayChdir                    message 
     31# Deactivate 'DisplayFirstChdir' and activate 'DisplayChdir' if you 
     32# get any warnigns about it. 
     33DisplayFirstChdir               message 
     34#DisplayChdir                   message 
    3235 
    3336#LsDefaultOptions               "-l" 
  • trunk/engine/ispcp_common_methods.pl

    r1012 r1014  
    44# Copyright (c) 2001-2006 by moleSoftware GmbH 
    55# http://www.molesoftware.com 
    6 # Copyright (c) 2006-2007 by isp Control Panel 
     6# Copyright (c) 2006-2008 by isp Control Panel 
    77# http://isp-control.net 
    88# 
  • trunk/gui/admin/add_admin.php

    r949 r1014  
    11<?php 
    22/** 
    3  * ispCP ω (OMEGA) a Virtual Hosting Control System 
     3 * ispCP ω (OMEGA) a Virtual Hosting Control System 
    44 * 
    5  *  @copyright  2001-2006 by moleSoftware GmbH 
    6  *  @copyright  2006-2007 by ispCP | http://isp-control.net 
    7  *  @link               http://isp-control.net 
    8  *  @author             ispCP Team (2007) 
     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 
    910 * 
    10  * @license 
    11  *  This program is free software; you can redistribute it and/or modify it under 
    12  *  the terms of the MPL General Public License as published by the Free Software 
    13  *  Foundation; either version 1.1 of the License, or (at your option) any later 
    14  *  version. 
    15  *  You should have received a copy of the MPL Mozilla Public License along with 
    16  *  this program; if not, write to the Open Source Initiative (OSI) 
    17  *  http://opensource.org | osi@opensource.org 
    18  **
     11 * @license 
     12 *  This program is free software; you can redistribute it and/or modify it under 
     13 *  the terms of the MPL General Public License as published by the Free Software 
     14 *  Foundation; either version 1.1 of the License, or (at your option) any later 
     15 *  version. 
     16 *  You should have received a copy of the MPL Mozilla Public License along with 
     17 *  this program; if not, write to the Open Source Initiative (OSI) 
     18 *  http://opensource.org | osi@opensource.org 
     19 *
    1920 
    2021require '../include/ispcp-lib.php'; 
     
    2324 
    2425$tpl = new pTemplate(); 
    25  
    26 $tpl -> define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'].'/add_admin.tpl'); 
    27  
    28 $tpl -> define_dynamic('page_message', 'page'); 
     26$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/add_admin.tpl'); 
     27$tpl->define_dynamic('page_message', 'page'); 
    2928 
    3029$theme_color = $cfg['USER_INITIAL_THEME']; 
    3130 
    32 $tpl -> assign( 
    33                 array( 
    34                         'TR_ADMIN_ADD_USER_PAGE_TITLE' => tr('ispCP - Admin/Manage users/Add User'), 
    35                         'THEME_COLOR_PATH' => "../themes/$theme_color", 
    36                         'THEME_CHARSET' => tr('encoding'), 
    37                         'ISP_LOGO' => get_logo($_SESSION['user_id']), 
    38                         'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'] 
    39                      ) 
    40               ); 
    41  
    42  
    43 function add_user(&$tpl, &$sql) 
    44 
    45  
    46     if (isset($_POST['uaction']) && $_POST['uaction'] === 'add_user') { 
    47  
    48         if(check_user_data()){ 
    49  
    50                 $upass = crypt_user_pass($_POST['pass']); 
    51  
    52                 $user_id = $_SESSION['user_id']; 
    53  
    54                 $username       = clean_input($_POST['username']); 
    55                 $fname          = clean_input($_POST['fname']); 
    56                 $lname          = clean_input($_POST['lname']); 
    57                 $gender         = clean_input($_POST['gender']); 
    58                 $firm           = clean_input($_POST['firm']); 
    59                 $zip            = clean_input($_POST['zip']); 
    60                 $city           = clean_input($_POST['city']); 
    61                 $country        = clean_input($_POST['country']); 
    62                 $email          = clean_input($_POST['email']); 
    63                 $phone          = clean_input($_POST['phone']); 
    64                 $fax            = clean_input($_POST['fax']); 
    65                 $street1        = clean_input($_POST['street1']); 
    66                 $street2        = clean_input($_POST['street2']); 
    67  
    68                 if (get_gender_by_code($gender, true) === null) { 
    69                     $gender = ''; 
    70                 } 
    71  
    72                 $query = <<<SQL_QUERY 
     31$tpl->assign( 
     32                array( 
     33                        'TR_ADMIN_ADD_USER_PAGE_TITLE' => tr('ispCP - Admin/Manage users/Add User'), 
     34                        'THEME_COLOR_PATH' => "../themes/$theme_color", 
     35                        'THEME_CHARSET' => tr('encoding'), 
     36                        'ISP_LOGO' => get_logo($_SESSION['user_id']) 
     37                ) 
     38        ); 
     39 
     40function add_user(&$tpl, &$sql) { 
     41        if (isset($_POST['uaction']) && $_POST['uaction'] === 'add_user') { 
     42                if (check_user_data()) { 
     43                        $upass = crypt_user_pass($_POST['pass']); 
     44 
     45                        $user_id = $_SESSION['user_id']; 
     46 
     47                        $username = clean_input($_POST['username']); 
     48                        $fname = clean_input($_POST['fname']); 
     49                        $lname = clean_input($_POST['lname']); 
     50                        $gender = clean_input($_POST['gender']); 
     51                        $firm = clean_input($_POST['firm']); 
     52                        $zip = clean_input($_POST['zip']); 
     53                        $city = clean_input($_POST['city']); 
     54                        $country = clean_input($_POST['country']); 
     55                        $email = clean_input($_POST['email']); 
     56                        $phone = clean_input($_POST['phone']); 
     57                        $fax = clean_input($_POST['fax']); 
     58                        $street1 = clean_input($_POST['street1']); 
     59                        $street2 = clean_input($_POST['street2']); 
     60 
     61                        if (get_gender_by_code($gender, true) === null) { 
     62                                $gender = ''; 
     63                        } 
     64 
     65                        $query = <<<SQL_QUERY 
    7366                    insert into 
    7467                            admin 
     
    114107SQL_QUERY; 
    115108 
    116                 $rs = exec_query($sql, $query, array($username, 
    117                                                      $upass, 
    118                                                      $user_id, 
    119                                                      $fname, 
    120                                                      $lname, 
    121                                                      $firm, 
    122                                                      $zip, 
    123                                                      $city, 
    124                                                      $country, 
    125                                                      $email, 
    126                                                      $phone, 
    127                                                      $fax, 
    128                                                      $street1, 
    129                                                      $street2, 
    130                                                      $gender)); 
    131  
    132                 $new_admin_id = $sql -> Insert_ID(); 
    133  
    134                 $user_logged= $_SESSION['user_logged']; 
    135  
    136                 write_log("$user_logged: add admin: $username"); 
    137  
    138                                $user_def_lang = $_SESSION['user_def_lang']; 
    139                                $user_theme_color = $_SESSION['user_theme']; 
    140                                $user_logo = 0; 
    141  
    142                 $query = <<<SQL_QUERY 
     109                       $rs = exec_query($sql, $query, array($username, 
     110                                       $upass, 
     111                                       $user_id, 
     112                                       $fname, 
     113                                       $lname, 
     114                                       $firm, 
     115                                       $zip, 
     116                                       $city, 
     117                                       $country, 
     118                                       $email, 
     119                                       $phone, 
     120                                       $fax, 
     121                                       $street1, 
     122                                       $street2, 
     123                                       $gender)); 
     124 
     125                       $new_admin_id = $sql->Insert_ID(); 
     126 
     127                       $user_logged = $_SESSION['user_logged']; 
     128 
     129                       write_log("$user_logged: add admin: $username"); 
     130 
     131                        $user_def_lang = $_SESSION['user_def_lang']; 
     132                        $user_theme_color = $_SESSION['user_theme']; 
     133                        $user_logo = 0; 
     134 
     135                       $query = <<<SQL_QUERY 
    143136                    insert into 
    144137                        user_gui_props 
     
    155148SQL_QUERY; 
    156149 
    157                 $rs = exec_query($sql, $query, array($new_admin_id, 
    158                                                      $user_def_lang, 
    159                                                      $user_theme_color, 
    160                                                      $user_logo)); 
    161  
    162                 send_add_user_auto_msg ( 
    163                                         $user_id, 
    164                                         clean_input($_POST['username']), 
    165                                         clean_input($_POST['pass']), 
    166                                         clean_input($_POST['email']), 
    167                                         clean_input($_POST['fname']), 
    168                                         clean_input($_POST['lname']), 
    169                                         tr('Administrator'), 
    170                                         $gender 
    171                                     ); 
    172  
    173                 $_SESSION['user_added'] = 1; 
    174  
    175                 header( "Location: manage_users.php" ); 
    176                 die(); 
    177  
    178         } //check user data 
    179         else{ 
    180             $tpl -> assign( 
    181                     array( 
    182                             'EMAIL' => clean_input($_POST['email']), 
    183                             'USERNAME' => clean_input($_POST['username']), 
    184                             'FIRST_NAME' => clean_i