Пример #1
0
         echo $userSettings->settings->licenseType . '-' . $_SESSION['user_name'];
     }
     break;
 case "refreshAccount":
     // if (isset ( $_POST ['i'] )) {
     // $i_val = intval ( $_POST ['i'] );
     // $accounts = new SimpleXMLElement ( $api->getAccountsData ( 'accounts' ) );
     // $acc_id = $accounts->analyticsAccounts->account [$i_val]->accountId;
     // $resp = $api->refreshAnalyticsAccount( $acc_id );
     $resp = $api->refreshAnalyticsAccount($_POST['accountID']);
     echo (string) $resp->returnCode;
     // }
     break;
 case "newBlogUser":
     if (isset($_POST['name']) && isset($_POST['email'])) {
         $resp = $api->newBlogUser($_POST['name'], $_POST['email']);
         echo json_encode($resp);
     } else {
         echo "Incorrect Data!";
     }
     break;
 case "setAccountExpired":
     $i_val = intval($_POST["i"]);
     $accounts = new SimpleXMLElement($api->getAccountsData('accounts'));
     $acc_id = $accounts->analyticsAccounts->account[$i_val]->accountId;
     $resp = $api->setAccountExpired($acc_id);
     echo json_encode($resp);
     break;
 case "getFavoriteStreams":
     $resp = $api->getFavoriteStreams();
     echo json_encode($resp);