Exemple #1
0
    } 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) {
        $post = json_decode($getPost->content);
        $_POST['postTitle'] = escape($getPost->post_title);
        $_POST['postId'] = $getPost->id;
        $_POST['message'] = escape($post->message);
        $_POST['postType'] = "message";
        // Set Post type
        if (Posts::PostType($getPost->content) == "link") {
            $_POST['postType'] = "link";