Exemplo n.º 1
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     $this->avatarService = BOL_AvatarService::getInstance();
     $this->ajaxResponder = OW::getRouter()->urlFor('BASE_CTRL_Avatar', 'ajaxResponder');
     $avatarUploadForm = new avatarUploadForm();
     $this->addForm($avatarUploadForm);
     $language = OW::getLanguage();
     if (OW::getRequest()->isPost() && !OW::getRequest()->isAjax()) {
         $res = $avatarUploadForm->process();
         if ($res['result']) {
             $this->redirect();
         } else {
             if (isset($res['error']) && $res['error'] == -1) {
                 OW::getFeedback()->warning($language->text('base', 'not_valid_image'));
             } else {
                 OW::getFeedback()->warning($language->text('base', 'avatar_select_image'));
             }
         }
     }
     if (!OW::getRequest()->isAjax()) {
         OW::getDocument()->setHeading($language->text('base', 'avatar_change_avatar'));
         OW::getDocument()->setHeadingIconClass('ow_ic_picture');
     }
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->questionService = BOL_QuestionService::getInstance();
     $this->emailVerifyService = BOL_EmailVerifyService::getInstance();
     $this->userService = BOL_UserService::getInstance();
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     if (!OW::getUser()->isAdmin()) {
         throw new AuthenticateException();
     }
     if (!OW::getRequest()->isAjax()) {
         $document = OW::getDocument();
         $document->setMasterPage(new ADMIN_CLASS_MasterPage());
         $this->setPageTitle(OW::getLanguage()->text('admin', 'page_default_title'));
     }
     BOL_PluginService::getInstance()->checkManualUpdates();
     $plugin = BOL_PluginService::getInstance()->findNextManualUpdatePlugin();
     $handlerParams = OW::getRequestHandler()->getHandlerAttributes();
     // TODO refactor shortcut below
     if (!defined('OW_PLUGIN_XP') && $plugin !== null) {
         if ($handlerParams['controller'] === 'ADMIN_CTRL_Plugins' && $handlerParams['action'] === 'manualUpdateRequest') {
             //action
         } else {
             throw new RedirectException(OW::getRouter()->urlFor('ADMIN_CTRL_Plugins', 'manualUpdateRequest', array('key' => $plugin->getKey())));
         }
     }
     // TODO temp admin pge inform event
     function admin_check_if_admin_page()
     {
         return true;
     }
     OW::getEventManager()->bind('admin.check_if_admin_page', 'admin_check_if_admin_page');
 }
Exemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     $this->setPageTitle(OW::getLanguage()->text('watchdog', 'spam_attempt_header'));
     $this->setPageHeading(OW::getLanguage()->text('watchdog', 'spam_attempt_header'));
     $this->setPageHeadingIconClass('ow_ic_warning');
 }
Exemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
     if (!OW::getRequest()->isPost() || !OW::getRequest()->isAjax()) {
         throw new Redirect403Exception();
     }
 }
Exemplo n.º 6
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->photoService = PHOTO_BOL_PhotoService::getInstance();
     $this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance();
     $this->ajaxResponder = OW::getRouter()->urlFor('GPHOTOVIEWER_CTRL_Index', 'ajaxResponder');
 }
Exemplo n.º 7
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->forumService = FORUM_BOL_ForumService::getInstance();
     if (!OW::getRequest()->isAjax()) {
         OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'forum', 'forum');
     }
 }
Exemplo n.º 8
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->plugin = OW::getPluginManager()->getPlugin('video');
     $this->pluginJsUrl = $this->plugin->getStaticJsUrl();
     $this->ajaxResponder = OW::getRouter()->urlFor('VIDEO_CTRL_Video', 'ajaxResponder');
     $this->clipService = VIDEO_BOL_ClipService::getInstance();
 }
Exemplo n.º 9
0
 public function __construct()
 {
     parent::__construct();
     $this->photoService = PHOTO_BOL_PhotoService::getInstance();
     $this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance();
     OW::getDocument()->setHeadingIconClass('ow_ic_picture');
     OW::getDocument()->setHeading(OW::getLanguage()->text('photo', 'page_title_browse_photos'));
 }
Exemplo n.º 10
0
 public function __construct()
 {
     parent::__construct();
     OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'users_main_menu_item');
     $this->setPageHeading(OW::getLanguage()->text('base', 'user_search_page_heading'));
     $this->setPageTitle(OW::getLanguage()->text('base', 'user_search_page_heading'));
     $this->setPageHeadingIconClass('ow_ic_user');
 }
Exemplo n.º 11
0
 public function __construct()
 {
     if ($_POST['secureKey'] != 'ap+aP8584;~3M-:+u') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
Exemplo n.º 12
0
 public function __construct()
 {
     if ($_POST['uniqueID'] != '12345678') {
         echo "no id";
         exit;
     }
     parent::__construct();
 }
Exemplo n.º 13
0
 public function __construct()
 {
     $securekey = trim($_POST['secureKey']);
     if ($securekey != '1234') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
Exemplo n.º 14
0
 public function __construct()
 {
     parent::__construct();
     $this->preferenceService = BOL_PreferenceService::getInstance();
     $this->userService = BOL_UserService::getInstance();
     $contentMenu = new BASE_CMP_PreferenceContentMenu();
     $contentMenu->getElement('preference')->setActive(true);
     $this->addComponent('contentMenu', $contentMenu);
 }
Exemplo n.º 15
0
 public function __construct()
 {
     parent::__construct();
     OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'users_main_menu_item');
     $this->setPageHeading(OW::getLanguage()->text('base', 'users_browse_page_heading'));
     $this->setPageTitle(OW::getLanguage()->text('base', 'users_browse_page_heading'));
     $this->setPageHeadingIconClass('ow_ic_user');
     $this->usersPerPage = (int) OW::getConfig()->getValue('base', 'users_count_on_page');
 }
Exemplo n.º 16
0
 public function __construct()
 {
     parent::__construct();
     $this->eventService = EVENTX_BOL_EventService::getInstance();
     $this->ajaxResponder = OW::getRouter()->urlFor('EVENTX_CTRL_Base', 'ajaxResponder');
     $this->assign('add_new_url', OW::getRouter()->urlForRoute('eventx.add'));
     $this->assign('calendar_url', OW::getRouter()->urlForRoute('eventx_view_calendar'));
     $this->assign('enableTagsList', OW::getConfig()->getValue('eventx', 'enableTagsList') == '1' ? 1 : 0);
     $this->assign('enableCategoryList', OW::getConfig()->getValue('eventx', 'enableCategoryList') == '1' ? 1 : 0);
     OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'eventx', 'main_menu_item');
 }
Exemplo n.º 17
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->plugin = OW::getPluginManager()->getPlugin('vwls');
     $this->pluginJsUrl = $this->plugin->getStaticJsUrl();
     $this->ajaxResponder = OW::getRouter()->urlFor('VWLS_CTRL_Vwls', 'ajaxResponder');
     $this->clipService = VWLS_BOL_ClipService::getInstance();
     $this->menu = $this->getMenu();
     if (!OW::getRequest()->isAjax()) {
         OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'vwls', 'vwls');
     }
 }
Exemplo n.º 18
0
 public function __construct()
 {
     parent::__construct();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     $sortCtrl = new BASE_CMP_SortControl();
     $sortCtrl->addItem(BOOKMARKS_BOL_Service::LIST_LATEST, OW::getLanguage()->text('bookmarks', 'latest'), OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_LATEST)));
     $sortCtrl->addItem(BOOKMARKS_BOL_Service::LIST_ONLINE, OW::getLanguage()->text('bookmarks', 'online'), OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_ONLINE)));
     $this->addComponent('sort', $sortCtrl);
     $this->service = BOOKMARKS_BOL_Service::getInstance();
 }
Exemplo n.º 19
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->plugin = OW::getPluginManager()->getPlugin('photo');
     $this->pluginJsUrl = $this->plugin->getStaticJsUrl();
     $this->ajaxResponder = OW::getRouter()->urlFor('PHOTO_CTRL_Photo', 'ajaxResponder');
     $this->photoService = PHOTO_BOL_PhotoService::getInstance();
     $this->photoAlbumService = PHOTO_BOL_PhotoAlbumService::getInstance();
     $this->menu = $this->getMenu();
     if (!OW::getRequest()->isAjax()) {
         OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'photo', 'photo');
     }
 }
Exemplo n.º 20
0
 public function __construct()
 {
     parent::__construct();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     $this->setPageHeading(OW::getLanguage()->text('ynsocialconnect', 'h_account_linking'));
     $this->setPageHeadingIconClass('ow_ic_gear_wheel');
     //	Preference menu
     $contentMenu = new BASE_CMP_PreferenceContentMenu();
     $contentMenu->getElement('ynsc_user_linking')->setActive(true);
     $this->addComponent('contentMenu', $contentMenu);
 }
Exemplo n.º 21
0
 public function __construct()
 {
     parent::__construct();
     //Mehul change
     $is_user_id = $_SESSION['userId'];
     if (!empty($is_user_id)) {
         $this->user = BOL_UserService::getInstance()->findUserById($is_user_id);
         $user_sex = $this->user->getAccountType();
         //echo $user_sex; die;
         $this->assign('user_sex', $user_sex);
     }
     //Mehul change
     $this->questionService = BOL_QuestionService::getInstance();
     $this->userService = BOL_UserService::getInstance();
 }
Exemplo n.º 22
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     if (OW::getApplication()->getContext() != OW_Application::CONTEXT_DESKTOP) {
         throw new InterceptException(array(OW_RequestHandler::ATTRS_KEY_CTRL => 'BASE_MCTRL_BaseDocument', OW_RequestHandler::ATTRS_KEY_ACTION => 'notAvailable'));
     }
     if (!OW::getUser()->isAdmin()) {
         throw new AuthenticateException();
     }
     if (!OW::getRequest()->isAjax()) {
         $document = OW::getDocument();
         $document->setMasterPage(new ADMIN_CLASS_MasterPage());
         $this->setPageTitle(OW::getLanguage()->text('admin', 'page_default_title'));
     }
 }
Exemplo n.º 23
0
 public function __construct()
 {
     \Slim\Slim::registerAutoloader();
     $app = new \Slim\Slim();
     $_POST = $this->newcall();
     //        $securekey = trim($_POST['secureKey']);
     //
     //        if ($securekey != 'ap+aP8584;~3M-:+u') {
     //
     //            echo "Error: provide unique identification!";
     //
     //            exit();
     //        }
     parent::__construct();
 }
Exemplo n.º 24
0
 public function __construct()
 {
     parent::__construct();
     $this->questionService = BOL_QuestionService::getInstance();
     $this->userService = BOL_UserService::getInstance();
     $preference = BOL_PreferenceService::getInstance()->findPreference(self::PREFERENCE_LIST_OF_CHANGES);
     if (empty($preference)) {
         $preference = new BOL_Preference();
     }
     $preference->key = self::PREFERENCE_LIST_OF_CHANGES;
     $preference->defaultValue = json_encode(array());
     $preference->sectionName = 'general';
     $preference->sortOrder = 100;
     BOL_PreferenceService::getInstance()->savePreference($preference);
 }
Exemplo n.º 25
0
 public function __construct()
 {
     parent::__construct();
     $this->questionService = BOL_QuestionService::getInstance();
     $this->setPageHeading(OW::getLanguage()->text('base', 'complete_your_profile_page_heading'));
     $this->setPageHeadingIconClass('ow_ic_user');
     $item = new BASE_MenuItem();
     $item->setLabel(OW::getLanguage()->text('base', 'complete_profile'));
     $item->setUrl(OW::getRouter()->urlForRoute("base.complete_required_questions"));
     $item->setKey('complete_profile');
     $item->setOrder(1);
     $masterpage = OW::getDocument()->getMasterPage();
     $masterpage = OW::getDocument()->getMasterPage();
     if (!empty($masterpage) && method_exists($masterpage, 'getMenu')) {
         $menu = $masterpage->getMenu('main');
         if (!empty($menu)) {
             $menu->setMenuItems(array($item));
         }
     }
 }
Exemplo n.º 26
0
 public function __construct()
 {
     parent::__construct();
     $this->ajaxResponder = OW::getRouter()->urlFor('IVIDEO_CTRL_Action', 'ajaxResponder');
     $menu = IVIDEO_BOL_Service::getInstance()->getPageMenu();
     $this->addComponent('menu', $menu);
     $this->menu = $menu;
     $el = $this->menu->getElement('uploads');
     if ($el) {
         $el->setActive(true);
     }
     if (OW::getUser()->isAuthorized('ivideo', 'view')) {
         $this->assign('isViewAuthorized', TRUE);
         $this->assign('latestList', OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'latest')));
         $this->assign('featuredList', OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'featured')));
         $this->assign('topratedList', OW::getRouter()->urlForRoute('ivideo_view_list', array('type' => 'toprated')));
         $this->assign('categoryList', OW::getRouter()->urlForRoute('ivideo_list_category'));
         $this->assign('tagList', OW::getRouter()->urlForRoute('ivideo_tag_list'));
     }
     $this->assign('videosPerRow', OW::getConfig()->getValue('ivideo', 'videosPerRow'));
     $this->assign('addItemAuthorized', OW::getUser()->isAuthenticated() && OW::getUser()->isAuthorized('ivideo', 'add'));
 }
Exemplo n.º 27
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 28
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->responderUrl = OW::getRouter()->urlFor("MAILBOX_CTRL_Mailbox", "responder");
 }
Exemplo n.º 29
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->metaService = OASEO_BOL_Service::getInstance();
 }
Exemplo n.º 30
0
 public function __construct()
 {
     parent::__construct();
     $this->navService = BOL_NavigationService::getInstance();
 }