예제 #1
0
        if ($update['status'] != 201) {
            $ca->assign('errormessage', $update['results']['errors']['base']['0']);
        } else {
            header('Location: viewticket.php?tid=' . $ticket['results']['reference'] . '&c=' . $ticket['results']['id']);
        }
    }
}
## Ticket updates
foreach ($ticket['results']['updates'] as $key => $value) {
    if (!$value['private']) {
        $replies[] = array('name' => $value['author']['name'] ? $value['author']['name'] : $value['author']['first_name'] . ' ' . $value['author']['last_name'], 'message' => nl2br(($value['message'] ? $value['message'] : strip_tags($value['html_body'])) . ($value['signature_text'] ? "<div class='signature'><p>" . $value['signature_text'] . "</p></div>" : "")), 'admin' => $value['author']['type'] == 'User' ? true : false, 'userid' => $value['author']['type'] == 'User' ? false : true, 'date' => fromMySQLDate($value['posted_at'], 'time'), 'user' => $value['author']['type'] == 'User' ? "{$value['author']['first_name']} {$value['author']['last_name']}" : "{$value['from_name']}");
    }
}
## 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']);
}
## Assign vars to the template
$ca->assign('tid', $ticket['results']['reference']);
$ca->assign('subject', $ticket['results']['subject']);
$ca->assign('date', fromMySQLDate($ticket['results']['submitted_at'], time));
$ca->assign('department', $ticket['results']['department']['name']);
$ca->assign('urgency', "<span style='color:#{$ticket['results']['priority']['colour']}'>{$ticket['results']['priority']['name']}</span>");
$ca->assign('status', "<span style='color:#{$ticket['results']['status']['colour']}'>{$ticket['results']['status']['name']}</span>");
$ca->assign('showclosebutton', $settings['close_ticket'] ? true : false);
$ca->assign('descreplies', array_reverse($replies));
$ca->assign('replies', array_reverse($replies));
$ca->assign('c', $_GET['c']);
예제 #2
0
// Set the required paramaters to set the page up
define("CLIENTAREA", true);
//define("FORCESSL",true); // Uncomment to force the page to use https://
require "init.php";
$ca = new WHMCS_ClientArea();
$ca->initPage();
// Load the Lang file
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'solusvmcontrol' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . strtolower($language) . '.php')) {
    require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'solusvmcontrol' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . strtolower($language) . '.php';
} else {
    require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'solusvmcontrol' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . 'english.php';
}
// Check login status
if ($ca->isLoggedIn()) {
    // User is logged in, check product belongs to user
    $user_check = "SELECT count(id) AS count FROM tblhosting WHERE id = '" . (int) $_GET['id'] . "' AND userid = '" . $ca->getUserID() . "' AND packageid = '" . (int) $_GET['pid'] . "' LIMIT 1";
    $result = mysql_query($user_check);
    $row = mysql_fetch_assoc($result);
    if ($row["count"] != 1) {
        die("<font style=\"color:red;\"><b>{$_ADDONLANG['client_product_doesnt_belong_to_user']}</b></font>");
    }
    //** All checks out so far **//
    // Require SVMC functions
    require_once 'modules/addons/solusvmcontrol/solusvmcontrol.php';
    // Call vps()
    vps();
    /**
     * 	// User is logged in
     * 	$result = mysql_query("SELECT firstname FROM tblclients WHERE id=".$ca->getUserID());
     * 	$data = mysql_fetch_array($result);
     * 	$clientname = $data[0];
예제 #3
0
<?php

define("CLIENTAREA", true);
//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
}
$pageicon = "images/domains_big.gif";
initialiseClientArea($pagetitle, $pageicon, $breadcrumbnav);
$search = $whmcs->get_req_var("search");
$domain = $whmcs->get_req_var("domain");
$bulkdomains = $whmcs->get_req_var("bulkdomains");
$tld = $whmcs->get_req_var("tld");
$tlds = $whmcs->get_req_var("tlds");
$ext = $whmcs->get_req_var("ext");
$direct = $whmcs->get_req_var("direct");
$sld = "";
$invalidtld = "";
$availabilityresults = array();
$search_tlds = array();
$tldslist = array();
$client = new WHMCS_ClientArea();
$uid = $client->getUserID();
$currencyid = isset($_SESSION['currency']) ? $_SESSION['currency'] : "";
$currency = getCurrency($uid, $currencyid);
$smartyvalues['currency'] = $currency;
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : "";
$domain = isset($_REQUEST['domain']) ? $_REQUEST['domain'] : "";
$document_download = isset($_REQUEST['dl']) ? $_REQUEST['dl'] : "";
$search_domain = $_POST['search_domain'] != "Enter Domain to Find" ? $_POST['search_domain'] : "";
$current_date = date('Y-m-d');
$where = array("registrar" => "domainku");
if ($domain || $search_domain) {
    $where["domain"] = $domain ? $domain : $search_domain;
    $where_document = array("domain" => $domain);
}
$query = full_query("\n    SELECT  t.id, t.userid, t.type, t.domain, t.registrar, t.registrationdate, t.registrationperiod, t.status AS domstatus, i.status, o.nameservers, o.transfersecret,\n                m.domain AS coza_domain, m.domainid AS coza_domainid, m.userid AS coza_userid, m.id_doc_storage_name, m.id_doc_type, m.le_doc_storage_name, \n                m.le_doc_type, m.su_doc_storage_name, m.su_doc_type, m.domain_approval_date, m.domain_status,\n                c.firstname, c.lastname, c.companyname, c.email, c.address1, c.address2, c.city, c.state, c.postcode, c.country, c.phonenumber\n        FROM tbldomains t \n        LEFT JOIN mod_domaincloudregistrar m ON t.domain = m.domain \n        LEFT JOIN tblorders o ON t.orderid = o.id\n        LEFT JOIN tblinvoices i ON o.invoiceid = i.id\n        LEFT JOIN tblclients c ON t.userid = c.id\n        WHERE t.userid = " . $uid . " AND t.status <> 'Cancelled' AND t.status <> 'Expired' AND " . (!empty($domain) || !empty($search_domain) ? "t.domain LIKE '" . (!empty($domain) ? $domain : $search_domain) . "%'" : "t.domain LIKE '%.id'") . ";\n    ");
$rows = array();
예제 #5
0
             logActivity("Modified Password - User ID: " . $client->getID() . ($_SESSION['cid'] ? " - Contact ID: " . $_SESSION['cid'] : ""));
             $smartyvalues['successful'] = true;
         }
     }
     $smartyvalues['errormessage'] = $validate->getHTMLErrorOutput();
 } else {
     if ($action == "security") {
         checkContactPermission("changesq");
         $ca->setTemplate("clientareasecurity");
         $ca->addToBreadCrumb("clientarea.php?action=details", $whmcs->get_lang("clientareanavdetails"));
         $ca->addToBreadCrumb("clientarea.php?action=security", $whmcs->get_lang("clientareanavsecurity"));
         if ($whmcs->get_req_var("successful")) {
             $smartyvalues['successful'] = true;
         }
         $twofa = new WHMCS_2FA();
         $twofa->setClientID($ca->getUserID());
         if ($twofa->isActiveClients()) {
             $ca->assign("twofaavailable", true);
             if ($whmcs->get_req_var("2fasetup")) {
                 if (!$twofa->isActiveClients()) {
                     exit("Access denied");
                 }
                 ob_start();
                 if ($twofa->isEnabled()) {
                     echo "<div class=\"content\"><div style=\"padding:15px;\">";
                     $disabled = $incorrect = false;
                     if ($password = $whmcs->get_req_var("pwverify")) {
                         $dbpwd = get_query_val("tblclients", "password", array("id" => $ca->getUserID()));
                         if ($whmcs->get_config("NOMD5")) {
                             $check_pwd = decrypt($dbpwd);
                         } else {