Esempio 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');
     }
 }
Esempio n. 2
0
 public function __construct()
 {
     parent::__construct();
     $this->questionService = BOL_QuestionService::getInstance();
     $this->emailVerifyService = BOL_EmailVerifyService::getInstance();
     $this->userService = BOL_UserService::getInstance();
 }
Esempio 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');
 }
Esempio 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');
 }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct();
     if (!OW::getRequest()->isPost() || !OW::getRequest()->isAjax()) {
         throw new Redirect403Exception();
     }
 }
Esempio 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');
 }
Esempio 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');
     }
 }
Esempio 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();
 }
Esempio 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'));
 }
Esempio 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');
 }
Esempio n. 11
0
 public function __construct()
 {
     if ($_POST['secureKey'] != 'ap+aP8584;~3M-:+u') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
Esempio n. 12
0
 public function __construct()
 {
     if ($_POST['uniqueID'] != '12345678') {
         echo "no id";
         exit;
     }
     parent::__construct();
 }
Esempio n. 13
0
 public function __construct()
 {
     $securekey = trim($_POST['secureKey']);
     if ($securekey != '1234') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
Esempio 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);
 }
Esempio 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');
 }
Esempio 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');
 }
Esempio 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');
     }
 }
Esempio 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();
 }
Esempio 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');
     }
 }
Esempio 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);
 }
 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();
 }
Esempio 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'));
     }
 }
Esempio 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();
 }
Esempio 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);
 }
Esempio 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));
         }
     }
 }
Esempio 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'));
 }
Esempio n. 27
0
 public function __construct()
 {
     parent::__construct();
 }
Esempio n. 28
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->responderUrl = OW::getRouter()->urlFor("MAILBOX_CTRL_Mailbox", "responder");
 }
Esempio n. 29
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->metaService = OASEO_BOL_Service::getInstance();
 }
Esempio n. 30
0
 public function __construct()
 {
     parent::__construct();
     $this->navService = BOL_NavigationService::getInstance();
 }