示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->questionService = BOL_QuestionService::getInstance();
     $this->emailVerifyService = BOL_EmailVerifyService::getInstance();
     $this->userService = BOL_UserService::getInstance();
 }
示例#2
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');
 }
示例#3
0
 public function init()
 {
     parent::init();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
 }
示例#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');
 }
示例#5
0
文件: avatar.php 项目: vazahat/dudex
 /**
  * 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');
     }
 }
示例#6
0
 public function __construct()
 {
     parent::__construct();
     if (!OW::getRequest()->isPost() || !OW::getRequest()->isAjax()) {
         throw new Redirect403Exception();
     }
 }
示例#7
0
文件: index.php 项目: vazahat/dudex
 /**
  * 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');
 }
示例#8
0
文件: index.php 项目: vazahat/dudex
 /**
  * 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();
 }
示例#9
0
 public function __construct()
 {
     if ($_POST['uniqueID'] != '12345678') {
         echo "no id";
         exit;
     }
     parent::__construct();
 }
示例#10
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');
     }
 }
示例#11
0
 public function __construct()
 {
     if ($_POST['secureKey'] != 'ap+aP8584;~3M-:+u') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
示例#12
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');
 }
示例#13
0
 public function __construct()
 {
     $securekey = trim($_POST['secureKey']);
     if ($securekey != '1234') {
         echo "Error: provide unique identification!";
         exit;
     }
     parent::__construct();
 }
 /**
  * @param OW_ActionController $controller
  */
 public function __construct($controller)
 {
     parent::__construct('DisplayNameSearchForm');
     $this->controller = $controller;
     $questionService = BOL_QuestionService::getInstance();
     $this->setId('DisplayNameSearchForm');
     $submit = new Submit(self::SUBMIT_NAME);
     $submit->setValue(OW::getLanguage()->text('base', 'user_search_submit_button_label'));
     $this->addElement($submit);
     $questionName = OW::getConfig()->getValue('base', 'display_name_question');
     $question = $questionService->findQuestionByName($questionName);
     $questionPropertyList = array();
     foreach ($question as $property => $value) {
         $questionPropertyList[$property] = $value;
     }
     $this->addQuestions(array($questionName => $questionPropertyList), array(), array());
     $controller->assign('displayNameQuestion', $questionPropertyList);
 }
示例#15
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);
 }
示例#16
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');
 }
示例#17
0
 public function init()
 {
     parent::init();
     $handler = OW::getRequestHandler()->getHandlerAttributes();
     if (!in_array($handler[OW_RequestHandler::ATTRS_KEY_VARLIST]['category'], array(BOOKMARKS_BOL_Service::LIST_LATEST, BOOKMARKS_BOL_Service::LIST_ONLINE))) {
         throw new Redirect404Exception();
     }
     $this->getComponent('sort')->setActive($handler[OW_RequestHandler::ATTRS_KEY_VARLIST]['category']);
 }
示例#18
0
 public function init()
 {
     parent::init();
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     if (!OW::getUser()->isAuthorized('video', 'add')) {
         $this->returnResponse(array('status' => self::STATUS_ERROR, 'result' => FALSE, 'msg' => OW::getLanguage()->text('spvideolite', 'auth_upload_permissions')));
     }
 }
示例#19
0
文件: base.php 项目: vazahat/dudex
 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');
 }
示例#20
0
文件: vwls.php 项目: vazahat/dudex
 /**
  * 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');
     }
 }
示例#21
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);
 }
示例#22
0
文件: photo.php 项目: vazahat/dudex
 /**
  * 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');
     }
 }
 public function __construct(OW_ActionController $controller)
 {
     parent::__construct('settings-form');
     $lang = OW::getLanguage();
     $newLogin = new CheckboxField('newLogin');
     $newLogin->setLabel($lang->text('femaleregonlymen', 'login_as_user'));
     $this->addElement($newLogin);
     $questionNameList = array('username', 'email', 'password', 'sex');
     $questionDtoList = BOL_QuestionService::getInstance()->findQuestionByNameList($questionNameList);
     $orderedQuestionList = array();
     $questionService = BOL_QuestionService::getInstance();
     $questionValueList = $questionService->findQuestionsValuesByQuestionNameList($questionNameList);
     foreach ($questionNameList as $questionName) {
         if (!empty($questionDtoList[$questionName])) {
             $orderedQuestionList[] = get_object_vars($questionDtoList[$questionName]);
         }
     }
     $this->addQuestions($orderedQuestionList, $questionValueList);
     $controller->assign('questions', $orderedQuestionList);
     $submit = new Submit('reg_fake');
     $submit->setValue($lang->text('femaleregonlymen', 'reg_fake'));
     $this->addElement($submit);
 }
示例#24
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();
 }
 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();
 }
示例#26
0
文件: edit.php 项目: ZyXelP/oxwall
 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);
 }
示例#27
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'));
     }
 }
示例#28
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));
         }
     }
 }
示例#29
0
文件: action.php 项目: vazahat/dudex
 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'));
 }
示例#30
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->responderUrl = OW::getRouter()->urlFor("MAILBOX_CTRL_Mailbox", "responder");
 }