Ejemplo n.º 1
0
 function __construct()
 {
     parent::__construct();
     $this->CI->load->library('Utility');
     $this->log = $this->CI->utility->getLogWrapper();
     $this->contact = $this->CI->utility->getLoginContact();
     $this->extServerType = $this->CI->model('custom/ExtIntegrationConfigVerb')->getExtServerType();
 }
Ejemplo n.º 2
0
 function __construct()
 {
     parent::__construct();
     $this->CI->load->library('CurlRequest');
     $this->CI->load->library('EbsRequestGenerator');
     $this->CI->load->library('Utility');
     $this->log = $this->CI->utility->getLogWrapper();
 }
 function __construct()
 {
     parent::__construct();
     $this->CI->load->library('Utility');
     $this->log = $this->CI->utility->getLogWrapper();
     $this->contact = $this->CI->utility->getLoginContact();
     $this->checkExtIntegrationConfigVerb();
 }
Ejemplo n.º 4
0
 function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 5
0
<?php

namespace Custom\Models;

\RightNow\Models\Base::loadModel('Field');
use RightNow\Connect\v1_2 as RNCPHP;
//\RightNow\Models\Base::loadModel('Text');
use RightNow\Utils\Connect, RightNow\Utils\Framework, RightNow\Utils\Text, RightNow\Utils\Config, RightNow\Api;
class FieldExtn extends \RightNow\Models\Field
{
    function __construct()
    {
        parent::__construct();
    }
    public function sendForm($formData, $listOfUpdateIDs = array(), $smartAssistant = false)
    {
        if ($tokenError = $this->verifyFormToken()) {
            return $tokenError;
        }
        $actions = array();
        $processActions = function ($type, $action, $response) {
            return array($type => $response->result ?: $response->errors, "{$type}{$action}" => $response->errors ? false : true);
        };
        $formData = $this->processFields($formData, $presentFields);
        if (!$formData || !array_intersect(array_keys($presentFields), array_keys(Connect::getSupportedObjects(), 'read,write'))) {
            Api::phpoutlog("The form did not contain any fields with names of the Connect objects for which we have read and write support. Fields present: " . var_export($presentFields, true));
            return $this->getResponseObject(null, null, Config::getMessage(ERROR_REQUEST_ACTION_COMPLETED_MSG));
        }
        if ($presentFields['Contact']) {
            //Contact update
            if (Framework::isLoggedIn()) {
Ejemplo n.º 6
0
<?php

namespace Custom\Models;

\RightNow\Models\Base::loadModel('Asset');
//\RightNow\Models\Base::loadModel('Text');
use RightNow\Connect\v1_2 as Connect, RightNow\Utils\Connect as ConnectUtil, RightNow\Internal\Sql\Asset as Sql, RightNow\Utils\Framework, RightNow\Utils\Text, RightNow\Utils\Config;
class AssetExtn extends \RightNow\Models\Asset
{
    function __construct()
    {
        parent::__construct();
    }
    public function validateSerialNumber($serialNumber, $productID)
    {
        try {
            $array = str_split($serialNumber);
            $chckSum = array_pop($array);
            $afterdecode[] = "";
            foreach ($array as $value) {
                switch ($value) {
                    case '0':
                        $afterdecode[] = '0';
                        break;
                    case '1':
                        $afterdecode[] = '1';
                        break;
                    case '2':
                        $afterdecode[] = '2';
                        break;
                    case '3':