Test Failed
Push — master ( 84e24a...0ae603 )
by Joe
02:10
created

Parallels::authInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Parallels Functionality
4
 *
5
 * API Documentation at: .. ill fill this in later from forum posts
6
 *
7
 * Last Changed: $LastChangedDate: 2017-05-31 06:50:39 -0400 (Wed, 31 May 2017) $
8
 * @author detain
9
 * @version $Revision: 24936 $
10
 * @copyright 2017
11
 * @package MyAdmin
12
 * @category Licenses
13
 */
14
15
namespace Detain\Parallels;
16
17
/**
18
 * Parallels
19
 *
20
 * @access public
21
 */
22
class Parallels {
23
	public $LicenseType = 'billing'; // billing or purchase
24
	private $xmlOptions = array('sslverify' => FALSE);
25
	private $defaultUrl = 'https://ka.parallels.com:7050/';
26
	private $defaultDemoUrl = 'https://kademo.parallels.com:7050/';
27
	public $url = '';
28
	public $response;
29
	private $client = '';
30
	private $login = '';
31
	private $password = '';
32
	public $xml;
33
34
	/**
35
	 * @param null|string $login api login, null(default) to use the PARALLELS_KA_LOGIN setting
36
	 * @param null|string $password api password, null(default) to use the PARALLELS_KA_PASSWORD setting
37
	 * @param null|string $client api client, null(default) to use the PARALLELS_KA_CLIENT setting
38
	 * @param bool $demo defaults to false, whether or not to use the demo interface instae dof the normal one
39
	 * @param null|array $xmlOptions array of optoins ot pass to xmlrpc2 client
40
	 */
41
	public function __construct($login = NULL, $password = NULL, $client = NULL, $demo = FALSE, $xmlOptions = NULL) {
0 ignored issues
show
Coding Style introduced by
__construct uses the super-global variable $GLOBALS which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
42
		if (is_null($login) && defined('PARALLELS_KA_LOGIN'))
43
			$this->login = constant('PARALLELS_KA_LOGIN');
44
		else
45
			$this->login = $login;
46
		if (is_null($password) && defined('PARALLELS_KA_PASSWORD'))
47
			$this->password = constant('PARALLELS_KA_PASSWORD');
48
		else
49
			$this->password = $password;
50
		if (!is_null($client))
51
			$this->client = $client;
52
		elseif (defined('PARALLELS_KA_CLIENT'))
53
			$this->client = constant('PARALLELS_KA_CLIENT');
54
		if ($demo === TRUE)
55
			$this->url = $this->defaultDemoUrl;
56
		elseif ($demo === FALSE)
57
			$this->url = $this->defaultUrl;
58
		else
59
			$this->url = $demo;
0 ignored issues
show
Documentation Bug introduced by
The property $url was declared of type string, but $demo is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
60
		if (!is_null($xmlOptions))
61
			$this->xmlOptions = $xml_options;
0 ignored issues
show
Bug introduced by
The variable $xml_options does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
62
		if (!isset($GLOBALS['HTTP_RAW_POST_DATA']))
63
			$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
64
		require_once('XML/RPC2/Client.php');
65
		$this->xml = XML_RPC2_Client::create($this->url, $this->xmlOptions);
66
	}
67
68
	/**
69
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
70
	 */
71
	public function authInfo() {
72
		return array('login' => $this->login, 'password' => $this->password);
73
	}
74
75
	/**
76
	 * @param array $ips
77
	 * @param array $macs
78
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,array>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
79
	 */
80
	public function ServerAddress($ips = array(), $macs = array()) {
81
		if (!is_array($ips) && $ips != '')
82
			$ips = array($ips);
83
		if (!is_array($macs) && $macs != '')
84
			$macs = array($macs);
85
		return array(
86
			'ips' => $ips,
87
			'macs' => $macs,
88
			);
89
	}
90
91
	/**
92
	 * @param $Key
93
	 * @return mixed
94
	 */
95
	public function terminateKey($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
96
		$this->response = $this->xml->__call('partner10.terminateKey', array($this->authInfo(), $Key));
97
		return $this->response;
98
	}
99
100
	/**
101
	 * @param $Key
102
	 * @return mixed
103
	 */
104
	public function resetKey($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
105
		$this->response = $this->xml->__call('partner10.resetKey', array($this->authInfo(), $Key));
106
		return $this->response;
107
	}
108
109
	/**
110
	 * @param $Key
111
	 * @return mixed
112
	 */
113
	public function activateKey($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
114
		$this->response = $this->xml->__call('partner10.activateKey', array($this->authInfo(), $Key));
115
		return $this->response;
116
	}
117
118
	/**
119
	 * @param $Key
120
	 * @param $Note
121
	 * @return mixed
122
	 */
123
	public function addNoteToKey($Key, $Note) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style Naming introduced by
The parameter $Note is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
124
		$this->response = $this->xml->__call('partner10.addNoteToKey', array($this->authInfo(), $Key, $Note));
125
		return $this->response;
126
	}
127
128
	/**
129
	 * @param      $Key
130
	 * @param bool $Email
131
	 * @return mixed
132
	 */
133
	public function sendKeyByEmail($Key, $Email = FALSE) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style Naming introduced by
The parameter $Email is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
134
		if ($Email === FALSE)
135
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->authInfo(), $Key));
136
		else
137
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', array($this->authInfo(), $Key, $Email));
138
		return $this->response;
139
	}
140
141
	/**
142
	 * @param       $KeyType
143
	 * @param array $UpgradePlans
144
	 * @param array $ips
145
	 * @param array $macs
146
	 * @param bool  $LicenseType
147
	 * @param bool  $client
148
	 * @return mixed
149
	 */
150
	public function createKey($KeyType, $UpgradePlans = array(), $ips = array(), $macs = array(), $LicenseType = FALSE, $client = FALSE) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $KeyType is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style Naming introduced by
The parameter $UpgradePlans is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
Coding Style Naming introduced by
The parameter $LicenseType is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
151
		if (!is_array($ips) && $ips != '')
152
			$ips = array($ips);
153
		$this->response = $this->xml->__call('partner10.createKey', array(
154
			$this->authInfo(),
155
			$this->ServerAddress($ips, $macs),
156
			($client === FALSE ? $this->client : $client),
157
			$KeyType,
158
			$UpgradePlans,
159
			($LicenseType === FALSE ? $this->LicenseType : $LicenseType)));
160
		return $this->response;
161
		/* Success:
0 ignored issues
show
Unused Code Comprehensibility introduced by
41% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
162
		Array
163
		(
164
		[mainKeyNumber] => PLSK.00004266.0000
165
		[expirationDate] => stdClass Object
166
		(
167
		[scalar] => 20131209T00:00:00
168
		[xmlrpc_type] => datetime
169
		[timestamp] => 1386547200
170
		)
171
172
		[productKey] => DETAIN-2TVB02-ZT1R57-AY2442-6WN966
173
		[additionalKeysNumbers] => Array
174
		(
175
		)
176
177
		[resultCode] => 100
178
		[resultDesc] => PLSK.00004266.0000 has been successfully created.
179
		[updateDate] => stdClass Object
180
		(
181
		[scalar] => 20131129T00:00:00
182
		[xmlrpc_type] => datetime
183
		[timestamp] => 1385683200
184
		)
185
186
		)
187
		*/
188
	}
189
190
	/**
191
	 * @param $Key
192
	 * @return mixed
193
	 */
194
	public function retrieveKey($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
195
		$this->response = $this->xml->__call('partner10.retrieveKey', array($this->authInfo(), $Key));
196
		return $this->response;
197
		/* Success
198
		Array
199
		(
200
		[keyExtension] => xml
201
		[resultCode] => 100
202
		[resultDesc] => PLSK.00005819.0000 has been successfully retrieved
203
		[keyNumber] => PLSK.00005819.0000
204
		[key] => stdClass Object
205
		(
206
		[scalar] => <?xml version="1.0" encoding="UTF-8"?><plesk-windows:key xmlns:plesk-windows="http://parallels.com/schemas/keys/products/plesk/windows/multi" core:format="openfusion-3" xmlns:core="http://parallels.com/schemas/keys/core/3">
207
		<!--Unique product Key number-->
208
		<core:key-number core:type="string">PLSK.00005819</core:key-number>
209
		<!--Key version-->
210
		<core:key-version core:type="string">0000</core:key-version>
211
		<!--Key description-->
212
		<core:description>
213
		<core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows</core:keytype>
214
		<core:feature>Unlimited Domains w/1 yr SUS</core:feature>
215
		<core:feature>Parallels Web Presence Builder - 100 Sites</core:feature>
216
		<core:feature>Parallels PowerPack for Plesk (Windows)</core:feature>
217
		</core:description>
218
		<!--Product which this license is intended to work on-->
219
		<core:product core:type="string">plesk-win</core:product>
220
		<!--Supported product version-->
221
		<core:versions>
222
		<core:from core:type="string">10.0</core:from>
223
		<core:to core:type="string">any</core:to>
224
		</core:versions>
225
		<!--Date after which this license becomes usable (inclusive)-->
226
		<core:start-date core:type="date">instant</core:start-date>
227
		<!--Date before which this license is usable (exclusive)-->
228
		<core:expiration-date core:type="date">2013-12-02</core:expiration-date>
229
		<!--URL of the service endpoint to use when performing an autoupdate-->
230
		<core:license-server-url core:type="string">https://ka.parallels.com:5224/xmlrpc</core:license-server-url>
231
		<!--Date when product will try to perform an autoupdate-->
232
		<core:update-date core:type="date">2013-11-22</core:update-date>
233
		<core:update-ticket core:hidden="true" core:type="string">k0uj75wmlfa1a5hwmk-k43gy2ji0p2y1</core:update-ticket>
234
		<!--Number of domains-->
235
		<plesk-windows:domains core:type="integer">unlimited</plesk-windows:domains>
236
		<!--Number of clients-->
237
		<plesk-windows:clients core:type="integer">unlimited</plesk-windows:clients>
238
		<!--Number of webusers-->
239
		<plesk-windows:webusers core:type="integer">unlimited</plesk-windows:webusers>
240
		<!--Number of mailnames-->
241
		<plesk-windows:mailnames core:type="integer">unlimited</plesk-windows:mailnames>
242
		<!--Number of additional language pack(s)-->
243
		<plesk-windows:language-packs core:type="integer">0</plesk-windows:language-packs>
244
		<plesk-windows:mpc-id core:hidden="true" core:type="integer">0</plesk-windows:mpc-id>
245
		<plesk-windows:mpc-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-disabled>
246
		<!--Google tools-->
247
		<plesk-windows:google-tools core:type="boolean">true</plesk-windows:google-tools>
248
		<plesk-windows:mpc-mng-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-mng-disabled>
249
		<!--Number of slaves-->
250
		<plesk-windows:slaves core:type="integer">0</plesk-windows:slaves>
251
		<!--EventManager-->
252
		<plesk-windows:event-manager core:type="boolean">true</plesk-windows:event-manager>
253
		<!--Domains backup-->
254
		<plesk-windows:domains-backup core:type="boolean">true</plesk-windows:domains-backup>
255
		<!--Tomcat support-->
256
		<plesk-windows:tomcat-support core:type="boolean">true</plesk-windows:tomcat-support>
257
		<!--Subdomains-->
258
		<plesk-windows:subdomains-support core:type="boolean">true</plesk-windows:subdomains-support>
259
		<!--Backward key compatibility restriction-->
260
		<plesk-windows:backward-restriction core:type="integer">0</plesk-windows:backward-restriction>
261
		<!--Work Inside Virtuozzo-->
262
		<plesk-windows:vps-only core:type="boolean">false</plesk-windows:vps-only>
263
		<!--Work Inside Hyper-V-->
264
		<plesk-windows:hyper-v core:type="boolean">false</plesk-windows:hyper-v>
265
		<!--Work Inside VMware-->
266
		<plesk-windows:vmware core:type="boolean">false</plesk-windows:vmware>
267
		<!--Work Inside Xen-->
268
		<plesk-windows:xen core:type="boolean">false</plesk-windows:xen>
269
		<!--Work Inside KVM-->
270
		<plesk-windows:kvm core:type="boolean">false</plesk-windows:kvm>
271
		<!--Work Inside Parallels Hypervisor-->
272
		<plesk-windows:hypervisor core:type="boolean">false</plesk-windows:hypervisor>
273
		<!--Global changes-->
274
		<plesk-windows:global-changes core:type="boolean">true</plesk-windows:global-changes>
275
		<!--Shell access-->
276
		<plesk-windows:shell-access core:type="boolean">true</plesk-windows:shell-access>
277
		<!--Detailed traffic-->
278
		<plesk-windows:detailed-traffic core:type="boolean">true</plesk-windows:detailed-traffic>
279
		<!--Notification manager-->
280
		<plesk-windows:notification-manager core:type="boolean">true</plesk-windows:notification-manager>
281
		<!--Action log manager-->
282
		<plesk-windows:action-manager core:type="boolean">true</plesk-windows:action-manager>
283
		<!--Clients and Domains Expirations management-->
284
		<plesk-windows:expirations-manager core:type="boolean">true</plesk-windows:expirations-manager>
285
		<!--Client templates-->
286
		<plesk-windows:client-templates core:type="boolean">true</plesk-windows:client-templates>
287
		<!--Ability to use Application Vault-->
288
		<plesk-windows:appvault-support core:type="boolean">true</plesk-windows:appvault-support>
289
		<!--Ability to use SpamAssassin-->
290
		<plesk-windows:spamassasin-support core:type="boolean">true</plesk-windows:spamassasin-support>
291
		<!--Ability to use Trouble Ticketing System-->
292
		<plesk-windows:tts-support core:type="boolean">true</plesk-windows:tts-support>
293
		<!--Ability to use ColdFusion-->
294
		<plesk-windows:coldfusion-support core:type="boolean">true</plesk-windows:coldfusion-support>
295
		<plesk-windows:ask-update core:hidden="true" core:type="boolean">false</plesk-windows:ask-update>
296
		<plesk-windows:autoinstaller-config core:hidden="true" core:type="string">true</plesk-windows:autoinstaller-config>
297
		<!--Ability to use DrWeb-->
298
		<plesk-windows:drweb-support core:type="boolean">true</plesk-windows:drweb-support>
299
		<plesk-windows:store-id core:hidden="true" core:type="integer">1</plesk-windows:store-id>
300
		<!--Ability to use Migration Manager-->
301
		<plesk-windows:migration-manager core:type="boolean">true</plesk-windows:migration-manager>
302
		<!--Ability to use MS SQL-->
303
		<plesk-windows:mssql core:type="boolean">true</plesk-windows:mssql>
304
		<!--Allowed locales-->
305
		<plesk-windows:allowed-locales core:type="string">any</plesk-windows:allowed-locales>
306
		<!--Allows feature upgrades for this version-->
307
		<plesk-windows:feature-upgrades core:type="boolean">true</plesk-windows:feature-upgrades>
308
		<!--Parallels Plesk Billing accounts count-->
309
		<plesk-windows:modernbill-accounts core:type="integer">0</plesk-windows:modernbill-accounts>
310
		<!--Number of sites-->
311
		<plesk-windows:sitebuilder-sites core:type="integer">100</plesk-windows:sitebuilder-sites>
312
		<!--Enable Parallels Plesk Mobile Server Manager-->
313
		<plesk-windows:mobile-server-manager-support core:type="boolean">true</plesk-windows:mobile-server-manager-support>
314
		<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
315
		<ds:SignedInfo>
316
		<ds:CanonicalizationMethod Algorithm="http://parallels.com/schemas/keys/core/3#canonicalize"/>
317
		<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
318
		<ds:Reference URI="">
319
		<ds:Transforms>
320
		<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
321
		<ds:Transform Algorithm="http://parallels.com/schemas/keys/core/3#transform"/>
322
		</ds:Transforms>
323
		<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
324
		<ds:DigestValue>ENCODED HASH HERE</ds:DigestValue>
325
		</ds:Reference>
326
		</ds:SignedInfo>
327
		<ds:SignatureValue>
328
		ENCODED DATA HERE
329
		</ds:SignatureValue>
330
		<ds:KeyInfo>
331
		<ds:X509Data>
332
		<ds:X509Certificate>
333
		ENCODED DATA HERE
334
		</ds:X509Certificate>
335
		</ds:X509Data>
336
		</ds:KeyInfo>
337
		</ds:Signature>
338
		</plesk-windows:key>
339
340
		[xmlrpc_type] => base64
341
		)
342
343
		)
344
345
		*/
346
	}
347
348
	/**
349
	 * Returns an array with keys 'resultCode', 'resultDesc', and 'upgradePlans'.  the last one being an array of plan names, one time i wrote down the output it looked like:
350
	 * 3_LANGUAGE_PACKS FOTOLIA_OFF 5_LANGUAGE_PACKS  NEWSFEED_OFF VIRTUOZZO_PROMO_OFF ADDITIONAL_LANGUAGE_PACK were some of the packqage types, there wer eothers
351
	 *
352
	 * @param $Key
353
	 * @return mixed
354
	 */
355
	public function getAvailableUpgrades($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
356
		$this->response = $this->xml->__call('partner10.getAvailableUpgrades', array($this->authInfo(), $Key));
357
		return $this->response;
358
	}
359
360
	/**
361
	 * Success
362
	 * Array
363
	 * (
364
	 * [keyInfo] => Array
365
	 * (
366
	 * [expirationDate] => stdClass Object
367
	 * (
368
	 * [scalar] => 20131202T00:00:00
369
	 * [xmlrpc_type] => datetime
370
	 * [timestamp] => 1385942400
371
	 * )
372
	 * )
373
	 * [features] => Array
374
	 * (
375
	 * [0] => Array
376
	 * (
377
	 * [apiName] => PLESK_7X_FOR_WIN_POWER_PACK
378
	 * [name] => Parallels PowerPack for Plesk (Windows) (Monthly Lease)
379
	 * )
380
	 * [1] => Array
381
	 * (
382
	 * [apiName] => PLESK-100-SITES
383
	 * [name] => Parallels Web Presence Builder - 100 Sites (Monthly Lease)
384
	 * )
385
	 * [2] => Array
386
	 * (
387
	 * [apiName] => UNLIMITED_DOMAINS
388
	 * [name] => Unlimited Domains w/1 yr SUS (Lease)
389
	 * )
390
	 * )
391
	 * [billingType] => LEASE
392
	 * [productFamily] => plesk
393
	 * [createDate] => stdClass Object
394
	 * (
395
	 * [scalar] => 20131023T18:02:11
396
	 * [xmlrpc_type] => datetime
397
	 * [timestamp] => 1382551331
398
	 * )
399
	 * [trial] =>
400
	 * [lastReportingDate] => stdClass Object
401
	 * (
402
	 * [scalar] => 20131029T06:27:31
403
	 * [xmlrpc_type] => datetime
404
	 * [timestamp] => 1383028051
405
	 * )
406
	 * [additionalKeys] => Array
407
	 * (
408
	 * [0] => Array
409
	 * (
410
	 * [expirationDate] => stdClass Object
411
	 * (
412
	 * [scalar] => 20131202T00:00:00
413
	 * [xmlrpc_type] => datetime
414
	 * [timestamp] => 1385942400
415
	 * )
416
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
417
	 * [apiKeyType] => N/A
418
	 * [boundIPAddress] =>
419
	 * [problem] =>
420
	 * [keyNumber] => KAV.00005821.0001
421
	 * [properties] => Array
422
	 * (
423
	 * )
424
	 * [type] => ADDITIONAL
425
	 * [updateDate] => stdClass Object
426
	 * (
427
	 * [scalar] => 20131122T00:00:00
428
	 * [xmlrpc_type] => datetime
429
	 * [timestamp] => 1385078400
430
	 * )
431
	 * [clientId] => 19282468
432
	 * [parentKeyNumber] => PLSK.00005819.0000
433
	 * [lastReportingVersion] => 11.5.3
434
	 * [keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
435
	 * [terminated] =>
436
	 * [susAndSupportInfo] => Array
437
	 * (
438
	 * )
439
	 * [features] => Array
440
	 * (
441
	 * )
442
	 * [billingType] => LEASE
443
	 * [productFamily] => kav
444
	 * [createDate] => stdClass Object
445
	 * (
446
	 * [scalar] => 20131023T18:02:12
447
	 * [xmlrpc_type] => datetime
448
	 * [timestamp] => 1382551332
449
	 * )
450
	 * [trial] =>
451
	 * [lastReportingDate] => stdClass Object
452
	 * (
453
	 * [scalar] => 20131023T18:05:24
454
	 * [xmlrpc_type] => datetime
455
	 * [timestamp] => 1382551524
456
	 * )
457
	 * [additionalKeys] => Array
458
	 * (
459
	 * )
460
	 * )
461
	 * [1] => Array
462
	 * (
463
	 * [expirationDate] => stdClass Object
464
	 * (
465
	 * [scalar] => 20131202T00:00:00
466
	 * [xmlrpc_type] => datetime
467
	 * [timestamp] => 1385942400
468
	 * )
469
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
470
	 * [apiKeyType] => N/A
471
	 * [boundIPAddress] =>
472
	 * [problem] =>
473
	 * [keyNumber] => APS.00005820.0001
474
	 * [properties] => Array
475
	 * (
476
	 * )
477
	 * [type] => ADDITIONAL
478
	 * [updateDate] => stdClass Object
479
	 * (
480
	 * [scalar] => 20131122T00:00:00
481
	 * [xmlrpc_type] => datetime
482
	 * [timestamp] => 1385078400
483
	 * )
484
	 * [clientId] => 19282468
485
	 * [parentKeyNumber] => PLSK.00005819.0000
486
	 * [lastReportingVersion] => 11.5.3
487
	 * [keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
488
	 * [terminated] =>
489
	 * [susAndSupportInfo] => Array
490
	 * (
491
	 * )
492
	 * [features] => Array
493
	 * (
494
	 * )
495
	 * [billingType] => LEASE
496
	 * [productFamily] => unity-one
497
	 * [createDate] => stdClass Object
498
	 * (
499
	 * [scalar] => 20131023T18:02:11
500
	 * [xmlrpc_type] => datetime
501
	 * [timestamp] => 1382551331
502
	 * )
503
	 * [trial] =>
504
	 * [lastReportingDate] => stdClass Object
505
	 * (
506
	 * [scalar] => 20131023T18:05:26
507
	 * [xmlrpc_type] => datetime
508
	 * [timestamp] => 1382551526
509
	 * )
510
	 * [additionalKeys] => Array
511
	 * (
512
	 * )
513
	 * )
514
	 * )
515
	 * )
516
	 *[resultCode] => 100
517
	 * [resultDesc] => Key info for PLSK.00005819.0000 key returned successfully
518
	 * [keyNumber] => PLSK.00005819.0000
519
	 * )
520
	 *
521
	 * @param $Key
522
	 * @return mixed
523
	 */
524
	public function getKeyInfo($Key) {
0 ignored issues
show
Coding Style Naming introduced by
The parameter $Key is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
525
		$this->response = $this->xml->__call('partner10.getKeyInfo', array($this->authInfo(), $Key));
526
		return $this->response;
527
	}
528
529
	/**
530
	 * @param $ip
531
	 * @return bool
532
	 */
533
	public function getMainKeyFromIp($ip) {
534
		$response = $this->getKeyNumbers($ip);
535
		//$response = $this->getKeysInfoByIP($ip);
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
536
		$return = FALSE;
537
		if (isset($response['keyInfos'])) {
538
			foreach ($response['keyInfos'] as $idx => $data) {
539
				if ($return === FALSE)
540
					$return = $data['keyNumber'];
541
				if ($data['type'] == 'MAIN')
542
					$return = $data['keyNumber'];
543
			}
544
			return $return;
545
		} else
546
			return FALSE;
547
	}
548
549
	/**
550
	 * @param $ip
551
	 * @return mixed
552
	 */
553
	public function getKeysInfoByIP($ip) {
554
		$this->response = $this->xml->__call('partner10.getKeysInfoByIP', array($this->authInfo(), $ip));
555
		return $this->response;
556
	}
557
558
	/**
559
	 * @param array $ips
560
	 * @param array $macs
561
	 * @return mixed
562
	 */
563
	public function getKeyNumbers($ips = array(), $macs = array()) {
564
		myadmin_log('licenses', 'info', json_encode($this->ServerAddress($ips, $macs)), __LINE__, __FILE__);
565
		$this->response = $this->xml->__call('partner10.getKeyNumbers', array($this->authInfo(), $this->ServerAddress($ips, $macs)));
566
		return $this->response;
567
		/* Success
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
568
		Array
569
		(
570
		[keyInfos] => Array
571
		(
572
		[0] => Array
573
		(
574
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows for Virtual Machines (Lease)
575
		Lease)
576
		[lastReportingIp] => 206.72.205.242
577
		[terminated] => 1
578
		[keyNumber] => KAV.00004873.0002
579
		[billingType] => LEASE
580
		[type] => ADDITIONAL
581
		[createDate] => stdClass Object
582
		(
583
		[scalar] => 20131014T16:44:40
584
		[xmlrpc_type] => datetime
585
		[timestamp] => 1381769080
586
		)
587
588
		[lastReportingDate] => stdClass Object
589
		(
590
		[scalar] => 20131023T17:35:45
591
		[xmlrpc_type] => datetime
592
		[timestamp] => 1382549745
593
		)
594
595
		)
596
597
		[3] => Array
598
		(
599
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows (Lease)
600
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
601
		[terminated] =>
602
		[keyNumber] => PLSK.00005819.0000
603
		[billingType] => LEASE
604
		[type] => MAIN
605
		[createDate] => stdClass Object
606
		(
607
		[scalar] => 20131023T18:02:11
608
		[xmlrpc_type] => datetime
609
		[timestamp] => 1382551331
610
		)
611
612
		[lastReportingDate] => stdClass Object
613
		(
614
		[scalar] => 20131029T06:27:31
615
		[xmlrpc_type] => datetime
616
		[timestamp] => 1383028051
617
		)
618
619
		)
620
621
		[4] => Array
622
		(
623
		[keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
624
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
625
		[terminated] =>
626
		[keyNumber] => APS.00005820.0001
627
		[billingType] => LEASE
628
		[type] => ADDITIONAL
629
		[createDate] => stdClass Object
630
		(
631
		[scalar] => 20131023T18:02:11
632
		[xmlrpc_type] => datetime
633
		[timestamp] => 1382551331
634
		)
635
636
		[lastReportingDate] => stdClass Object
637
		(
638
		[scalar] => 20131023T18:05:26
639
		[xmlrpc_type] => datetime
640
		[timestamp] => 1382551526
641
		)
642
643
		)
644
645
		[5] => Array
646
		(
647
		[keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
648
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
649
		[terminated] =>
650
		[keyNumber] => KAV.00005821.0001
651
		[billingType] => LEASE
652
		[type] => ADDITIONAL
653
		[createDate] => stdClass Object
654
		(
655
		[scalar] => 20131023T18:02:12
656
		[xmlrpc_type] => datetime
657
		[timestamp] => 1382551332
658
		)
659
660
		[lastReportingDate] => stdClass Object
661
		(
662
		[scalar] => 20131023T18:05:24
663
		[xmlrpc_type] => datetime
664
		[timestamp] => 1382551524
665
		)
666
667
		)
668
669
		)
670
671
		[resultCode] => 100
672
		[resultDesc] => Found: PLSK.02554871.0001, APS.02554872.0002, KAV.02554873.0002, PLSK.00005819.0000, APS.00005820.0001, KAV.00005821.0001
673
		[keyNumbers] => Array
674
		(
675
		[0] => PLSK.02554871.0001
676
		[1] => APS.02554872.0002
677
		[2] => KAV.02554873.0002
678
		[3] => PLSK.00005819.0000
679
		[4] => APS.00005820.0001
680
		[5] => KAV.00005821.0001
681
		)
682
683
		[detailResultCode] => 0
684
		)
685
		*/
686
	}
687
688
	/**
689
	 * @param bool $client
690
	 * @return mixed
691
	 */
692
	public function getAvailableKeyTypesAndFeatures($client = FALSE) {
693
		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', array($this->authInfo(), ($client === FALSE ? $this->client : $client)));
694
		return $this->response;
695
		/* My Output:
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
696
		Array
697
		(
698
		[resultCode] => 100
699
		[features] => Array
700
		(
701
		[0] => ADDON-CT-OAS-L-1Y
702
		[1] => ADDON-HMP-L-M
703
		[2] => SB10X-500
704
		[3] => ADDON-WPB-12500-M
705
		[4] => MEDIUM
706
		[5] => 30_DOMAINS_FOR_VZ
707
		[6] => PLESK-100-SITES
708
		[7] => SB10X-35000
709
		[8] => STORE_BUTTON_OFF
710
		[9] => 2CPU_90CT_PIM
711
		[10] => 4CPU_1CT_PIM
712
		[11] => SB10X-300
713
		[12] => SB10X-25000
714
		[13] => 3_LANGUAGE_PACKS_FOR_VMM
715
		[14] => UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ
716
		[15] => 8CPU_15HV_PVA
717
		[16] => ADDITIONAL_LANGUAGE_PACK
718
		[17] => SB10X-100
719
		[18] => 4CPU_UNLIMITEDVC_PVA
720
		[19] => PLESK_SWSOFT_SERVICES_OFF
721
		[20] => 8CPU_100CT_PVA
722
		[21] => PLESK_POWER_PACK_FOR_VMM
723
		[22] => 4CPU_20CT_PIM
724
		[23] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM
725
		[24] => HSPHERE_7500_ACCOUNTS
726
		[25] => CLDF-PLUS-M
727
		[26] => 7500_SITES_MULTI_SERVER
728
		[27] => 4-LANGUAGE-PACKS-FOR-PPA
729
		[28] => MONTHLY_AMPS
730
		[29] => 300_SITES
731
		[30] => UO-UNL-L-1Y
732
		[31] => 2CPU_20CT_PIM
733
		[32] => 8CPU_6HV_PVA
734
		[33] => 4_LANGUAGE_PACKS
735
		[34] => 8CPU_40CT_PVA
736
		[35] => 8CPU_1CT_PVA
737
		[36] => 2CPU_4HV_PVA
738
		[37] => 8CPU_200CT_PVA
739
		[38] => 4CPU_60CT_PIM
740
		[39] => 100_EXT_WHITELABEL
741
		[40] => 8CPU_50CT_PVA
742
		[41] => PLESK-UNLIMITED-PB-ACCOUNTS
743
		[42] => SB10X-40000
744
		[43] => PLESK_HOSTING_SUITE_FOR_VZ
745
		[44] => HSPHERE_3750_ACCOUNTS
746
		[45] => 2CPU_7HV_PVA
747
		[46] => 4CPU_5CT_PIM
748
		[47] => UNLIMITED_USERS_FOR_VPS
749
		[48] => PLESK-100-SITES-FOR-VZ
750
		[49] => PLESK_RELOADED_FOR_VZ_POWER_PACK
751
		[50] => 8CPU_10HV_PVA
752
		[51] => ADDONVZ-CT-OAS-L-1Y
753
		[52] => PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK
754
		[53] => SB10X-2500
755
		[54] => 2CPU_3CT_PIM
756
		[55] => ADDITIONAL_LANGUAGE_PACK_FOR_VZ
757
		[56] => 8CPU_80CT_PVA
758
		[57] => 4CPU_30VC_PVA
759
		[58] => 1000_SITES_MULTI_SERVER
760
		[59] => 1_UNITY_MOBILE_SITE
761
		[60] => 2CPU_40CT_PIM
762
		[61] => EXTRAS_BUTTONS_OFF
763
		[62] => UNLIMITED_DOMAINS_FOR_VMM
764
		[63] => 8CPU_450CT_PVA
765
		[64] => HSPHERE_500_ACCOUNTS
766
		[65] => 4CPU_5VC_PVA
767
		[66] => HSPHERE_1750_ACCOUNTS
768
		[67] => FOTOLIA_OFF
769
		[68] => SB10X-50000
770
		[69] => HSPHERE_1000_ACCOUNTS
771
		[70] => 1000_EXT
772
		[71] => SB10X-7500
773
		[72] => 100_EXTENSIONS
774
		[73] => 2CPU_1CT_PIM
775
		[74] => 1000_EXT_WHITELABEL
776
		[75] => 8CPU_9HV_PVA
777
		[76] => UO-1-L-1Y
778
		[77] => 8CPU_5VC_PVA
779
		[78] => 8CPU_8HV_PVA
780
		[79] => 4_LANGUAGE_PACKS_FOR_VZ
781
		[80] => 4CPU_70CT_PIM
782
		[81] => 30_DOMAINS
783
		[82] => 2_LANGUAGE_PACKS_FOR_VMM
784
		[83] => ADDON-CT-OAS-L-M
785
		[84] => UO-1-W-M
786
		[85] => UNLIMITED-LANGUAGE-PACKS-FOR-PPA
787
		[86] => 100_DOMAINS_FOR_VZ
788
		[87] => ADDON-WPB-1000-M
789
		[88] => STH-WMP-BUSP-M
790
		[89] => UNLIMITED_DOMAINS
791
		[90] => 2CPU_100CT_PIM
792
		[91] => ADDONVZ-HMP-W-M
793
		[92] => DISABLE_SITEBUILDER
794
		[93] => 8CPU_1CT
795
		[94] => HSPHERE_2500_ACCOUNTS
796
		[95] => STH-WMP-BUS-M
797
		[96] => PLESK_POWER_PACK_FOR_WIN
798
		[97] => 8CPU_30VC_PVA
799
		[98] => 8CPU_150CT_PVA
800
		[99] => HSPHERE_5000_ACCOUNTS
801
		[100] => 4CPU_90CT_PIM
802
		[101] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ
803
		[102] => ADDON-WPB-45000-M
804
		[103] => PLESK_POWER_PACK_FOR_VZ
805
		[104] => 8CPU_250CT_PVA
806
		[105] => 1-LANGUAGE-PACK-FOR-PPA
807
		[106] => UO-UNL-W-M
808
		[107] => 2CPU_5VC_PVA
809
		[108] => ADDON-WPB-15000-M
810
		[109] => PLESK_RELOADED_POWER_PACK
811
		[110] => ADDON-WPB-7500-M
812
		[111] => PLESK-1000-SITES-FOR-VZ
813
		[112] => 10_UNITY_MOBILE_SITES
814
		[148] => 3_LANGUAGE_PACKS_FOR_VZ
815
		[149] => 2CPU_30CT_PIM
816
		[150] => ENTERPRISE
817
		[151] => 2CPU_50CT_PIM
818
		[152] => ADDON-HMP-W-M
819
		[153] => 2_LANGUAGE_PACKS_FOR_VZ
820
		[154] => 4_LANGUAGE_PACKS_FOR_VMM
821
		[155] => UO-UNL-L-M
822
		[156] => SB10X-12500
823
		[157] => 4CPU_50CT_PIM
824
		[158] => ADDON-WPB-20000-M
825
		[159] => HSPHERE_10000_ACCOUNTS
826
		[160] => 4CPU_3CT_PIM
827
		[161] => 3_LANGUAGE_PACKS
828
		[162] => 8CPU_90CT_PVA
829
		[163] => 5000_SITES
830
		[164] => 100_SITES
831
		[165] => PLESK_POWER_PACK
832
		[166] => 8CPU_400CT_PVA
833
		[167] => 500_EXT
834
		[168] => 5000_SITES_MULTI_SERVER
835
		[169] => 5_LANGUAGE_PACKS_FOR_VMM
836
		[170] => UNLIMITED_BATTLEFIELD_SERVERS
837
		[171] => ADDON-WPB-35000-M
838
		[172] => PLESK-100-SITES-FOR-VMM
839
		[173] => ADDON-WPB-50000-M
840
		[174] => 8CPU_4HV_PVA
841
		[175] => 8CPU_5HV_PVA
842
		[176] => 2CPU_10HV_PVA
843
		[177] => ADDON-WPB-300-M
844
		[178] => 2CPU_2HV_PVA
845
		[179] => 300_SITES_MULTI_SERVER
846
		[180] => 10_DOMAINS_FOR_VZ
847
		[181] => 1_LANGUAGE_PACK
848
		[182] => 4CPU_10CT_PIM
849
		[183] => ADDON-WPB-700-M
850
		[184] => 2CPU_30VC_PVA
851
		[185] => 2CPU_1HV_PVA
852
		[186] => 5_USERS_FOR_VPS
853
		[187] => 2CPU_10CT_PIM
854
		[188] => 500_SITES_MULTI_SERVER
855
		[189] => 300_DOMAINS
856
		[190] => 10000_SITES
857
		[191] => 8CPU_2HV_PVA
858
		[192] => ADDON-WPB-10000-M
859
		[193] => PLESK_POWER_PACK_FOR_WIN_FOR_VMM
860
		[194] => PLESK-1000-SITES-FOR-VMM
861
		[195] => 5_LANGUAGE_PACKS
862
		[196] => 1_LANGUAGE_PACK_FOR_VZ
863
		[197] => 2CPU_200CT_PIM
864
		[198] => VIRTUOZZO_PROMO_OFF
865
		[199] => SB10X-5000
866
		[200] => 8CPU_7HV_PVA
867
		[201] => 10_DOMAINS
868
		[202] => PRO
869
		[203] => 500_SITES
870
		[204] => 2CPU_70CT_PIM
871
		[205] => 1_BATTLEFIELD_SERVER
872
		[206] => 2CPU_150CT_PIM
873
		[207] => 2CPU_80CT_PIM
874
		[208] => ADDONVMM-HMP-L-M
875
		[209] => UNLIMITED_USERS
876
		[210] => 4CPU_30CT_PIM
877
		[211] => PLESK_POWER_PACK_FOR_WIN_FOR_VZ
878
		[212] => 8CPU_300CT_PVA
879
		[213] => 5_USERS
880
		[214] => 4CPU_150CT_PIM
881
		[215] => 10_BATTLEFIELD_SERVERS
882
		[216] => ADDON-WPB-100-M
883
		[217] => 8CPU_3HV_PVA
884
		[218] => ADDON-WPB-2500-M
885
		[219] => 5_LANGUAGE_PACKS_FOR_VZ
886
		[220] => 5_BATTLEFIELD_SERVERS
887
		[221] => DISABLE_GOOGLE_TOOLS
888
		[222] => 500_EXT_WHITELABEL
889
		[223] => UNLIMITED_DOMAINS_FOR_VZ
890
		[224] => SB10X-15000
891
		[225] => UNLIMITED_MAILBOXES_FOR_VZ
892
		[226] => 2CPU_5HV_PVA
893
		[227] => PLESK_7X_FOR_WIN_POWER_PACK
894
		[228] => PLESK-1000-SITES
895
		[229] => DISABLE_FEATURE_UPGRADES
896
		[230] => SB10X-20000
897
		[231] => ENTRY
898
		[232] => 2CPU_6HV_PVA
899
		[233] => 8CPU_30CT_PVA
900
		[234] => UO-UNL-W-1Y
901
		[235] => 2_LANGUAGE_PACKS
902
		[236] => 8CPU_UNLIMITEDVC_PVA
903
		[237] => 100_DOMAINS
904
		[238] => 8CPU_20CT_PVA
905
		[239] => 2CPU_3HV_PVA
906
		[240] => ADD_1_MANAGED_MSSQL
907
		[241] => 100_EXT
908
		[242] => 100_EXTENSIONS_FOR_VZ
909
		[243] => ADDON-WPB-500-M
910
		[244] => 8CPU_3CT_PVA
911
		[245] => 2CPU_9HV_PVA
912
		[246] => 1_LANGUAGE_PACK_FOR_VMM
913
		[247] => 8CPU_10CT_PVA
914
		[248] => 2CPU_15HV_PVA
915
		[249] => 2CPU_8HV_PVA
916
		[250] => STARTER
917
		[251] => ADDONVMM-HMP-W-M
918
		[252] => 7500_SITES
919
		[253] => 4CPU_40CT_PIM
920
		[254] => SB10X-30000
921
		[255] => PROFESSIONAL
922
		[256] => 1000_SITES
923
		[257] => 8CPU_350CT_PVA
924
		[258] => 2CPU_60CT_PIM
925
		[259] => HSPHERE_200_ACCOUNTS
926
		[260] => 8CPU_500CT_PVA
927
		[261] => SB10X-10000
928
		[262] => STH-WMP-BSC-M
929
		[263] => ADDON-WPB-25000-M
930
		)
931
932
		[resultDesc] => Key types available: GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE, PSBM_45_SPE, PLESK-10-AND-LATER-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M, MYLITTLEADMIN_2000, MYLITTLEADMIN_2005, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN, CRT-5-UNL-L, GLOBAL_MENTORING_TOTAL_CARE, LINUXMAGIC_MAGICSPAM, PLESK_ANTIVIRUS_BY_KAV_FOR_VZ, PINNACLE_CART_ECOMMERCE_SHOPPING_CART, SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY, ATI_PRO_FOR_WIN, STOPTHEHACKER-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ, SB10X-PA, ATI_PRO, CRT-30-UNL-L, 4PSA_VOIPNOW_25_PROFESSIONAL, CLOUDLINUX-L-M, ATMAIL_WEBMAIL, PLESK_10_AND_LATER_FOR_WIN, CRT-5-100-L, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y, UNITY-ONE-W-M, PLESK-10-AND-LATER-FOR-WIN-FOR-VMM, GLOBAL_MENTORING_LIVE_EXPERT_BASIC, CRT-50-UNL-L, VIRTUOZZO_CONTAINERS_4, PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ, PLESK_10_AND_LATER_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M, CRT-50-100-L, UNITY-ONE-L-M, PLESK_ANTIVIRUS_BY_DRWEB, SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY, CRT-100-UNL-L, PARALLELS-CLOUD-SERVER, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y, CRT-100-100-L, PLESK_10_AND_LATER_FOR_WIN_FOR_VZ, PPA-L-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN, PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN, PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ, SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY, UNITY_MOBILE, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ, SB10X, UNITY_MOBILE_FOR_WIN, PARALLELS-CLOUD-STORAGE, CRT-30-100-L, CLOUDFLARE-M, VIRTUOZZO_CONTAINERS_4_FOR_WIN, PLESK_10_AND_LATER, PARALLELS_PREMIUM_ANTIVIRUS, SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY, PLESK_ANTIVIRUS_BY_KAV, KEEPIT_ONLINE_BACKUP. Features available: ADDON-CT-OAS-L-1Y, ADDON-HMP-L-M, SB10X-500, ADDON-WPB-12500-M, MEDIUM, 30_DOMAINS_FOR_VZ, PLESK-100-SITES, SB10X-35000, STORE_BUTTON_OFF, 2CPU_90CT_PIM, 4CPU_1CT_PIM, SB10X-300, SB10X-25000, 3_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ, 8CPU_15HV_PVA, ADDITIONAL_LANGUAGE_PACK, SB10X-100, 4CPU_UNLIMITEDVC_PVA, PLESK_SWSOFT_SERVICES_OFF, 8CPU_100CT_PVA, PLESK_POWER_PACK_FOR_VMM, 4CPU_20CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM, HSPHERE_7500_ACCOUNTS, CLDF-PLUS-M, 7500_SITES_MULTI_SERVER, 4-LANGUAGE-PACKS-FOR-PPA, MONTHLY_AMPS, 300_SITES, UO-UNL-L-1Y, 2CPU_20CT_PIM, 8CPU_6HV_PVA, 4_LANGUAGE_PACKS, 8CPU_40CT_PVA, 8CPU_1CT_PVA, 2CPU_4HV_PVA, 8CPU_200CT_PVA, 4CPU_60CT_PIM, 100_EXT_WHITELABEL, 8CPU_50CT_PVA, PLESK-UNLIMITED-PB-ACCOUNTS, SB10X-40000, PLESK_HOSTING_SUITE_FOR_VZ, HSPHERE_3750_ACCOUNTS, 2CPU_7HV_PVA, 4CPU_5CT_PIM, UNLIMITED_USERS_FOR_VPS, PLESK-100-SITES-FOR-VZ, PLESK_RELOADED_FOR_VZ_POWER_PACK, 8CPU_10HV_PVA, ADDONVZ-CT-OAS-L-1Y, PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK, SB10X-2500, 2CPU_3CT_PIM, ADDITIONAL_LANGUAGE_PACK_FOR_VZ, 8CPU_80CT_PVA, 4CPU_30VC_PVA, 1000_SITES_MULTI_SERVER, 1_UNITY_MOBILE_SITE, 2CPU_40CT_PIM, EXTRAS_BUTTONS_OFF, UNLIMITED_DOMAINS_FOR_VMM, 8CPU_450CT_PVA, HSPHERE_500_ACCOUNTS, 4CPU_5VC_PVA, HSPHERE_1750_ACCOUNTS, FOTOLIA_OFF, SB10X-50000, HSPHERE_1000_ACCOUNTS, 1000_EXT, SB10X-7500, 100_EXTENSIONS, 2CPU_1CT_PIM, 1000_EXT_WHITELABEL, 8CPU_9HV_PVA, UO-1-L-1Y, 8CPU_5VC_PVA, 8CPU_8HV_PVA, 4_LANGUAGE_PACKS_FOR_VZ, 4CPU_70CT_PIM, 30_DOMAINS, 2_LANGUAGE_PACKS_FOR_VMM, ADDON-CT-OAS-L-M, UO-1-W-M, UNLIMITED-LANGUAGE-PACKS-FOR-PPA, 100_DOMAINS_FOR_VZ, ADDON-WPB-1000-M, STH-WMP-BUSP-M, UNLIMITED_DOMAINS, 2CPU_100CT_PIM, ADDONVZ-HMP-W-M, DISABLE_SITEBUILDER, 8CPU_1CT, HSPHERE_2500_ACCOUNTS, STH-WMP-BUS-M, PLESK_POWER_PACK_FOR_WIN, 8CPU_30VC_PVA, 8CPU_150CT_PVA, HSPHERE_5000_ACCOUNTS, 4CPU_90CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ, ADDON-WPB-45000-M, PLESK_POWER_PACK_FOR_VZ, 8CPU_250CT_PVA, 1-LANGUAGE-PACK-FOR-PPA, UO-UNL-W-M, 2CPU_5VC_PVA, ADDON-WPB-15000-M, PLESK_RELOADED_POWER_PACK, ADDON-WPB-7500-M, PLESK-1000-SITES-FOR-VZ, 10_UNITY_MOBILE_SITES, 8CPU_70CT_PVA, UNLIMITED_MAILBOXES, STH-WMP-PRO-M, SB10X-45000, 8CPU_1HV_PVA, NEWSFEED_OFF, 4CPU_80CT_PIM, UO-1-W-1Y, 10000_SITES_MULTI_SERVER, 8CPU_UNLIMITEDHV_PVA, 2_BATTLEFIELD_SERVERS, CLNX-M, 8CPU_60CT_PVA, 100_SITES_MULTI_SERVER, 2CPU_UNLIMITEDVC_PVA, 2CPU_UNLIMITED_HV_PVA, 10_EXT_WHITELABEL, REINSTATE_SUS, ADDONVZ-HMP-L-M, UO-1-L-M, 8CPU_5CT_PVA, 4CPU_100CT_PIM, SB10X-1000, ADDON-WPB-5000-M, 2CPU_5CT_PIM, 10_EXT, 5_UNITY_MOBILE_SITES, 4CPU_200CT_PIM, ADDON-WPB-40000-M, ADDON-WPB-30000-M, 5-LANGUAGE-PACKS-FOR-PPA, 3-LANGUAGE-PACKS-FOR-PPA, PCS-RKU, ADDONVZ-CT-OAS-L-M, 2-LANGUAGE-PACKS-FOR-PPA, 3_LANGUAGE_PACKS_FOR_VZ, 2CPU_30CT_PIM, ENTERPRISE, 2CPU_50CT_PIM, ADDON-HMP-W-M, 2_LANGUAGE_PACKS_FOR_VZ, 4_LANGUAGE_PACKS_FOR_VMM, UO-UNL-L-M, SB10X-12500, 4CPU_50CT_PIM, ADDON-WPB-20000-M, HSPHERE_10000_ACCOUNTS, 4CPU_3CT_PIM, 3_LANGUAGE_PACKS, 8CPU_90CT_PVA, 5000_SITES, 100_SITES, PLESK_POWER_PACK, 8CPU_400CT_PVA, 500_EXT, 5000_SITES_MULTI_SERVER, 5_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_BATTLEFIELD_SERVERS, ADDON-WPB-35000-M, PLESK-100-SITES-FOR-VMM, ADDON-WPB-50000-M, 8CPU_4HV_PVA, 8CPU_5HV_PVA, 2CPU_10HV_PVA, ADDON-WPB-300-M, 2CPU_2HV_PVA, 300_SITES_MULTI_SERVER, 10_DOMAINS_FOR_VZ, 1_LANGUAGE_PACK, 4CPU_10CT_PIM, ADDON-WPB-700-M, 2CPU_30VC_PVA, 2CPU_1HV_PVA, 5_USERS_FOR_VPS, 2CPU_10CT_PIM, 500_SITES_MULTI_SERVER, 300_DOMAINS, 10000_SITES, 8CPU_2HV_PVA, ADDON-WPB-10000-M, PLESK_POWER_PACK_FOR_WIN_FOR_VMM, PLESK-1000-SITES-FOR-VMM, 5_LANGUAGE_PACKS, 1_LANGUAGE_PACK_FOR_VZ, 2CPU_200CT_PIM, VIRTUOZZO_PROMO_OFF, SB10X-5000, 8CPU_7HV_PVA, 10_DOMAINS, PRO, 500_SITES, 2CPU_70CT_PIM, 1_BATTLEFIELD_SERVER, 2CPU_150CT_PIM, 2CPU_80CT_PIM, ADDONVMM-HMP-L-M, UNLIMITED_USERS, 4CPU_30CT_PIM, PLESK_POWER_PACK_FOR_WIN_FOR_VZ, 8CPU_300CT_PVA, 5_USERS, 4CPU_150CT_PIM, 10_BATTLEFIELD_SERVERS, ADDON-WPB-100-M, 8CPU_3HV_PVA, ADDON-WPB-2500-M, 5_LANGUAGE_PACKS_FOR_VZ, 5_BATTLEFIELD_SERVERS, DISABLE_GOOGLE_TOOLS, 500_EXT_WHITELABEL, UNLIMITED_DOMAINS_FOR_VZ, SB10X-15000, UNLIMITED_MAILBOXES_FOR_VZ, 2CPU_5HV_PVA, PLESK_7X_FOR_WIN_POWER_PACK, PLESK-1000-SITES, DISABLE_FEATURE_UPGRADES, SB10X-20000, ENTRY, 2CPU_6HV_PVA, 8CPU_30CT_PVA, UO-UNL-W-1Y, 2_LANGUAGE_PACKS, 8CPU_UNLIMITEDVC_PVA, 100_DOMAINS, 8CPU_20CT_PVA, 2CPU_3HV_PVA, ADD_1_MANAGED_MSSQL, 100_EXT, 100_EXTENSIONS_FOR_VZ, ADDON-WPB-500-M, 8CPU_3CT_PVA, 2CPU_9HV_PVA, 1_LANGUAGE_PACK_FOR_VMM, 8CPU_10CT_PVA, 2CPU_15HV_PVA, 2CPU_8HV_PVA, STARTER, ADDONVMM-HMP-W-M, 7500_SITES, 4CPU_40CT_PIM, SB10X-30000, PROFESSIONAL, 1000_SITES, 8CPU_350CT_PVA, 2CPU_60CT_PIM, HSPHERE_200_ACCOUNTS, 8CPU_500CT_PVA, SB10X-10000, STH-WMP-BSC-M, ADDON-WPB-25000-M.
933
		[keyTypes] => Array
934
		(
935
		[0] => GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE
936
		[1] => PSBM_45_SPE
937
		[2] => PLESK-10-AND-LATER-FOR-VMM
938
		[3] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ
939
		[4] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M
940
		[5] => MYLITTLEADMIN_2000
941
		[6] => MYLITTLEADMIN_2005
942
		[7] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN
943
		[8] => CRT-5-UNL-L
944
		[9] => GLOBAL_MENTORING_TOTAL_CARE
945
		[10] => LINUXMAGIC_MAGICSPAM
946
		[11] => PLESK_ANTIVIRUS_BY_KAV_FOR_VZ
947
		[12] => PINNACLE_CART_ECOMMERCE_SHOPPING_CART
948
		[13] => SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY
949
		[14] => ATI_PRO_FOR_WIN
950
		[15] => STOPTHEHACKER-M
951
		[16] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ
952
		[17] => SB10X-PA
953
		[18] => ATI_PRO
954
		[19] => CRT-30-UNL-L
955
		[20] => 4PSA_VOIPNOW_25_PROFESSIONAL
956
		[21] => CLOUDLINUX-L-M
957
		[22] => ATMAIL_WEBMAIL
958
		[23] => PLESK_10_AND_LATER_FOR_WIN
959
		[24] => CRT-5-100-L
960
		[25] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y
961
		[26] => UNITY-ONE-W-M
962
		[27] => PLESK-10-AND-LATER-FOR-WIN-FOR-VMM
963
		[28] => GLOBAL_MENTORING_LIVE_EXPERT_BASIC
964
		[29] => CRT-50-UNL-L
965
		[30] => VIRTUOZZO_CONTAINERS_4
966
		[31] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ
967
		[32] => PLESK_10_AND_LATER_FOR_VZ
968
		[33] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M
969
		[34] => CRT-50-100-L
970
		[35] => UNITY-ONE-L-M
971
		[36] => PLESK_ANTIVIRUS_BY_DRWEB
972
		[37] => SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY
973
		[38] => CRT-100-UNL-L
974
		[39] => PARALLELS-CLOUD-SERVER
975
		[40] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y
976
		[41] => CRT-100-100-L
977
		[42] => PLESK_10_AND_LATER_FOR_WIN_FOR_VZ
978
		[43] => PPA-L-M
979
		[44] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN
980
		[45] => PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM
981
		[46] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN
982
		[47] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ
983
		[48] => SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY
984
		[49] => UNITY_MOBILE
985
		[50] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ
986
		[51] => SB10X
987
		[52] => UNITY_MOBILE_FOR_WIN
988
		[53] => PARALLELS-CLOUD-STORAGE
989
		[54] => CRT-30-100-L
990
		[55] => CLOUDFLARE-M
991
		[56] => VIRTUOZZO_CONTAINERS_4_FOR_WIN
992
		[57] => PLESK_10_AND_LATER
993
		[58] => PARALLELS_PREMIUM_ANTIVIRUS
994
		[59] => SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY
995
		[60] => PLESK_ANTIVIRUS_BY_KAV
996
		[61] => KEEPIT_ONLINE_BACKUP
997
		)
998
999
		)
1000
		*/
1001
	}
1002
1003
}
1004