Пример #1
0
    Session::put("groupscategory", (int) Input::get('groupscategory'));
}
if (Input::get('addCategory')) {
    if ($res = $fbaccount->addGroupCategory(Input::get('newCategoryName'))) {
        Session::Flash("home", "danger", $res, true);
    } else {
        Session::Flash("home", "success", lang('CATEGORY_ADDED_SUCCESSFULLY'), true);
    }
}
// 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');
}