Changeset 1245
- Timestamp:
- 06/29/08 00:11:22
(2 months ago)
- Author:
- rats
- Message:
GUI Update 3/5: client
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1241 |
r1245 |
|
| 37 | 37 | $tpl->define_dynamic('js_not_domain', 'page'); //JavaScript has to be generated, too |
|---|
| 38 | 38 | |
|---|
| 39 | | |
|---|
| 40 | 39 | // page functions. |
|---|
| 41 | 40 | |
|---|
| … | … | |
| 61 | 60 | } |
|---|
| 62 | 61 | |
|---|
| 63 | | $tpl->assign(array('USERNAME' => clean_input($_POST['username']), |
|---|
| 64 | | 'DOMAIN_NAME' => $dmn_name, |
|---|
| 65 | | 'MAIL_DMN_CHECKED' => ($_POST['dmn_type'] === 'dmn') ? "checked=\"checked\"" : "", |
|---|
| 66 | | 'MAIL_ALS_CHECKED' => ($_POST['dmn_type'] === 'als') ? "checked=\"checked\"" : "", |
|---|
| 67 | | 'MAIL_SUB_CHECKED' => ($_POST['dmn_type'] === 'sub') ? "checked=\"checked\"" : "", |
|---|
| 68 | | 'NORMAL_MAIL_CHECKED' => ($_POST['mail_type_normal']) ? "checked=\"checked\"" : "", |
|---|
| 69 | | 'FORWARD_MAIL_CHECKED' => ($_POST['mail_type_forward']) ? "checked=\"checked\"" : "", |
|---|
| 70 | | 'FORWARD_LIST' => $f_list)); |
|---|
| | 62 | $tpl->assign( |
|---|
| | 63 | array( |
|---|
| | 64 | 'USERNAME' => clean_input($_POST['username']), |
|---|
| | 65 | 'DOMAIN_NAME' => $dmn_name, |
|---|
| | 66 | 'MAIL_DMN_CHECKED' => ($_POST['dmn_type'] === 'dmn') ? "checked=\"checked\"" : "", |
|---|
| | 67 | 'MAIL_ALS_CHECKED' => ($_POST['dmn_type'] === 'als') ? "checked=\"checked\"" : "", |
|---|
| | 68 | 'MAIL_SUB_CHECKED' => ($_POST['dmn_type'] === 'sub') ? "checked=\"checked\"" : "", |
|---|
| | 69 | 'NORMAL_MAIL_CHECKED' => (isset($_POST['mail_type_normal'])) ? "checked=\"checked\"" : "", |
|---|
| | 70 | 'FORWARD_MAIL_CHECKED' => (isset($_POST['mail_type_forward'])) ? "checked=\"checked\"" : "", |
|---|
| | 71 | 'FORWARD_LIST' => $f_list |
|---|
| | 72 | ) |
|---|
| | 73 | ); |
|---|
| 71 | 74 | } |
|---|
| 72 | 75 | } |
|---|
| … | … | |
| 90 | 93 | $rs = exec_query($sql, $query, array($dmn_id, $ok_status)); |
|---|
| 91 | 94 | if ($rs->RecordCount() == 0) { |
|---|
| 92 | | $tpl->assign(array('ALS_ID' => '0', |
|---|
| 93 | | 'ALS_SELECTED' => 'selected', |
|---|
| 94 | | 'ALS_NAME' => tr('Empty list'))); |
|---|
| | 95 | $tpl->assign( |
|---|
| | 96 | array( |
|---|
| | 97 | 'ALS_ID' => '0', |
|---|
| | 98 | 'ALS_SELECTED' => 'selected', |
|---|
| | 99 | 'ALS_NAME' => tr('Empty list') |
|---|
| | 100 | ) |
|---|
| | 101 | ); |
|---|
| 95 | 102 | $tpl->parse('ALS_LIST', 'als_list'); |
|---|
| 96 | 103 | $tpl->assign('TO_ALIAS_DOMAIN', ''); |
|---|
| 97 | 104 | $_SESSION['alias_count'] = "no"; |
|---|
| 98 | | } |
|---|
| 99 | | else { |
|---|
| | 105 | } else { |
|---|
| 100 | 106 | $first_passed = false; |
|---|
| 101 | 107 | while (!$rs->EOF) { |
|---|
| … | … | |
| 103 | 109 | if (!isset($_POST['als_id'])) { |
|---|
| 104 | 110 | $als_id = ""; |
|---|
| 105 | | } |
|---|
| 106 | | else { |
|---|
| | 111 | } else { |
|---|
| 107 | 112 | $als_id = $_POST['als_id']; |
|---|
| 108 | 113 | } |
|---|
| … | … | |
| 110 | 115 | if ($als_id == $rs->fields['alias_id']) { |
|---|
| 111 | 116 | $als_selected = 'selected'; |
|---|
| 112 | | } |
|---|
| 113 | | else { |
|---|
| | 117 | } else { |
|---|
| 114 | 118 | $als_selected = ''; |
|---|
| 115 | 119 | } |
|---|
| 116 | | } |
|---|
| 117 | | else { |
|---|
| | 120 | } else { |
|---|
| 118 | 121 | if (!$first_passed) { |
|---|
| 119 | 122 | $als_selected = 'selected'; |
|---|
| 120 | | } |
|---|
| 121 | | else { |
|---|
| | 123 | } else { |
|---|
| 122 | 124 | $als_selected = ''; |
|---|
| 123 | 125 | } |
|---|
| … | … | |
| 161 | 163 | $tpl->assign('TO_SUBDOMAIN', ''); |
|---|
| 162 | 164 | $_SESSION['subdomain_count'] = "no"; |
|---|
| 163 | | } |
|---|
| 164 | | else { |
|---|
| | 165 | } else { |
|---|
| 165 | 166 | $first_passed = false; |
|---|
| 166 | 167 | |
|---|
| … | … | |
| 169 | 170 | if (!isset($_POST['sub_id'])) { |
|---|
| 170 | 171 | $sub_id = ""; |
|---|
| 171 | | } |
|---|
| 172 | | else { |
|---|
| | 172 | } else { |
|---|
| 173 | 173 | $sub_id = $_POST['sub_id']; |
|---|
| 174 | 174 | } |
|---|
| … | … | |
| 176 | 176 | if ($sub_id == $rs->fields['sub_id']) { |
|---|
| 177 | 177 | $sub_selected = 'selected'; |
|---|
| | 178 | } else { |
|---|
| | 179 | $sub_selected = ''; |
|---|
| 178 | 180 | } |
|---|
| 179 | | else { |
|---|
| | 181 | } else { |
|---|
| | 182 | if (!$first_passed) { |
|---|
| | 183 | $sub_selected = 'selected'; |
|---|
| | 184 | } else { |
|---|
| 180 | 185 | $sub_selected = ''; |
|---|
| 181 | 186 | } |
|---|
| 182 | 187 | } |
|---|
| 183 | | else { |
|---|
| 184 | | if (!$first_passed) { |
|---|
| 185 | | $sub_selected = 'selected'; |
|---|
| 186 | | } |
|---|
| 187 | | else { |
|---|
| 188 | | $sub_selected = ''; |
|---|
| 189 | | } |
|---|
| 190 | | } |
|---|
| 191 | 188 | |
|---|
| 192 | 189 | $sub_name = decode_idna($rs->fields['sub_name']); |
|---|
| 193 | 190 | $dmn_name = decode_idna($dmn_name); |
|---|
| 194 | | $tpl->assign(array('SUB_ID' => $rs->fields['sub_id'], |
|---|
| 195 | | 'SUB_SELECTED' => $sub_selected, |
|---|
| 196 | | 'SUB_NAME' => $sub_name . '.' . $dmn_name)); |
|---|
| | 191 | $tpl->assign( |
|---|
| | 192 | array( |
|---|
| | 193 | 'SUB_ID' => $rs->fields['sub_id'], |
|---|
| | 194 | 'SUB_SELECTED' => $sub_selected, |
|---|
| | 195 | 'SUB_NAME' => $sub_name . '.' . $dmn_name |
|---|
| | 196 | ) |
|---|
| | 197 | ); |
|---|
| 197 | 198 | $tpl->parse('SUB_LIST', '.sub_list'); |
|---|
| 198 | 199 | $rs->MoveNext(); |
|---|
| 199 | 200 | |
|---|
| 200 | | if (!$first_passed) $first_passed = true; |
|---|
| | 201 | if (!$first_passed) |
|---|
| | 202 | $first_passed = true; |
|---|
| 201 | 203 | } |
|---|
| 202 | 204 | } |
|---|
| … | … | |
| 286 | 288 | |
|---|
| 287 | 289 | $mail_forward = $_POST['forward_list']; |
|---|
| 288 | | $faray = preg_split ("/[\n,]+/", $mail_forward); |
|---|
| | 290 | $farray = preg_split("/[\n,]+/", $mail_forward); |
|---|
| 289 | 291 | $mail_accs = array(); |
|---|
| 290 | 292 | |
|---|
| 291 | | foreach ($faray as $value) { |
|---|
| | 293 | foreach ($farray as $value) { |
|---|
| 292 | 294 | $value = trim($value); |
|---|
| 293 | 295 | if (!chk_email($value) && $value !== '') { |
|---|
| … | … | |
| 305 | 307 | |
|---|
| 306 | 308 | $mail_type = implode(',', $mail_type); |
|---|
| | 309 | list($dmn_type, $type) = split('_', $mail_type, 2); |
|---|
| 307 | 310 | |
|---|
| 308 | 311 | $check_acc_query = <<<SQL_QUERY |
|---|
| … | … | |
| 316 | 319 | `domain_id` = ? |
|---|
| 317 | 320 | AND |
|---|
| 318 | | `mail_type` = ? |
|---|
| | 321 | `sub_id` = ? |
|---|
| 319 | 322 | AND |
|---|
| 320 | | `sub_id` = ? |
|---|
| | 323 | LEFT (`mail_type`, LOCATE('_', `mail_type`)-1) = ? |
|---|
| 321 | 324 | SQL_QUERY; |
|---|
| 322 | 325 | |
|---|
| 323 | | $rs = exec_query($sql, $check_acc_query, array($mail_acc, $domain_id, $mail_type, $sub_id)); |
|---|
| | 326 | $rs = exec_query($sql, $check_acc_query, array($mail_acc, $domain_id, $sub_id, $dmn_type)); |
|---|
| 324 | 327 | } |
|---|
| 325 | 328 | |
|---|
| … | … | |
| 358 | 361 | $mail_addr)); |
|---|
| 359 | 362 | |
|---|
| 360 | | write_log($_SESSION['user_logged'] . ": add new mail account: " . $mail_addr); |
|---|
| | 363 | write_log($_SESSION['user_logged'] . ": adds new mail account: " . (isset($mail_addr) ? $mail_addr : $mail_acc)); |
|---|
| 361 | 364 | set_page_message(tr('Mail account scheduled for addition!')); |
|---|
| 362 | 365 | send_request(); |
|---|
| … | … | |
| 366 | 369 | |
|---|
| 367 | 370 | function check_mail_acc_data(&$sql, $dmn_id, $dmn_name) { |
|---|
| 368 | | if ($_POST['mail_type'] != 'forward') { |
|---|
| | 371 | |
|---|
| | 372 | $mail_type_normal = isset($_POST['mail_type_normal']) ? $_POST['mail_type_normal'] : false; |
|---|
| | 373 | $mail_type_forward = isset($_POST['mail_type_forward']) ? $_POST['mail_type_forward'] : false; |
|---|
| | 374 | |
|---|
| | 375 | if (($mail_type_normal == false) && ($mail_type_forward == false)) { |
|---|
| | 376 | set_page_message(tr('Please select at least one mail type!')); |
|---|
| | 377 | return; |
|---|
| | 378 | } |
|---|
| | 379 | |
|---|
| | 380 | if ($mail_type_normal) { |
|---|
| 369 | 381 | $pass = escapeshellcmd($_POST['pass']); |
|---|
| 370 | 382 | $pass_rep = escapeshellcmd($_POST['pass_rep']); |
|---|
| … | … | |
| 376 | 388 | } |
|---|
| 377 | 389 | |
|---|
| 378 | | if ($_POST['mail_type'] === 'normal') { |
|---|
| 379 | | if (!isset($pass) || $pass == null || !isset($pass_rep) || $pass_rep == null) { |
|---|
| | 390 | if ($mail_type_normal) { |
|---|
| | 391 | if (!isset($pass) || $pass == null || !isset($pass_rep) || $pass_rep == null || $pass_rep == '' || $pass == '') { |
|---|
| 380 | 392 | set_page_message(tr('Password data is missing!')); |
|---|
| 381 | 393 | return; |
|---|
| … | … | |
| 388 | 400 | // Not permitted chars |
|---|
| 389 | 401 | if (!chk_password($pass)) { |
|---|
| 390 | | set_page_message(tr('Password data includes not permitted signs!')); |
|---|
| | 402 | set_page_message(tr('Password data is shorter than %s signs or includes not permitted signs!'), $cfg['PASSWD_CHARS']); |
|---|
| 391 | 403 | return; |
|---|
| 392 | 404 | } |
|---|
| … | … | |
| 394 | 406 | |
|---|
| 395 | 407 | if ($_POST['dmn_type'] === 'sub' && !isset($_POST['sub_id'])) { |
|---|
| 396 | | set_page_message(tr('Subdomain list is empty! You can not add mail accounts!')); |
|---|
| | 408 | set_page_message(tr('Subdomain list is empty! You cannot add mail accounts!')); |
|---|
| 397 | 409 | return; |
|---|
| 398 | 410 | } |
|---|
| 399 | 411 | |
|---|
| 400 | 412 | if ($_POST['dmn_type'] === 'als' && !isset($_POST['als_id'])) { |
|---|
| 401 | | set_page_message(tr('Alias list is empty! You can not add mail accounts!')); |
|---|
| | 413 | set_page_message(tr('Alias list is empty! You cannot add mail accounts!')); |
|---|
| 402 | 414 | return; |
|---|
| 403 | 415 | } |
|---|
| 404 | 416 | |
|---|
| 405 | | if ($_POST['mail_type'] === 'forward' && empty($_POST['forward_list'])) { |
|---|
| | 417 | if ($mail_type_forward && empty($_POST['forward_list'])) { |
|---|
| 406 | 418 | set_page_message(tr('Forward list is empty!')); |
|---|
| 407 | 419 | return; |
|---|
| … | … | |
| 442 | 454 | header("Location: email_accounts.php"); |
|---|
| 443 | 455 | die(); |
|---|
| 444 | | } |
|---|
| 445 | | else { |
|---|
| | 456 | } else { |
|---|
| 446 | 457 | if (!isset($_POST['uaction'])) { |
|---|
| 447 | 458 | gen_page_form_data($tpl, $dmn_name, 'no'); |
|---|
| … | … | |
| 449 | 460 | gen_dmn_sub_list($tpl, $sql, $dmn_id, $dmn_name, 'no'); |
|---|
| 450 | 461 | gen_page_js($tpl); |
|---|
| 451 | | } |
|---|
| 452 | | else if (isset($_POST['uaction']) && $_POST['uaction'] === 'add_user') { |
|---|
| | 462 | } else if (isset($_POST['uaction']) && $_POST['uaction'] === 'add_user') { |
|---|
| 453 | 463 | gen_page_form_data($tpl, $dmn_name, 'yes'); |
|---|
| 454 | 464 | gen_dmn_als_list($tpl, $sql, $dmn_id, 'yes'); |
|---|
| … | … | |
| 466 | 476 | $tpl->assign('JS_TO_ALIAS_DOMAIN', ''); |
|---|
| 467 | 477 | $tpl->assign('JS_TO_ALL_DOMAIN', ''); |
|---|
| 468 | | } |
|---|
| 469 | | else if (isset($_SESSION['subdomain_count']) && !isset($_SESSION['alias_count'])) { // no subdomains - alaias available |
|---|
| | 478 | } else if (isset($_SESSION['subdomain_count']) && !isset($_SESSION['alias_count'])) { // no subdomains - alaias available |
|---|
| 470 | 479 | $tpl->assign('JS_NOT_DOMAIN', ''); |
|---|
| 471 | 480 | $tpl->assign('JS_TO_SUBDOMAIN', ''); |
|---|
| 472 | 481 | $tpl->parse('JS_TO_ALIAS_DOMAIN', 'js_to_alias_domain'); |
|---|
| 473 | 482 | $tpl->assign('JS_TO_ALL_DOMAIN', ''); |
|---|
| 474 | | } |
|---|
| 475 | | else if (!isset($_SESSION['subdomain_count']) && isset($_SESSION['alias_count'])) { // no alias - subdomain available |
|---|
| | 483 | } else if (!isset($_SESSION['subdomain_count']) && isset($_SESSION['alias_count'])) { // no alias - subdomain available |
|---|
| 476 | 484 | $tpl->assign('JS_NOT_DOMAIN', ''); |
|---|
| 477 | 485 | $tpl->parse('JS_TO_SUBDOMAIN', 'js_to_subdomain'); |
|---|
| 478 | 486 | $tpl->assign('JS_TO_ALIAS_DOMAIN', ''); |
|---|
| 479 | 487 | $tpl->assign('JS_TO_ALL_DOMAIN', ''); |
|---|
| 480 | | } |
|---|
| 481 | | else { // there are subdomains and aliases |
|---|
| | 488 | } else { // there are subdomains and aliases |
|---|
| 482 | 489 | $tpl->assign('JS_NOT_DOMAIN', ''); |
|---|
| 483 | 490 | $tpl->assign('JS_TO_SUBDOMAIN', ''); |
|---|
| … | … | |
| 526 | 533 | check_permissions($tpl); |
|---|
| 527 | 534 | |
|---|
| 528 | | $tpl->assign(array('TR_ADD_MAIL_USER' => tr('Add mail users'), |
|---|
| 529 | | 'TR_USERNAME' => tr('Username'), |
|---|
| 530 | | 'TR_TO_MAIN_DOMAIN' => tr('To main domain'), |
|---|
| 531 | | 'TR_TO_DMN_ALIAS' => tr('To domain alias'), |
|---|
| 532 | | 'TR_TO_SUBDOMAIN' => tr('To subdomain'), |
|---|
| 533 | | 'TR_NORMAL_MAIL' => tr('Normal mail'), |
|---|
| 534 | | 'TR_PASSWORD' => tr('Password'), |
|---|
| 535 | | 'TR_PASSWORD_REPEAT' => tr('Repeat password'), |
|---|
| 536 | | 'TR_FORWARD_MAIL' => tr('Forward mail'), |
|---|
| 537 | | 'TR_FORWARD_TO' => tr('Forward to'), |
|---|
| 538 | | 'TR_FWD_HELP' => tr("Separate multiple email addresses with a line-break."), |
|---|
| 539 | | 'TR_ADD' => tr('Add'))); |
|---|
| | 535 | $tpl->assign( |
|---|
| | 536 | array( |
|---|
| | 537 | 'TR_ADD_MAIL_USER' => tr('Add mail users'), |
|---|
| | 538 | 'TR_USERNAME' => tr('Username'), |
|---|
| | 539 | 'TR_TO_MAIN_DOMAIN' => tr('To main domain'), |
|---|
| | 540 | 'TR_TO_DMN_ALIAS' => tr('To domain alias'), |
|---|
| | 541 | 'TR_TO_SUBDOMAIN' => tr('To subdomain'), |
|---|
| | 542 | 'TR_NORMAL_MAIL' => tr('Normal mail'), |
|---|
| | 543 | 'TR_PASSWORD' => tr('Password'), |
|---|
| | 544 | 'TR_PASSWORD_REPEAT' => tr('Repeat password'), |
|---|
| | 545 | 'TR_FORWARD_MAIL' => tr('Forward mail'), |
|---|
| | 546 | 'TR_FORWARD_TO' => tr('Forward to'), |
|---|
| | 547 | 'TR_FWD_HELP' => tr("Separate multiple email addresses with a line-break."), |
|---|
| | 548 | 'TR_ADD' => tr('Add') |
|---|
| | 549 | ) |
|---|
| | 550 | ); |
|---|
| 540 | 551 | |
|---|
| 541 | 552 | gen_page_message($tpl); |
|---|
| r1241 |
r1245 |
|
| 138 | 138 | $rs = exec_query($sql, $query, array($dmn_id, $db_name)); |
|---|
| 139 | 139 | |
|---|
| 140 | | write_log($_SESSION['user_logged'] . ": add new SQL database: " . $db_name); |
|---|
| | 140 | write_log($_SESSION['user_logged'] . ": adds new SQL database: " . $db_name); |
|---|
| 141 | 141 | set_page_message(tr('SQL database created successfully!')); |
|---|
| 142 | 142 | user_goto('manage_sql.php'); |
|---|
| r1241 |
r1245 |
|
| 180 | 180 | // related to their domains. |
|---|
| 181 | 181 | |
|---|
| 182 | | write_log($_SESSION['user_logged'] . ": add new subdomain: " . $sub_name); |
|---|
| | 182 | write_log($_SESSION['user_logged'] . ": adds new subdomain: " . $sub_name); |
|---|
| 183 | 183 | send_request(); |
|---|
| 184 | 184 | } |
|---|
| r1241 |
r1245 |
|
| 64 | 64 | ); |
|---|
| 65 | 65 | |
|---|
| 66 | | function gen_page_awstats($tpl) { |
|---|
| | 66 | function gen_page_awstats(&$tpl) { |
|---|
| 67 | 67 | $awstats_act = Config::get('AWSTATS_ACTIVE'); |
|---|
| 68 | 68 | if ($awstats_act != 'yes') { |
|---|
| … | … | |
| 107 | 107 | 'TR_SWITCH_TO_BACKUP' => tr('Switch to backups/ directory'), |
|---|
| 108 | 108 | 'TR_DOWNLOAD_FILE' => tr('Download the files stored in this directory'), |
|---|
| 109 | | 'TR_USUALY_NAMED' => tr('(usually named ' . $name . ')'), |
|---|
| | 109 | 'TR_USUALY_NAMED' => tr('(usually named') . ' ' . $name . ')', |
|---|
| 110 | 110 | 'TR_RESTORE_BACKUP' => tr('Restore backup'), |
|---|
| 111 | 111 | 'TR_RESTORE_DIRECTIONS' => tr('Click the Restore button and the system will restore the last daily backup'), |
|---|
| r1241 |
r1245 |
|
| 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 | | **/ |
|---|
| 19 | | |
|---|
| | 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 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 23 | 23 | check_login(__FILE__); |
|---|
| 24 | 24 | |
|---|
| 25 | | if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id']) && isset($_GET['action']) && $_GET['action'] == "go_back") { |
|---|
| | 25 | if (isset($_SESSION['logged_from']) && isset($_SESSION['logged_from_id']) && |
|---|
| | 26 | isset($_GET['action']) && $_GET['action'] == "go_back") { |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | $from_id = $_SESSION['user_id']; |
|---|
| 28 | | |
|---|
| 29 | 29 | $to_id = $_SESSION['logged_from_id']; |
|---|
| 30 | 30 | |
|---|
| r1241 |
r1245 |
|
| 279 | 279 | |
|---|
| 280 | 280 | send_request(); |
|---|
| 281 | | write_log($_SESSION['user_logged'] . ": add new email catch all"); |
|---|
| | 281 | write_log($_SESSION['user_logged'] . ": adds new email catch all"); |
|---|
| 282 | 282 | set_page_message(tr('Catch all account scheduled for creation!')); |
|---|
| 283 | 283 | user_goto('catchall.php'); |
|---|
| … | … | |
| 295 | 295 | $sub_id = '0'; |
|---|
| 296 | 296 | $domain_id = $item_id; |
|---|
| 297 | | $query = "SELECT `domain_name` FROM `domain` |
|---|
| | 297 | $query = "SELECT `domain_name` FROM `domain` |
|---|
| 298 | 298 | WHERE `domain_id` = ?"; |
|---|
| 299 | 299 | $rs = exec_query($sql, $query, $domain_id); |
|---|
| … | … | |
| 311 | 311 | $mail_type = 'subdom_catchall'; |
|---|
| 312 | 312 | $sub_id = $item_id; |
|---|
| 313 | | $query = "SELECT `subdomain`.`domain_id`, `subdomain_name`, `domain_name` FROM `subdomain`, `domain` |
|---|
| | 313 | $query = "SELECT `subdomain`.`domain_id`, `subdomain_name`, `domain_name` FROM `subdomain`, `domain` |
|---|
| 314 | 314 | WHERE `subdomain_id` = ? AND `domain`.`domain_id` = `subdomain`.`domain_id`"; |
|---|
| 315 | 315 | $rs = exec_query($sql, $query, $item_id); |
|---|
| … | … | |
| 356 | 356 | |
|---|
| 357 | 357 | send_request(); |
|---|
| 358 | | write_log($_SESSION['user_logged'] . ": add new email catch all "); |
|---|
| | 358 | write_log($_SESSION['user_logged'] . ": adds new email catch all "); |
|---|
| 359 | 359 | set_page_message(tr('Catch all account scheduled for creation!')); |
|---|
| 360 | 360 | user_goto('catchall.php'); |
|---|
| r1241 |
r1245 |
|
| 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) |
|---|
| 9 | | * @license This program is free software; you can redistribute it and/or modify it under |
|---|
| | 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 |
|---|
| | 10 | * |
|---|
| | 11 | * @license |
|---|
| | 12 | * This program is free software; you can redistribute it and/or modify it under |
|---|
| 10 | 13 | * the terms of the MPL General Public License as published by the Free Software |
|---|
| 11 | 14 | * Foundation; either version 1.1 of the License, or (at your option) any later |
|---|
| r1241 |
r1245 |
|
| 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'; |
|---|
| r1241 |
r1245 |
|
| 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 |
|---|
| r1241 |
r1245 |
|
| 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 | | **/ |
|---|
| 19 | | |
|---|
| 20 | | |
|---|
| | 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 | */ |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 60 | 59 | |
|---|
| 61 | 60 | send_request(); |
|---|
| 62 | | write_log($_SESSION['user_logged'].": delete email catch all!"); |
|---|
| | 61 | write_log($_SESSION['user_logged'].": deletes email catch all!"); |
|---|
| 63 | 62 | set_page_message(tr('Catch all account scheduled for deletion!')); |
|---|
| 64 | 63 | user_goto('catchall.php'); |
|---|
| r1241 |
r1245 |
|
| 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 | | **/ |
|---|
| 19 | | |
|---|
| 20 | | |
|---|
| | 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 | */ |
|---|
| 21 | 20 | |
|---|
| 22 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 105 | 104 | $rs = exec_query($sql, $query, array($ftp_id)); |
|---|
| 106 | 105 | |
|---|
| 107 | | write_log($_SESSION['user_logged'].": delete FTP account: ".$ftp_name); |
|---|
| | 106 | write_log($_SESSION['user_logged'].": deletes FTP account: ".$ftp_name); |
|---|
| 108 | 107 | set_page_message(tr('FTP account deleted successfully!')); |
|---|
| 109 | 108 | user_goto('ftp_accounts.php'); |
|---|
| r1241 |
r1245 |
|
| 102 | 102 | send_request(); |
|---|
| 103 | 103 | $admin_login = decode_idna($_SESSION['user_logged']); |
|---|
| 104 | | write_log("$admin_login: delete mail account: " . $data['mail_acc'] . "@" . $dmn_name); |
|---|
| | 104 | write_log("$admin_login: deletes mail account: " . $data['mail_acc'] . "@" . $dmn_name); |
|---|
| 105 | 105 | $maildel = 1; |
|---|
| 106 | 106 | session_register("maildel"); |
|---|
| r1241 |
r1245 |
|
| 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 | | **/ |
|---|
| 19 | | |
|---|
| | 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 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| r1241 |
r1245 |
|
| 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'; |
|---|
| … | … | |
| 68 | 69 | $rs = exec_query($sql, $query, array($sub_id)); |
|---|
| 69 | 70 | send_request(); |
|---|
| 70 | | write_log($_SESSION['user_logged'].": delete subdomain: ".$sub_name); |
|---|
| | 71 | write_log($_SESSION['user_logged'].": deletes subdomain: ".$sub_name); |
|---|
| 71 | 72 | set_page_message(tr('Subdomain scheduled for deletion!')); |
|---|
| 72 | 73 | header('Location: manage_domains.php'); |
|---|
| r1241 |
r1245 |
|
| 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 | | **/ |
|---|
| 19 | | |
|---|
| | 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 | */ |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | require '../include/ispcp-lib.php'; |
|---|
| … | … | |
| 68 | 68 | } |
|---|
| 69 | 69 | |
|---|
| 70 | | write_log($_SESSION['user_logged'].": delete support ticket"); |
|---|
| | 70 | write_log($_SESSION['user_logged'].": deletes support ticket"); |
|---|
| 71 | 71 | set_page_message(tr('Support ticket deleted successfully!')); |
|---|
| 72 | 72 | user_goto($back_url); |
|---|
| r1241 |
r1245 |
|
| 164 | 164 | $ed_error = tr("Incorrect forward syntax"); |
|---|
| 165 | 165 | } |
|---|
| 166 | | if (!preg_match("/\/$/", $forward)) { |
|---|
| 167 | | $forward .= "/"; |
|---|
| | 166 | if (!preg_match("/\/$/", $forward_url)) { |
|---|
| | 167 | $forward_url .= "/"; |
|---|
| 168 | 168 | } |
|---|
| 169 | 169 | } |
|---|
| r1241 |
r1245 |
|
| 30 | 30 | $tpl->define_dynamic('forward_mail', 'page'); |
|---|
| 31 | 31 | |
|---|
| 32 | | // page functions. |
|---|
| | 32 | // page functions |
|---|
| 33 | 33 | |
|---|
| 34 | 34 | function edit_mail_account(&$tpl, &$sql) { |
|---|
| … | … | |
| 73 | 73 | if ($mail_type == MT_NORMAL_MAIL) { |
|---|
| 74 | 74 | $mtype[] = 1; |
|---|
| 75 | | $res1 = exec_query($sql, "select domain_name from domain where domain_id=?", array($domain_id)); |
|---|
| | 75 | $res1 = exec_query($sql, "SELECT domain_name FROM domain WHERE domain_id=?", array($domain_id)); |
|---|
| 76 | 76 | $tmp1 = $res1->FetchRow(0); |
|---|
| 77 | 77 | $maildomain = $tmp1['domain_name']; |
|---|
| 78 | 78 | } else if ($mail_type == MT_NORMAL_FORWARD) { |
|---|
| 79 | 79 | $mtype[] = 4; |
|---|
| 80 | | $res1 = exec_query($sql, "select domain_name from domain where domain_id=?", array($domain_id)); |
|---|
| | 80 | $res1 = exec_query($sql, "SELECT domain_name FROM domain WHERE domain_id=?", array($domain_id)); |
|---|
| 81 | 81 | $tmp1 = $res1->FetchRow(0); |
|---|
| 82 | 82 | &nb |
|---|
|