Пример #1
0
     if (isset($_POST['accountID']) && isset($_POST['profileID']) && isset($_POST['comment_id'])) {
         echo $api->deleteSocialStreamComment($_POST['accountID'], $_POST['profileID'], $_POST['comment_id'], "googleplus");
     } else {
         echo "Incorrect data";
     }
     break;
 case 'updateGPComment':
     if (isset($_POST['accountID']) && isset($_POST['profileID']) && isset($_POST['comment_id']) && isset($_POST['content'])) {
         echo $api->updateSocialStreamComment($_POST['accountID'], $_POST['profileID'], $_POST['comment_id'], $_POST['content'], "googleplus");
     } else {
         echo "Incorrect data";
     }
     break;
 case 'updateGPPost':
     if (isset($_POST['accountID']) && isset($_POST['profileID']) && isset($_POST['id']) && isset($_POST['content'])) {
         echo $api->updateSocialStreamPost($_POST['accountID'], $_POST['profileID'], $_POST['id'], $_POST['content'], "googleplus", $_POST['link']);
     } else {
         echo "Incorrect data";
     }
     break;
 case 'addGooglePlusComment':
     if (isset($_POST["post_id"]) && isset($_POST['accountID']) && isset($_POST["profileID"])) {
         echo $re = $api->publishSocialStreamObject("addGooglePlusComment", $_POST['post_id'], $_POST["comment"], "comment");
     }
     break;
 case 'saveNotification':
     $notifications = MultiCache::cache_get('notifications');
     $notifications = is_array($notifications) ? $notifications : array();
     $id = time();
     $notifications[$id] = array('id' => $id, 'content' => $_POST['comments'], 'status' => $_POST['status']);
     MultiCache::cache_set('notifications', $notifications, 60 * 60 * 24 * 7);