|
@@ -86,9 +86,26 @@ if(isset($r['error_msg'])) {
|
|
|
// Actions //
|
|
// Actions //
|
|
|
/////////////
|
|
/////////////
|
|
|
|
|
|
|
|
-// Get All Accounts
|
|
|
|
|
if($action == 'gaa')
|
|
if($action == 'gaa')
|
|
|
{
|
|
{
|
|
|
$r = $cwp7->getAllAccounts();
|
|
$r = $cwp7->getAllAccounts();
|
|
|
- print_r($r);
|
|
|
|
|
|
|
+ if(isset($r['error_msg'])) {
|
|
|
|
|
+ echo 'Error : could not fetch list of accounts on '. $cwp7URL . ' :-(' . PHP_EOL;
|
|
|
|
|
+ print_r($r);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ echo 'OK : got a list of '. count($r['msj']) . ' accounts on ' . $cwp7URL . ' :-)' . PHP_EOL;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+// Get Account Informations
|
|
|
|
|
+if($action == 'gai')
|
|
|
|
|
+{
|
|
|
|
|
+ $r = $cwp7->getAccount($args['account_name']);
|
|
|
|
|
+ if(isset($r['error_msg'])) {
|
|
|
|
|
+ echo 'Error : could not fetch information of '. $args['account_name'] . ' :-(' . PHP_EOL;
|
|
|
|
|
+ print_r($r);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ echo 'OK : got the infos for account ' . $args['account_name'] . ' :-)' . PHP_EOL;
|
|
|
|
|
+ print_r($r);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|