<?php define("CLIENTAREA", true); require "init.php"; require_once 'modules/addons/sirportly/sirportly_functions.php'; include_once "modules/addons/sirportly/markdown.php"; $ca = new WHMCS_ClientArea(); $ca->initPage(); $ca->setPageTitle($whmcs->get_lang('supportticketssubmitticket')); $settings = sirportly_settings(); if (!sirportly_enabled()) { header('Location: /'); } $ca->setTemplate('/modules/addons/sirportly/templates/default/knowledgebase.tpl'); $content = curl('/api/v2/knowledge/page', array('kb' => $settings['kb'], 'path' => ltrim($_SERVER['PATH_INFO'], '/'))); $ca->assign('tree', doc_nav($kb)); $ca->assign('title', $content['results']['page']['title']); $ca->assign('content', Markdown($content['results']['page']['content'])); $ca->output();
$ca = new WHMCS_ClientArea(); $settings = sirportly_settings(); $ca->setPageTitle($whmcs->get_lang('supportticketsviewticket')); $ca->initPage(); global $CONFIG; if (!sirportly_enabled()) { die('Sirportly module not enabled.'); } if ($CONFIG['RequireLoginforClientTickets'] == 'on' && !$ca->isLoggedIn()) { header('Location: login.php'); } ## Close ticket if ($settings['close_ticket'] && $_GET['closeticket']) { $close = curl('/api/v2/tickets/update', array('ticket' => $_GET['tid'], 'status' => $settings['closed_status'])); if ($close['status'] != 200) { $ca->assign('errormessage', "Unable to close ticket, please contact support."); } else { header('Location: viewticket.php?tid=' . $_GET['tid'] . '&c=' . $_GET['c']); } } $ticket = curl('/api/v2/tickets/ticket', array('reference' => $_GET['tid'])); if ($ticket['results']['id'] != $_GET['c']) { header('Location: supporttickets.php'); } ## An update has been posted if ($_POST) { foreach ($_POST as $key => $value) { $ca->assign($key, $value); } if (!$_POST['replymessage']) { $ca->assign('errormessage', $whmcs->get_lang('supportticketserrornomessage'));
<?php require "init.php"; require_once dirname(__FILE__) . '/includes/hooks/inc/oms_config.php'; require_once __DIR__ . '/Classes/Autoloader.php'; $ca = new WHMCS_ClientArea(); $ca->setPageTitle("Resource consumption summary"); $ca->addToBreadCrumb('index.php', $whmcs->get_lang('globalsystemname')); $ca->addToBreadCrumb('oms_usage.php', 'OMS usage'); $ca->initPage(); //get parameters $user_id = mysql_real_escape_string($_GET['user_id']); $clientId = $_SESSION['uid']; global $product_core_name, $product_disk_name, $product_memory_name, $oms_usage_db, $whmcs_admin_user, $whmcs_admin_password, $whmcs_api_url, $oms_usage_db; $whmcsDbService = new \Opennode\Whmcs\Service\WhmcsDbService(); $whmcsExternalService = new \Opennode\Whmcs\Service\WhmcsExternalService($whmcs_admin_user, $whmcs_admin_password, $whmcs_api_url, $oms_usage_db); $omsReduction = new \Opennode\Whmcs\Service\OmsReductionService($product_core_name, $product_disk_name, $product_memory_name, $oms_usage_db, $whmcsExternalService, $whmcsDbService); $confChanges = $omsReduction->findClientConfChanges($clientId, null, null); $parsedChanges = $omsReduction->parseClientConfChanges($confChanges, $clientId); $ca->assign('omsconfs', $parsedChanges); $ca->setTemplate('omsclientusage'); $ca->output();
<?php // To be seen by admin only define("ADMINAREA", true); require "../init.php"; include_once '../includes/hooks/inc/oms_utils.php'; $ca = new WHMCS_ClientArea(); $ca->setPageTitle("VM statistics"); $ca->addToBreadCrumb('index.php', $whmcs->get_lang('globalsystemname')); $ca->initPage(); global $oms_user, $oms_password, $oms_hostname, $whmcs_upload_folder; // execute an external program to get all the info from oms $id = exec("{$whmcs_code_folder}/vmsummary.py {$oms_hostname} {$oms_user} {$oms_password} " . "{$whmcs_code_folder}/{$whmcs_upload_folder}/omssstats.csv", $arrEntries); $vms = array(); foreach ($arrEntries as $vmdata) { $vms[] = explode(";", $vmdata); } $ca->assign('vms', $vms); $ca->assign('upload_folder', $whmcs_upload_folder); $ca->setTemplate('omsvmstats'); $ca->output();
define("ADMINAREA", true); require "init.php"; include_once 'includes/hooks/inc/oms_utils.php'; $ca = new WHMCS_ClientArea(); $ca->setPageTitle("Resource consumption summary"); $ca->addToBreadCrumb('index.php', $whmcs->get_lang('globalsystemname')); $ca->addToBreadCrumb('oms_usage.php', 'OMS usage'); $ca->initPage(); $DATE_FORMAT_INPUT = 'd-m-Y'; $DATE_FORMAT_OUTPUT = 'Y-m-d'; //get parameters $start_date = $_GET['start_date'] ? DateTime::createFromFormat($DATE_FORMAT_INPUT, $_GET['start_date']) : date_sub(date_create(), date_interval_create_from_date_string("1 days")); $end_date = $_GET['end_date'] ? DateTime::createFromFormat($DATE_FORMAT_INPUT, $_GET['end_date']) : date_create(); $user_id = mysql_real_escape_string($_GET['user_id']); $datebetweenStr = "start_date: " . $start_date->format($DATE_FORMAT_INPUT) . " ... end_date: " . $end_date->format($DATE_FORMAT_INPUT); $ca->assign('datebetween', $datebetweenStr); $isAdmin = $_SESSION['adminid']; if ($start_date && $end_date && $isAdmin > 0) { $sql = "SELECT clientid, SUM(amount) as credit FROM tblcredit WHERE description LIKE 'OMS_USAGE%' AND date BETWEEN '" . $start_date->format($DATE_FORMAT_OUTPUT) . "' AND '" . $end_date->format($DATE_FORMAT_OUTPUT) . "' "; if ($user_id) { $sql .= " AND clientid=" . $user_id; } $sql .= " GROUP BY clientid "; $query = mysql_query($sql); $clients = array(); while ($client = mysql_fetch_array($query)) { $clients[] = $client; } $ca->assign('clients', $clients); } $ca->setTemplate('omsusage');
//define("FORCESSL", true); // Uncomment to force the page to use https:// require "init.php"; require 'modules/addons/facturacom/wrapperapp.php'; $ca = new WHMCS_ClientArea(); $ca->setPageTitle("Facturación de servicios"); $ca->initPage(); $ca->requireLogin(); if ($ca->isLoggedIn()) { WrapperConfig::load(); $configEntity = WrapperConfig::configEntity(); // Getting invoices by client from factura.com $invoices = (array) WrapperHelper::getInvoices($ca->getUserID()); $clientInvoices = array(); //object to array foreach ($invoices['data'] as $key => $value) { $clientInvoices[$key] = (array) $value; } // Getting invoices from whmcs $whmcsInvoices = WrapperHelper::getWhmcsInvoices($ca->getUserID()); $ca->assign('clientW', $ca->getUserID()); $ca->assign('whmcsInvoices', $whmcsInvoices); $ca->assign('clientInvoices', $clientInvoices); $ca->assign('systemURL', $configEntity['systemURL']); $ca->assign('apiUrl', $configEntity['apiUrl']); $ca->assign('serieInvoices', $configEntity['serie']); } else { # User is not logged in } # Define the template filename to be used without the .tpl extension $ca->setTemplate('customer_area/clientfacturacion'); $ca->output();
} } return $res; } if ($domain) { $domain = trim($domain); if (substr(strtolower($domain), 0, 7) == "http://") { $domain = substr($domain, 7); } if (substr(strtolower($domain), 0, 4) == "www.") { $domain = substr($domain, 4); } if (ip_dorgula($domain)) { $sonuc = ip_sorgula($domain); } elseif (domain_dorgula($domain)) { $sonuc = domain_sorgula($domain); } else { die("Invalid Input!"); } } $domain_parts = explode(".", $domain); $tld = strtolower(array_pop($domain_parts)); $whoissunucu = $whoissunuculari[$tld]; if ($whoissunucu == "whois.nic.tr") { $sonuc = iconv('ISO-8859-9', 'UTF-8', $sonuc); } $sonuc = str_replace(array_keys($ifadeler), array_values($ifadeler), $sonuc); $ca->assign('domain', $domain); $ca->assign('whois', $sonuc); $ca->setTemplate('whois2'); $ca->output();
} if ($action == "emails") { $ca->addToBreadCrumb("clientarea.php?action=emails", $whmcs->get_lang("clientareaemails")); } if ($action == "addfunds") { $ca->addToBreadCrumb("clientarea.php?action=addfunds", $whmcs->get_lang("addfunds")); } if ($action == "masspay") { $ca->addToBreadCrumb("clientarea.php?action=masspay" . ($all ? "&all=true" : "") . "#", $whmcs->get_lang("masspaytitle")); } if ($action == "quotes") { $ca->addToBreadCrumb("clientarea.php?action=quotes", $whmcs->get_lang("quotestitle")); } $client = new WHMCS_Client(WHMCS_Session::get("uid")); $currency = $client->getCurrency(); $ca->assign("action", $action); $ca->assign("clientareaaction", $action); if ($action == "") { $ca->setTemplate("clientareahome"); require "includes/ticketfunctions.php"; $tickets = array(); $statusfilter = ""; $result = select_query("tblticketstatuses", "title", array("showactive" => "1")); while ($data = mysql_fetch_array($result)) { $statusfilter .= "'" . $data[0] . "',"; } $statusfilter = substr($statusfilter, 0, 0 - 1); $result = select_query("tbltickets", "", "userid='" . mysql_real_escape_string($client->getID()) . ("' AND status IN (" . $statusfilter . ")"), "lastreply", "DESC"); while ($data = mysql_fetch_array($result)) { $id = $data['id']; $tid = $data['tid'];
<?php define("CLIENTAREA", true); require "init.php"; $ca = new WHMCS_ClientArea(); $ca->initPage(); $ca->setPageTitle($whmcs->get_lang('supportticketssubmitticket')); $settings = sirportly_settings(); if (!sirportly_enabled()) { die('Sirportly module not enabled.'); } ## Logged in? if ($ca->isLoggedIn()) { $result = mysql_query("SELECT CONCAT_WS(' ', firstname, lastname) as full_name, email FROM tblclients WHERE id=" . $ca->getUserID()); $client = mysql_fetch_array($result, MYSQL_ASSOC); $ca->assign('email', $client['email']); $ca->assign('clientname', $client['full_name']); } switch ($_GET['step']) { case '2': ## Default department, priority $ca->assign('deptid', $_GET['deptid']); $ca->assign('priorityid', $settings['priority']); if ($_POST) { ## Submitted new ticket foreach ($_POST as $key => $value) { $ca->assign($key, $value); } if (!$_POST['message']) { $ca->assign('errormessage', $whmcs->get_lang('supportticketserrornomessage')); } elseif ($contact = sirportly_contact()) {