Changeset 751
- Timestamp:
- 08/19/07 06:18:24
(1 year ago)
- Author:
- raphael
- Message:
Fixed #571: mod_cband's limit is not updated when limit is change in the GUI
Fixed some i18n issues
Fixed #562: Disable Named/Bind
Fixed #575: Update german translation with old submission at mailinglist
Merged French translation with Greg's
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r750 |
r751 |
|
| 8 | 8 | |
|---|
| 9 | 9 | 2007-08-18 Raphael Geissert |
|---|
| | 10 | - GUI: |
|---|
| | 11 | * Fixed #571: mod_cband's limit is not updated when limit is change in the GUI |
|---|
| | 12 | * Fixed some i18n issues |
|---|
| 10 | 13 | - SETUP: |
|---|
| 11 | 14 | * Fixed #573: Local name server in /etc/resolv.conf allows hijacking |
|---|
| | 15 | * Fixed #562: Disable Named/Bind |
|---|
| 12 | 16 | - CONFIGS: |
|---|
| 13 | 17 | * Fixed #578: ERROR 1170 (42000) at line 18: BLOB/TEXT column 'msgid' used in key specification without a key length |
|---|
| | 18 | - ENGINE: |
|---|
| | 19 | * Fixed #562: Disable Named/Bind |
|---|
| | 20 | - LANGUAGES: |
|---|
| | 21 | * Fixed #575: Update german translation with old submission at mailinglist |
|---|
| | 22 | * Merged French translation with Greg's |
|---|
| 14 | 23 | |
|---|
| 15 | 24 | 2007-08-17 Raphael Geissert |
|---|
| r745 |
r751 |
|
| 728 | 728 | } |
|---|
| 729 | 729 | |
|---|
| | 730 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 731 | |
|---|
| 730 | 732 | $rs = als_add_named_cfg_data($als_data); |
|---|
| 731 | 733 | |
|---|
| … | … | |
| 757 | 759 | } |
|---|
| 758 | 760 | |
|---|
| | 761 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 762 | |
|---|
| 759 | 763 | $rs = als_add_named_data($als_data); |
|---|
| 760 | 764 | |
|---|
| … | … | |
| 781 | 785 | |
|---|
| 782 | 786 | } |
|---|
| | 787 | |
|---|
| | 788 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| 783 | 789 | |
|---|
| 784 | 790 | $rs = als_del_named_cfg_data($als_data); |
|---|
| r749 |
r751 |
|
| 743 | 743 | } |
|---|
| 744 | 744 | |
|---|
| | 745 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 746 | |
|---|
| 745 | 747 | $rs = dmn_add_named_cfg_data($dmn_data); |
|---|
| 746 | 748 | |
|---|
| … | … | |
| 806 | 808 | |
|---|
| 807 | 809 | } |
|---|
| | 810 | |
|---|
| | 811 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| 808 | 812 | |
|---|
| 809 | 813 | $rs = dmn_del_named_cfg_data($dmn_data); |
|---|
| r745 |
r751 |
|
| 533 | 533 | } |
|---|
| 534 | 534 | |
|---|
| | 535 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 536 | |
|---|
| 535 | 537 | $rs = sub_add_named_cfg_data($sub_data); |
|---|
| 536 | 538 | |
|---|
| … | … | |
| 559 | 561 | } |
|---|
| 560 | 562 | |
|---|
| | 563 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 564 | |
|---|
| 561 | 565 | $rs = sub_add_named_cfg_data($sub_data); |
|---|
| 562 | 566 | |
|---|
| … | … | |
| 584 | 588 | |
|---|
| 585 | 589 | } |
|---|
| | 590 | |
|---|
| | 591 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| 586 | 592 | |
|---|
| 587 | 593 | $rs = sub_del_named_cfg_data($sub_data); |
|---|
| r750 |
r751 |
|
| 576 | 576 | my $vhost = "admin.$addr"; |
|---|
| 577 | 577 | |
|---|
| 578 | | my $qmsg = "\n Please enter the domain name ispCP OMEGA will run on [$vhost]: "; |
|---|
| | 578 | my $qmsg = "\n Please enter the domain name where ispCP OMEGA will run on [$vhost]: "; |
|---|
| 579 | 579 | |
|---|
| 580 | 580 | print STDOUT $qmsg; |
|---|
| … | … | |
| 1677 | 1677 | my ($cfg_tpl, $cfg, $cmd) = (undef, undef, undef); |
|---|
| 1678 | 1678 | |
|---|
| 1679 | | if ($main::cfg{'CMD_NAMED'} ne 'no') { |
|---|
| 1680 | | |
|---|
| 1681 | | sys_command_rs("$main::cfg{'CMD_NAMED'} stop &> /tmp/ispcp-setup-services.log"); |
|---|
| 1682 | | |
|---|
| 1683 | | } |
|---|
| | 1679 | return 0 if ($main::cfg{'CMD_NAMED'} eq 'no'); |
|---|
| | 1680 | |
|---|
| | 1681 | sys_command_rs("$main::cfg{'CMD_NAMED'} stop &> /tmp/ispcp-setup-services.log"); |
|---|
| 1684 | 1682 | |
|---|
| 1685 | 1683 | ($rs, $cfg_tpl) = get_file("$cfg_dir/named.conf"); |
|---|
| … | … | |
| 1715 | 1713 | return $rs if ($rs != 0); |
|---|
| 1716 | 1714 | |
|---|
| 1717 | | if ($main::cfg{'CMD_NAMED'} ne 'no') { |
|---|
| 1718 | | |
|---|
| 1719 | | sys_command_rs("$main::cfg{'CMD_NAMED'} start &> /tmp/ispcp-setup-services.log"); |
|---|
| 1720 | | |
|---|
| 1721 | | } |
|---|
| | 1715 | sys_command_rs("$main::cfg{'CMD_NAMED'} start &> /tmp/ispcp-setup-services.log"); |
|---|
| 1722 | 1716 | |
|---|
| 1723 | 1717 | push_el(\@main::el, 'setup_named()', 'Ending...'); |
|---|
| r736 |
r751 |
|
| 171 | 171 | $tpl -> assign( |
|---|
| 172 | 172 | array( |
|---|
| 173 | | 'TR_OF' => tr('of'), |
|---|
| 174 | | 'PERCENT' => $pr, |
|---|
| 175 | | 'VALUE' => sizeit($mtraff), |
|---|
| 176 | | 'MAX_VALUE' => $show_straf_max, |
|---|
| | 173 | 'TRAFFIC_WARNING' => tr('%1$d % [%2$d of %3$d]', $pr, sizeit($mtraff), $show_straf_max), |
|---|
| 177 | 174 | 'BAR_VALUE' => $bar_value, |
|---|
| 178 | 175 | ) |
|---|
| r661 |
r751 |
|
| 299 | 299 | 'TRAFF_SHOW_PERCENT' => $traff_show_percent, |
|---|
| 300 | 300 | 'TRAFF_PERCENT' => $traff_percent, |
|---|
| 301 | | 'TRAFF_USED' => make_hr($utraff_current), |
|---|
| 302 | | 'TRAFF_CURRENT' => make_hr($rtraff_current), |
|---|
| 303 | | 'TRAFF_MAX' => ($rtraff_max) ? make_hr($rtraff_max) : tr('unlimited'), |
|---|
| | 301 | |
|---|
| | 302 | 'TRAFF_MSG' => ($rtraff_max) ? |
|---|
| | 303 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', make_hr($utraff_current), make_hr($rtraff_current), make_hr($rtraff_max)): |
|---|
| | 304 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', make_hr($utraff_current), make_hr($rtraff_current)), |
|---|
| 304 | 305 | |
|---|
| 305 | 306 | 'DISK_SHOW_PERCENT' => $disk_show_percent, |
|---|
| 306 | 307 | 'DISK_PERCENT' => $disk_percent, |
|---|
| 307 | | 'DISK_USED' => make_hr($udisk_current), |
|---|
| 308 | | 'DISK_CURRENT' => make_hr($rdisk_current), |
|---|
| 309 | | 'DISK_MAX' => ($rdisk_max) ? make_hr($rdisk_max) : tr('unlimited'), |
|---|
| 310 | | |
|---|
| 311 | | 'DMN_USED' => $udmn_current, |
|---|
| 312 | | 'DMN_CURRENT' => $rdmn_current, |
|---|
| 313 | | 'DMN_MAX' => ($rdmn_max) ? $rdmn_max : tr('unlimited'), |
|---|
| 314 | | |
|---|
| 315 | | 'SUB_USED' => $usub_current, |
|---|
| 316 | | 'SUB_CURRENT' => $rsub_current, |
|---|
| 317 | | 'SUB_MAX' => ($rsub_max) ? $rsub_max : tr('unlimited'), |
|---|
| 318 | | |
|---|
| 319 | | 'ALS_USED' => $uals_current, |
|---|
| 320 | | 'ALS_CURRENT' => $rals_current, |
|---|
| 321 | | 'ALS_MAX' => ($rals_max) ? $rals_max : tr('unlimited'), |
|---|
| 322 | | |
|---|
| 323 | | 'MAIL_USED' => $umail_current, |
|---|
| 324 | | 'MAIL_CURRENT' => $rmail_current, |
|---|
| 325 | | 'MAIL_MAX' => ($rmail_max) ? $rmail_max : tr('unlimited'), |
|---|
| 326 | | |
|---|
| 327 | | 'FTP_USED' => $uftp_current, |
|---|
| 328 | | 'FTP_CURRENT' => $rftp_current, |
|---|
| 329 | | 'FTP_MAX' => ($rftp_max) ? $rftp_max : tr('unlimited'), |
|---|
| 330 | | |
|---|
| 331 | | 'SQL_DB_USED' => $usql_db_current, |
|---|
| 332 | | 'SQL_DB_CURRENT' => $rsql_db_current, |
|---|
| 333 | | 'SQL_DB_MAX' => ($rsql_db_max) ? $rsql_db_max : tr('unlimited'), |
|---|
| 334 | | 'TR_OF' => tr('of'), |
|---|
| 335 | | |
|---|
| 336 | | 'SQL_USER_USED' => $usql_user_current, |
|---|
| 337 | | 'SQL_USER_CURRENT' => $rsql_user_current, |
|---|
| 338 | | 'SQL_USER_MAX' => ($rsql_user_max) ? $rsql_user_max : tr('unlimited') |
|---|
| | 308 | |
|---|
| | 309 | 'DISK_MSG' => ($rdisk_max) ? |
|---|
| | 310 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', make_hr($udisk_current), make_hr($rdisk_current), make_hr($rdisk_max)): |
|---|
| | 311 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', make_hr($udisk_current), make_hr($rdisk_current)), |
|---|
| | 312 | |
|---|
| | 313 | 'DMN_MSG' => ($rdmn_max) ? |
|---|
| | 314 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $udmn_current, $rdmn_current, $rdmn_max): |
|---|
| | 315 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $udmn_current, $rdmn_current), |
|---|
| | 316 | |
|---|
| | 317 | 'SUB_MSG' => ($rsub_max) ? |
|---|
| | 318 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $usub_current, $rsub_current, $rsub_max): |
|---|
| | 319 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $usub_current, $rsub_current), |
|---|
| | 320 | |
|---|
| | 321 | 'ALS_MSG' => ($rals_max) ? |
|---|
| | 322 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $uals_current, $rals_current, $rals_max): |
|---|
| | 323 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $uals_current, $rals_current), |
|---|
| | 324 | |
|---|
| | 325 | 'MAIL_MSG' => ($rmail_max) ? |
|---|
| | 326 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $umail_current, $rmail_current, $rmail_max): |
|---|
| | 327 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $umail_current, $rmail_current), |
|---|
| | 328 | |
|---|
| | 329 | 'FTP_MSG' => ($rftp_max) ? |
|---|
| | 330 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $uftp_current, $rftp_current, $rftp_max): |
|---|
| | 331 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $uftp_current, $rftp_current), |
|---|
| | 332 | |
|---|
| | 333 | 'SQL_DB_MSG' => ($rsql_db_max) ? |
|---|
| | 334 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $usql_db_current, $rsql_db_current, $rsql_db_max): |
|---|
| | 335 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $usql_db_current, $rsql_db_current), |
|---|
| | 336 | |
|---|
| | 337 | 'SQL_USER_MSG' => ($rsql_user_max) ? |
|---|
| | 338 | tr('%1$d / %2$d <br/>of<br/> <b>%3$d</b>', $usql_user_current, $rsql_user_current, $rsql_user_max): |
|---|
| | 339 | tr('%1$d / %2$d <br/>of<br/> <b>unlimited</b>', $usql_user_current, $rsql_user_current) |
|---|
| 339 | 340 | |
|---|
| 340 | 341 | ) |
|---|
| r661 |
r751 |
|
| 343 | 343 | 'TRAFF_RED' => $traff_red, |
|---|
| 344 | 344 | 'TRAFF_GREEN' => $traff_green, |
|---|
| 345 | | 'TRAFF_USED' => make_hr($utraff_current), |
|---|
| 346 | | 'TRAFF_MAX' => ($utraff_max) ? make_hr($utraff_max) : tr('unlimited'), |
|---|
| | 345 | |
|---|
| | 346 | 'TRAFF_MSG' => ($utraff_max)? |
|---|
| | 347 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($utraff_current), make_hr($utraff_max)): |
|---|
| | 348 | tr('%d <br/>of</br> <b>unlimited</b>', make_hr($utraff_current)), |
|---|
| 347 | 349 | |
|---|
| 348 | 350 | 'DISK_SHOW_PERCENT' => $disk_show_percent, |
|---|
| … | … | |
| 350 | 352 | 'DISK_RED' => $disk_red, |
|---|
| 351 | 353 | 'DISK_GREEN' => $disk_green, |
|---|
| 352 | | 'DISK_USED' => make_hr($udisk_current), |
|---|
| 353 | | 'DISK_MAX' => ($udisk_max) ? make_hr($udisk_max) : tr('unlimited'), |
|---|
| | 354 | |
|---|
| | 355 | 'DISK_MSG' => ($udisk_max)? |
|---|
| | 356 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($udisk_current), make_hr($udisk_max)): |
|---|
| | 357 | tr('%d <br/>of</br> <b>unlimited</b>', make_hr($udisk_current)), |
|---|
| 354 | 358 | |
|---|
| 355 | 359 | 'WEB' => make_hr($web), |
|---|
| … | … | |
| 358 | 362 | 'POP3' => make_hr($pop3), |
|---|
| 359 | 363 | |
|---|
| 360 | | 'SUB_USED' => $usub_current, |
|---|
| 361 | | 'SUB_MAX' => ($usub_max) ? (($usub_max > 0) ? $usub_max : tr('disabled')) : tr('unlimited'), |
|---|
| 362 | | |
|---|
| 363 | | 'ALS_USED' => $uals_current, |
|---|
| 364 | | 'ALS_MAX' => ($uals_max) ? (($uals_max > 0) ? $uals_max : tr('disabled')) : tr('unlimited'), |
|---|
| 365 | | |
|---|
| 366 | | 'MAIL_USED' => $umail_current, |
|---|
| 367 | | 'MAIL_MAX' => ($umail_max) ? $umail_max : tr('unlimited'), |
|---|
| 368 | | |
|---|
| 369 | | 'FTP_USED' => $uftp_current, |
|---|
| 370 | | 'FTP_MAX' => ($uftp_max) ? $uftp_max : tr('unlimited'), |
|---|
| 371 | | |
|---|
| 372 | | 'SQL_DB_USED' => $usql_db_current, |
|---|
| 373 | | 'SQL_DB_MAX' => ($usql_db_max) ? (($usql_db_max > 0) ? $usql_db_max : tr('disabled')) : tr('unlimited'), |
|---|
| 374 | | |
|---|
| 375 | | 'SQL_USER_USED' => $usql_user_current, |
|---|
| 376 | | 'SQL_USER_MAX' => ($usql_user_max) ? (($usql_user_max > 0) ? $usql_user_max : tr('disabled')) : tr('unlimited'), |
|---|
| | 364 | 'SUB_MSG' => ($usub_max)? ( |
|---|
| | 365 | ($usub_max > 0) ? |
|---|
| | 366 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($usub_current), $usub_max): |
|---|
| | 367 | tr('<b>disabled</b>') |
|---|
| | 368 | ) : tr('%d <br/>of</br> <b>unlimited</b>', make_hr($usub_current)), |
|---|
| | 369 | |
|---|
| | 370 | 'ALS_MSG' => ($uals_max)? ( |
|---|
| | 371 | ($uals_max > 0) ? |
|---|
| | 372 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($uals_current), $uals_max): |
|---|
| | 373 | tr('<b>disabled</b>') |
|---|
| | 374 | ) : tr('%d <br/>of</br> <b>unlimited</b>', make_hr($uals_current)), |
|---|
| | 375 | |
|---|
| | 376 | 'MAIL_MSG' => ($umail_max)? |
|---|
| | 377 | tr('%1$d <br/>of</br> <b>%2$d</b>', $umail_current, $umail_max): |
|---|
| | 378 | tr('%d <br/>of</br> <b>unlimited</b>', $umail_current), |
|---|
| | 379 | |
|---|
| | 380 | 'FTP_MSG' => ($uftp_max)? |
|---|
| | 381 | tr('%1$d <br/>of</br> <b>%2$d</b>', $uftp_current, $uftp_max): |
|---|
| | 382 | tr('%d <br/>of</br> <b>unlimited</b>', $uftp_current), |
|---|
| | 383 | |
|---|
| | 384 | 'SQL_DB_MSG' => ($usql_db_max)? ( |
|---|
| | 385 | ($usql_db_max > 0) ? |
|---|
| | 386 | tr('%1$d <br/>of</br> <b>%2$d</b>', $usql_db_current, $usql_db_max): |
|---|
| | 387 | tr('<b>disabled</b>') |
|---|
| | 388 | ) : tr('%d <br/>of</br> <b>unlimited</b>', $usql_db_current), |
|---|
| | 389 | |
|---|
| | 390 | 'SQL_USER_MSG' => ($usql_user_max)? ( |
|---|
| | 391 | ($usql_user_max > 0) ? |
|---|
| | 392 | tr('%1$d <br/>of</br> <b>%2$d</b>', $usql_user_current, $usql_user_max): |
|---|
| | 393 | tr('<b>disabled</b>') |
|---|
| | 394 | ) : tr('%d <br/>of</br> <b>unlimited</b>', $usql_user_current) |
|---|
| 377 | 395 | |
|---|
| 378 | 396 | ) |
|---|
| … | … | |
| 410 | 428 | 'TR_SQL_DB' => tr('SQL<br>database'), |
|---|
| 411 | 429 | 'TR_SQL_USER' => tr('SQL<br>user'), |
|---|
| 412 | | 'TR_OF' => tr('of'), |
|---|
| 413 | 430 | |
|---|
| 414 | 431 | 'VALUE_NAME' => $name, |
|---|
| r747 |
r751 |
|
| 317 | 317 | |
|---|
| 318 | 318 | |
|---|
| 319 | | // Function to update changes into db |
|---|
| 320 | | function update_data_in_db($hpid) |
|---|
| 321 | | { |
|---|
| 322 | | global $domain_name, $domain_ip, $php_sup; |
|---|
| 323 | | global $cgi_supp ,$sub, $als; |
|---|
| 324 | | global $mail, $ftp, $sql_db; |
|---|
| 325 | | global $sql_user, $traff, $disk; |
|---|
| 326 | | global $username, $domain_php, $domain_cgi; |
|---|
| 327 | | |
|---|
| 328 | | $user_props = "$usub_current;$usub_max;"; |
|---|
| 329 | | $user_props .= "$uals_current;$uals_max;"; |
|---|
| 330 | | $user_props .= "$umail_current;$umail_max;"; |
|---|
| 331 | | $user_props .= "$uftp_current;$uftp_max;"; |
|---|
| 332 | | $user_props .= "$usql_db_current;$usql_db_max;"; |
|---|
| 333 | | $user_props .= "$usql_user_current;$usql_user_max;"; |
|---|
| 334 | | $user_props .= "$utraff_max;"; |
|---|
| 335 | | $user_props .= "$udisk_max;"; |
|---|
| 336 | | //$user_props .= "$domain_ip;"; |
|---|
| 337 | | $user_props .= "$domain_php;"; |
|---|
| 338 | | $user_props .= "$domain_cgi;"; |
|---|
| 339 | | |
|---|
| 340 | | update_user_props($user_id, $user_props); |
|---|
| 341 | | |
|---|
| 342 | | $reseller_props = "$rdmn_current;$rdmn_max;"; |
|---|
| 343 | | $reseller_props .= "$rsub_current;$rsub_max;"; |
|---|
| 344 | | $reseller_props .= "$rals_current;$rals_max;"; |
|---|
| 345 | | $reseller_props .= "$rmail_current;$rmail_max;"; |
|---|
| 346 | | $reseller_props .= "$rftp_current;$rftp_max;"; |
|---|
| 347 | | $reseller_props .= "$rsql_db_current;$rsql_db_max;"; |
|---|
| 348 | | $reseller_props .= "$rsql_user_current;$rsql_user_max;"; |
|---|
| 349 | | $reseller_props .= "$rtraff_current;$rtraff_max;"; |
|---|
| 350 | | $reseller_props .= "$rdisk_current;$rdisk_max;"; |
|---|
| 351 | | |
|---|
| 352 | | update_reseller_props($reseller_id, $reseller_props); |
|---|
| 353 | | |
|---|
| 354 | | //$tpl -> assign('MESSAGE', tr('Domain properties updated successfully!')); |
|---|
| 355 | | |
|---|
| 356 | | unset($_SESSION['edit_id']); |
|---|
| 357 | | set_page_message(tr('Domain properties updated successfully!')); |
|---|
| 358 | | Header("Location: users.php"); |
|---|
| 359 | | die(); |
|---|
| 360 | | }// End of update_data_in_db() |
|---|
| 361 | | |
|---|
| 362 | | |
|---|
| 363 | 319 | //Check input data |
|---|
| 364 | 320 | function check_user_data ( &$tpl, &$sql, $reseller_id, $user_id) { |
|---|
| … | … | |
| 426 | 382 | $usql_user_current, $usql_user_max, |
|---|
| 427 | 383 | $utraff_max, $udisk_max) = generate_user_props($user_id); |
|---|
| | 384 | |
|---|
| | 385 | $previous_utraff_max = $utraff_max; |
|---|
| 428 | 386 | |
|---|
| 429 | 387 | list ( |
|---|
| … | … | |
| 503 | 461 | if ($ed_error == '_off_') { |
|---|
| 504 | 462 | |
|---|
| | 463 | // |
|---|
| | 464 | // Set domain's status to 'change' to update mod_cband's limit |
|---|
| | 465 | // |
|---|
| | 466 | if ($previous_utraff_max != $utraff_max) { |
|---|
| | 467 | $query = "UPDATE domain SET domain_status = 'change' WHERE domain_id = ?"; |
|---|
| | 468 | exec_query($sql, $query, array($user_id)); |
|---|
| | 469 | } |
|---|
| | 470 | |
|---|
| 505 | 471 | $user_props = "$usub_current;$usub_max;"; |
|---|
| 506 | 472 | $user_props .= "$uals_current;$uals_max;"; |
|---|
| r743 |
r751 |
|
| 56 | 56 | list($percent, $bars) = calc_bars($usage, $max_usage, $bars_max); |
|---|
| 57 | 57 | $max_usage = sizeit($max_usage); |
|---|
| | 58 | $traffic_usage_data = tr('%1$s%% [%2$s of %3$s]', $percent, sizeit($usage), $max_usage); |
|---|
| 58 | 59 | } |
|---|
| 59 | 60 | |
|---|
| … | … | |
| 61 | 62 | $percent = 0; |
|---|
| 62 | 63 | $bars = 0; |
|---|
| 63 | | $max_usage = tr('unlimited'); |
|---|
| 64 | | } |
|---|
| 65 | | |
|---|
| 66 | | $traffic_usage_data = tr('%1$s%% [%2$s of %3$s]', $percent, sizeit($usage), $max_usage); |
|---|
| | 64 | $traffic_usage_data = tr('%1$s%% [%2$s of unlimited]', $percent, sizeit($usage)); |
|---|
| | 65 | } |
|---|
| 67 | 66 | |
|---|
| 68 | 67 | $tpl -> assign( |
|---|
| … | … | |
| 147 | 146 | gen_disk_usage($tpl, $udisk_current, $rdisk_max, 400); |
|---|
| 148 | 147 | |
|---|
| 149 | | if ($rtraff_max > 0) |
|---|
| 150 | | { |
|---|
| 151 | | if ($utraff_current > $rtraff_max) |
|---|
| 152 | | { |
|---|
| | 148 | if ($rtraff_max > 0) { |
|---|
| | 149 | if ($utraff_current > $rtraff_max) { |
|---|
| 153 | 150 | $tpl -> assign( |
|---|
| 154 | | 'TR_TRAFFIC_WARNING', tr('You are exceeding your traffic limit!') |
|---|
| 155 | | ); |
|---|
| 156 | | |
|---|
| 157 | | }else |
|---|
| 158 | | { |
|---|
| 159 | | $tpl -> assign('TRAFF_WARN', ''); |
|---|
| 160 | | } |
|---|
| 161 | | |
|---|
| 162 | | } else { |
|---|
| 163 | | if ($utraff_current > 1024 * 1024 * 1024 * 1024) { |
|---|
| 164 | | // $tpl -> assign('TR_TRAFFIC_WARNING', tr('You are exceeding your UNLIMITED traffic limit!')); |
|---|
| | 151 | 'TR_TRAFFIC_WARNING', tr('You are exceeding your traffic limit!') |
|---|
| | 152 | ); |
|---|
| | 153 | |
|---|
| 165 | 154 | } else { |
|---|
| 166 | 155 | $tpl -> assign('TRAFF_WARN', ''); |
|---|
| 167 | 156 | } |
|---|
| | 157 | |
|---|
| | 158 | } else { |
|---|
| | 159 | $tpl -> assign('TRAFF_WARN', ''); |
|---|
| 168 | 160 | } |
|---|
| 169 | 161 | |
|---|
| 170 | 162 | |
|---|
| 171 | 163 | //warning HDD Usage |
|---|
| 172 | | if ($rdisk_max > 0) |
|---|
| 173 | | { |
|---|
| 174 | | if ($udisk_current > $rdisk_max) |
|---|
| 175 | | { |
|---|
| 176 | | $tpl -> assign( |
|---|
| 177 | | 'TR_DISK_WARNING', tr('You are exceeding your disk limit!') |
|---|
| 178 | | ); |
|---|
| 179 | | |
|---|
| 180 | | }else |
|---|
| 181 | | { |
|---|
| 182 | | $tpl -> assign('DISK_WARN', ''); |
|---|
| 183 | | } |
|---|
| 184 | | |
|---|
| 185 | | } else { |
|---|
| 186 | | if ($udisk_current > 1024 * 1024 * 1024 * 1024) { |
|---|
| 187 | | // $tpl -> assign('TR_DISK_WARNING', tr('You are exceeding your UNLIMITED disk limit!')); |
|---|
| 188 | | } else { |
|---|
| 189 | | $tpl -> assign('DISK_WARN', ''); |
|---|
| 190 | | } |
|---|
| 191 | | } |
|---|
| | 164 | if ($rdisk_max > 0) { |
|---|
| | 165 | if ($udisk_current > $rdisk_max) { |
|---|
| | 166 | $tpl -> assign( |
|---|
| | 167 | 'TR_DISK_WARNING', tr('You are exceeding your disk limit!') |
|---|
| | 168 | ); |
|---|
| | 169 | |
|---|
| | 170 | } else { |
|---|
| | 171 | $tpl -> assign('DISK_WARN', ''); |
|---|
| | 172 | } |
|---|
| | 173 | |
|---|
| | 174 | } else { |
|---|
| | 175 | $tpl -> assign('DISK_WARN', ''); |
|---|
| | 176 | } |
|---|
| 192 | 177 | |
|---|
| 193 | 178 | |
|---|
| r743 |
r751 |
|
| 218 | 218 | 'YEAR' => $crnt_year, |
|---|
| 219 | 219 | 'DOMAIN_ID' => $domain_id, |
|---|
| 220 | | 'TRAFF_PERCENT' => $traff_percent, |
|---|
| | 220 | |
|---|
| 221 | 221 | 'TRAFF_SHOW_PERCENT' => $traff_show_percent, |
|---|
| | 222 | 'TRAFF_PERCENT' => $traff_percent, |
|---|
| 222 | 223 | 'TRAFF_RED' => $traff_red, |
|---|
| 223 | 224 | 'TRAFF_GREEN' => $traff_green, |
|---|
| 224 | | 'TRAFF_USED' => make_hr($utraff_current), |
|---|
| 225 | | 'TRAFF_MAX' => ($utraff_max) ? make_hr($utraff_max) : tr('unlimited'), |
|---|
| 226 | | 'DISK_PERCENT' => $disk_percent, |
|---|
| | 225 | |
|---|
| | 226 | 'TRAFF_MSG' => ($utraff_max)? |
|---|
| | 227 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($utraff_current), make_hr($utraff_max)): |
|---|
| | 228 | tr('%d <br/>of</br> <b>unlimited</b>', make_hr($utraff_current)), |
|---|
| | 229 | |
|---|
| 227 | 230 | 'DISK_SHOW_PERCENT' => $disk_show_percent, |
|---|
| | 231 | 'DISK_PERCENT' => $disk_percent, |
|---|
| 228 | 232 | 'DISK_RED' => $disk_red, |
|---|
| 229 | 233 | 'DISK_GREEN' => $disk_green, |
|---|
| 230 | | 'DISK_USED' => make_hr($udisk_current), |
|---|
| 231 | | 'DISK_MAX' => ($udisk_max) ? make_hr($udisk_max) : tr('unlimited'), |
|---|
| | 234 | |
|---|
| | 235 | 'DISK_MSG' => ($udisk_max)? |
|---|
| | 236 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($udisk_current), make_hr($udisk_max)): |
|---|
| | 237 | tr('%d <br/>of</br> <b>unlimited</b>', make_hr($udisk_current)), |
|---|
| | 238 | |
|---|
| 232 | 239 | 'WEB' => make_hr($web), |
|---|
| 233 | 240 | 'FTP' => make_hr($ftp), |
|---|
| 234 | 241 | 'SMTP' => make_hr($smtp), |
|---|
| 235 | 242 | 'POP3' => make_hr($pop3), |
|---|
| 236 | | 'SUB_USED' => $usub_current, |
|---|
| 237 | | 'SUB_MAX' => ($usub_max) ? (($usub_max > 0) ? $usub_max : tr('disabled')) : tr('unlimited'), |
|---|
| 238 | | 'ALS_USED' => $uals_current, |
|---|
| 239 | | 'ALS_MAX' => ($uals_max) ? (($uals_max > 0) ? $uals_max : tr('disabled')) : tr('unlimited'), |
|---|
| 240 | | 'MAIL_USED' => $umail_current, |
|---|
| 241 | | 'MAIL_MAX' => ($umail_max) ? $umail_max : tr('unlimited'), |
|---|
| 242 | | 'FTP_USED' => $uftp_current, |
|---|
| 243 | | 'FTP_MAX' => ($uftp_max) ? $uftp_max : tr('unlimited'), |
|---|
| 244 | | 'SQL_DB_USED' => $usql_db_current, |
|---|
| 245 | | 'SQL_DB_MAX' => ($usql_db_max) ? (($usql_db_max > 0) ? $usql_db_max : tr('disabled')) : tr('unlimited'), |
|---|
| 246 | | 'SQL_USER_USED' => $usql_user_current, |
|---|
| 247 | | 'SQL_USER_MAX' => ($usql_user_max) ? (($usql_user_max > 0) ? $usql_user_max : tr('disabled')) : tr('unlimited'))); |
|---|
| | 243 | |
|---|
| | 244 | 'SUB_MSG' => ($usub_max)? ( |
|---|
| | 245 | ($usub_max > 0) ? |
|---|
| | 246 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($usub_current), $usub_max): |
|---|
| | 247 | tr('<b>disabled</b>') |
|---|
| | 248 | ) : tr('%d <br/>of</br> <b>unlimited</b>', make_hr($usub_current)), |
|---|
| | 249 | |
|---|
| | 250 | 'ALS_MSG' => ($uals_max)? ( |
|---|
| | 251 | ($uals_max > 0) ? |
|---|
| | 252 | tr('%1$d <br/>of</br> <b>%2$d</b>', make_hr($uals_current), $uals_max): |
|---|
| | 253 | tr('<b>disabled</b>') |
|---|
| | 254 | ) : tr('%d <br/>of</br> <b>unlimited</b>', make_hr($uals_current)), |
|---|
| | 255 | |
|---|
| | 256 | 'MAIL_MSG' => ($umail_max)? |
|---|
| | 257 | tr('%1$d <br/>of</br> <b>%2$d</b>', $umail_current, $umail_max): |
|---|
| | 258 | tr('%d <br/>of</br> <b>unlimited</b>', $umail_current), |
|---|
| | 259 | |
|---|
| | 260 | 'FTP_MSG' => ($uftp_max)? |
|---|
| | 261 | tr('%1$d <br/>of</br> <b>%2$d</b>', $uftp_current, $uftp_max): |
|---|
| | 262 | tr('%d <br/>of</br> <b>unlimited</b>', $uftp_current), |
|---|
| | 263 | |
|---|
| | 264 | 'SQL_DB_MSG' => ($usql_db_max)? ( |
|---|
| | 265 | ($usql_db_max > 0) ? |
|---|
| | 266 | tr('%1$d <br/>of</br> <b>%2$d</b>', $usql_db_current, $usql_db_max): |
|---|
| | 267 | tr('<b>disabled</b>') |
|---|
| | 268 | ) : tr('%d <br/>of</br> <b>unlimited</b>', $usql_db_current), |
|---|
| | 269 | |
|---|
| | 270 | 'SQL_USER_MSG' => ($usql_user_max)? ( |
|---|
| | 271 | ($usql_user_max > 0) ? |
|---|
| | 272 | tr('%1$d <br/>of</br> <b>%2$d</b>', $usql_user_current, $usql_user_max): |
|---|
| | 273 | tr('<b>disabled</b>') |
|---|
| | 274 | ) : tr('%d <br/>of</br> <b>unlimited</b>', $usql_user_current) |
|---|
| | 275 | )); |
|---|
| 248 | 276 | } |
|---|
| 249 | 277 | |
|---|
| … | … | |
| 280 | 308 | 'TR_SQL_DB' => tr('SQL<br>database'), |
|---|
| 281 | 309 | 'TR_SQL_USER' => tr('SQL<br>user'), |
|---|
| 282 | | 'TR_OF' => tr('of'), |
|---|
| 283 | 310 | |
|---|
| 284 | 311 | 'VALUE_NAME' => $name, |
|---|
| r736 |
r751 |
|
| 145 | 145 | <tr> |
|---|
| 146 | 146 | <td width="25"> </td> |
|---|
| 147 | | <td class="content">{PERCENT} % [{VALUE} {TR_OF} {MAX_VALUE}]</td> |
|---|
| | 147 | <td class="content">{TRAFFIC_WARNING}</td> |
|---|
| 148 | 148 | </tr> |
|---|
| 149 | 149 | <tr> |
|---|
| r684 |
r751 |
|
| 101 | 101 | </table> |
|---|
| 102 | 102 | <b>{TRAFF_SHOW_PERCENT} %</b><br /> |
|---|
| 103 | | {TRAFF_USED} / {TRAFF_CURRENT}<br /> |
|---|
| 104 | | {TR_OF}<br /> |
|---|
| 105 | | <b>{TRAFF_MAX}</b></td> |
|---|
| | 103 | {TRAFF_MSG}</td> |
|---|
| 106 | 104 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|---|
| 107 | 105 | <tr> |
|---|
| … | … | |
| 118 | 116 | </table> |
|---|
| 119 | 117 | <b>{DISK_SHOW_PERCENT} %</b><br /> |
|---|
| 120 | | {DISK_USED} / {DISK_CURRENT}<br /> |
|---|
| 121 | | {TR_OF}<br /> |
|---|
| 122 | | <b>{DISK_MAX}</b></td> |
|---|
| 123 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{DMN_USED} / {DMN_CURRENT}<br /> |
|---|
| 124 | | {TR_OF}<br /> |
|---|
| 125 | | <b>{DMN_MAX}</b></td> |
|---|
| 126 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SUB_USED} / {SUB_CURRENT}<br /> |
|---|
| 127 | | {TR_OF}<br /> |
|---|
| 128 | | <b>{SUB_MAX}</b></td> |
|---|
| 129 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{ALS_USED} / {ALS_CURRENT}<br /> |
|---|
| 130 | | {TR_OF}<br /> |
|---|
| 131 | | <b>{ALS_MAX}</b></td> |
|---|
| 132 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{MAIL_USED} / {MAIL_CURRENT}<br /> |
|---|
| 133 | | {TR_OF}<br /> |
|---|
| 134 | | <b>{MAIL_MAX}</b></td> |
|---|
| 135 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{FTP_USED} / {FTP_CURRENT}<br /> |
|---|
| 136 | | {TR_OF}<br /> |
|---|
| 137 | | <b>{FTP_MAX}</b></td> |
|---|
| 138 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_DB_USED} / {SQL_DB_CURRENT}<br /> |
|---|
| 139 | | {TR_OF}<br /> |
|---|
| 140 | | <b>{SQL_DB_MAX}</b></td> |
|---|
| 141 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_USER_USED} / {SQL_USER_CURRENT}<br /> |
|---|
| 142 | | {TR_OF}<br /> |
|---|
| 143 | | <b>{SQL_USER_MAX}</b></td> |
|---|
| | 118 | {DISK_MSG}</b></td> |
|---|
| | 119 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{DMN_MSG}</td> |
|---|
| | 120 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SUB_MSG}</td> |
|---|
| | 121 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{ALS_MSG}</td> |
|---|
| | 122 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{MAIL_MSG}</td> |
|---|
| | 123 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{FTP_MSG}</td> |
|---|
| | 124 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_DB_MSG}</td> |
|---|
| | 125 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_USER_MSG}</td> |
|---|
| 144 | 126 | </tr> |
|---|
| 145 | 127 | <!-- EDP: reseller_entry --> |
|---|
| r684 |
r751 |
|
| 109 | 109 | </table> |
|---|
| 110 | 110 | <b>{TRAFF_SHOW_PERCENT} %</b><br /> |
|---|
| 111 | | {TRAFF_USED}<br /> |
|---|
| 112 | | {TR_OF}<br /> |
|---|
| 113 | | <b>{TRAFF_MAX}</b></td> |
|---|
| | 111 | {TRAFF_MSG}</td> |
|---|
| 114 | 112 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|---|
| 115 | 113 | <tr> |
|---|
| … | … | |
| 126 | 124 | </table> |
|---|
| 127 | 125 | <b>{DISK_SHOW_PERCENT} %</b><br /> |
|---|
| 128 | | {DISK_USED}<br /> |
|---|
| 129 | | {TR_OF}<br /> |
|---|
| 130 | | <b>{DISK_MAX}</b></td> |
|---|
| | 126 | {DISK_MSG}</td> |
|---|
| 131 | 127 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{WEB}</td> |
|---|
| 132 | 128 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{FTP}</td> |
|---|
| 133 | 129 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SMTP}</td> |
|---|
| 134 | 130 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{POP3}</td> |
|---|
| 135 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SUB_USED}<br /> |
|---|
| 136 | | {TR_OF}<br /> |
|---|
| 137 | | <b>{SUB_MAX}</b></td> |
|---|
| 138 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{ALS_USED}</td> |
|---|
| 139 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{MAIL_USED}<br /> |
|---|
| 140 | | {TR_OF}<br /> |
|---|
| 141 | | <b>{MAIL_MAX}</b></td> |
|---|
| 142 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{FTP_USED}<br /> |
|---|
| 143 | | {TR_OF}<br /> |
|---|
| 144 | | <b>{FTP_MAX}</b></td> |
|---|
| 145 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_DB_USED}<br /> |
|---|
| 146 | | {TR_OF}<br /> |
|---|
| 147 | | <b>{SQL_DB_MAX}</b></td> |
|---|
| 148 | | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SQL_USER_USED}<br /> |
|---|
| 149 | | {TR_OF}<br /> |
|---|
| 150 | | <b>{SQL_USER_MAX}</b></td> |
|---|
| | 131 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{SUB_MSG}</td> |
|---|
| | 132 | <td class="{ITEM_CLASS}" nowrap="nowrap" align="center">{ALS_MSG}</td> |
|---|
| | 133 | <td class="{ITEM_CLASS}" nowrap=" |
|---|
|