<?php require "core/init.php"; $template = new template(); $fb = new Facebook(); $user = new User(); $fbaccount = new fbaccount(); if (!$fbaccount->UserDefaultFbAccount()) { Session::Flash("home", "warning", lang('NO_FB_ACCOUNT_AVAILABLE'), true); } $fbaccountDetails = $fbaccount->get($fbaccount->UserDefaultFbAccount()); if (Input::get('groupscategory')) { 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);
" value=""/> <input type="button" name="addFbApp" value="<?php echo lang('ADD'); ?> " id="addFbApp" class="btn btn-primary" /> <br /> <br /> <?php } ?> <?php if ($fbaccount->UserDefaultFbAccount()) { $currentFbAccount = $fbaccount->get($fbaccount->UserDefaultFbAccount()); if ($currentFbAccount) { ?> <div class='alert alert-warning' role='alert'> <span class='glyphicon glyphicon-exclamation-sign' aria-hidden='true'></span> Please make sure to logged in to Facebook as <strong><?php echo $currentFbAccount->GetFirstname() . " " . $currentFbAccount->GetLastname(); ?> </strong> before authenticate the app. </div> <?php } } ?>