Changeset 1005
- Timestamp:
- 02/17/08 00:17:31
(6 months ago)
- Author:
- rats
- Message:
A lot of inconsistency adding a user while reseller values are eceeded
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1004 |
r1005 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| | 3 | |
|---|
| | 4 | 2008-02-16 Benedikt Heintel |
|---|
| | 5 | - GUI: |
|---|
| | 6 | * Fixed: A lot of inconsistency adding a user while reseller values are eceeded |
|---|
| | 7 | |
|---|
| | 8 | 2008-02-16 Jochen Manz |
|---|
| | 9 | - DISTS: |
|---|
| | 10 | * Fixed #772: Gentoo init.d scripts broken with changes to make them "LSB compliant" |
|---|
| 3 | 11 | |
|---|
| 4 | 12 | 2008-02-16 Christian Hernmarck |
|---|
| … | … | |
| 13 | 21 | * Fixed #894: Domain Alias as Forward - including directory information |
|---|
| 14 | 22 | * Fixed #1023: master domain can be added as user |
|---|
| | 23 | * Fixed #1045: Alias via mod_alias (Redirect) -> FIX |
|---|
| 15 | 24 | |
|---|
| 16 | 25 | 2008-02-13 Benedikt Heintel |
|---|
| r918 |
r1005 |
|
| 1 | | #! /bin/sh |
|---|
| 2 | | |
|---|
| | 1 | #!/sbin/runscript |
|---|
| | 2 | # |
|---|
| 3 | 3 | # ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | | # Copyright (c) 2007 by ispCP |
|---|
| | 4 | # Copyright (c) 2008 by ispCP |
|---|
| 5 | 5 | # http://www.isp-control.net |
|---|
| 6 | 6 | # |
|---|
| … | … | |
| 28 | 28 | # http://www.isp-control.net |
|---|
| 29 | 29 | # |
|---|
| 30 | | ### BEGIN INIT INFO |
|---|
| 31 | | # Provides: ispcp_daemon |
|---|
| 32 | | # Required-Start: $network $local_fs $remote_fs |
|---|
| 33 | | # Required-Stop: |
|---|
| 34 | | # Should-Stop: $local_fs |
|---|
| 35 | | # Default-Start: 2 3 4 5 |
|---|
| 36 | | # Default-Stop: 0 1 6 |
|---|
| 37 | | # Short-Description: ispCP GUI-Backend communication Daemon |
|---|
| 38 | | ### END INIT INFO |
|---|
| 39 | | # Note: do not modify any of these vars here, use /etc/default/$NAME instead |
|---|
| 40 | 30 | |
|---|
| 41 | | PATH=/sbin:/bin:/usr/sbin:/usr/bin |
|---|
| 42 | | NAME=ispcp_daemon |
|---|
| | 31 | NAME="ispCP Deamon" |
|---|
| 43 | 32 | DAEMON=/var/www/ispcp/daemon/ispcp_daemon |
|---|
| 44 | 33 | PID=/var/run/ispcp-daemon.pid |
|---|
| 45 | 34 | DESC="ispCP GUI-Backend communication Daemon" |
|---|
| 46 | 35 | |
|---|
| | 36 | opts="" |
|---|
| 47 | 37 | |
|---|
| 48 | | test -f $DAEMON || exit 0 |
|---|
| | 38 | depend() { |
|---|
| | 39 | need net |
|---|
| | 40 | after apache mysql |
|---|
| | 41 | use logger |
|---|
| | 42 | } |
|---|
| 49 | 43 | |
|---|
| 50 | | set -e |
|---|
| | 44 | start() { |
|---|
| | 45 | ebegin "Starting $NAME:" |
|---|
| | 46 | start-stop-daemon --start --exec $DAEMON \ |
|---|
| | 47 | --pidfile $PID |
|---|
| | 48 | eend $? |
|---|
| | 49 | } |
|---|
| 51 | 50 | |
|---|
| 52 | | case "$1" in |
|---|
| 53 | | start) |
|---|
| 54 | | echo -n "Starting $DESC: " |
|---|
| 55 | | start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID |
|---|
| 56 | | echo "$NAME." |
|---|
| 57 | | ;; |
|---|
| 58 | | stop) |
|---|
| 59 | | echo -n "Stopping $DESC: " |
|---|
| 60 | | start-stop-daemon --stop --verbose --pidfile $PID --exec $DAEMON --retry 5 |
|---|
| 61 | | rm $PID |
|---|
| 62 | | echo "$NAME." |
|---|
| 63 | | ;; |
|---|
| 64 | | restart|force-reload) |
|---|
| 65 | | echo "Restarting $DESC: " |
|---|
| 66 | | start-stop-daemon --stop --verbose --pidfile $PID --exec $DAEMON --retry 5 |
|---|
| 67 | | rm $PID |
|---|
| 68 | | start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID |
|---|
| 69 | | ;; |
|---|
| 70 | | status) |
|---|
| 71 | | set +e |
|---|
| 72 | | if [ -s $PID ]; then |
|---|
| 73 | | RPID=`cat $PID` |
|---|
| 74 | | kill -0 $RPID 2> /dev/null |
|---|
| 75 | | if [ "$?" = 0 ] ; then |
|---|
| 76 | | echo "$NAME is started" |
|---|
| 77 | | exit 0 |
|---|
| 78 | | fi |
|---|
| 79 | | fi |
|---|
| 80 | | echo "$NAME is stopped" |
|---|
| 81 | | exit 1 |
|---|
| 82 | | ;; |
|---|
| 83 | | *) |
|---|
| 84 | | N=/etc/init.d/$NAME |
|---|
| 85 | | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 |
|---|
| 86 | | exit 1 |
|---|
| 87 | | ;; |
|---|
| 88 | | esac |
|---|
| 89 | 51 | |
|---|
| 90 | | exit 0 |
|---|
| | 52 | stop() { |
|---|
| | 53 | ebegin "Stopping $NAME:" |
|---|
| | 54 | start-stop-daemon --stop --exec $DAEMON \ |
|---|
| | 55 | --pidfile $PID |
|---|
| | 56 | eend $? |
|---|
| | 57 | } |
|---|
| r999 |
r1005 |
|
| 92 | 92 | (when you get to the rootkithunter screen, select two time 'yes') |
|---|
| 93 | 93 | |
|---|
| 94 | | Now install needed Perl modules: |
|---|
| 95 | | |
|---|
| 96 | | # cpan |
|---|
| 97 | | cpan> install FindBin |
|---|
| 98 | | cpan> install Net::LibIDN |
|---|
| 99 | | cpan> quit |
|---|
| 100 | | |
|---|
| 101 | 94 | 4. (optional) Check the ispcp.conf and adapt it to your requirements. |
|---|
| 102 | 95 | An overview over the variables you can find in the FAQ on |
|---|
| r830 |
r1005 |
|
| 84 | 84 | function set_page_message($message) { |
|---|
| 85 | 85 | if (isset($_SESSION['user_page_message'])) |
|---|
| 86 | | $_SESSION['user_page_message'] .= "<br><br>$message<br><br>"; |
|---|
| | 86 | $_SESSION['user_page_message'] .= "<br />$message\n"; |
|---|
| 87 | 87 | else |
|---|
| 88 | 88 | $_SESSION['user_page_message'] = $message; |
|---|
| r951 |
r1005 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| | 7 | * @version SVN: $ID$ |
|---|
| 7 | 8 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * @license |
|---|
| … | … | |
| 535 | 536 | ); |
|---|
| 536 | 537 | } // End of get_user_props(); |
|---|
| 537 | | function rsl_full_domain_check ($data) |
|---|
| 538 | | { |
|---|
| | 538 | |
|---|
| | 539 | function rsl_full_domain_check ($data) { |
|---|
| 539 | 540 | $data .= '.'; |
|---|
| 540 | 541 | $match = array(); |
|---|
| … | … | |
| 567 | 568 | return 1; |
|---|
| 568 | 569 | } // End of full_domain_check() |
|---|
| | 570 | |
|---|
| 569 | 571 | // Generate ip list |
|---|
| 570 | | function generate_ip_list(&$tpl, &$reseller_id) |
|---|
| 571 | | { |
|---|
| | 572 | function generate_ip_list(&$tpl, &$reseller_id) { |
|---|
| 572 | 573 | global $sql; |
|---|
| 573 | 574 | global $domain_ip; |
|---|
| … | … | |
| 616 | 617 | } // End loop |
|---|
| 617 | 618 | } // End of generate_ip_list() |
|---|
| | 619 | |
|---|
| 618 | 620 | // Check validity of input data |
|---|
| 619 | | function check_ruser_data (&$tpl, $NoPass) |
|---|
| 620 | | { |
|---|
| | 621 | function check_ruser_data (&$tpl, $NoPass) { |
|---|
| 621 | 622 | global $dmn_name, $hpid , $dmn_user_name; |
|---|
| 622 | 623 | global $user_email, $customer_id, $first_name; |
|---|
| … | … | |
| 728 | 729 | return false; |
|---|
| 729 | 730 | } //End of check_ruser_data() |
|---|
| | 731 | |
|---|
| 730 | 732 | // Translate domain status |
|---|
| 731 | 733 | function translate_dmn_status ($status) { |
|---|
| … | … | |
| 752 | 754 | } |
|---|
| 753 | 755 | } // End of translate_dmn_status() |
|---|
| | 756 | |
|---|
| 754 | 757 | // Check if the domain already exist |
|---|
| 755 | | function ispcp_domain_exists ($domain_name, $reseller_id) |
|---|
| 756 | | { |
|---|
| | 758 | function ispcp_domain_exists ($domain_name, $reseller_id) { |
|---|
| 757 | 759 | global $sql; |
|---|
| 758 | 760 | // query to check if the domain name exist in the table for domains/accounts |
|---|
| … | … | |
| 864 | 866 | } |
|---|
| 865 | 867 | } // End of ispcp_domain_exists() |
|---|
| | 868 | |
|---|
| 866 | 869 | function gen_manage_domain_query (&$search_query, &$count_query, |
|---|
| 867 | 870 | $reseller_id, |
|---|
| … | … | |
| 870 | 873 | $search_for, |
|---|
| 871 | 874 | $search_common, |
|---|
| 872 | | $search_status) |
|---|
| 873 | | { |
|---|
| | 875 | $search_status) { |
|---|
| 874 | 876 | // IMHO, this code is an unmaintainable mess and should be replaced - Cliff |
|---|
| 875 | 877 | if ($search_for === 'n/a' && $search_common === 'n/a' && $search_status === 'n/a') { |
|---|
| … | … | |
| 991 | 993 | $search_for, |
|---|
| 992 | 994 | $search_common, |
|---|
| 993 | | $search_status) |
|---|
| 994 | | { |
|---|
| | 995 | $search_status) { |
|---|
| 995 | 996 | if ($search_for === 'n/a' && $search_common === 'n/a' && $search_status === 'n/a') { |
|---|
| 996 | 997 | // we have no search and let's genarate search fields empty |
|---|
| … | … | |
| 1102 | 1103 | } |
|---|
| 1103 | 1104 | |
|---|
| 1104 | | function gen_def_language(&$tpl, &$sql, &$user_def_language) |
|---|
| 1105 | | { |
|---|
| | 1105 | function gen_def_language(&$tpl, &$sql, &$user_def_language) { |
|---|
| 1106 | 1106 | $matches = array(); |
|---|
| 1107 | 1107 | $languages = array(); |
|---|
| … | … | |
| 1157 | 1157 | } |
|---|
| 1158 | 1158 | |
|---|
| 1159 | | function gen_domain_details(&$tpl, &$sql, &$domain_id) |
|---|
| 1160 | | { |
|---|
| | 1159 | function gen_domain_details(&$tpl, &$sql, &$domain_id) { |
|---|
| 1161 | 1160 | $tpl->assign('USER_DETAILS', ''); |
|---|
| 1162 | 1161 | |
|---|
| … | … | |
| 1211 | 1210 | } |
|---|
| 1212 | 1211 | |
|---|
| 1213 | | function add_domain_extras(&$dmn_id, &$admin_id, &$sql) |
|---|
| 1214 | | { |
|---|
| | 1212 | function add_domain_extras(&$dmn_id, &$admin_id, &$sql) { |
|---|
| 1215 | 1213 | $query = <<<SQL_QUERY |
|---|
| 1216 | 1214 | insert into domain_extras |
|---|
| … | … | |
| 1241 | 1239 | } |
|---|
| 1242 | 1240 | |
|---|
| 1243 | | function reseller_limits_check(&$sql, &$err_msg, $reseller_id, $hpid, $newprops = "") |
|---|
| 1244 | | { |
|---|
| | 1241 | function reseller_limits_check(&$sql, &$err_msg, $reseller_id, $hpid, $newprops = "") { |
|---|
| | 1242 | $error = false; |
|---|
| | 1243 | |
|---|
| 1245 | 1244 | if (empty($newprops)) { |
|---|
| 1246 | 1245 | // this hosting plan exists |
|---|
| … | … | |
| 1311 | 1310 | if ($dmn_max != 0) { |
|---|
| 1312 | 1311 | if ($dmn_current + 1 > $dmn_max) { |
|---|
| 1313 | | $err_msg = tr('You have reached your domains limit.<br>You can not add more domains!'); |
|---|
| 1314 | | return; |
|---|
| | 1312 | set_page_message(tr('You have reached your domains limit.<br>You can not add more domains!')); |
|---|
| | 1313 | $error = true; |
|---|
| 1315 | 1314 | } |
|---|
| 1316 | 1315 | } |
|---|
| … | … | |
| 1319 | 1318 | if ($sub_new != -1) { |
|---|
| 1320 | 1319 | if ($sub_new == 0) { |
|---|
| 1321 | | $err_msg = tr('You have a subdomains limit!<br>You can not add an user with unlimited subdomains!'); |
|---|
| 1322 | | return; |
|---|
| | 1320 | set_page_message(tr('You have a subdomains limit!<br>You can not add an user with unlimited subdomains!')); |
|---|
| | 1321 | $error = true; |
|---|
| 1323 | 1322 | } else if ($sub_current + $sub_new > $sub_max) { |
|---|
| 1324 | | $err_msg = tr('You are exceeding your subdomains limit!'); |
|---|
| 1325 | | return; |
|---|
| | 1323 | set_page_message(tr('You are exceeding your subdomains limit!')); |
|---|
| | 1324 | $error = true; |
|---|
| 1326 | 1325 | } |
|---|
| 1327 | 1326 | } |
|---|
| … | … | |
| 1331 | 1330 | if ($als_new != -1) { |
|---|
| 1332 | 1331 | if ($als_new == 0) { |
|---|
| 1333 | | $err_msg = tr('You have an aliases limit!<br>You can not add an user with unlimited aliases!'); |
|---|
| 1334 | | return; |
|---|
| | 1332 | set_page_message(tr('You have an aliases limit!<br>You can not add an user with unlimited aliases!')); |
|---|
| | 1333 | $error = true; |
|---|
| 1335 | 1334 | } else if ($als_current + $als_new > $als_max) { |
|---|
| 1336 | | $err_msg = tr('You Are Exceeding Your Alias Limit!'); |
|---|
| 1337 | | return; |
|---|
| | 1335 | set_page_message(tr('You Are Exceeding Your Alias Limit!')); |
|---|
| | 1336 | $error = true; |
|---|
| 1338 | 1337 | } |
|---|
| 1339 | 1338 | } |
|---|
| … | … | |
| 1342 | 1341 | if ($mail_max != 0) { |
|---|
| 1343 | 1342 | if ($mail_new == 0) { |
|---|
| 1344 | | $err_msg = tr('You have a mail accounts limit!<br>You can not add an user with unlimited mail accounts!'); |
|---|
| 1345 | | return; |
|---|
| | 1343 | set_page_message(tr('You have a mail accounts limit!<br>You can not add an user with unlimited mail accounts!')); |
|---|
| | 1344 | $error = true; |
|---|
| 1346 | 1345 | } else if ($mail_current + $mail_new > $mail_max) { |
|---|
| 1347 | | $err_msg = tr('You are exceeding your mail accounts limit!'); |
|---|
| 1348 | | return; |
|---|
| | 1346 | set_page_message(tr('You are exceeding your mail accounts limit!')); |
|---|
| 1349 | 1347 | } |
|---|
| 1350 | 1348 | } |
|---|
| … | … | |
| 1352 | 1350 | if ($ftp_max != 0) { |
|---|
| 1353 | 1351 | if ($ftp_new == 0) { |
|---|
| 1354 | | $err_msg = tr('You have a FTP accounts limit!<br>You can not add an user with unlimited FTP accounts!'); |
|---|
| 1355 | | return; |
|---|
| | 1352 | set_page_message(tr('You have a FTP accounts limit!<br>You can not add an user with unlimited FTP accounts!')); |
|---|
| | 1353 | $error = true; |
|---|
| 1356 | 1354 | } else if ($ftp_current + $ftp_new > $ftp_max) { |
|---|
| 1357 | | $err_msg = tr('You are exceeding your FTP accounts limit!'); |
|---|
| 1358 | | return; |
|---|
| | 1355 | set_page_message(tr('You are exceeding your FTP accounts limit!')); |
|---|
| | 1356 | $error = true; |
|---|
| 1359 | 1357 | } |
|---|
| 1360 | 1358 | } |
|---|
| … | … | |
| 1363 | 1361 | if ($sql_db_new != -1) { |
|---|
| 1364 | 1362 | if ($sql_db_new == 0) { |
|---|
| 1365 | | $err_msg = tr('You have a SQL databases limit!<br>You can not add an user with unlimited SQL databases!'); |
|---|
| 1366 | | return; |
|---|
| | 1363 | set_page_message(tr('You have a SQL databases limit!<br>You can not add an user with unlimited SQL databases!')); |
|---|
| | 1364 | $error = true; |
|---|
| 1367 | 1365 | } else if ($sql_db_current + $sql_db_new > $sql_db_max) { |
|---|
| 1368 | | $err_msg = tr('You are exceeding your SQL databases limit!'); |
|---|
| 1369 | | return; |
|---|
| | 1366 | set_page_message(tr('You are exceeding your SQL databases limit!')); |
|---|
| | 1367 | $error = true; |
|---|
| 1370 | 1368 | } |
|---|
| 1371 | 1369 | } |
|---|
| … | … | |
| 1375 | 1373 | if ($sql_user_new != -1) { |
|---|
| 1376 | 1374 | if ($sql_user_new == 0) { |
|---|
| 1377 | | $err_msg = tr('You have an SQL users limit!<br>You can not add an user with unlimited SQL users!'); |
|---|
| 1378 | | return; |
|---|
| | 1375 | set_page_message(tr('You have an SQL users limit!<br>You can not add an user with unlimited SQL users!')); |
|---|
| | 1376 | $error = true; |
|---|
| 1379 | 1377 | } else if ($sql_db_new == -1) { |
|---|
| 1380 | | $err_msg = tr('You have disabled SQL databases for this user!<br>You can not have SQL users here!'); |
|---|
| 1381 | | return; |
|---|
| | 1378 | set_page_message(tr('You have disabled SQL databases for this user!<br>You can not have SQL users here!')); |
|---|
| | 1379 | $error = true; |
|---|
| 1382 | 1380 | } else if ($sql_user_current + $sql_user_new > $sql_user_max) { |
|---|
| 1383 | | $err_msg = tr('You are exceeding your SQL database limit!'); |
|---|
| 1384 | | return; |
|---|
| | 1381 | set_page_message(tr('You are exceeding your SQL database limit!')); |
|---|
| | 1382 | $error = true; |
|---|
| 1385 | 1383 | } |
|---|
| 1386 | 1384 | } |
|---|
| … | … | |
| 1389 | 1387 | if ($traff_max != 0) { |
|---|
| 1390 | 1388 | if ($traff_new == 0) { |
|---|
| 1391 | | $err_msg = tr('You have a traffic limit!<br>You can not add an user with unlimited traffic!'); |
|---|
| 1392 | | return; |
|---|
| | 1389 | set_page_message(tr('You have a traffic limit!<br>You can not add an user with unlimited traffic!')); |
|---|
| | 1390 | $error = true; |
|---|
| 1393 | 1391 | } else if ($traff_current + $traff_new > $traff_max) { |
|---|
| 1394 | | $err_msg = tr('You are exceeding your traffic limit!'); |
|---|
| 1395 | | return; |
|---|
| | 1392 | set_page_message(tr('You are exceeding your traffic limit!')); |
|---|
| | 1393 | $error = true; |
|---|
| 1396 | 1394 | } |
|---|
| 1397 | 1395 | } |
|---|
| … | … | |
| 1399 | 1397 | if ($disk_max != 0) { |
|---|
| 1400 | 1398 | if ($disk_new == 0) { |
|---|
| 1401 | | $err_msg = tr('You have a disk limit!<br>You can not add an user with unlimited disk!'); |
|---|
| 1402 | | return; |
|---|
| | 1399 | set_page_message(tr('You have a disk limit!<br>You can not add an user with unlimited disk!')); |
|---|
| | 1400 | $error = true; |
|---|
| 1403 | 1401 | } else if ($disk_current + $disk_new > $disk_max) { |
|---|
| 1404 | | $err_msg = tr('You are exceeding your disk limit!'); |
|---|
| 1405 | | return; |
|---|
| 1406 | | } |
|---|
| 1407 | | } |
|---|
| | 1402 | set_page_message(tr('You are exceeding your disk limit!')); |
|---|
| | 1403 | $error = true; |
|---|
| | 1404 | } |
|---|
| | 1405 | } |
|---|
| | 1406 | |
|---|
| | 1407 | if ($error == true) { |
|---|
| | 1408 | return false; |
|---|
| | 1409 | } |
|---|
| | 1410 | |
|---|
| | 1411 | return true; |
|---|
| 1408 | 1412 | } |
|---|
| | 1413 | |
|---|
| 1409 | 1414 | // Update reseller props |
|---|
| 1410 | | function au_update_reseller_props($reseller_id, $props) |
|---|
| 1411 | | { |
|---|
| | 1415 | function au_update_reseller_props($reseller_id, $props) { |
|---|
| 1412 | 1416 | global $sql; |
|---|
| 1413 | 1417 | |
|---|
| r784 |
r1005 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| … | … | |
| 272 | 272 | global $price, $setup_fee, $value, $payment, $status; |
|---|
| 273 | 273 | |
|---|
| | 274 | $err_msg = ""; |
|---|
| 274 | 275 | $query = "select id from hosting_plans where name = ? and reseller_id = ?"; |
|---|
| 275 | 276 | $res = exec_query($sql, $query, array($hp_name, $admin_id)); |
|---|
| … | … | |
| 280 | 281 | } else { |
|---|
| 281 | 282 | $hp_props = "$hp_php;$hp_cgi;$hp_sub;$hp_als;$hp_mail;$hp_ftp;$hp_sql_db;$hp_sql_user;$hp_traff;$hp_disk;"; |
|---|
| 282 | | |
|---|
| 283 | | $err_msg = '_off_'; |
|---|
| 284 | 283 | // this id is just for fake and is not used in reseller_limits_check. |
|---|
| 285 | | $hpid = 99999999999999999999999999; |
|---|
| 286 | | |
|---|
| 287 | | reseller_limits_check($sql, $err_msg, $admin_id, $hpid, $hp_props); |
|---|
| 288 | | |
|---|
| 289 | | if ($err_msg != '_off_') { |
|---|
| 290 | | set_page_message($err_msg); |
|---|
| 291 | | return; |
|---|
| 292 | | } else { |
|---|
| 293 | | $query = <<<SQL_QUERY |
|---|
| | 284 | $hpid = 0; |
|---|
| | 285 | |
|---|
| | 286 | if (reseller_limits_check($sql, $err_msg, $admin_id, $hpid, $hp_props)) { |
|---|
| | 287 | if (!empty($err_msg)) { |
|---|
| | 288 | set_page_message($err_msg); |
|---|
| | 289 | return false; |
|---|
| | 290 | } else { |
|---|
| | 291 | $query = <<<SQL_QUERY |
|---|
| 294 | 292 | insert into |
|---|
| 295 | 293 | hosting_plans(reseller_id, |
|---|
| … | … | |
| 304 | 302 | values (?, ?, ?, ?, ?, ?, ?, ?, ?) |
|---|
| 305 | 303 | SQL_QUERY; |
|---|
| 306 | | $res = exec_query($sql, $query, array($admin_id, $hp_name, $description, $hp_props, $price, $setup_fee, $value, $payment, $status)); |
|---|
| 307 | | |
|---|
| 308 | | $_SESSION['hp_added'] = '_yes_'; |
|---|
| 309 | | Header("Location: ehp.php"); |
|---|
| 310 | | die(); |
|---|
| | 304 | $res = exec_query($sql, $query, array($admin_id, $hp_name, $description, $hp_props, $price, $setup_fee, $value, $payment, $status)); |
|---|
| | 305 | |
|---|
| | 306 | $_SESSION['hp_added'] = '_yes_'; |
|---|
| | 307 | header("Location: ehp.php"); |
|---|
| | 308 | die(); |
|---|
| | 309 | } |
|---|
| 311 | 310 | } |
|---|
| | 311 | else { |
|---|
| | 312 | set_page_message(tr("Hosting plan values exceed reseller maximum values!")); |
|---|
| | 313 | return false; |
|---|
| | 314 | } |
|---|
| 312 | 315 | } |
|---|
| 313 | 316 | } //End of save_data_to_db() |
|---|
| r880 |
r1005 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| r784 |
r1005 |
|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| | 6 | * @copyright 2006-2008 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @version SVN: $ID$ |
|---|
| 8 | 8 | * @link http://isp-control.net |
|---|
| 9 | | * @author ispCP Team (2007) |
|---|
| | 9 | * @author ispCP Team |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * @license |
|---|
| … | … | |
| 324 | 324 | global $hpid; |
|---|
| 325 | 325 | |
|---|
| | 326 | $err_msg = ""; |
|---|
| 326 | 327 | $description = clean_input($_POST['hp_description']); |
|---|
| 327 | 328 | $price = clean_input($_POST['hp_price']); |
|---|
| … | … | |
| 333 | 334 | $hp_props = "$hp_php;$hp_cgi;$hp_sub;$hp_als;$hp_mail;$hp_ftp;$hp_sql_db;$hp_sql_user;$hp_traff;$hp_disk;"; |
|---|
| 334 | 335 | |
|---|
| 335 | | $err_msg = '_off_'; |
|---|
| 336 | | |
|---|
| 337 | 336 | $admin_id = $_SESSION['user_id']; |
|---|
| 338 | 337 | |
|---|
| 339 | | reseller_limits_check($sql, $err_msg, $admin_id, $hpid, $hp_props); |
|---|
| 340 | | |
|---|
| 341 | | if ($err_msg != '_off_') { |
|---|
| 342 | | set_page_message($err_msg); |
|---|
| 343 | | restore_form($tpl, $sql); |
|---|
| 344 | | } else { |
|---|
| 345 | | $query = <<<SQL_QUERY |
|---|
| | 338 | if (reseller_limits_check($sql, $err_msg, $admin_id, $hpid, $hp_props)) { |
|---|
| | 339 | |
|---|
| | 340 | if (!empty($err_msg)) { |
|---|
| | 341 | set_page_message($err_msg); |
|---|
| | 342 | restore_form($tpl, $sql); |
|---|
| | 343 | return false; |
|---|
| | 344 | } else { |
|---|
| | 345 | $query = <<<SQL_QUERY |
|---|
| 346 | 346 | update |
|---|
| 347 | 347 | hosting_plans |
|---|
| … | … | |
| 358 | 358 | id = ? |
|---|
| 359 | 359 | SQL_QUERY; |
|---|
| 360 | | $res = exec_query($sql, $query, array($hp_name, $description, $hp_props, $price, |
|---|
| | 360 | $res = exec_query($sql, $query, array($hp_name, $description, $hp_props, $price, |
|---|
| 361 | 361 | $setup_fee, $currency, $payment, $status, $hpid)); |
|---|
| 362 | 362 | |
|---|
| 363 | | $_SESSION['hp_updated'] = '_yes_'; |
|---|
| 364 | | Header("Location: hp.php"); |
|---|
| 365 | | die(); |
|---|
| | 363 | $_SESSION['hp_updated'] = '_yes_'; |
|---|
| | 364 | header("Location: hp.php"); |
|---|
| | 365 | die(); |
|---|
| | 366 | } |
|---|
| | 367 | } |
|---|
| | 368 | else { |
|---|
| | 369 | set_page_message(tr("Hosting plan values exceed reseller maximum values!")); |
|---|
| | 370 | return false; |
|---|
| 366 | 371 | } |
|---|
| 367 | 372 | } //End of save_data_to_db() |
|---|
| r678 |
r1005 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP ω (OMEGA) a Virtual Hosting Control System |
|---|
| 4 | 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 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 |
|---|
| 9 | 10 | * |
|---|
| 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 | */ |
|---|
| 19 | 20 | |
|---|
| 20 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 24 | 25 | $reseller_id = $_SESSION['user_id']; |
|---|
| 25 | 26 | |
|---|
| 26 | | |
|---|
| 27 | | if(isset($_GET['order_id']) && is_numeric($_GET['order_id'])){ |
|---|
| | 27 | if (isset($_GET['order_id']) && is_numeric($_GET['order_id'])) { |
|---|
| 28 | 28 | $order_id = $_GET['order_id']; |
|---|
| 29 | | }else{ |
|---|
| | 29 | } else { |
|---|
| 30 | 30 | set_page_message(tr('Wrong order ID!')); |
|---|
| 31 | 31 | Header("Location: orders.php"); |
|---|
| … | … | |
| 33 | 33 | } |
|---|
| 34 | 34 | |
|---|
| 35 | | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin'){ |
|---|
| | 35 | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') { |
|---|
| 36 | 36 | $query = <<<SQL_QUERY |
|---|
| 37 | 37 | select |
|---|
| … | … | |
| 44 | 44 | |
|---|
| 45 | 45 | $rs = exec_query($sql, $query, array($order_id)); |
|---|
| 46 | | |
|---|
| 47 | | |
|---|
| 48 | 46 | } else { |
|---|
| 49 | | |
|---|
| 50 | | $query = <<<SQL_QUERY |
|---|
| | 47 | $query = <<<SQL_QUERY |
|---|
| 51 | 48 | select |
|---|
| 52 | 49 | * |
|---|
| … | … | |
| 60 | 57 | |
|---|
| 61 | 58 | $rs = exec_query($sql, $query, array($order_id, $reseller_id)); |
|---|
| 62 | | } |
|---|
| 63 | | |
|---|
| 64 | | if ($rs -> RecordCount() == 0 || !isset($_SESSION['domain_ip'])) { |
|---|
| 65 | | |
|---|
| 66 | | set_page_message(tr('Permission deny!')); |
|---|
| 67 | | header('Location: orders.php'); |
|---|
| 68 | | die(); |
|---|
| 69 | | } |
|---|
| | 59 | } |
|---|
| | 60 | |
|---|
| | 61 | if ($rs->RecordCount() == 0 || !isset($_SESSION['domain_ip'])) { |
|---|
| | 62 | set_page_message(tr('Permission deny!')); |
|---|
| | 63 | header('Location: orders.php'); |
|---|
| | 64 | die(); |
|---|
| | 65 | } |
|---|
| 70 | 66 | |
|---|
| 71 | 67 | $domain_ip = $_SESSION['domain_ip']; |
|---|
| 72 | | $dmn_user_name = $rs -> fields['domain_name']; |
|---|
| | 68 | $dmn_user_name = $rs->fields['domain_name']; |
|---|
| 73 | 69 | $dmn_user_name = decode_idna($dmn_user_name); |
|---|
| 74 | 70 | |
|---|
| 75 | | $hpid = $rs -> fields['plan_id']; |
|---|
| 76 | | $first_name = $rs -> fields['fname']; |
|---|
| 77 | | $last_name = $rs -> fields['lname']; |
|---|
| 78 | | $firm = $rs -> fields['firm']; |
|---|
| 79 | | $zip = $rs -> fields['zip']; |
|---|
| 80 | | $city = $rs -> fields['city']; |
|---|
| 81 | | $country = $rs -> fields['country']; |
|---|
| 82 | | $phone = $rs -> fields['phone']; |
|---|
| 83 | | $fax = $rs -> fields['fax']; |
|---|
| 84 | | $street_one = $rs -> fields['street1']; |
|---|
| 85 | | $street_two = $rs -> fields['street2']; |
|---|
| 86 | | $customer_id = $rs -> fields['customer_id']; |
|---|
| 87 | | $user_email = $rs -> fields['email']; |
|---|
| 88 | | |
|---|
| 89 | | //lets check the reseller limits |
|---|
| 90 | | $err_msg = '_off_'; |
|---|
| 91 | | |
|---|
| 92 | | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin'){ |
|---|
| 93 | | $query = "select props from hosting_plans where id = ?"; |
|---|
| 94 | | $res = exec_query($sql, $query, array($hpid)); |
|---|
| 95 | | } else { |
|---|
| 96 | | $query = "select props from hosting_plans where reseller_id = ? and id = ?"; |
|---|
| 97 | | $res = exec_query($sql, $query, array($reseller_id, $hpid)); |
|---|
| 98 | | } |
|---|
| 99 | | $data = $res -> FetchRow(); |
|---|
| 100 | | $props = $data['props']; |
|---|
| 101 | | |
|---|
| 102 | | $_SESSION["ch_hpprops"] = $props; |
|---|
| 103 | | |
|---|
| 104 | | reseller_limits_check($sql, $err_msg, $reseller_id, $hpid); |
|---|
| 105 | | if ($err_msg != '_off_') { |
|---|
| | 71 | $hpid = $rs->fields['plan_id']; |
|---|
| | 72 | $first_name = $rs->fields['fname']; |
|---|
| | 73 | $last_name = $rs->fields['lname']; |
|---|
| | 74 | $firm = $rs->fields['firm']; |
|---|
| | 75 | $zip = $rs->fields['zip']; |
|---|
| | 76 | $city = $rs->fields['city']; |
|---|
| | 77 | $country = $rs->fields['country']; |
|---|
| | 78 | $phone = $rs->fields['phone']; |
|---|
| | 79 | $fax = $rs->fields['fax']; |
|---|
| | 80 | $street_one = $rs->fields['street1']; |
|---|
| | 81 | $street_two = $rs->fields['street2']; |
|---|
| | 82 | $customer_id = $rs->fields['customer_id']; |
|---|
| | 83 | $user_email = $rs->fields['email']; |
|---|
| | 84 | // lets check the reseller limits |
|---|
| | 85 | $err_msg = ""; |
|---|
| | 86 | |
|---|
| | 87 | if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') { |
|---|
| | 88 | $query = "select props from hosting_plans where id = ?"; |
|---|
| | 89 | $res = exec_query($sql, $query, array($hpid)); |
|---|
| | 90 | } else { |
|---|
| | 91 | $query = "select props from hosting_plans where reseller_id = ? and id = ?"; |
|---|
| | 92 | $res = exec_query($sql, $query, array($reseller_id, $hpid)); |
|---|
| | 93 | } |
|---|
| | 94 | $data = $res->FetchRow(); |
|---|
| | 95 | $props = $data['props']; |
|---|
| | 96 | |
|---|
| | 97 | $_SESSION["ch_hpprops"] = $props; |
|---|
| | 98 | |
|---|
| | 99 | if (!reseller_limits_check($sql, $err_msg, $reseller_id, $hpid)) { |
|---|
| | 100 | set_page_message(tr("Order Canceled: resellers maximum exceeded!")); |
|---|
| | 101 | header('Location: orders.php'); |
|---|
| | 102 | die(); |
|---|
| | 103 | } |
|---|
| | 104 | |
|---|
| | 105 | if (!empty($err_msg)) { |
|---|
| 106 | 106 | set_page_message($err_msg); |
|---|
| 107 | 107 | unset($_SESSION['domain_ip']); |
|---|
| … | … | |
| 109 | 109 | die(); |
|---|
| 110 | 110 | } |
|---|
| 111 | | unset($_SESSION["ch_hpprops"]); |
|---|
| 112 | | list($php, $cgi, $sub, |
|---|
| 113 | | $als, $mail, $ftp, |
|---|
| 114 | | $sql_db, $sql_user, |
|---|
| 115 | | $traff, $disk) = explode(";", $props); |
|---|
| 116 | | |
|---|
| 117 | | $php = preg_replace("/\_/", "", $php); |
|---|
| 118 | | $cgi = preg_replace("/\_/", "", $cgi); |
|---|
| 119 | | |
|---|
| 120 | | $timestamp = time(); |
|---|
| 121 | | $pure_user_pass = substr($timestamp,0,6); |
|---|
| 122 | | $inpass = crypt_user_pass($pure_user_pass); |
|---|
| 123 | | |
|---|
| 124 | | if (!chk_dname($dmn_user_name)) { |
|---|
| 125 | | set_page_message(tr('Wrong domain name syntax!')); |
|---|
| 126 | | unset($_SESSION['domain_ip']); |
|---|
| 127 | | header('Location: orders.php'); |
|---|
| 128 | | die(); |
|---|
| 129 | | |
|---|
| 130 | | } if (ispcp_domain_exists($dmn_user_name, $_SESSION['user_id'])) { |
|---|
| 131 | | set_page_message(tr('Domain with that name already exists on the system!')); |
|---|
| 132 | | unset($_SESSION['domain_ip']); |
|---|
| 133 | | header('Location: orders.php'); |
|---|
| 134 | | die(); |
|---|
| 135 | | } |
|---|
| 136 | | |
|---|
| 137 | | check_for_lock_file(); |
|---|
| 138 | | |
|---|
| 139 | | $query = <<<ISPCP_SQL_QUERY |
|---|
| | 111 | unset($_SESSION["ch_hpprops"]); |
|---|
| | 112 | list($php, $cgi, $sub, |
|---|
| | 113 | $als, $mail, $ftp, |
|---|
| | 114 | $sql_db, $sql_user, |
|---|
| | 115 | $traff, $disk) = explode(";", $props); |
|---|
| | 116 | |
|---|
| | 117 | $php = preg_replace("/\_/", "", $php); |
|---|
| | 118 | $cgi = preg_replace("/\_/", "", $cgi); |
|---|
| | 119 | |
|---|
| | 120 | $timestamp = time(); |
|---|
| | 121 | $pure_user_pass = substr($timestamp, 0, 6); |
|---|
| | 122 | $inpass = crypt_user_pass($pure_user_pass); |
|---|
| | 123 | |
|---|
| | 124 | if (!chk_dname($dmn_user_name)) { |
|---|
| | 125 | set_page_message(tr('Wrong domain name syntax!')); |
|---|
| | 126 | unset($_SESSION['domain_ip']); |
|---|
| | 127 | header('Location: orders.php'); |
|---|
| | 128 | die(); |
|---|
| | 129 | } |
|---|
| | 130 | if (ispcp_domain_exists($dmn_user_name, $_SESSION['user_id'])) { |
|---|
| | 131 | set_page_message(tr('Domain with that name already exists on the system!')); |
|---|
| | 132 | unset($_SESSION['domain_ip']); |
|---|
| | 133 | header('Location: orders.php'); |
|---|
| | 134 | die(); |
|---|
| | 135 | } |
|---|
| | 136 | |
|---|
| | 137 | check_for_lock_file(); |
|---|
| | 138 | |
|---|
| | 139 | $query = <<<ISPCP_SQL_QUERY |
|---|
| 140 | 140 | insert into admin |
|---|
| 141 | 141 | ( |
|---|
| … | … | |
| 153 | 153 | ISPCP_SQL_QUERY; |
|---|
| 154 | 154 | |
|---|
| 155 | | $res = exec_query($sql, $query, array($dmn_user_name, $inpass, $reseller_id, $first_name, $last_name, |
|---|
| 156 | | $firm, $zip, $city, $country, $user_email, $phone, $fax, $street_one, $street_two, $customer_id)); |
|---|
| 157 | | |
|---|
| 158 | | print $sql -> ErrorMsg(); |
|---|
| 159 | | |
|---|
| 160 | | $record_id = $sql -> Insert_ID(); |
|---|
| | 155 | $res = exec_query($sql, $query, array($dmn_user_name, $inpass, $reseller_id, $first_name, $last_name, |
|---|
| | 156 | $firm, $zip, $city, $country, $user_email, $phone, $fax, $street_one, $street_two, $customer_id)); |
|---|
| | 157 | |
|---|
| | 158 | print $sql->ErrorMsg(); |
|---|
| | 159 | |
|---|
| | 160 | $record_id = $sql->Insert_ID(); |
|---|
| 161 | 161 | |
|---|
| 162 | 162 | $query = <<<SQL_QUERY |
|---|
| … | … | |
| 170 | 170 | SQL_QUERY; |
|---|
| 171 | 171 | |
|---|
| 172 | | $rs = exec_query($sql, $query, array($reseller_id)); |
|---|
| 173 | | $domain_ip = $rs -> fields['reseller_ips']; |
|---|
| 174 | | |
|---|
| 175 | | |
|---|
| 176 | | $query = <<<ISPCP_SQL_QUERY |
|---|
| | 172 | $rs = exec_query($sql, $query, array($reseller_id)); |
|---|
| | 173 | $domain_ip = $rs->fields['reseller_ips']; |
|---|
| | 174 | |
|---|
| | 175 | $query = <<<ISPCP_SQL_QUERY |
|---|
| 177 | 176 | insert into domain ( |
|---|
| 178 | 177 | domain_name, domain_admin_id, |
|---|
| … | … | |
| 197 | 196 | ISPCP_SQL_QUERY; |
|---|
| 198 | 197 | |
|---|
| 199 | | $res = exec_query($sql, $query, array($dmn_user_name, |
|---|
| 200 | | $record_id, |
|---|
| 201 | | $reseller_id, |
|---|
| 202 | | $mail, |
|---|
| 203 | | $ftp, |
|---|
| 204 | | $traff, |
|---|
| 205 | | $sql_db, |
|---|
| 206 | | $sql_user, |
|---|
| 207 | | $sub, |
|---|
| 208 | | $als, |
|---|
| 209 | | $domain_ip, |
|---|
| 210 | | $disk, |
|---|
| 211 | | $php, |
|---|
| 212 | | $cgi)); |
|---|
| 213 | | $dmn_id = $sql -> Insert_ID(); |
|---|
| 214 | | |
|---|
| 215 | | // ispcp 2.5 feature |
|---|
| 216 | | //add_domain_extras($dmn_id, $record_id, $sql); |
|---|
| 217 | | |
|---|
| 218 | | |
|---|
| 219 | | // lets send mail to user |
|---|
| 220 | | send_add_user_auto_msg ( |
|---|
| 221 | | $reseller_id, |
|---|
| 222 | | $dmn_user_name, |
|---|
| 223 | | $pure_user_pass, |
|---|
| 224 | | $user_email, |
|---|
| 225 | | $first_name, |
|---|
| 226 | | $last_name, |
|---|
| 227 | | tr('Domain account') |
|---|
| 228 | | ); |
|---|
| 229 | | |
|---|
| 230 | | // send query to the ispcp daemon |
|---|
| 231 | | |
|---|
| 232 | | |
|---|
| 233 | | // add user into user_gui_props => domain looser needs language and skin too :-) |
|---|
| 234 | | |
|---|
| 235 | | $user_def_lang = $_SESSION['user_def_lang']; |
|---|
| 236 | | $user_theme_color = $_SESSION['user_theme']; |
|---|
| 237 | | |
|---|
| 238 | | $query = <<<SQL_QUERY |
|---|
| | 198 | $res = exec_query($sql, $query, array($dmn_user_name, |
|---|
| | 199 | $record_id, |
|---|
| | 200 | $reseller_id, |
|---|
| | 201 | $mail, |
|---|
| | 202 | $ftp, |
|---|
| | 203 | $traff, |
|---|
| | 204 | $sql_db, |
|---|
| | 205 | $sql_user, |
|---|
| | 206 | $sub, |
|---|
| | 207 | $als, |
|---|
| | 208 | $domain_ip, |
|---|
| | 209 | $disk, |
|---|
| | 210 | $php, |
|---|
| | 211 | $cgi)); |
|---|
| | 212 | $dmn_id = $sql->Insert_ID(); |
|---|
| | 213 | // ispcp 2.5 feature |
|---|
| | 214 | // add_domain_extras($dmn_id, $record_id, $sql); |
|---|
| | 215 | // lets send mail to user |
|---|
| | 216 | send_add_user_auto_msg ($reseller_id, |
|---|
| | 217 | $dmn_user_name, |
|---|
| | 218 | $pure_user_pass, |
|---|
| | 219 | $user_email, |
|---|
| | 220 | $first_name, |
|---|
| | 221 | $last_name, |
|---|
| | 222 | tr('Domain account') |
|---|
| | 223 | ); |
|---|
| | 224 | // send query to the ispcp daemon |
|---|
| | 225 | // add user into user_gui_props => domain looser needs language and skin too :-) |
|---|
| | 226 | $user_def_lang = $_SESSION['user_def_lang']; |
|---|
| | 227 | $user_theme_color = $_SESSION['user_theme']; |
|---|
| | 228 | |
|---|
| | 229 | $query = <<<SQL_QUERY |
|---|
| 239 | 230 | |
|---|
|