Пример #1
0
// Get default app
if (!$fbaccount->UserFbAccountDefaultApp()) {
    Session::Flash("home", "warning", lang('NO_APP_SELECTED'), true);
}
if (Input::get('removeGroup')) {
    try {
        $fbaccount->removeGroupFromCategory(Input::get('removeGroup'));
        Session::Flash("home", "success", lang('GROUP_RMOVED_SUCCESS'), true);
    } catch (Exeption $ex) {
        Session::Flash("home", "danger", $ex->getMessage(), true);
    }
    Redirect::to('index.php');
}
if (Input::get('deleteCategory')) {
    try {
        $fbaccount->deleteCategory(Input::get('deleteCategory'));
        Session::Flash("home", "success", lang('CATEGORY_DELETED_SUCCESS'), true);
    } catch (Exeption $ex) {
        Session::Flash("home", "danger", $ex->getMessage(), true);
    }
    Redirect::to('index.php');
}
// Get list of groups
$groups = $fbaccount->GetGroups();
// Get list of categories
$groupsCategories = $fbaccount->GetGroupCategories($fbaccount->UserDefaultFbAccount());
// Load post if the post id has been passed
if (Input::Get("post_id", "GET")) {
    $posts = new Posts();
    $getPost = $posts->get(Input::Get("post_id"));
    if ($getPost) {