Test Failed
Branch master (346139)
by Joe
04:26
created

Parallels::getKeyNumbers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Parallels Functionality
4
 *
5
 * API Documentation at: .. ill fill this in later from forum posts
6
 *
7
 * @author Joe Huss <[email protected]>
8
 * @copyright 2017
9
 * @package MyAdmin
10
 * @category Licenses
11
 */
12
13
namespace Detain\Parallels;
14
15
use XML_RPC2_Client;
16
17
/**
18
 * Parallels
19
 *
20
 * @access public
21
 */
22
class Parallels {
23
	public $licenseType = 'billing'; // billing or purchase
24
	private $xmlOptions = ['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) {
42
		if (null === $login && defined('PARALLELS_KA_LOGIN'))
43
			$this->login = constant('PARALLELS_KA_LOGIN');
44
		else
45
			$this->login = $login;
46
		if (null === $password && defined('PARALLELS_KA_PASSWORD'))
47
			$this->password = constant('PARALLELS_KA_PASSWORD');
48
		else
49
			$this->password = $password;
50
		if (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)
0 ignored issues
show
introduced by
The condition $demo === FALSE is always true.
Loading history...
57
			$this->url = $this->defaultUrl;
58
		else
59
			$this->url = $demo;
60
		if (null !== $xmlOptions)
61
			$this->xmlOptions = $xmlOptions;
62
		require_once 'XML/RPC2/Client.php';
63
		$this->xml = \XML_RPC2_Client::create($this->url, $this->xmlOptions);
64
	}
65
66
	/**
67
	 * @return array
68
	 */
69 1
	public function authInfo() {
70 1
		return ['login' => $this->login, 'password' => $this->password];
71
	}
72
73
	/**
74
	 * @param array $ips
75
	 * @param array $macs
76
	 * @return array
77
	 */
78
	public function serverAddress($ips = [], $macs = []) {
79
		if (!is_array($ips) && $ips != '')
0 ignored issues
show
introduced by
The condition is_array($ips) is always true.
Loading history...
80
			$ips = [$ips];
81
		if (!is_array($macs) && $macs != '')
0 ignored issues
show
introduced by
The condition is_array($macs) is always true.
Loading history...
82
			$macs = [$macs];
83
		return [
84
			'ips' => $ips,
85
			'macs' => $macs
86
		];
87
	}
88
89
	/**
90
	 * @param $key
91
	 * @return mixed
92
	 */
93
	public function terminateKey($key) {
94
		$this->response = $this->xml->__call('partner10.terminateKey', [$this->authInfo(), $key]);
95
		return $this->response;
96
	}
97
98
	/**
99
	 * @param $key
100
	 * @return mixed
101
	 */
102
	public function resetKey($key) {
103
		$this->response = $this->xml->__call('partner10.resetKey', [$this->authInfo(), $key]);
104
		return $this->response;
105
	}
106
107
	/**
108
	 * @param $key
109
	 * @return mixed
110
	 */
111
	public function activateKey($key) {
112
		$this->response = $this->xml->__call('partner10.activateKey', [$this->authInfo(), $key]);
113
		return $this->response;
114
	}
115
116
	/**
117
	 * @param $key
118
	 * @param $note
119
	 * @return mixed
120
	 */
121
	public function addNoteToKey($key, $note) {
122
		$this->response = $this->xml->__call('partner10.addNoteToKey', [$this->authInfo(), $key, $note]);
123
		return $this->response;
124
	}
125
126
	/**
127
	 * @param      $key
128
	 * @param bool $email
129
	 * @return mixed
130
	 */
131
	public function sendKeyByEmail($key, $email = FALSE) {
132
		if ($email === FALSE)
133
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key]);
134
		else
135
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key, $email]);
136
		return $this->response;
137
	}
138
139
	/**
140
	 * @param       $keyType
141
	 * @param array $upgradePlans
142
	 * @param array $ips
143
	 * @param array $macs
144
	 * @param bool  $licenseType
145
	 * @param bool  $client
146
	 * @return mixed
147
	 */
148
	public function createKey($keyType, $upgradePlans = [], $ips = [], $macs = [], $licenseType = FALSE, $client = FALSE) {
149
		if (!is_array($ips) && $ips != '')
0 ignored issues
show
introduced by
The condition is_array($ips) is always true.
Loading history...
150
			$ips = [$ips];
151
		$this->response = $this->xml->__call('partner10.createKey', [
152
																	  $this->authInfo(),
153
																	  $this->serverAddress($ips, $macs), $client === FALSE ? $this->client : $client,
154
																	  $keyType,
155
																	  $upgradePlans, $licenseType === FALSE ? $this->licenseType : $licenseType
156
		]
157
		);
158
		return $this->response;
159
		/* 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...
160
		Array
161
		(
162
		[mainKeyNumber] => PLSK.00004266.0000
163
		[expirationDate] => stdClass Object
164
		(
165
		[scalar] => 20131209T00:00:00
166
		[xmlrpc_type] => datetime
167
		[timestamp] => 1386547200
168
		)
169
170
		[productKey] => DETAIN-2TVB02-ZT1R57-AY2442-6WN966
171
		[additionalKeysNumbers] => Array
172
		(
173
		)
174
175
		[resultCode] => 100
176
		[resultDesc] => PLSK.00004266.0000 has been successfully created.
177
		[updateDate] => stdClass Object
178
		(
179
		[scalar] => 20131129T00:00:00
180
		[xmlrpc_type] => datetime
181
		[timestamp] => 1385683200
182
		)
183
184
		)
185
		*/
186
	}
187
188
	/**
189
	 * @param $key
190
	 * @return mixed
191
	 */
192
	public function retrieveKey($key) {
193
		$this->response = $this->xml->__call('partner10.retrieveKey', [$this->authInfo(), $key]);
194
		return $this->response;
195
		/* Success
196
		Array
197
		(
198
		[keyExtension] => xml
199
		[resultCode] => 100
200
		[resultDesc] => PLSK.00005819.0000 has been successfully retrieved
201
		[keyNumber] => PLSK.00005819.0000
202
		[key] => stdClass Object
203
		(
204
		[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">
205
		<!--Unique product Key number-->
206
		<core:key-number core:type="string">PLSK.00005819</core:key-number>
207
		<!--Key version-->
208
		<core:key-version core:type="string">0000</core:key-version>
209
		<!--Key description-->
210
		<core:description>
211
		<core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows</core:keytype>
212
		<core:feature>Unlimited Domains w/1 yr SUS</core:feature>
213
		<core:feature>Parallels Web Presence Builder - 100 Sites</core:feature>
214
		<core:feature>Parallels PowerPack for Plesk (Windows)</core:feature>
215
		</core:description>
216
		<!--Product which this license is intended to work on-->
217
		<core:product core:type="string">plesk-win</core:product>
218
		<!--Supported product version-->
219
		<core:versions>
220
		<core:from core:type="string">10.0</core:from>
221
		<core:to core:type="string">any</core:to>
222
		</core:versions>
223
		<!--Date after which this license becomes usable (inclusive)-->
224
		<core:start-date core:type="date">instant</core:start-date>
225
		<!--Date before which this license is usable (exclusive)-->
226
		<core:expiration-date core:type="date">2013-12-02</core:expiration-date>
227
		<!--URL of the service endpoint to use when performing an autoupdate-->
228
		<core:license-server-url core:type="string">https://ka.parallels.com:5224/xmlrpc</core:license-server-url>
229
		<!--Date when product will try to perform an autoupdate-->
230
		<core:update-date core:type="date">2013-11-22</core:update-date>
231
		<core:update-ticket core:hidden="true" core:type="string">k0uj75wmlfa1a5hwmk-k43gy2ji0p2y1</core:update-ticket>
232
		<!--Number of domains-->
233
		<plesk-windows:domains core:type="integer">unlimited</plesk-windows:domains>
234
		<!--Number of clients-->
235
		<plesk-windows:clients core:type="integer">unlimited</plesk-windows:clients>
236
		<!--Number of webusers-->
237
		<plesk-windows:webusers core:type="integer">unlimited</plesk-windows:webusers>
238
		<!--Number of mailnames-->
239
		<plesk-windows:mailnames core:type="integer">unlimited</plesk-windows:mailnames>
240
		<!--Number of additional language pack(s)-->
241
		<plesk-windows:language-packs core:type="integer">0</plesk-windows:language-packs>
242
		<plesk-windows:mpc-id core:hidden="true" core:type="integer">0</plesk-windows:mpc-id>
243
		<plesk-windows:mpc-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-disabled>
244
		<!--Google tools-->
245
		<plesk-windows:google-tools core:type="boolean">true</plesk-windows:google-tools>
246
		<plesk-windows:mpc-mng-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-mng-disabled>
247
		<!--Number of slaves-->
248
		<plesk-windows:slaves core:type="integer">0</plesk-windows:slaves>
249
		<!--EventManager-->
250
		<plesk-windows:event-manager core:type="boolean">true</plesk-windows:event-manager>
251
		<!--Domains backup-->
252
		<plesk-windows:domains-backup core:type="boolean">true</plesk-windows:domains-backup>
253
		<!--Tomcat support-->
254
		<plesk-windows:tomcat-support core:type="boolean">true</plesk-windows:tomcat-support>
255
		<!--Subdomains-->
256
		<plesk-windows:subdomains-support core:type="boolean">true</plesk-windows:subdomains-support>
257
		<!--Backward key compatibility restriction-->
258
		<plesk-windows:backward-restriction core:type="integer">0</plesk-windows:backward-restriction>
259
		<!--Work Inside Virtuozzo-->
260
		<plesk-windows:vps-only core:type="boolean">false</plesk-windows:vps-only>
261
		<!--Work Inside Hyper-V-->
262
		<plesk-windows:hyper-v core:type="boolean">false</plesk-windows:hyper-v>
263
		<!--Work Inside VMware-->
264
		<plesk-windows:vmware core:type="boolean">false</plesk-windows:vmware>
265
		<!--Work Inside Xen-->
266
		<plesk-windows:xen core:type="boolean">false</plesk-windows:xen>
267
		<!--Work Inside KVM-->
268
		<plesk-windows:kvm core:type="boolean">false</plesk-windows:kvm>
269
		<!--Work Inside Parallels Hypervisor-->
270
		<plesk-windows:hypervisor core:type="boolean">false</plesk-windows:hypervisor>
271
		<!--Global changes-->
272
		<plesk-windows:global-changes core:type="boolean">true</plesk-windows:global-changes>
273
		<!--Shell access-->
274
		<plesk-windows:shell-access core:type="boolean">true</plesk-windows:shell-access>
275
		<!--Detailed traffic-->
276
		<plesk-windows:detailed-traffic core:type="boolean">true</plesk-windows:detailed-traffic>
277
		<!--Notification manager-->
278
		<plesk-windows:notification-manager core:type="boolean">true</plesk-windows:notification-manager>
279
		<!--Action log manager-->
280
		<plesk-windows:action-manager core:type="boolean">true</plesk-windows:action-manager>
281
		<!--Clients and Domains Expirations management-->
282
		<plesk-windows:expirations-manager core:type="boolean">true</plesk-windows:expirations-manager>
283
		<!--Client templates-->
284
		<plesk-windows:client-templates core:type="boolean">true</plesk-windows:client-templates>
285
		<!--Ability to use Application Vault-->
286
		<plesk-windows:appvault-support core:type="boolean">true</plesk-windows:appvault-support>
287
		<!--Ability to use SpamAssassin-->
288
		<plesk-windows:spamassasin-support core:type="boolean">true</plesk-windows:spamassasin-support>
289
		<!--Ability to use Trouble Ticketing System-->
290
		<plesk-windows:tts-support core:type="boolean">true</plesk-windows:tts-support>
291
		<!--Ability to use ColdFusion-->
292
		<plesk-windows:coldfusion-support core:type="boolean">true</plesk-windows:coldfusion-support>
293
		<plesk-windows:ask-update core:hidden="true" core:type="boolean">false</plesk-windows:ask-update>
294
		<plesk-windows:autoinstaller-config core:hidden="true" core:type="string">true</plesk-windows:autoinstaller-config>
295
		<!--Ability to use DrWeb-->
296
		<plesk-windows:drweb-support core:type="boolean">true</plesk-windows:drweb-support>
297
		<plesk-windows:store-id core:hidden="true" core:type="integer">1</plesk-windows:store-id>
298
		<!--Ability to use Migration Manager-->
299
		<plesk-windows:migration-manager core:type="boolean">true</plesk-windows:migration-manager>
300
		<!--Ability to use MS SQL-->
301
		<plesk-windows:mssql core:type="boolean">true</plesk-windows:mssql>
302
		<!--Allowed locales-->
303
		<plesk-windows:allowed-locales core:type="string">any</plesk-windows:allowed-locales>
304
		<!--Allows feature upgrades for this version-->
305
		<plesk-windows:feature-upgrades core:type="boolean">true</plesk-windows:feature-upgrades>
306
		<!--Parallels Plesk Billing accounts count-->
307
		<plesk-windows:modernbill-accounts core:type="integer">0</plesk-windows:modernbill-accounts>
308
		<!--Number of sites-->
309
		<plesk-windows:sitebuilder-sites core:type="integer">100</plesk-windows:sitebuilder-sites>
310
		<!--Enable Parallels Plesk Mobile Server Manager-->
311
		<plesk-windows:mobile-server-manager-support core:type="boolean">true</plesk-windows:mobile-server-manager-support>
312
		<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
313
		<ds:SignedInfo>
314
		<ds:CanonicalizationMethod Algorithm="http://parallels.com/schemas/keys/core/3#canonicalize"/>
315
		<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
316
		<ds:Reference URI="">
317
		<ds:Transforms>
318
		<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
319
		<ds:Transform Algorithm="http://parallels.com/schemas/keys/core/3#transform"/>
320
		</ds:Transforms>
321
		<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
322
		<ds:DigestValue>ENCODED HASH HERE</ds:DigestValue>
323
		</ds:Reference>
324
		</ds:SignedInfo>
325
		<ds:SignatureValue>
326
		ENCODED DATA HERE
327
		</ds:SignatureValue>
328
		<ds:KeyInfo>
329
		<ds:X509Data>
330
		<ds:X509Certificate>
331
		ENCODED DATA HERE
332
		</ds:X509Certificate>
333
		</ds:X509Data>
334
		</ds:KeyInfo>
335
		</ds:Signature>
336
		</plesk-windows:key>
337
338
		[xmlrpc_type] => base64
339
		)
340
341
		)
342
343
		*/
344
	}
345
346
	/**
347
	 * 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:
348
	 * 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
349
	 *
350
	 * @param $key
351
	 * @return mixed
352
	 */
353
	public function getAvailableUpgrades($key) {
354
		$this->response = $this->xml->__call('partner10.getAvailableUpgrades', [$this->authInfo(), $key]);
355
		return $this->response;
356
	}
357
358
	/**
359
	 * Success
360
	 * Array
361
	 * (
362
	 * [keyInfo] => Array
363
	 * (
364
	 * [expirationDate] => stdClass Object
365
	 * (
366
	 * [scalar] => 20131202T00:00:00
367
	 * [xmlrpc_type] => datetime
368
	 * [timestamp] => 1385942400
369
	 * )
370
	 * )
371
	 * [features] => Array
372
	 * (
373
	 * [0] => Array
374
	 * (
375
	 * [apiName] => PLESK_7X_FOR_WIN_POWER_PACK
376
	 * [name] => Parallels PowerPack for Plesk (Windows) (Monthly Lease)
377
	 * )
378
	 * [1] => Array
379
	 * (
380
	 * [apiName] => PLESK-100-SITES
381
	 * [name] => Parallels Web Presence Builder - 100 Sites (Monthly Lease)
382
	 * )
383
	 * [2] => Array
384
	 * (
385
	 * [apiName] => UNLIMITED_DOMAINS
386
	 * [name] => Unlimited Domains w/1 yr SUS (Lease)
387
	 * )
388
	 * )
389
	 * [billingType] => LEASE
390
	 * [productFamily] => plesk
391
	 * [createDate] => stdClass Object
392
	 * (
393
	 * [scalar] => 20131023T18:02:11
394
	 * [xmlrpc_type] => datetime
395
	 * [timestamp] => 1382551331
396
	 * )
397
	 * [trial] =>
398
	 * [lastReportingDate] => stdClass Object
399
	 * (
400
	 * [scalar] => 20131029T06:27:31
401
	 * [xmlrpc_type] => datetime
402
	 * [timestamp] => 1383028051
403
	 * )
404
	 * [additionalKeys] => Array
405
	 * (
406
	 * [0] => Array
407
	 * (
408
	 * [expirationDate] => stdClass Object
409
	 * (
410
	 * [scalar] => 20131202T00:00:00
411
	 * [xmlrpc_type] => datetime
412
	 * [timestamp] => 1385942400
413
	 * )
414
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
415
	 * [apiKeyType] => N/A
416
	 * [boundIPAddress] =>
417
	 * [problem] =>
418
	 * [keyNumber] => KAV.00005821.0001
419
	 * [properties] => Array
420
	 * (
421
	 * )
422
	 * [type] => ADDITIONAL
423
	 * [updateDate] => stdClass Object
424
	 * (
425
	 * [scalar] => 20131122T00:00:00
426
	 * [xmlrpc_type] => datetime
427
	 * [timestamp] => 1385078400
428
	 * )
429
	 * [clientId] => 19282468
430
	 * [parentKeyNumber] => PLSK.00005819.0000
431
	 * [lastReportingVersion] => 11.5.3
432
	 * [keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
433
	 * [terminated] =>
434
	 * [susAndSupportInfo] => Array
435
	 * (
436
	 * )
437
	 * [features] => Array
438
	 * (
439
	 * )
440
	 * [billingType] => LEASE
441
	 * [productFamily] => kav
442
	 * [createDate] => stdClass Object
443
	 * (
444
	 * [scalar] => 20131023T18:02:12
445
	 * [xmlrpc_type] => datetime
446
	 * [timestamp] => 1382551332
447
	 * )
448
	 * [trial] =>
449
	 * [lastReportingDate] => stdClass Object
450
	 * (
451
	 * [scalar] => 20131023T18:05:24
452
	 * [xmlrpc_type] => datetime
453
	 * [timestamp] => 1382551524
454
	 * )
455
	 * [additionalKeys] => Array
456
	 * (
457
	 * )
458
	 * )
459
	 * [1] => Array
460
	 * (
461
	 * [expirationDate] => stdClass Object
462
	 * (
463
	 * [scalar] => 20131202T00:00:00
464
	 * [xmlrpc_type] => datetime
465
	 * [timestamp] => 1385942400
466
	 * )
467
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
468
	 * [apiKeyType] => N/A
469
	 * [boundIPAddress] =>
470
	 * [problem] =>
471
	 * [keyNumber] => APS.00005820.0001
472
	 * [properties] => Array
473
	 * (
474
	 * )
475
	 * [type] => ADDITIONAL
476
	 * [updateDate] => stdClass Object
477
	 * (
478
	 * [scalar] => 20131122T00:00:00
479
	 * [xmlrpc_type] => datetime
480
	 * [timestamp] => 1385078400
481
	 * )
482
	 * [clientId] => 19282468
483
	 * [parentKeyNumber] => PLSK.00005819.0000
484
	 * [lastReportingVersion] => 11.5.3
485
	 * [keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
486
	 * [terminated] =>
487
	 * [susAndSupportInfo] => Array
488
	 * (
489
	 * )
490
	 * [features] => Array
491
	 * (
492
	 * )
493
	 * [billingType] => LEASE
494
	 * [productFamily] => unity-one
495
	 * [createDate] => stdClass Object
496
	 * (
497
	 * [scalar] => 20131023T18:02:11
498
	 * [xmlrpc_type] => datetime
499
	 * [timestamp] => 1382551331
500
	 * )
501
	 * [trial] =>
502
	 * [lastReportingDate] => stdClass Object
503
	 * (
504
	 * [scalar] => 20131023T18:05:26
505
	 * [xmlrpc_type] => datetime
506
	 * [timestamp] => 1382551526
507
	 * )
508
	 * [additionalKeys] => Array
509
	 * (
510
	 * )
511
	 * )
512
	 * )
513
	 * )
514
	 *[resultCode] => 100
515
	 * [resultDesc] => Key info for PLSK.00005819.0000 key returned successfully
516
	 * [keyNumber] => PLSK.00005819.0000
517
	 * )
518
	 *
519
	 * @param $key
520
	 * @return mixed
521
	 */
522
	public function getKeyInfo($key) {
523
		$this->response = $this->xml->__call('partner10.getKeyInfo', [$this->authInfo(), $key]);
524
		return $this->response;
525
	}
526
527
	/**
528
	 * @param string $ipAddress the ip address
529
	 * @return false|string false if no key , or a string w/ the key
530
	 */
531
	public function getMainKeyFromIp($ipAddress) {
532
		$response = $this->getKeyNumbers($ipAddress);
533
		//$response = $this->getKeysInfoByIP($ipAddress);
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...
534
		$return = FALSE;
535
		if (isset($response['keyInfos'])) {
536
			$responseValues = array_values($response['keyInfos']);
537
			foreach ($responseValues as $data) {
538
				if ($return === FALSE)
539
					$return = $data['keyNumber'];
540
				if ($data['type'] == 'MAIN')
541
					$return = $data['keyNumber'];
542
			}
543
			return $return;
544
		} else
545
			return FALSE;
546
	}
547
548
	/**
549
	 * @param $ipAddress
550
	 * @return mixed
551
	 */
552
	public function getKeysInfoByIP($ipAddress) {
553
		$this->response = $this->xml->__call('partner10.getKeysInfoByIP', [$this->authInfo(), $ipAddress]);
554
		return $this->response;
555
	}
556
557
	/**
558
	 * @param array|string $ips
559
	 * @param array        $macs
560
	 * @return mixed
561
	 */
562
	public function getKeyNumbers($ips = [], $macs = []) {
563
		myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
0 ignored issues
show
Bug introduced by
The function myadmin_log was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

563
		/** @scrutinizer ignore-call */ 
564
  myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
Loading history...
Bug introduced by
It seems like $ips can also be of type string; however, parameter $ips of Detain\Parallels\Parallels::serverAddress() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

563
		myadmin_log('licenses', 'info', json_encode($this->serverAddress(/** @scrutinizer ignore-type */ $ips, $macs)), __LINE__, __FILE__);
Loading history...
564
		$this->response = $this->xml->__call('partner10.getKeyNumbers', [$this->authInfo(), $this->serverAddress($ips, $macs)]);
565
		return $this->response;
566
		/* 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...
567
		Array
568
		(
569
		[keyInfos] => Array
570
		(
571
		[0] => Array
572
		(
573
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows for Virtual Machines (Lease)
574
		Lease)
575
		[lastReportingIp] => 206.72.205.242
576
		[terminated] => 1
577
		[keyNumber] => KAV.00004873.0002
578
		[billingType] => LEASE
579
		[type] => ADDITIONAL
580
		[createDate] => stdClass Object
581
		(
582
		[scalar] => 20131014T16:44:40
583
		[xmlrpc_type] => datetime
584
		[timestamp] => 1381769080
585
		)
586
587
		[lastReportingDate] => stdClass Object
588
		(
589
		[scalar] => 20131023T17:35:45
590
		[xmlrpc_type] => datetime
591
		[timestamp] => 1382549745
592
		)
593
594
		)
595
596
		[3] => Array
597
		(
598
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows (Lease)
599
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
600
		[terminated] =>
601
		[keyNumber] => PLSK.00005819.0000
602
		[billingType] => LEASE
603
		[type] => MAIN
604
		[createDate] => stdClass Object
605
		(
606
		[scalar] => 20131023T18:02:11
607
		[xmlrpc_type] => datetime
608
		[timestamp] => 1382551331
609
		)
610
611
		[lastReportingDate] => stdClass Object
612
		(
613
		[scalar] => 20131029T06:27:31
614
		[xmlrpc_type] => datetime
615
		[timestamp] => 1383028051
616
		)
617
618
		)
619
620
		[4] => Array
621
		(
622
		[keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
623
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
624
		[terminated] =>
625
		[keyNumber] => APS.00005820.0001
626
		[billingType] => LEASE
627
		[type] => ADDITIONAL
628
		[createDate] => stdClass Object
629
		(
630
		[scalar] => 20131023T18:02:11
631
		[xmlrpc_type] => datetime
632
		[timestamp] => 1382551331
633
		)
634
635
		[lastReportingDate] => stdClass Object
636
		(
637
		[scalar] => 20131023T18:05:26
638
		[xmlrpc_type] => datetime
639
		[timestamp] => 1382551526
640
		)
641
642
		)
643
644
		[5] => Array
645
		(
646
		[keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
647
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
648
		[terminated] =>
649
		[keyNumber] => KAV.00005821.0001
650
		[billingType] => LEASE
651
		[type] => ADDITIONAL
652
		[createDate] => stdClass Object
653
		(
654
		[scalar] => 20131023T18:02:12
655
		[xmlrpc_type] => datetime
656
		[timestamp] => 1382551332
657
		)
658
659
		[lastReportingDate] => stdClass Object
660
		(
661
		[scalar] => 20131023T18:05:24
662
		[xmlrpc_type] => datetime
663
		[timestamp] => 1382551524
664
		)
665
666
		)
667
668
		)
669
670
		[resultCode] => 100
671
		[resultDesc] => Found: PLSK.02554871.0001, APS.02554872.0002, KAV.02554873.0002, PLSK.00005819.0000, APS.00005820.0001, KAV.00005821.0001
672
		[keyNumbers] => Array
673
		(
674
		[0] => PLSK.02554871.0001
675
		[1] => APS.02554872.0002
676
		[2] => KAV.02554873.0002
677
		[3] => PLSK.00005819.0000
678
		[4] => APS.00005820.0001
679
		[5] => KAV.00005821.0001
680
		)
681
682
		[detailResultCode] => 0
683
		)
684
		*/
685
	}
686
687
	/**
688
	 * @param bool $client
689
	 * @return mixed
690
	 */
691
	public function getAvailableKeyTypesAndFeatures($client = FALSE) {
692
		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', [$this->authInfo(), $client === FALSE ? $this->client : $client]);
693
		return $this->response;
694
		/* 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...
695
		Array
696
		(
697
		[resultCode] => 100
698
		[features] => Array
699
		(
700
		[0] => ADDON-CT-OAS-L-1Y
701
		[1] => ADDON-HMP-L-M
702
		[2] => SB10X-500
703
		[3] => ADDON-WPB-12500-M
704
		[4] => MEDIUM
705
		[5] => 30_DOMAINS_FOR_VZ
706
		[6] => PLESK-100-SITES
707
		[7] => SB10X-35000
708
		[8] => STORE_BUTTON_OFF
709
		[9] => 2CPU_90CT_PIM
710
		[10] => 4CPU_1CT_PIM
711
		[11] => SB10X-300
712
		[12] => SB10X-25000
713
		[13] => 3_LANGUAGE_PACKS_FOR_VMM
714
		[14] => UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ
715
		[15] => 8CPU_15HV_PVA
716
		[16] => ADDITIONAL_LANGUAGE_PACK
717
		[17] => SB10X-100
718
		[18] => 4CPU_UNLIMITEDVC_PVA
719
		[19] => PLESK_SWSOFT_SERVICES_OFF
720
		[20] => 8CPU_100CT_PVA
721
		[21] => PLESK_POWER_PACK_FOR_VMM
722
		[22] => 4CPU_20CT_PIM
723
		[23] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM
724
		[24] => HSPHERE_7500_ACCOUNTS
725
		[25] => CLDF-PLUS-M
726
		[26] => 7500_SITES_MULTI_SERVER
727
		[27] => 4-LANGUAGE-PACKS-FOR-PPA
728
		[28] => MONTHLY_AMPS
729
		[29] => 300_SITES
730
		[30] => UO-UNL-L-1Y
731
		[31] => 2CPU_20CT_PIM
732
		[32] => 8CPU_6HV_PVA
733
		[33] => 4_LANGUAGE_PACKS
734
		[34] => 8CPU_40CT_PVA
735
		[35] => 8CPU_1CT_PVA
736
		[36] => 2CPU_4HV_PVA
737
		[37] => 8CPU_200CT_PVA
738
		[38] => 4CPU_60CT_PIM
739
		[39] => 100_EXT_WHITELABEL
740
		[40] => 8CPU_50CT_PVA
741
		[41] => PLESK-UNLIMITED-PB-ACCOUNTS
742
		[42] => SB10X-40000
743
		[43] => PLESK_HOSTING_SUITE_FOR_VZ
744
		[44] => HSPHERE_3750_ACCOUNTS
745
		[45] => 2CPU_7HV_PVA
746
		[46] => 4CPU_5CT_PIM
747
		[47] => UNLIMITED_USERS_FOR_VPS
748
		[48] => PLESK-100-SITES-FOR-VZ
749
		[49] => PLESK_RELOADED_FOR_VZ_POWER_PACK
750
		[50] => 8CPU_10HV_PVA
751
		[51] => ADDONVZ-CT-OAS-L-1Y
752
		[52] => PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK
753
		[53] => SB10X-2500
754
		[54] => 2CPU_3CT_PIM
755
		[55] => ADDITIONAL_LANGUAGE_PACK_FOR_VZ
756
		[56] => 8CPU_80CT_PVA
757
		[57] => 4CPU_30VC_PVA
758
		[58] => 1000_SITES_MULTI_SERVER
759
		[59] => 1_UNITY_MOBILE_SITE
760
		[60] => 2CPU_40CT_PIM
761
		[61] => EXTRAS_BUTTONS_OFF
762
		[62] => UNLIMITED_DOMAINS_FOR_VMM
763
		[63] => 8CPU_450CT_PVA
764
		[64] => HSPHERE_500_ACCOUNTS
765
		[65] => 4CPU_5VC_PVA
766
		[66] => HSPHERE_1750_ACCOUNTS
767
		[67] => FOTOLIA_OFF
768
		[68] => SB10X-50000
769
		[69] => HSPHERE_1000_ACCOUNTS
770
		[70] => 1000_EXT
771
		[71] => SB10X-7500
772
		[72] => 100_EXTENSIONS
773
		[73] => 2CPU_1CT_PIM
774
		[74] => 1000_EXT_WHITELABEL
775
		[75] => 8CPU_9HV_PVA
776
		[76] => UO-1-L-1Y
777
		[77] => 8CPU_5VC_PVA
778
		[78] => 8CPU_8HV_PVA
779
		[79] => 4_LANGUAGE_PACKS_FOR_VZ
780
		[80] => 4CPU_70CT_PIM
781
		[81] => 30_DOMAINS
782
		[82] => 2_LANGUAGE_PACKS_FOR_VMM
783
		[83] => ADDON-CT-OAS-L-M
784
		[84] => UO-1-W-M
785
		[85] => UNLIMITED-LANGUAGE-PACKS-FOR-PPA
786
		[86] => 100_DOMAINS_FOR_VZ
787
		[87] => ADDON-WPB-1000-M
788
		[88] => STH-WMP-BUSP-M
789
		[89] => UNLIMITED_DOMAINS
790
		[90] => 2CPU_100CT_PIM
791
		[91] => ADDONVZ-HMP-W-M
792
		[92] => DISABLE_SITEBUILDER
793
		[93] => 8CPU_1CT
794
		[94] => HSPHERE_2500_ACCOUNTS
795
		[95] => STH-WMP-BUS-M
796
		[96] => PLESK_POWER_PACK_FOR_WIN
797
		[97] => 8CPU_30VC_PVA
798
		[98] => 8CPU_150CT_PVA
799
		[99] => HSPHERE_5000_ACCOUNTS
800
		[100] => 4CPU_90CT_PIM
801
		[101] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ
802
		[102] => ADDON-WPB-45000-M
803
		[103] => PLESK_POWER_PACK_FOR_VZ
804
		[104] => 8CPU_250CT_PVA
805
		[105] => 1-LANGUAGE-PACK-FOR-PPA
806
		[106] => UO-UNL-W-M
807
		[107] => 2CPU_5VC_PVA
808
		[108] => ADDON-WPB-15000-M
809
		[109] => PLESK_RELOADED_POWER_PACK
810
		[110] => ADDON-WPB-7500-M
811
		[111] => PLESK-1000-SITES-FOR-VZ
812
		[112] => 10_UNITY_MOBILE_SITES
813
		[148] => 3_LANGUAGE_PACKS_FOR_VZ
814
		[149] => 2CPU_30CT_PIM
815
		[150] => ENTERPRISE
816
		[151] => 2CPU_50CT_PIM
817
		[152] => ADDON-HMP-W-M
818
		[153] => 2_LANGUAGE_PACKS_FOR_VZ
819
		[154] => 4_LANGUAGE_PACKS_FOR_VMM
820
		[155] => UO-UNL-L-M
821
		[156] => SB10X-12500
822
		[157] => 4CPU_50CT_PIM
823
		[158] => ADDON-WPB-20000-M
824
		[159] => HSPHERE_10000_ACCOUNTS
825
		[160] => 4CPU_3CT_PIM
826
		[161] => 3_LANGUAGE_PACKS
827
		[162] => 8CPU_90CT_PVA
828
		[163] => 5000_SITES
829
		[164] => 100_SITES
830
		[165] => PLESK_POWER_PACK
831
		[166] => 8CPU_400CT_PVA
832
		[167] => 500_EXT
833
		[168] => 5000_SITES_MULTI_SERVER
834
		[169] => 5_LANGUAGE_PACKS_FOR_VMM
835
		[170] => UNLIMITED_BATTLEFIELD_SERVERS
836
		[171] => ADDON-WPB-35000-M
837
		[172] => PLESK-100-SITES-FOR-VMM
838
		[173] => ADDON-WPB-50000-M
839
		[174] => 8CPU_4HV_PVA
840
		[175] => 8CPU_5HV_PVA
841
		[176] => 2CPU_10HV_PVA
842
		[177] => ADDON-WPB-300-M
843
		[178] => 2CPU_2HV_PVA
844
		[179] => 300_SITES_MULTI_SERVER
845
		[180] => 10_DOMAINS_FOR_VZ
846
		[181] => 1_LANGUAGE_PACK
847
		[182] => 4CPU_10CT_PIM
848
		[183] => ADDON-WPB-700-M
849
		[184] => 2CPU_30VC_PVA
850
		[185] => 2CPU_1HV_PVA
851
		[186] => 5_USERS_FOR_VPS
852
		[187] => 2CPU_10CT_PIM
853
		[188] => 500_SITES_MULTI_SERVER
854
		[189] => 300_DOMAINS
855
		[190] => 10000_SITES
856
		[191] => 8CPU_2HV_PVA
857
		[192] => ADDON-WPB-10000-M
858
		[193] => PLESK_POWER_PACK_FOR_WIN_FOR_VMM
859
		[194] => PLESK-1000-SITES-FOR-VMM
860
		[195] => 5_LANGUAGE_PACKS
861
		[196] => 1_LANGUAGE_PACK_FOR_VZ
862
		[197] => 2CPU_200CT_PIM
863
		[198] => VIRTUOZZO_PROMO_OFF
864
		[199] => SB10X-5000
865
		[200] => 8CPU_7HV_PVA
866
		[201] => 10_DOMAINS
867
		[202] => PRO
868
		[203] => 500_SITES
869
		[204] => 2CPU_70CT_PIM
870
		[205] => 1_BATTLEFIELD_SERVER
871
		[206] => 2CPU_150CT_PIM
872
		[207] => 2CPU_80CT_PIM
873
		[208] => ADDONVMM-HMP-L-M
874
		[209] => UNLIMITED_USERS
875
		[210] => 4CPU_30CT_PIM
876
		[211] => PLESK_POWER_PACK_FOR_WIN_FOR_VZ
877
		[212] => 8CPU_300CT_PVA
878
		[213] => 5_USERS
879
		[214] => 4CPU_150CT_PIM
880
		[215] => 10_BATTLEFIELD_SERVERS
881
		[216] => ADDON-WPB-100-M
882
		[217] => 8CPU_3HV_PVA
883
		[218] => ADDON-WPB-2500-M
884
		[219] => 5_LANGUAGE_PACKS_FOR_VZ
885
		[220] => 5_BATTLEFIELD_SERVERS
886
		[221] => DISABLE_GOOGLE_TOOLS
887
		[222] => 500_EXT_WHITELABEL
888
		[223] => UNLIMITED_DOMAINS_FOR_VZ
889
		[224] => SB10X-15000
890
		[225] => UNLIMITED_MAILBOXES_FOR_VZ
891
		[226] => 2CPU_5HV_PVA
892
		[227] => PLESK_7X_FOR_WIN_POWER_PACK
893
		[228] => PLESK-1000-SITES
894
		[229] => DISABLE_FEATURE_UPGRADES
895
		[230] => SB10X-20000
896
		[231] => ENTRY
897
		[232] => 2CPU_6HV_PVA
898
		[233] => 8CPU_30CT_PVA
899
		[234] => UO-UNL-W-1Y
900
		[235] => 2_LANGUAGE_PACKS
901
		[236] => 8CPU_UNLIMITEDVC_PVA
902
		[237] => 100_DOMAINS
903
		[238] => 8CPU_20CT_PVA
904
		[239] => 2CPU_3HV_PVA
905
		[240] => ADD_1_MANAGED_MSSQL
906
		[241] => 100_EXT
907
		[242] => 100_EXTENSIONS_FOR_VZ
908
		[243] => ADDON-WPB-500-M
909
		[244] => 8CPU_3CT_PVA
910
		[245] => 2CPU_9HV_PVA
911
		[246] => 1_LANGUAGE_PACK_FOR_VMM
912
		[247] => 8CPU_10CT_PVA
913
		[248] => 2CPU_15HV_PVA
914
		[249] => 2CPU_8HV_PVA
915
		[250] => STARTER
916
		[251] => ADDONVMM-HMP-W-M
917
		[252] => 7500_SITES
918
		[253] => 4CPU_40CT_PIM
919
		[254] => SB10X-30000
920
		[255] => PROFESSIONAL
921
		[256] => 1000_SITES
922
		[257] => 8CPU_350CT_PVA
923
		[258] => 2CPU_60CT_PIM
924
		[259] => HSPHERE_200_ACCOUNTS
925
		[260] => 8CPU_500CT_PVA
926
		[261] => SB10X-10000
927
		[262] => STH-WMP-BSC-M
928
		[263] => ADDON-WPB-25000-M
929
		)
930
931
		[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.
932
		[keyTypes] => Array
933
		(
934
		[0] => GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE
935
		[1] => PSBM_45_SPE
936
		[2] => PLESK-10-AND-LATER-FOR-VMM
937
		[3] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ
938
		[4] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M
939
		[5] => MYLITTLEADMIN_2000
940
		[6] => MYLITTLEADMIN_2005
941
		[7] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN
942
		[8] => CRT-5-UNL-L
943
		[9] => GLOBAL_MENTORING_TOTAL_CARE
944
		[10] => LINUXMAGIC_MAGICSPAM
945
		[11] => PLESK_ANTIVIRUS_BY_KAV_FOR_VZ
946
		[12] => PINNACLE_CART_ECOMMERCE_SHOPPING_CART
947
		[13] => SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY
948
		[14] => ATI_PRO_FOR_WIN
949
		[15] => STOPTHEHACKER-M
950
		[16] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ
951
		[17] => SB10X-PA
952
		[18] => ATI_PRO
953
		[19] => CRT-30-UNL-L
954
		[20] => 4PSA_VOIPNOW_25_PROFESSIONAL
955
		[21] => CLOUDLINUX-L-M
956
		[22] => ATMAIL_WEBMAIL
957
		[23] => PLESK_10_AND_LATER_FOR_WIN
958
		[24] => CRT-5-100-L
959
		[25] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y
960
		[26] => UNITY-ONE-W-M
961
		[27] => PLESK-10-AND-LATER-FOR-WIN-FOR-VMM
962
		[28] => GLOBAL_MENTORING_LIVE_EXPERT_BASIC
963
		[29] => CRT-50-UNL-L
964
		[30] => VIRTUOZZO_CONTAINERS_4
965
		[31] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ
966
		[32] => PLESK_10_AND_LATER_FOR_VZ
967
		[33] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M
968
		[34] => CRT-50-100-L
969
		[35] => UNITY-ONE-L-M
970
		[36] => PLESK_ANTIVIRUS_BY_DRWEB
971
		[37] => SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY
972
		[38] => CRT-100-UNL-L
973
		[39] => PARALLELS-CLOUD-SERVER
974
		[40] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y
975
		[41] => CRT-100-100-L
976
		[42] => PLESK_10_AND_LATER_FOR_WIN_FOR_VZ
977
		[43] => PPA-L-M
978
		[44] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN
979
		[45] => PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM
980
		[46] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN
981
		[47] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ
982
		[48] => SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY
983
		[49] => UNITY_MOBILE
984
		[50] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ
985
		[51] => SB10X
986
		[52] => UNITY_MOBILE_FOR_WIN
987
		[53] => PARALLELS-CLOUD-STORAGE
988
		[54] => CRT-30-100-L
989
		[55] => CLOUDFLARE-M
990
		[56] => VIRTUOZZO_CONTAINERS_4_FOR_WIN
991
		[57] => PLESK_10_AND_LATER
992
		[58] => PARALLELS_PREMIUM_ANTIVIRUS
993
		[59] => SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY
994
		[60] => PLESK_ANTIVIRUS_BY_KAV
995
		[61] => KEEPIT_ONLINE_BACKUP
996
		)
997
998
		)
999
		*/
1000
	}
1001
1002
}
1003