@@ -7,14 +7,14 @@ |
||
| 7 | 7 | $licenses = $cpl->fetchExpiredLicenses(); |
| 8 | 8 | |
| 9 | 9 | foreach ( $licenses->licenses as $lisc ) { |
| 10 | - $lisc = (array)$lisc; |
|
| 11 | - print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n"; |
|
| 12 | - print " ID: " . $lisc['@attributes']['name'] . "\n"; |
|
| 13 | - print " groupid: " . $lisc['@attributes']['groupid'] . "\n"; |
|
| 14 | - print " packageid: " . $lisc['@attributes']['packageid'] . "\n"; |
|
| 15 | - print " adddate: " . $lisc['@attributes']['adddate'] . "\n"; |
|
| 16 | - print "expired on: " . $lisc['@attributes']['expiredon'] . "\n"; |
|
| 17 | - print " reason: " . $lisc['@attributes']['expirereason'] . "\n"; |
|
| 10 | + $lisc = (array)$lisc; |
|
| 11 | + print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n"; |
|
| 12 | + print " ID: " . $lisc['@attributes']['name'] . "\n"; |
|
| 13 | + print " groupid: " . $lisc['@attributes']['groupid'] . "\n"; |
|
| 14 | + print " packageid: " . $lisc['@attributes']['packageid'] . "\n"; |
|
| 15 | + print " adddate: " . $lisc['@attributes']['adddate'] . "\n"; |
|
| 16 | + print "expired on: " . $lisc['@attributes']['expiredon'] . "\n"; |
|
| 17 | + print " reason: " . $lisc['@attributes']['expirereason'] . "\n"; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | |
@@ -2,19 +2,19 @@ |
||
| 2 | 2 | |
| 3 | 3 | include("../cpl.inc.php"); |
| 4 | 4 | |
| 5 | -$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1],$_SERVER['argv'][2]); |
|
| 5 | +$cpl = new \Detain\Cpanel\Cpanel($_SERVER['argv'][1], $_SERVER['argv'][2]); |
|
| 6 | 6 | |
| 7 | 7 | $licenses = $cpl->fetchExpiredLicenses(); |
| 8 | 8 | |
| 9 | -foreach ( $licenses->licenses as $lisc ) { |
|
| 10 | - $lisc = (array)$lisc; |
|
| 11 | - print "\nLicense IP: " . $lisc['@attributes']['ip'] . "\n"; |
|
| 12 | - print " ID: " . $lisc['@attributes']['name'] . "\n"; |
|
| 13 | - print " groupid: " . $lisc['@attributes']['groupid'] . "\n"; |
|
| 14 | - print " packageid: " . $lisc['@attributes']['packageid'] . "\n"; |
|
| 15 | - print " adddate: " . $lisc['@attributes']['adddate'] . "\n"; |
|
| 16 | - print "expired on: " . $lisc['@attributes']['expiredon'] . "\n"; |
|
| 17 | - print " reason: " . $lisc['@attributes']['expirereason'] . "\n"; |
|
| 9 | +foreach ($licenses->licenses as $lisc) { |
|
| 10 | + $lisc = (array) $lisc; |
|
| 11 | + print "\nLicense IP: ".$lisc['@attributes']['ip']."\n"; |
|
| 12 | + print " ID: ".$lisc['@attributes']['name']."\n"; |
|
| 13 | + print " groupid: ".$lisc['@attributes']['groupid']."\n"; |
|
| 14 | + print " packageid: ".$lisc['@attributes']['packageid']."\n"; |
|
| 15 | + print " adddate: ".$lisc['@attributes']['adddate']."\n"; |
|
| 16 | + print "expired on: ".$lisc['@attributes']['expiredon']."\n"; |
|
| 17 | + print " reason: ".$lisc['@attributes']['expirereason']."\n"; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | |
@@ -7,17 +7,17 @@ |
||
| 7 | 7 | $status = $cpl->fetchLicenseRaw(array("ip" => $ip)); |
| 8 | 8 | print_r($status); |
| 9 | 9 | if (isset($status['@attributes'])) { |
| 10 | - print "The license id for the ip is: " . $status["@attributes"]["licenseid"] . "\n"; |
|
| 11 | - print "The status of the license is: "; |
|
| 12 | - if ($status["@attributes"]["valid"] > 0) { |
|
| 13 | - print "Active"; |
|
| 14 | - } else { |
|
| 15 | - print "Inactive"; |
|
| 16 | - } |
|
| 17 | - print "\n"; |
|
| 18 | - print "The company holding the license is: " . $status["@attributes"]["company"] . |
|
| 19 | - "\n"; |
|
| 10 | + print "The license id for the ip is: " . $status["@attributes"]["licenseid"] . "\n"; |
|
| 11 | + print "The status of the license is: "; |
|
| 12 | + if ($status["@attributes"]["valid"] > 0) { |
|
| 13 | + print "Active"; |
|
| 14 | + } else { |
|
| 15 | + print "Inactive"; |
|
| 16 | + } |
|
| 17 | + print "\n"; |
|
| 18 | + print "The company holding the license is: " . $status["@attributes"]["company"] . |
|
| 19 | + "\n"; |
|
| 20 | 20 | } else { |
| 21 | - print "The status of the license is: Not Licensed\n"; |
|
| 21 | + print "The status of the license is: Not Licensed\n"; |
|
| 22 | 22 | } |
| 23 | 23 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | $status = $cpl->fetchLicenseRaw(array("ip" => $ip)); |
| 8 | 8 | print_r($status); |
| 9 | 9 | if (isset($status['@attributes'])) { |
| 10 | - print "The license id for the ip is: " . $status["@attributes"]["licenseid"] . "\n"; |
|
| 10 | + print "The license id for the ip is: ".$status["@attributes"]["licenseid"]."\n"; |
|
| 11 | 11 | print "The status of the license is: "; |
| 12 | 12 | if ($status["@attributes"]["valid"] > 0) { |
| 13 | 13 | print "Active"; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | print "Inactive"; |
| 16 | 16 | } |
| 17 | 17 | print "\n"; |
| 18 | - print "The company holding the license is: " . $status["@attributes"]["company"] . |
|
| 18 | + print "The company holding the license is: ".$status["@attributes"]["company"]. |
|
| 19 | 19 | "\n"; |
| 20 | 20 | } else { |
| 21 | 21 | print "The status of the license is: Not Licensed\n"; |