$template = 'reseller/alias_edit.tpl'; // "Modify" button has been pressed if (isset($_POST['uaction']) && 'modify' === $_POST['uaction']) { if (isset($_SESSION['edit_ID'])) { $editid = $_SESSION['edit_ID']; } else { if (isset($_GET['edit_id'])) { $editid = $_GET['edit_id']; } else { unset($_SESSION['edit_ID']); $_SESSION['aledit'] = '_no_'; user_goto('alias.php'); } } // Save data to db if (check_fwd_data($tpl, $editid)) { $_SESSION['aledit'] = "_yes_"; user_goto('alias.php'); } } else { // Get user id that comes for edit if (isset($_GET['edit_id'])) { $editid = $_GET['edit_id']; } $_SESSION['edit_ID'] = $editid; $tpl->assign('PAGE_MESSAGE', ""); } // static page messages gen_logged_from($tpl); gen_editalias_page($tpl, $editid); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Manage Domain Alias/Edit Alias'), 'TR_MANAGE_DOMAIN_ALIAS' => tr('Manage domain alias'), 'TR_EDIT_ALIAS' => tr('Edit domain alias'), 'TR_ALIAS_NAME' => tr('Alias name'), 'TR_DOMAIN_IP' => tr('Domain IP'), 'TR_FORWARD' => tr('Forward to URL'), 'TR_MODIFY' => tr('Modify'), 'TR_CANCEL' => tr('Cancel'), 'TR_ENABLE_FWD' => tr("Enable Forward"), 'TR_ENABLE' => tr("Enable"), 'TR_DISABLE' => tr("Disable"), 'TR_DISABLE' => tr("Disable"), 'TR_PREFIX_HTTP' => 'http://', 'TR_PREFIX_HTTPS' => 'https://', 'TR_PREFIX_FTP' => 'ftp://'));
$editid = $_GET['edit_id']; } else { if (isset($_SESSION['edit_ID'])) { $editid = $_SESSION['edit_ID']; } else { unset($_SESSION['edit_ID']); not_allowed(); } } // Save data to db if (check_fwd_data($editid)) { $_SESSION['dnsedit'] = "_yes_"; user_goto('dns_overview.php'); } } elseif (isset($_POST['uaction']) && $_POST['uaction'] === 'add') { if (check_fwd_data(true)) { $_SESSION['dnsedit'] = "_yes_"; user_goto('dns_overview.php'); } } else { // Get user id that come for edit if (isset($_GET['edit_id'])) { $editid = $_GET['edit_id']; } else { $editid = 0; } $_SESSION['edit_ID'] = $editid; } gen_editdns_page($tpl, $editid, $add_mode); // static page messages gen_logged_from($tpl);
unset($_SESSION['edit_ID']); $_SESSION['subedit'] = '_no_'; user_goto('domains_manage.php'); } } // Get subdomain type if (isset($_POST['dmn_type'])) { $dmntype = $_POST['dmn_type']; } else { unset($_SESSION['edit_ID']); $_SESSION['subedit'] = '_no_'; user_goto('domains_manage.php'); } $dmn_id = $_POST['dmn_id']; // Save data to db if (check_fwd_data($tpl, $sql, $editid, $dmntype, $dmn_id)) { $_SESSION['subedit'] = '_yes_'; user_goto('domains_manage.php'); } } else { // Get user id that comes for edit if (isset($_GET['edit_id'])) { $editid = $_GET['edit_id']; } // Get subdomain type if (isset($_GET['dmn_type'])) { $dmntype = $_GET['dmn_type']; } else { user_goto('domains_manage.php'); } $_SESSION['edit_ID'] = $editid;