|
@@ -89,7 +89,7 @@ if(isset($r['error_msg'])) {
|
|
|
if($action == 'gaa')
|
|
if($action == 'gaa')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getAllAccounts();
|
|
$r = $cwp7->getAllAccounts();
|
|
|
- if(isset($r['error_msg'])) {
|
|
|
|
|
|
|
+ if($r['status'] == 'Error') {
|
|
|
echo 'Error : could not fetch list of accounts on '. $cwp7URL . ' :-(' . PHP_EOL;
|
|
echo 'Error : could not fetch list of accounts on '. $cwp7URL . ' :-(' . PHP_EOL;
|
|
|
} else {
|
|
} else {
|
|
|
echo 'OK : got a list of '. count($r['msj']) . ' accounts on ' . $cwp7URL . ' :-)' . PHP_EOL;
|
|
echo 'OK : got a list of '. count($r['msj']) . ' accounts on ' . $cwp7URL . ' :-)' . PHP_EOL;
|
|
@@ -101,7 +101,7 @@ if($action == 'gaa')
|
|
|
if($action == 'gai')
|
|
if($action == 'gai')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getAccount($args['account_name']);
|
|
$r = $cwp7->getAccount($args['account_name']);
|
|
|
- if(isset($r['error_msg'])) {
|
|
|
|
|
|
|
+ if($r['status'] == 'Error') {
|
|
|
echo 'Error : could not fetch information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
echo 'Error : could not fetch information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
|
} else {
|
|
} else {
|
|
|
echo 'OK : got the infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
echo 'OK : got the infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
@@ -113,7 +113,7 @@ if($action == 'gai')
|
|
|
if($action == 'gap')
|
|
if($action == 'gap')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getPackages();
|
|
$r = $cwp7->getPackages();
|
|
|
- if(isset($r['error_msg'])) {
|
|
|
|
|
|
|
+ if($r['status'] == 'Error') {
|
|
|
echo 'Error : could not fetch information of packages :-(' . PHP_EOL;
|
|
echo 'Error : could not fetch information of packages :-(' . PHP_EOL;
|
|
|
} else {
|
|
} else {
|
|
|
echo 'OK : got the infos of ' . count($r['msj']) . 'packages :-)' . PHP_EOL;
|
|
echo 'OK : got the infos of ' . count($r['msj']) . 'packages :-)' . PHP_EOL;
|
|
@@ -125,7 +125,7 @@ if($action == 'gap')
|
|
|
if($action == 'gqu')
|
|
if($action == 'gqu')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getQuota($args['account_name']);
|
|
$r = $cwp7->getQuota($args['account_name']);
|
|
|
- if(isset($r['error_msg'])) {
|
|
|
|
|
|
|
+ if($r['status'] == 'Error') {
|
|
|
echo 'Error : could not fetch quota information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
echo 'Error : could not fetch quota information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
|
} else {
|
|
} else {
|
|
|
echo 'OK : got the quota infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
echo 'OK : got the quota infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
@@ -137,7 +137,7 @@ if($action == 'gqu')
|
|
|
if($action == 'gas')
|
|
if($action == 'gas')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getAutoSSL($args['account_name']);
|
|
$r = $cwp7->getAutoSSL($args['account_name']);
|
|
|
- if(isset($r['error_msg'])) {
|
|
|
|
|
|
|
+ if($r['status'] == 'Error') {
|
|
|
echo 'Error : could not fetch AutoSSL information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
echo 'Error : could not fetch AutoSSL information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
|
} else {
|
|
} else {
|
|
|
echo 'OK : got the AutoSSL infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
echo 'OK : got the AutoSSL infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|