function resellerclubsdhostingin_ClientArea($params) { if (isset($_POST['cplogin']) && strlen(trim($_POST['cplogin'])) > 0) { $cplogin_action = strtolower(trim($_POST['cplogin'])); switch ($cplogin_action) { case 'webhost': _redirect_to_webhosting_control_panel($params); break; case 'mailhost': _redirect_to_mailhosting_control_panel($params); break; case 'dns': _redirect_to_dns_control_panel($params); break; case 'webmail': _redirect_to_webmail_control_panel($params); break; } } global $smarty; global $orderbox; try { $is_processing = false; $plan_pieces = _get_plan_details($params['configoption1']); if ('windows' == $plan_pieces['type']) { $api_path_orderid_from_domain = '/singledomainhosting/windows/in/orderid.json'; $api_path_order_details = '/singledomainhosting/windows/in/details.json'; $api_path_dns_details = '/singledomainhosting/windows/in/dns-record.json'; } else { $api_path_orderid_from_domain = '/singledomainhosting/linux/in/orderid.json'; $api_path_order_details = '/singledomainhosting/linux/in/details.json'; $api_path_dns_details = '/singledomainhosting/linux/in/dns-record.json'; } $order_id_result = $orderbox->api('GET', $api_path_orderid_from_domain, array('domain-name' => $params['domain']), $response, 'resellerclubsdhostingin', 'clientarea'); if (is_array($order_id_result) && array_key_exists('status', $order_id_result) && strtolower($order_id_result['status']) == 'error') { $is_processing = true; } else { $order_id = $order_id_result; $order_details = $orderbox->api('GET', $api_path_order_details, array('order-id' => $order_id), $response, 'resellerclubsdhostingin', 'clientarea'); $order_dns_details = $orderbox->api('GET', $api_path_dns_details, array('order-id' => $order_id), $response, 'resellerclubsdhostingin', 'clientarea'); } $smarty->assign('is_processing', $is_processing); if ($is_processing) { $smarty->assign('sdh_status', 'Processing...'); } else { if ('windows' == $plan_pieces['type']) { $cp_url = 'http://' . $order_details['ipaddress'] . ':8880'; } else { $cp_url = 'http://' . $order_details['ipaddress'] . '/cpanel'; } $cp_url_href = "<a href=\"{$cp_url}\" target=\"_blank\">{$cp_url}</a>"; $temp_url_href = "<a href=\"{$order_details['tempurl']}\" target=\"_blank\">{$order_details['tempurl']}</a>"; $smarty->assign('sdh_status', $order_details['currentstatus']); $smarty->assign('sdh_webhosting_panel', _display_webhosting_panel_form()); $smarty->assign('sdh_mailhosting_panel', _display_mailhosting_panel_form()); $smarty->assign('sdh_dns_panel', _display_dns_panel_form()); $smarty->assign('sdh_webmail_panel', _display_webmail_panel_form()); $smarty->assign('sdh_temp_url', $temp_url_href); $smarty->assign('sdh_cp_url', $cp_url_href); $smarty->assign('sdh_cp_username', $order_details['siteadminusername']); $smarty->assign('sdh_cp_password', $order_details['siteadminpassword']); $smarty->assign('sdh_ip_address', $order_details['ipaddress']); $smarty->assign('sdh_mailpop', $order_details['mailpop'] == '-1' ? 'Unlimited' : $order_details['mailpop']); $smarty->assign('sdh_diskspace', $order_details['webspace'] == '-1' ? 'Unlimited' : $order_details['webspace']); $smarty->assign('sdh_bandwidth', $order_details['bandwidth'] == '-1' ? 'Unlimited' : $order_details['bandwidth']); $smarty->assign('sdh_allocated_mailspace', $order_details['mailspace'] == '-1' ? 'Unlimited' : $order_details['mailspace'] . " GB"); $smarty->assign('nameservers', $order_details['nameserver']); $smarty->assign('dns_details', $order_dns_details); } } catch (Exception $e) { return $e->getMessage(); } }
function resellerclubwebservices_ClientArea($params) { if (isset($_POST['cplogin']) && strlen(trim($_POST['cplogin'])) > 0) { $cplogin_action = strtolower(trim($_POST['cplogin'])); switch ($cplogin_action) { case 'webhost': _redirect_to_webhosting_control_panel($params); break; case 'mailhost': _redirect_to_mailhosting_control_panel($params); break; case 'dns': _redirect_to_dns_control_panel($params); break; case 'webmail': _redirect_to_webmail_control_panel($params); break; case 'websitebuilder': _redirect_to_websitebuilder_control_panel($params); break; } } global $smarty; global $orderbox; try { $is_processing = false; $plan_pieces = _get_plan_details($params['configoption1']); $api_path_orderid_from_domain = '/webservices/orderid.json'; $api_path_order_details = '/webservices/details.json'; $api_path_dns_details = '/webservices/dns-record.json'; $order_id_result = $orderbox->api('GET', $api_path_orderid_from_domain, array('domain-name' => $params['domain']), $response, 'resellerclubwebservices', 'clientarea'); if (is_array($order_id_result) && array_key_exists('status', $order_id_result) && strtolower($order_id_result['status']) == 'error') { $is_processing = true; } else { $order_id = $order_id_result; $order_details = $orderbox->api('GET', $api_path_order_details, array('order-id' => $order_id), $response, 'resellerclubwebservices', 'clientarea'); $order_dns_details = $orderbox->api('GET', $api_path_dns_details, array('order-id' => $order_id), $response, 'resellerclubwebservices', 'clientarea'); } $smarty->assign('is_processing', $is_processing); if ($is_processing) { $smarty->assign('wpp_status', 'Processing...'); } else { $smarty->assign('wpp_status', $order_details['currentstatus']); if ('website builder' == $plan_pieces['type']) { $smarty->assign('is_websitebuilder', true); $smarty->assign('wpp_websitebuilder_panel', _display_websitebuilder_panel_form()); $smarty->assign('wpp_ip_address', $order_details['ipaddress']); $smarty->assign('wpp_mailpop', $order_details['mailpop'] == '-1' ? 'Unlimited' : $order_details['mailpop']); $smarty->assign('wpp_diskspace', $order_details['webspace'] == '-1' ? 'Unlimited' : $order_details['webspace']); $smarty->assign('wpp_bandwidth', $order_details['bandwidth'] == '-1' ? 'Unlimited' : $order_details['bandwidth']); } $smarty->assign('wpp_mailhosting_panel', _display_mailhosting_panel_form()); $smarty->assign('wpp_dns_panel', _display_dns_panel_form()); $smarty->assign('wpp_webmail_panel', _display_webmail_panel_form()); $smarty->assign('wpp_allocated_mailspace', $order_details['mailspace'] == '-1' ? 'Unlimited' : $order_details['mailspace'] . " GB"); $smarty->assign('wpp_email_accounts', $order_details['no_of_mail_boxes'] == '-1' ? 'Unlimited' : $order_details['no_of_mail_boxes']); $smarty->assign('nameservers', $order_details['ns_detail']); $smarty->assign('dns_details', $order_dns_details); } } catch (Exception $e) { return $e->getMessage(); } }
function resellerclubvpsus_ClientArea($params) { if (isset($_POST['cplogin']) && strlen(trim($_POST['cplogin'])) > 0) { $cplogin_action = strtolower(trim($_POST['cplogin'])); switch ($cplogin_action) { case 'cpanel': _redirect_to_webhosting_control_panel($params); break; } } global $smarty; global $orderbox; try { $is_processing = false; $api_path = '/vps/linux/orderid.json'; $order_id_result = $orderbox->api('GET', $api_path, array('domain-name' => $params['domain']), $response, 'resellerclubvpslinuxus', 'clientarea'); if (is_array($order_id_result) && array_key_exists('status', $order_id_result) && strtolower($order_id_result['status']) == 'error') { $is_processing = true; } else { $order_id = $order_id_result; $api_path = '/vps/linux/details.json'; $order_details = $orderbox->api('GET', $api_path, array('order-id' => $order_id), $response, 'resellerclubvpslinuxus', 'clientarea'); if (is_array($order_details) && array_key_exists('status', $order_details)) { $status = strtolower($order_details['status']); if ($status != 'success') { $is_processing = true; } } } $smarty->assign('is_processing', $is_processing); if ($is_processing) { $smarty->assign('vps_status', 'Processing...'); } else { // if ('plesk' == $order_details['panel']) { // $cp_url = 'http://' . $order_details['ipaddress'] . ':8880'; // } else { // $cp_url = 'http://' . $order_details['ipaddress'] . '/cpanel'; // } $ssl_ip_address = ""; foreach ($order_details['addon_details'] as $addon_detail) { if ('whmcs' == $addon_detail['name']) { $whmcs_licence_key = $addon_detail['licenseKey']; $smarty->assign('is_whmcs_enabled', true); } if ('ssl' == $addon_detail['name']) { $ssl_ip_address .= $addon_detail['ipAddress'] . ', '; $smarty->assign('is_ssl_enabled', true); } if ('cpanel' == $addon_detail['name']) { $cp_login_url .= $addon_detail['loginURL']; $cp_username .= $addon_detail['username']; $smarty->assign('is_cpanel_enabled', true); } if ('virtuozzo' == $addon_detail['name']) { $virtuozzo_login_url .= $addon_detail['loginURL']; $virtuozzo_username .= $addon_detail['username']; } } $smarty->assign('vps_status', $order_details['currentstatus']); $smarty->assign('vps_webhosting_panel', _display_webhosting_panel_form()); $smarty->assign('vps_whmcs_key', $whmcs_licence_key); $smarty->assign('vps_ssl_ip_address', rtrim($ssl_ip_address, ', ')); $smarty->assign('vps_virtuozzo_url', $virtuozzo_login_url); $smarty->assign('vps_virtuozzo_username', $virtuozzo_username); $smarty->assign('vps_cp_url', $cp_login_url); $smarty->assign('vps_cp_username', $cp_username); $smarty->assign('vps_cp_password', $order_details['siteadminpassword']); $smarty->assign('vps_diskspace', $order_details['space'] == '-1' ? 'Unlimited' : $order_details['space']); $smarty->assign('vps_bandwidth', $order_details['bandwidth'] == '-1' ? 'Unlimited' : $order_details['bandwidth']); $smarty->assign('vps_cpu', $order_details['cpu']); $smarty->assign('vps_ram', $order_details['ram']); } } catch (Exception $e) { return $e->getMessage(); } }
function resellerclubresellerhosting_ClientArea($params) { if (isset($_POST['cplogin']) && strlen(trim($_POST['cplogin'])) > 0) { $cplogin_action = strtolower(trim($_POST['cplogin'])); switch ($cplogin_action) { case 'webhost': _redirect_to_webhosting_control_panel($params); break; case 'whm': _redirect_to_whm($params); break; case 'whmcs_license': resellerclubresellerhosting_GenerateLicense($params); break; } } global $smarty; global $orderbox; try { $is_processing = false; $plan_pieces = _get_plan_details($params['configoption1']); if ('windows' == $plan_pieces['type']) { $api_path = '/resellerhosting/windows/orderid.json'; } else { $api_path = '/resellerhosting/orderid.json'; } $order_id_result = $orderbox->api('GET', $api_path, array('domain-name' => $params['domain']), $response); if (is_array($order_id_result) && array_key_exists('status', $order_id_result) && strtolower($order_id_result['status']) == 'error') { $is_processing = true; } else { $order_id = $order_id_result; if ('windows' == $plan_pieces['type']) { $api_path = '/resellerhosting/windows/details.json'; } else { $api_path = '/resellerhosting/details.json'; } $order_details = $orderbox->api('GET', $api_path, array('order-id' => $order_id), $response); if (is_array($order_details) && array_key_exists('status', $order_details)) { $status = strtolower($order_details['status']); if ($status != 'success') { $is_processing = true; } } } $smarty->assign('is_processing', $is_processing); if ($is_processing) { $smarty->assign('rh_status', 'Your order is being processed ...'); } else { if ('windows' == $plan_pieces['type']) { $cp_url = 'http://' . $order_details['ipaddress'] . ':8880'; } else { $cp_url = 'http://' . $order_details['ipaddress'] . '/cpanel'; } $cp_url_href = "<a href=\"{$cp_url}\" target=\"_blank\">{$cp_url}</a>"; $temp_url_href = "<a href=\"{$order_details['tempurl']}\" target=\"_blank\">{$order_details['tempurl']}</a>"; $smarty->assign('rh_status', $order_details['currentstatus']); $smarty->assign('rh_webhosting_panel', _display_webhosting_panel_form()); $smarty->assign('rh_whm_panel', _display_whm_form()); $smarty->assign('rh_temp_url', $temp_url_href); $smarty->assign('rh_cp_url', $cp_url_href); $smarty->assign('rh_cp_username', $order_details['siteadminusername']); $smarty->assign('rh_cp_password', $order_details['siteadminpassword']); $smarty->assign('rh_ip_address', $order_details['ipaddress']); $plans = $orderbox->api('GET', '/products/plan-details.json'); if ('windows' != $plan_pieces['type'] && $plans['resellerhosting'][$plan_pieces['id']]['includes_whmcs'] == '1') { if ($order_details['licenseKey']) { $smarty->assign('rh_whmcs_license_key', $order_details['licenseKey']); } else { $smarty->assign('rh_whmcs_license_key', _display_whmcs_license_form()); } } else { $smarty->assign('rh_whmcs_license_key', ''); } $smarty->assign('rh_dns_1', $order_details['ns_detail']['0']); $smarty->assign('rh_dns_2', $order_details['ns_detail']['1']); $smarty->assign('rh_diskspace', $order_details['space'] == '-1' ? 'Unlimited' : $order_details['space']); $smarty->assign('rh_bandwidth', $order_details['bandwidth'] == '-1' ? 'Unlimited' : $order_details['bandwidth']); } } catch (Exception $e) { return $e->getMessage(); } }