Changeset 414
- 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:
- GUI:
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r412 |
r414 |
|
| 11 | 11 | | * gui: disable stats-alias in client menu | |
|---|
| 12 | 12 | \_________________________________________________________________/ |
|---|
| | 13 | |
|---|
| | 14 | 2007-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 |
|---|
| 13 | 22 | |
|---|
| 14 | 23 | 2007-03-13 Benedikt Heintel |
|---|
| r401 |
r414 |
|
| 39 | 39 | $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) |
|---|
| 40 | 40 | |
|---|
| 41 | | cd ./configs && $(MAKE) install |
|---|
| | 41 | cd ./configs && $(MAKE) install |
|---|
| 42 | 42 | cd ./engine && $(MAKE) install |
|---|
| 43 | 43 | cd ./gui && $(MAKE) install |
|---|
| r341 |
r414 |
|
| 46 | 46 | # |
|---|
| 47 | 47 | |
|---|
| 48 | | <VirtualHost _default_:*> |
|---|
| | 48 | # Temporary changed; now it's working |
|---|
| | 49 | # will be replaced in future |
|---|
| | 50 | <VirtualHost {IP}:80> |
|---|
| 49 | 51 | |
|---|
| 50 | 52 | DocumentRoot /var/www/vhcs2/gui |
|---|
| r378 |
r414 |
|
| 1 | 1 | <VirtualHost {DMN_IP}:80> |
|---|
| 2 | | |
|---|
| 3 | | # |
|---|
| 4 | | # User {SUEXEC_USER} |
|---|
| 5 | | # Group {SUEXEC_GROUP} |
|---|
| 6 | | # |
|---|
| 7 | 2 | |
|---|
| 8 | 3 | SuexecUserGroup {SUEXEC_USER} {SUEXEC_GROUP} |
|---|
| r341 |
r414 |
|
| 46 | 46 | # |
|---|
| 47 | 47 | |
|---|
| 48 | | <VirtualHost _default_:*> |
|---|
| | 48 | # Temporary changed; now it's working |
|---|
| | 49 | # will be replaced in future |
|---|
| | 50 | <VirtualHost {IP}:80> |
|---|
| 49 | 51 | |
|---|
| 50 | 52 | DocumentRoot /var/www/vhcs2/gui |
|---|
| r341 |
r414 |
|
| 46 | 46 | # |
|---|
| 47 | 47 | |
|---|
| 48 | | <VirtualHost _default_:*> |
|---|
| | 48 | # Temporary changed; now it's working |
|---|
| | 49 | # will be replaced in future |
|---|
| | 50 | <VirtualHost {IP}:80> |
|---|
| 49 | 51 | |
|---|
| 50 | 52 | DocumentRoot /var/www/vhcs2/gui |
|---|
| r387 |
r414 |
|
| 904 | 904 | '{URI}' => $url_forward, |
|---|
| 905 | 905 | '{MOUNT_POINT}' => $mount_point, |
|---|
| | 906 | '{STARTER_DIR}' => $main::cfg{'PHP_STARTER_DIR'}, |
|---|
| 906 | 907 | '{WWW_DIR}' => $main::cfg{'APACHE_WWW_DIR'}, |
|---|
| 907 | 908 | '{APACHE_LOG_DIR}' => $main::cfg{'APACHE_LOG_DIR'}, |
|---|
| r363 |
r414 |
|
| 842 | 842 | |
|---|
| 843 | 843 | return $num; |
|---|
| 844 | | |
|---|
| | 844 | |
|---|
| 845 | 845 | close('db'); |
|---|
| 846 | 846 | |
|---|
| … | … | |
| 1752 | 1752 | my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; |
|---|
| 1753 | 1753 | |
|---|
| 1754 | | # Should be created on install! (delete if okay) |
|---|
| 1755 | | ##my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; |
|---|
| 1756 | | |
|---|
| 1757 | 1754 | my $conf_dir = $main::cfg{'CONF_DIR'}; |
|---|
| 1758 | 1755 | |
|---|
| … | … | |
| 1772 | 1769 | # Starter-Scripts for FastCGI |
|---|
| 1773 | 1770 | # |
|---|
| 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 | | #} |
|---|
| 1795 | 1771 | |
|---|
| 1796 | 1772 | # |
|---|
| … | … | |
| 2049 | 2025 | } |
|---|
| 2050 | 2026 | |
|---|
| 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 | | |
|---|
| 2126 | 2027 | # |
|---|
| 2127 | 2028 | # php.ini for the new domain |
|---|
| … | … | |
| 2149 | 2050 | |
|---|
| 2150 | 2051 | return $rs if ($rs != 0); |
|---|
| 2151 | | |
|---|
| | 2052 | |
|---|
| 2152 | 2053 | } |
|---|
| 2153 | 2054 | |
|---|
| … | … | |
| 2179 | 2080 | # php-fcgi-starters for every domain |
|---|
| 2180 | 2081 | # |
|---|
| 2181 | | |
|---|
| | 2082 | |
|---|
| 2182 | 2083 | if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { |
|---|
| 2183 | 2084 | |
|---|
| … | … | |
| 2261 | 2162 | my $starter_dir = $main::cfg{'PHP_STARTER_DIR'}; |
|---|
| 2262 | 2163 | |
|---|
| 2263 | | # Should be created on install! (delete if okay) |
|---|
| 2264 | | ## my $fastcgi_target = $main::cfg{'APACHE_MOD_FASTCGI'}; |
|---|
| 2265 | | |
|---|
| 2266 | 2164 | my $conf_dir = $main::cfg{'CONF_DIR'}; |
|---|
| 2267 | 2165 | |
|---|
| … | … | |
| 2281 | 2179 | # Starter-Scripts for FastCGI |
|---|
| 2282 | 2180 | # |
|---|
| 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 | | ##} |
|---|
| 2305 | 2181 | |
|---|
| 2306 | 2182 | if( ! -d "$starter_dir/$dmn_name") { |
|---|
| … | … | |
| 2331 | 2207 | } |
|---|
| 2332 | 2208 | |
|---|
| 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 | | |
|---|
| 2450 | 2209 | # |
|---|
| 2451 | 2210 | # php.ini for the domain |
|---|
| 2452 | 2211 | # |
|---|
| 2453 | | |
|---|
| | 2212 | |
|---|
| 2454 | 2213 | if (!(-e "$starter_dir/$dmn_name/php5/php.ini")) { |
|---|
| 2455 | 2214 | |
|---|
| … | … | |
| 2498 | 2257 | # php5-fcgi-starter for every domain |
|---|
| 2499 | 2258 | # |
|---|
| 2500 | | |
|---|
| | 2259 | |
|---|
| 2501 | 2260 | if (!(-e "$starter_dir/$dmn_name/php5-fcgi-starter")) { |
|---|
| 2502 | 2261 | |
|---|
| r323 |
r414 |
|
| 1 | 1 | <?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 | |
|---|
| 18 | 21 | include '../include/vhcs-lib.php'; |
|---|
| 19 | 22 | |
|---|
| … | … | |
| 55 | 58 | |
|---|
| 56 | 59 | $contents = "<form><textarea cols='120' rows='40'>" . $log . "</textarea></form>"; |
|---|
| 57 | | |
|---|
| | 60 | |
|---|
| 58 | 61 | fclose($handle); |
|---|
| 59 | 62 | } |
|---|
| r323 |
r414 |
|
| 1 | 1 | <?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 | **/ |
|---|
| 17 | 20 | |
|---|
| 18 | 21 | include '../include/vhcs-lib.php'; |
|---|
| r411 |
r414 |
|
| 29 | 29 | switch ($_SERVER['REDIRECT_STATUS']) { |
|---|
| 30 | 30 | case 401: |
|---|
| 31 | | print "Unauthorized!"; |
|---|
| | 31 | print "Unauthorized!\n"; |
|---|
| 32 | 32 | break; |
|---|
| 33 | 33 | case 403: |
|---|
| 34 | | print "Forbidden!"; |
|---|
| | 34 | print "Forbidden!\n"; |
|---|
| 35 | 35 | break; |
|---|
| 36 | 36 | case 404: |
|---|
| 37 | | print "File Not Found!"; |
|---|
| | 37 | print "File Not Found!\n"; |
|---|
| 38 | 38 | break; |
|---|
| 39 | 39 | case 500: |
|---|
| 40 | | print "Internal Server Error!"; |
|---|
| | 40 | print "Internal Server Error!\n"; |
|---|
| 41 | 41 | break; |
|---|
| 42 | 42 | default: |
|---|
| 43 | | print "Unknown Error!"; |
|---|
| | 43 | print "Unknown Error!\n"; |
|---|
| 44 | 44 | break; |
|---|
| 45 | 45 | } |
|---|
| r320 |
r414 |
|
| 1 | 1 | <?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 | **/ |
|---|
| 18 | 20 | |
|---|
| 19 | 21 | /* for mail types */ |
|---|
| … | … | |
| 630 | 632 | }// End of full_domain_check() |
|---|
| 631 | 633 | |
|---|
| 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 | | |
|---|
| 643 | 634 | //Generate ip list |
|---|
| 644 | 635 | function generate_ip_list(&$tpl, &$reseller_id) |
|---|
| … | … | |
| 1782 | 1773 | |
|---|
| 1783 | 1774 | $from = $from_email; |
|---|
| 1784 | | |
|---|
| | 1775 | |
|---|
| 1785 | 1776 | } |
|---|
| 1786 | 1777 | |
|---|
| r388 |
r414 |
|
| 1 | 1 | <?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 | **/ |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | include '../include/vhcs-lib.php'; |
|---|
| … | … | |
| 95 | 96 | |
|---|
| 96 | 97 | |
|---|
| 97 | | gen_au3_page($tpl); |
|---|
| | 98 | gen_rau3_page($tpl); |
|---|
| 98 | 99 | gen_page_message($tpl); |
|---|
| 99 | 100 | $tpl -> parse('PAGE', 'page'); |
|---|
| … | … | |
| 134 | 135 | |
|---|
| 135 | 136 | // generate page add user 3 |
|---|
| 136 | | function gen_au3_page(&$tpl) |
|---|
| | 137 | function gen_rau3_page(&$tpl) |
|---|
| 137 | 138 | { |
|---|
| 138 | 139 | global $dmn_name, $hpid , $dmn_user_name; |
|---|
| … | … | |
| 169 | 170 | $_SESSION['local_data'] = "$dmn_name;$hpid"; |
|---|
| 170 | 171 | |
|---|
| 171 | | }// End of gen_au3_page() |
|---|
| | 172 | }// End of gen_rau3_page() |
|---|
| 172 | 173 | |
|---|
| 173 | 174 | |
|---|
| … | … | |
| 197 | 198 | |
|---|
| 198 | 199 | |
|---|
| 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() |
|---|
|