Changeset 414

Show
Ignore:
Timestamp:
03/16/07 01:47:12 (1 year ago)
Author:
rats
Message:

- CONFIGS:

  • Workaround for VHCS panel page not longer working after creation of a new domain
  • fixed bug #93: the value {STARTER_DIR} which is used by the php fcgi support isn't replaced

- ENGINE:

  • some trivial changes

- GUI:

  • some trivial changes
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r412 r414  
    1111|               * gui: disable stats-alias in client menu         | 
    1212\_________________________________________________________________/ 
     13 
     142007-03-15 Benedikt Heintel 
     15        - CONFIGS: 
     16                * Workaround for VHCS panel page not longer working after creation of a new domain 
     17                * fixed bug #93: the value {STARTER_DIR} which is used by the php fcgi support isn't replaced 
     18        - ENGINE: 
     19                * some trivial changes 
     20        - GUI: 
     21                * some trivial changes 
    1322 
    14232007-03-13 Benedikt Heintel 
  • trunk/Makefile.ubuntu

    r401 r414  
    3939        $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) 
    4040 
    41     cd ./configs && $(MAKE) install 
     41       cd ./configs && $(MAKE) install 
    4242        cd ./engine && $(MAKE) install 
    4343        cd ./gui && $(MAKE) install 
  • trunk/configs/apache/httpd.conf

    r341 r414  
    4646# 
    4747 
    48 <VirtualHost _default_:*> 
     48# Temporary changed; now it's working 
     49# will be replaced in future 
     50<VirtualHost {IP}:80> 
    4951 
    5052    DocumentRoot /var/www/vhcs2/gui 
  • trunk/configs/apache/parts/dmn_entry.tpl

    r378 r414  
    11<VirtualHost {DMN_IP}:80> 
    2  
    3     # 
    4     # User {SUEXEC_USER} 
    5     # Group {SUEXEC_GROUP} 
    6     # 
    72 
    83    SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} 
  • trunk/configs/apache/parts/vhcs2_base.tpl

    r341 r414  
    4646# 
    4747 
    48 <VirtualHost _default_:*> 
     48# Temporary changed; now it's working 
     49# will be replaced in future 
     50<VirtualHost {IP}:80> 
    4951 
    5052    DocumentRoot /var/www/vhcs2/gui 
  • trunk/configs/apache/working/vhcs2.conf

    r341 r414  
    4646# 
    4747 
    48 <VirtualHost _default_:*> 
     48# Temporary changed; now it's working 
     49# will be replaced in future 
     50<VirtualHost {IP}:80> 
    4951 
    5052    DocumentRoot /var/www/vhcs2/gui 
  • trunk/engine/vhcs2-als-mngr

    r387 r414  
    904904         '{URI}' => $url_forward, 
    905905         '{MOUNT_POINT}' => $mount_point, 
     906         '{STARTER_DIR}' => $main::cfg{'PHP_STARTER_DIR'}, 
    906907         '{WWW_DIR}' => $main::cfg{'APACHE_WWW_DIR'}, 
    907908         '{APACHE_LOG_DIR}' => $main::cfg{'APACHE_LOG_DIR'}, 
  • trunk/engine/vhcs2-dmn-mngr

    r363 r414  
    842842 
    843843    return $num; 
    844      
     844 
    845845    close('db'); 
    846846 
     
    17521752        my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; 
    17531753 
    1754         # Should be created on install! (delete if okay) 
    1755         ##my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
    1756  
    17571754        my $conf_dir = $main::cfg{'CONF_DIR'}; 
    17581755 
     
    17721769        # Starter-Scripts for FastCGI 
    17731770        # 
    1774  
    1775         # Should be created on install! (delete if okay) 
    1776         #$rs = make_dir( 
    1777         #                               "$starter_dir", 
    1778         #                               $httpd_uid, 
    1779         #                               $httpd_gid, 
    1780         #                               0755 
    1781         #                               ); 
    1782         # 
    1783         #return $rs if ($rs != 0); 
    1784  
    1785         #if (!(-e "$starter_dir/master")) { 
    1786         #       $rs = make_dir( 
    1787         #                                       "$starter_dir/master", 
    1788         #                                       $sys_user, 
    1789         #                                       $sys_group, 
    1790         #                                       0755 
    1791         #                                       ); 
    1792  
    1793         #       return $rs if ($rs != 0); 
    1794         #} 
    17951771 
    17961772        # 
     
    20492025        } 
    20502026 
    2051         # Should be created on install! (delete if okay) 
    2052         # 
    2053         # fastcgi.conf for apache 
    2054         # 
    2055         ##if (!(-e "$fastcgi_target")) { 
    2056  
    2057         ##      my $fast_tpl = ''; 
    2058  
    2059         ##      ($rs, $fast_tpl) = get_file("$conf_dir/apache/fastcgi.conf"); 
    2060  
    2061         ##      return $rs if ($rs != 0); 
    2062  
    2063         ##      $fast_tpl =~ s/{STARTER_DIR}/$starter_dir/gi; 
    2064         ##      $fast_tpl =~ s/{MASTER_USER}/$sys_user/gi; 
    2065         ##      $fast_tpl =~ s/{MASTER_GROUP}/$sys_group/gi; 
    2066  
    2067         ##      ($rs, $rdata) = store_file( 
    2068         ##                                                              "$fastcgi_target", 
    2069         ##                                                              $fast_tpl, 
    2070         ##                                                              $sys_user, 
    2071         ##                                                              $sys_group, 
    2072         ##                                                              0640 
    2073         ##                                                              ); 
    2074  
    2075         ##      return $rs if ($rs != 0); 
    2076  
    2077         ##} 
    2078  
    2079         # 
    2080         # php.ini/php-fcgi-starter for "master" (FCGI-Server) 
    2081         # 
    2082         ##if (!(-e "$starter_dir/master/php5/php.ini")) { 
    2083  
    2084         ##      my $ini_tpl = ''; 
    2085  
    2086         ##      ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5/php.ini"); 
    2087  
    2088         ##      return $rs if ($rs != 0); 
    2089  
    2090         ##      $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    2091         ##      $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
    2092         ##      $ini_tpl =~ s/{DMN_NAME}/master/gi; 
    2093  
    2094         ##      ($rs, $rdata) = store_file( 
    2095         ##                                                              "$starter_dir/master/php5/php.ini", 
    2096         ##                                                              $ini_tpl, 
    2097         ##                                                              $sys_user, 
    2098         ##                                                              $sys_group, 
    2099         ##                                                              0640 
    2100         ##                                                              ); 
    2101  
    2102         ##      return $rs if ($rs != 0); 
    2103  
    2104         ##      $ini_tpl = ''; 
    2105  
    2106         ##      ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4/php.ini"); 
    2107  
    2108         ##      return $rs if ($rs != 0); 
    2109  
    2110         ##      $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    2111         ##      $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
    2112         ##      $ini_tpl =~ s/{DMN_NAME}/master/gi; 
    2113  
    2114         ##      ($rs, $rdata) = store_file( 
    2115         ##                                                              "$starter_dir/master/php4/php.ini", 
    2116         ##                                                              $ini_tpl, 
    2117         ##                                                              $sys_user, 
    2118         ##                                                              $sys_group, 
    2119         ##                                                              0640 
    2120         ##                                                              ); 
    2121  
    2122         ##      return $rs if ($rs != 0); 
    2123  
    2124         ##} 
    2125  
    21262027        # 
    21272028        # php.ini for the new domain 
     
    21492050 
    21502051                return $rs if ($rs != 0); 
    2151                  
     2052 
    21522053        } 
    21532054 
     
    21792080        # php-fcgi-starters for every domain 
    21802081        # 
    2181          
     2082 
    21822083        if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { 
    21832084 
     
    22612162        my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; 
    22622163 
    2263         # Should be created on install! (delete if okay) 
    2264         ## my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; 
    2265  
    22662164        my $conf_dir = $main::cfg{'CONF_DIR'}; 
    22672165 
     
    22812179        # Starter-Scripts for FastCGI 
    22822180        # 
    2283  
    2284         ##if( ! -d "$starter_dir") { 
    2285         ##      $rs = make_dir( 
    2286         ##                                      "$starter_dir", 
    2287         ##                                      $httpd_uid, 
    2288         ##                                      $httpd_gid, 
    2289         ##                                      0755 
    2290         ##                                      ); 
    2291  
    2292         ##      return $rs if ($rs != 0); 
    2293         ##} 
    2294  
    2295         ##if( ! -d "$starter_dir/master") { 
    2296         ##      $rs = make_dir( 
    2297         ##                                      "$starter_dir/master", 
    2298         ##                                      $sys_user, 
    2299         ##                                      $sys_group, 
    2300         ##                                      0755 
    2301         ##                                      ); 
    2302  
    2303         ##      return $rs if ($rs != 0); 
    2304         ##} 
    23052181 
    23062182        if( ! -d "$starter_dir/$dmn_name") { 
     
    23312207        } 
    23322208 
    2333         # Should be created on install! (delete if okay) 
    2334         # 
    2335         # fastcgi.conf for apache 
    2336         # 
    2337         ###if (!(-e "$fastcgi_target")) { 
    2338  
    2339         ##      my $fast_tpl = ''; 
    2340  
    2341         ##      ($rs, $fast_tpl) = get_file("$conf_dir/apache/fastcgi.conf"); 
    2342  
    2343         ##      return $rs if ($rs != 0); 
    2344  
    2345         ##      $fast_tpl =~ s/{STARTER_DIR}/$starter_dir/gi; 
    2346         ##      $fast_tpl =~ s/{MASTER_USER}/$sys_user/gi; 
    2347         ##      $fast_tpl =~ s/{MASTER_GROUP}/$sys_group/gi; 
    2348  
    2349         ##      ($rs, $rdata) = store_file( 
    2350         ##                                                              "$fastcgi_target", 
    2351         ##                                                              $fast_tpl, 
    2352         ##                                                              $sys_user, 
    2353         ##                                                              $sys_group, 
    2354         ##                                                              0640 
    2355         ##                                                              ); 
    2356  
    2357         ##      return $rs if ($rs != 0); 
    2358  
    2359         ##} 
    2360  
    2361         # 
    2362         # php.ini/php-fcgi-starter for "master" (FCGI-Server) 
    2363         # 
    2364         ##if (!(-e "$starter_dir/master/php5/php.ini")) { 
    2365  
    2366         ##      my $ini_tpl = ''; 
    2367  
    2368         ##      ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php5/php.ini"); 
    2369  
    2370         ##      return $rs if ($rs != 0); 
    2371  
    2372         ##      $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    2373         ##      $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
    2374         ##      $ini_tpl =~ s/{DMN_NAME}/master/gi; 
    2375  
    2376         ##      ($rs, $rdata) = store_file( 
    2377         ##                                                              "$starter_dir/master/php5/php.ini", 
    2378         ##                                                              $ini_tpl, 
    2379         ##                                                              $sys_user, 
    2380         ##                                                              $sys_group, 
    2381         ##                                                              0640 
    2382         ##                                                              ); 
    2383  
    2384         ##      return $rs if ($rs != 0); 
    2385  
    2386         ##      $ini_tpl = ''; 
    2387  
    2388         ##      ($rs, $ini_tpl) = get_file("$conf_dir/fcgi/parts/php4/php.ini"); 
    2389  
    2390         ##      return $rs if ($rs != 0); 
    2391  
    2392         ##      $ini_tpl =~ s/{WWW_DIR}/$www_dir/gi; 
    2393         ##      $ini_tpl =~ s/{PEAR_DIR}/$pear_dir/gi; 
    2394         ##      $ini_tpl =~ s/{DMN_NAME}/master/gi; 
    2395  
    2396         ##      ($rs, $rdata) = store_file( 
    2397         ##                                                              "$starter_dir/master/php4/php.ini", 
    2398         ##                                                              $ini_tpl, 
    2399         ##                                                              $sys_user, 
    2400         ##                                                              $sys_group, 
    2401         ##                                                              0640 
    2402         ##                                                              ); 
    2403  
    2404         ##      return $rs if ($rs != 0); 
    2405  
    2406         ##} 
    2407  
    2408         ##if (!(-e "$starter_dir/master/php5-fcgi-starter")) { 
    2409  
    2410         ##      my $starter_tpl = ''; 
    2411  
    2412         ##      ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php5-fcgi-starter.tpl"); 
    2413  
    2414         ##      return $rs if ($rs != 0); 
    2415  
    2416         ##      $starter_tpl =~ s/{PHP_STARTER_DIR}/$starter_dir/gi; 
    2417         ##      $starter_tpl =~ s/{DMN_NAME}/master/gi; 
    2418  
    2419         ##      ($rs, $rdata) = store_file( 
    2420         ##                                                              "$starter_dir/master/php5-fcgi-starter", 
    2421         ##                                                              $starter_tpl, 
    2422         ##                                                              $sys_user, 
    2423         ##                                                              $sys_group, 
    2424         ##                                                              0750 
    2425         ##                                                              ); 
    2426  
    2427         ##      return $rs if ($rs != 0); 
    2428  
    2429         ##      $starter_tpl = ''; 
    2430  
    2431         ##      ($rs, $starter_tpl) = get_file("$conf_dir/fcgi/parts/php4-fcgi-starter.tpl"); 
    2432  
    2433         ##      return $rs if ($rs != 0); 
    2434  
    2435         ##      $starter_tpl =~ s/{PHP_STARTER_DIR}/$starter_dir/gi; 
    2436         ##      $starter_tpl =~ s/{DMN_NAME}/master/gi; 
    2437  
    2438         ##      ($rs, $rdata) = store_file( 
    2439         ##                                                              "$starter_dir/master/php4-fcgi-starter", 
    2440         ##                                                              $starter_tpl, 
    2441         ##                                                              $sys_user, 
    2442         ##                                                              $sys_group, 
    2443         ##                                                              0750 
    2444         ##                                                              ); 
    2445  
    2446         ##      return $rs if ($rs != 0); 
    2447  
    2448         ##} 
    2449  
    24502209        # 
    24512210        # php.ini for the domain 
    24522211        # 
    2453          
     2212 
    24542213        if (!(-e "$starter_dir/$dmn_name/php5/php.ini")) { 
    24552214 
     
    24982257        # php5-fcgi-starter for every domain 
    24992258        # 
    2500          
     2259 
    25012260        if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { 
    25022261 
  • trunk/gui/admin/rootkit_log.php

    r323 r414  
    11<?php 
    2 //   --------------------------------------------------------------------------- 
    3 //  |           VHCS ω (OMEGA) - Virtual Hosting Control System | Omega Version         | 
    4 //  |                                           Copyright (c) 2006 by ispCP                                                     | 
    5 //  |                                              http://isp-control.net                                                       | 
    6 //  |                                                                                                                                                   | 
    7 //  | This program is free software; you can redistribute it and/or                             | 
    8 //  | modify it under the terms of the GPL General Public License                               | 
    9 //  | as published by the Free Software Foundation; either version 2.0                  | 
    10 //  | of the License or (at your option) any later version.                                             | 
    11 //  |                                                                                                                                                   | 
    12 //  | You should have received a copy of the GPL eneral Public License                  | 
    13 //  | along with this program; if not, write to the Open Source Initiative (OSI)| 
    14 //  | http://opensource.org | osi@opensource.org                                                                | 
    15 //  |                                                                                                                                                   | 
    16 //   --------------------------------------------------------------------------- 
    17 // Begin page line 
     2/** 
     3 *  VHCS ω (OMEGA) - Virtual Hosting Control System | Omega Version 
     4 * 
     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             VHCS Team (2006) 
     9 * 
     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 * 
     19 **/ 
     20 
    1821include '../include/vhcs-lib.php'; 
    1922 
     
    5558 
    5659                $contents = "<form><textarea cols='120' rows='40'>" . $log . "</textarea></form>"; 
    57                  
     60 
    5861                fclose($handle); 
    5962} 
  • trunk/gui/admin/vhcs_updates.php

    r323 r414  
    11<?php 
    2 //   ------------------------------------------------------------------------------- 
    3 //  |             VHCS(tm) - Virtual Hosting Control System                         | 
    4 //  |              Copyright (c) 2001-2005 by moleSoftware                                      | 
    5 //  |                   http://vhcs.net | http://www.molesoftware.com                                   | 
    6 //  |                                                                               | 
    7 //  | This program is free software; you can redistribute it and/or                 | 
    8 //  | modify it under the terms of the MPL General Public License                   | 
    9 //  | as published by the Free Software Foundation; either version 1.1              | 
    10 //  | of the License, or (at your option) any later version.                        | 
    11 //  |                                                                               | 
    12 //  | You should have received a copy of the MPL Mozilla Public License             | 
    13 //  | along with this program; if not, write to the Open Source Initiative (OSI)    | 
    14 //  | http://opensource.org | osi@opensource.org                                                                    | 
    15 //  |                                                                               | 
    16 //   ------------------------------------------------------------------------------- 
     2/** 
     3 *  VHCS ω (OMEGA) - Virtual Hosting Control System | Omega Version 
     4 * 
     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             VHCS Team, Benedikt Heintel (2006) 
     9 * 
     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 * 
     19 **/ 
    1720 
    1821include '../include/vhcs-lib.php'; 
  • trunk/gui/errordocs/index.php

    r411 r414  
    2929                                switch ($_SERVER['REDIRECT_STATUS']) { 
    3030                                        case 401: 
    31                                                 print "Unauthorized!"; 
     31                                                print "Unauthorized!\n"; 
    3232                                                break; 
    3333                                        case 403: 
    34                                                 print "Forbidden!"; 
     34                                                print "Forbidden!\n"; 
    3535                                                break; 
    3636                                        case 404: 
    37                                                 print "File Not Found!"; 
     37                                                print "File Not Found!\n"; 
    3838                                                break; 
    3939                                        case 500: 
    40                                                 print "Internal Server Error!"; 
     40                                                print "Internal Server Error!\n"; 
    4141                                                break; 
    4242                                        default: 
    43                                                 print "Unknown Error!"; 
     43                                                print "Unknown Error!\n"; 
    4444                                                break; 
    4545                                } 
  • trunk/gui/include/reseller-functions.php

    r320 r414  
    11<?php 
    2 //   ------------------------------------------------------------------------------- 
    3 //  |             VHCS(tm) - Virtual Hosting Control System                         | 
    4 //  |              Copyright (c) 2001-2006 by moleSoftware                                      | 
    5 //  |                   http://vhcs.net | http://www.molesoftware.com                                   | 
    6 //  |                                                                               | 
    7 //  | This program is free software; you can redistribute it and/or                 | 
    8 //  | modify it under the terms of the MPL General Public License                   | 
    9 //  | as published by the Free Software Foundation; either version 1.1              | 
    10 //  | of the License, or (at your option) any later version.                        | 
    11 //  |                                                                               | 
    12 //  | You should have received a copy of the MPL Mozilla Public License             | 
    13 //  | along with this program; if not, write to the Open Source Initiative (OSI)    | 
    14 //  | http://opensource.org | osi@opensource.org                                                                    | 
    15 //  |                                                                               | 
    16 //   ------------------------------------------------------------------------------- 
    17  
     2/** 
     3 *  VHCS ω (OMEGA) - Virtual Hosting Control System | Omega Version 
     4 * 
     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             VHCS Team, Benedikt Heintel (2007) 
     9 * 
     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 * 
     19 **/ 
    1820 
    1921/* for mail types */ 
     
    630632        }// End of  full_domain_check() 
    631633 
    632  
    633 /*      function escape_user_data ( $data ) { 
    634  
    635                 $res_one = preg_replace("/\\\\/", "", $data); 
    636  
    637                 $res = preg_replace("/'/", "\\\'", $res_one); 
    638  
    639                 return $res; 
    640         }*/// End of escape_user_data() 
    641  
    642  
    643634//Generate ip list 
    644635function generate_ip_list(&$tpl, &$reseller_id) 
     
    17821773 
    17831774        $from = $from_email; 
    1784          
     1775 
    17851776        } 
    17861777 
  • trunk/gui/reseller/rau3.php

    r388 r414  
    11<?php 
    2 //   ------------------------------------------------------------------------------- 
    3 //  |             VHCS(tm) - Virtual Hosting Control System                         | 
    4 //  |              Copyright (c) 2001-2006 by moleSoftware                                      | 
    5 //  |                   http://vhcs.net | http://www.molesoftware.com                                   | 
    6 //  |                                                                               | 
    7 //  | This program is free software; you can redistribute it and/or                 | 
    8 //  | modify it under the terms of the MPL General Public License                   | 
    9 //  | as published by the Free Software Foundation; either version 1.1              | 
    10 //  | of the License, or (at your option) any later version.                        | 
    11 //  |                                                                               | 
    12 //  | You should have received a copy of the MPL Mozilla Public License             | 
    13 //  | along with this program; if not, write to the Open Source Initiative (OSI)    | 
    14 //  | http://opensource.org | osi@opensource.org                                                                    | 
    15 //  |                                                                               | 
    16 //   ------------------------------------------------------------------------------- 
    17  
    18  
     2/** 
     3 *  VHCS ω (OMEGA) - Virtual Hosting Control System | Omega Version 
     4 * 
     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             VHCS Team, Benedikt Heintel (2007) 
     9 * 
     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 * 
     19 **/ 
    1920 
    2021include '../include/vhcs-lib.php'; 
     
    9596 
    9697 
    97 gen_au3_page($tpl); 
     98gen_rau3_page($tpl); 
    9899gen_page_message($tpl); 
    99100$tpl -> parse('PAGE', 'page'); 
     
    134135 
    135136// generate page add user 3 
    136 function gen_au3_page(&$tpl) 
     137function gen_rau3_page(&$tpl) 
    137138{ 
    138139  global $dmn_name, $hpid , $dmn_user_name; 
     
    169170  $_SESSION['local_data'] = "$dmn_name;$hpid"; 
    170171 
    171 }// End of gen_au3_page() 
     172}// End of gen_rau3_page() 
    172173 
    173174 
     
    197198 
    198199 
    199  
    200 // Check validity of input data 
    201 /*function check_user_data (&$tpl) { 
    202  
    203         global $dmn_name, $hpid , $dmn_user_name; 
    204         global $user_email, $customer_id, $first_name; 
    205     global $last_name, $firm, $zip; 
    206     global $city, $country, $street_one; 
    207         global $street_two, $mail, $phone; 
    208         global $fax, $inpass, $domain_ip; 
    209  
    210     $rau_error = '_off_'; 
    211         $inpass_re = ''; 
    212  
    213         // Get data for fields from previus page 
    214         if(isset($_POST['userpassword'])) 
    215                 $inpass  = $_POST['userpassword']; 
    216  
    217         if(isset($_POST['userpassword_repeat'])) 
    218                 $inpass_re       = $_POST['userpassword_repeat']; 
    219  
    220         if(isset($_POST['domain_ip'])) 
    221                 $domain_ip       = $_POST['domain_ip']; 
    222  
    223         if(isset($_POST['useremail'])) 
    224                 $user_email      = $_POST['useremail']; 
    225  
    226         if(isset($_POST['useruid'])) 
    227                 $customer_id = $_POST['useruid']; 
    228  
    229         if(isset($_POST['userfname'])) 
    230                 $first_name  = $_POST['userfname']; 
    231  
    232         if(isset($_POST['userlname'])) 
    233                 $last_name       = $_POST['userlname']; 
    234  
    235         if(isset($_POST['userfirm'])) 
    236                 $firm            = $_POST['userfirm']; 
    237  
    238         if(isset($_POST['userzip'])) 
    239                 $zip = $_POST['userzip']; 
    240  
    241         if(isset($_POST['usercity'])) 
    242                 $city = $_POST['usercity']; 
    243  
    244         if(isset($_POST['usercountry'])) 
    245                 $country = $_POST['usercountry']; 
    246  
    247         if(isset($_POST['userstreet1'])) 
    248                 $street_one = $_POST['userstreet1']; 
    249  
    250         if(isset($_POST['userstreet2'])) 
    251                 $street_two      = $_POST['userstreet2']; 
    252  
    253         if(isset($_POST['useremail'])) 
    254                 $mail    = $_POST['useremail']; 
    255  
    256         if(isset($_POST['userphone'])) 
    257                 $phone = $_POST['userphone']; 
    258  
    259         if(isset($_POST['userfax'])) 
    260                 $fax = $_POST['userfax']; 
    261  
    262         //if(isset($_SESSION['local_data']) ) 
    263         //      list($dmn_name, $hpid, $dmn_user_name) = explode(";", $_SESSION['local_data']); 
    264  
    265         // Begin checking... 
    266         if (('' === $inpass_re) || ('' === $inpass)){ 
    267  
    268                 $rau_error = tr('Please fill up both data fields for password!'); 
    269  
    270         }else if ($inpass_re !== $inpass ){ 
    271  
    272                 $rau_error = tr('Passwords does not match!'); 
    273  
    274         }else if (!vhcs_password_check($inpass, 20)) { 
    275  
    276         $rau_error = tr('Incorrect password range or ayntax!'); 
    277  
    278     }else if (!vhcs_name_check($user_email, 40)){ 
    279  
    280                 $rau_error = tr('Incorrect mail account range or syntax!'); 
    281  
    282         }else if(!vhcs_limit_check($customer_id, 999)){ 
    283  
    284                 $rau_error = tr('Incorrect customer ID syntax!'); 
    285         }else if(!vhcs_name_check($first_name, 40)){ 
    286  
    287                 $rau_error = tr('Incorrect first name range or syntax!'); 
    288         }else if(!vhcs_name_check($last_name, 40)){ 
    289  
    290                 $rau_error = tr('Incorrect second name range or syntax!'); 
    291         }else if(!vhcs_name_check($firm, 100)){ 
    292  
    293                 $rau_error = tr('Incorrect company range or syntax!'); 
    294         }else if(!vhcs_limit_check($zip, 999999)){ 
    295  
    296                 $rau_error = tr('Incorrect post code range or syntax!'); 
    297         }else if(!vhcs_name_check($city, 40)){ 
    298  
    299                 $rau_error = tr('Incorrect city syntax!'); 
    300         }else if(!vhcs_name_check($country, 100)){ 
    301  
    302                 $rau_error = tr('Incorrect country syntax!'); 
    303         }else if(!vhcs_name_check($street_one, 100)){ 
    304  
    305                 $rau_error = tr('Incorrect street 1 syntax!'); 
    306         }else if(!vhcs_name_check($street_two, 100)){ 
    307  
    308                 $rau_error = tr('Incorrect street 2 syntax!'); 
    309         }else if(!vhcs_name_check($mail, 100)){ 
    310  
    311                 $rau_error = tr('Incorrect mail account range or syntax!'); 
    312         }else if(!vhcs_name_check($phone, 100)){ 
    313  
    314                 $rau_error = tr('Incorrect phone range or syntax!'); 
    315         }else if(!vhcs_name_check($fax, 100)){ 
    316  
    317                 $rau_error = tr('Incorrect fax range or syntax!'); 
    318         } 
    319  
    320  
    321     if ($rau_error == '_off_') { 
    322  
    323         $tpl -> assign('MESSAGE', ''); 
    324  
    325                 // send data throught session 
    326                 return true; 
    327  
    328     } else { 
    329  
    330         $tpl -> assign('MESSAGE', $rau_error); 
    331  
    332         return false; 
    333     } 
    334  
    335         return true; 
    336 }*///End of check_user_data()