예제 #1
0
파일: aaa.php 프로젝트: ram-1501/rs
         echo "Error: Incorrect email or password.";
     }
     break;
 case "isLoggedIn":
     if (array_key_exists('user_name', $_SESSION) && !empty($_SESSION['user_name']) && array_key_exists('user_pass', $_SESSION) && !empty($_SESSION['user_pass'])) {
         $userSettings = $api->getSettings();
         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;