public function __construct()
 {
     parent::__construct();
     $this->addPageData('header/assets/css', array('/admin-new/css/reset.css', '/admin-new/css/framework.css', '/admin-new/css/ui.visualized.css', '/admin-new/css/jquery.cluetip.css', '/admin-new/css/ui-coffee/ui.css'));
     $this->addPageData('header/assets/js', array('/admin-new/js/jquery.js', '/admin-new/js/jquery.ui.js', '/admin-new/js/jquery.browser.js', '/admin-new/js/jquery.validator.js', '/admin-new/js/jquery.tablesorter.js', '/admin-new/js/jquery.tablesorter.pager.js', '/admin-new/js/jquery.dataTables.js', '/admin-new/js/jquery.daterangepicker.js', '/admin-new/js/jquery.form.js', '/admin-new/js/jquery.maskedinput.js', '/admin-new/js/jquery.corners.js', '/admin-new/js/jquery.hoverintent.js', '/admin-new/js/jquery.visualize.js', '/admin-new/js/jquery.autoupload.js', '/admin-new/js/jquery.qtip.js', '/admin-new/js/general.js', '/admin-new/js/messagestack.js'));
     $this->member = Config::get('Member');
 }
예제 #2
0
 public function __construct()
 {
     if (!$this->displayName) {
         $this->displayName = 'Login Form';
     }
     parent::__construct();
 }
  public function __construct()
  {
    parent::__construct();

    global $container;
    $this->activityRepository = new Jacobemerick\Web\Domain\Stream\Activity\MysqlActivityRepository($container['db_connection_locator']);
  }
예제 #4
0
 public function __construct()
 {
     Auth::requireAdmin();
     if (!$this->displayName) {
         $this->displayName = 'Manage Images';
     }
     parent::__construct();
 }
 /**
  * Constructor of this class.
  * It initializes some class variables used to display the right product types.
  */
 public function __construct($titleKey, $class, $type, $limit = 0)
 {
     $this->class = $class === ProductType::CLASS_UNKNOWN ? null : $class;
     $this->type = $type === ProductType::TYPE_UNKNOWN ? null : $type;
     $this->limit = $limit;
     $this->id = null;
     $view = new ProductView($titleKey, Template::PRODUCT_SECTION, new ProductModel());
     parent::__construct($view);
 }
예제 #6
0
 /**
  * __construct
  *
  * PageController constructor
  *
  * @param string $template
  */
 public function __construct($template = null, $post_type = null)
 {
     $this->post_type = $post_type ? $post_type : get_post_type();
     if (!$template) {
         // try to guess the view for custom post types
         $template = sprintf("single%s.twig", $this->post_type === 'post' ? '' : "-{$this->post_type}");
     }
     parent::__construct(array($template, 'single.twig'));
 }
 /**
  * Construct cron controller
  *
  * @param Request $request
  * @return null
  */
 function __construct($request)
 {
     parent::__construct($request);
     if (defined('PROTECT_SCHEDULED_TASKS') && PROTECT_SCHEDULED_TASKS) {
         $code = $this->request->get('code');
         if (empty($code) || strtoupper($code) != strtoupper(substr(LICENSE_KEY, 0, 5))) {
             $this->httpError(HTTP_ERR_FORBIDDEN);
         }
         // if
     }
     // if
 }
예제 #8
0
 public function __construct()
 {
     Auth::requireAdmin();
     if (!$this->noun) {
         $this->noun = preg_replace('/^.+\\\\/', '', $this->entity);
     }
     if (!$this->nounPlural) {
         $this->nounPlural = $this->noun . 's';
     }
     if (!$this->displayName) {
         $this->displayName = 'Manage ' . $this->nounPlural;
     }
     parent::__construct();
 }
예제 #9
0
 /**
  * Constructor
  * Set up configuration containers
  * Start session handling
  * Setup error processing and email
  * @SuppressWarnings(PHPMD.ExitExpression)
  */
 public function __construct()
 {
     parent::__construct();
     $this->_previewMode = false;
     if ($this->_config->getMode() == 'MAINTENANCE') {
         $request = new \Lvc_Request();
         $request->setControllerName('maintenance');
         $request->setActionName('index');
         // Get a new front controller without any routers, and have it process our handmade request.
         $frontController = new \Lvc_FrontController();
         $frontController->processRequest($request);
         exit;
     }
     $this->setupSession();
     $this->setupDoctrine();
 }
 /**
  * Construct the controller
  *
  * @param void
  * @return FeedController
  */
 function __construct()
 {
     parent::__construct();
     $this->setLayout('xml');
     // default layout for this controller
 }
 public function __construct()
 {
     $view = new ShippingView(Template::SHIPPING, new ShippingModel());
     parent::__construct($view);
 }
예제 #12
0
 public function __construct()
 {
     parent::__construct();
     $this->jsFiles['results.js'] = array('results.js');
     $this->cssFiles['results.css'] = array('results.css');
 }
 public function __construct()
 {
     $view = new RegisterView(Template::REGISTER, null);
     parent::__construct($view);
 }
예제 #14
0
 /**
  * Construct the ErrorController
  *
  * @access public
  * @param void
  * @return ErrorController
  */
 function __construct()
 {
     parent::__construct();
     $this->addHelper('form', 'breadcrumbs', 'pageactions', 'tabbednavigation', 'company_website', 'project_website');
 }
 public function __construct()
 {
     $view = new OrderView(Template::ORDER, null);
     parent::__construct($view);
 }
 public function __construct()
 {
     $view = new DeleteView(Template::ADMIN_DELETE, null);
     parent::__construct($view);
 }
예제 #17
0
 /**
  * Create content for a popup window.
  * The page title is not used by all browsers.
  */
 public function __construct()
 {
     parent::__construct();
     $this->setPageTitle(WT_WEBTREES);
 }
 /**
  * Constructor
  *
  * @param Request $request
  * @return ApplicationController
  */
 function __construct($request)
 {
     parent::__construct($request);
     // Set detault layout for application pages
     $this->setLayout(array('module' => SYSTEM_MODULE, 'layout' => 'wireframe'));
     // Get Smarty instance... We need it
     $this->smarty =& Smarty::instance();
     // Load and init owner company
     $this->owner_company = get_owner_company();
     if (instance_of($this->owner_company, 'Company')) {
         cache_set('owner_company', $this->owner_company);
     } else {
         $this->httpError(HTTP_ERR_NOT_FOUND, 'Owner company is not defined');
     }
     // if
     $this->application =& application();
     $this->authentication =& Authentication::instance();
     $this->logged_user =& $this->authentication->provider->getUser();
     $this->wireframe =& Wireframe::instance();
     $this->wireframe->page_company = $this->owner_company;
     $this->theme_name = instance_of($this->logged_user, 'User') ? UserConfigOptions::getValue('theme', $this->logged_user) : ConfigOptions::getValue('theme');
     $this->smarty->assign(array('root_url' => ROOT_URL, 'assets_url' => ASSETS_URL));
     // Maintenance mode
     if (ConfigOptions::getValue('maintenance_enabled')) {
         if (instance_of($this->logged_user, 'User') && $this->logged_user->isAdministrator()) {
             $this->wireframe->addPageMessage(lang('System is in maintenance mode and can be used by administrators only. <a href=":url">Click here</a> to turn off maintenance mode', array('url' => assemble_url('admin_settings_maintenance'))), 'warning');
         } else {
             $additional_error_info = ConfigOptions::getValue('maintenance_message');
             if ($additional_error_info) {
                 $additional_error_info .= "\n\n";
             }
             // if
             $additional_error_info .= lang('When system is in maintenance mode, administrators can log in and access the system') . ": " . assemble_url('login');
             $this->smarty->assign('additional_error_info', $additional_error_info);
             if ($this->restrict_access_in_maintenance_mode) {
                 $this->httpError(503);
             }
             // if
         }
         // if
     }
     // if
     // Check permissions
     if ($this->login_required && !instance_of($this->logged_user, 'User')) {
         // If async don't redirect to loging, just server proper HTTP code
         if ($this->request->isAsyncCall()) {
             $this->httpError(HTTP_ERR_UNAUTHORIZED, null, true, true);
             // Not async? Redirect to login with extracted route data...
         } else {
             $params = array();
             if ($request->matched_route != 'login') {
                 $params['re_route'] = $request->matched_route;
                 foreach ($this->request->url_params as $k => $v) {
                     if ($k == 'module' || $k == 'controller' || $k == 'action') {
                         continue;
                     }
                     // if
                     $params["re_{$k}"] = $v;
                 }
                 // foreach
             }
             // if
             $this->redirectTo($this->login_route, $params);
         }
         // if
     }
     // if
     if (instance_of($this->logged_user, 'User') && !$this->logged_user->getSystemPermission('system_access')) {
         $this->authentication->provider->logUserOut();
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     $loaded_modules = $this->application->getModules();
     $assets_query_string = 'v=' . $this->application->version . '&modules=';
     foreach ($loaded_modules as $loaded_module) {
         $assets_query_string .= $loaded_module->getName() . ',';
     }
     // foreach
     $this->smarty->assign(array('api_status' => API_STATUS, 'application' => $this->application, 'owner_company' => $this->owner_company, 'authentication' => $this->authentication, 'logged_user' => $this->logged_user, 'request' => $this->request, 'theme_name' => $this->theme_name, 'request_time' => $this->request_time, 'loaded_modules' => $this->application->getModules(), 'captcha_url' => ROOT_URL . '/captcha.php?id=' . md5(time()), 'assets_query_string' => $assets_query_string, 'js_disabled_url' => assemble_url('js_disabled')));
     $this->smarty->assign_by_ref('wireframe', $this->wireframe);
     js_assign(array('homepage_url' => ROOT_URL, 'assets_url' => ASSETS_URL, 'indicator_url' => get_image_url('indicator.gif'), 'big_indicator_url' => get_image_url('indicator_big.gif'), 'ok_indicator_url' => get_image_url('ok_indicator.gif'), 'warning_indicator_url' => get_image_url('warning_indicator.gif'), 'error_indicator_url' => get_image_url('error_indicator.gif'), 'pending_indicator_url' => get_image_url('pending_indicator.gif'), 'url_base' => URL_BASE, 'keep_alive_interval' => KEEP_ALIVE_INTERVAL, 'refresh_session_url' => assemble_url('refresh_session'), 'jump_to_project_url' => assemble_url('jump_to_project_widget'), 'quick_add_url' => assemble_url('quick_add'), 'path_info_through_query_string' => PATH_INFO_THROUGH_QUERY_STRING, 'image_picker_url' => assemble_url('image_picker'), 'copyright_removed' => LICENSE_COPYRIGHT_REMOVED, 'custom_tabs_manager' => assemble_url('custom_tabs_manager'), 'add_milestone_url' => assemble_url('project_milestones_add', array('project_id' => '--PROJECT_ID--')), 'add_checklist_url' => assemble_url('project_checklists_add', array('project_id' => '--PROJECT_ID--')), 'add_discussion_url' => assemble_url('project_discussions_add', array('project_id' => '--PROJECT_ID--')), 'add_file_url' => assemble_url('project_files_upload', array('project_id' => '--PROJECT_ID--')), 'add_page_url' => assemble_url('project_pages_add', array('project_id' => '--PROJECT_ID--')), 'add_ticket_url' => assemble_url('project_tickets_add', array('project_id' => '--PROJECT_ID--')), 'add_timerecord_url' => assemble_url('project_time_add', array('project_id' => '--PROJECT_ID--')), 'attachment_rename_url' => assemble_url('attachment_rename', array('project_id' => '--PROJECT_ID--', 'attachment_id' => '--ATTACHMENT_ID--')), 'attachment_copy_to_url' => assemble_url('attachment_copy_to', array('project_id' => '--PROJECT_ID--', 'attachment_id' => '--ATTACHMENT_ID--')), 'attachment_move_to_url' => assemble_url('attachment_move_to', array('project_id' => '--PROJECT_ID--', 'attachment_id' => '--ATTACHMENT_ID--')), 'image_uploader_url' => assemble_url('image_uploader'), 'render_comments_url' => assemble_url('render_comments'), 'move_task_url' => assemble_url('project_task_move', array('project_id' => '--PROJECT_ID--', 'task_id' => '--TASK_ID--')), 'get_collection_url' => assemble_url('collection'), 'quick_task_reminder_url' => assemble_url('project_task_quickreminder', array('project_id' => '--PROJECT_ID--', 'task_id' => '--TASK_ID--')), 'convert_to_ticket_url' => assemble_url('project_object_convert_to_ticket', array('project_id' => '--PROJECT_ID--', 'object_id' => '--OBJECT_ID--')), 'convert_to_milestone_url' => assemble_url('project_object_convert_to_milestone', array('project_id' => '--PROJECT_ID--', 'object_id' => '--OBJECT_ID--')), 'convert_to_page_url' => assemble_url('project_object_convert_to_page', array('project_id' => '--PROJECT_ID--', 'object_id' => '--OBJECT_ID--')), 'snooze_task_url' => assemble_url('project_task_snooze', array('project_id' => '--PROJECT_ID--', 'task_id' => '--TASK_ID--'))));
     if ($this->logged_user) {
         $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);
         mysql_select_db(DB_NAME);
         if (!empty($_SESSION['pg_ttl'])) {
             mysql_query("update healingcrystals_user_visited_pages set title='" . mysql_real_escape_string($_SESSION['pg_ttl']) . "' where user_id='" . $this->logged_user->getId() . "' and access_time='" . date('Y-m-d H:i:s', $_SESSION['temp_time']) . "'");
         }
         $current_url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
         $pos = strpos($_SERVER['QUERY_STRING'], '%2F');
         if ($pos !== false) {
             $max_pages_count_per_user = 50;
             //require_once SMARTY_PATH . '/plugins/function.page_title.php';
             //$current_page_title = smarty_function_page_title(array('default' => 'Projects'));
             //$current_page_title = PageConstruction::getPageTitle();
             $_SESSION['temp_time'] = time();
             mysql_query("insert into healingcrystals_user_visited_pages (user_id, page_url, title, access_time) values ('" . $this->logged_user->getId() . "', '" . $current_url . "', '', '" . date('Y-m-d H:i:s', $_SESSION['temp_time']) . "')");
             //mysql_query("insert into healingcrystals_user_visited_pages (user_id, page_url, title, access_time) values ('" . $this->logged_user->getId() . "', '" . $current_url . "', '', now())");
             $query = "select count(*) as count from healingcrystals_user_visited_pages where user_id='" . $this->logged_user->getId() . "'";
             $result = mysql_query($query);
             $info = mysql_fetch_assoc($result);
             $current_count = $info['count'];
             if ($current_count > $max_pages_count_per_user) {
                 $querries = array();
                 $query = "select * from healingcrystals_user_visited_pages where user_id='" . $this->logged_user->getId() . "' order by access_time limit 0, " . ($current_count - $max_pages_count_per_user);
                 $result = mysql_query($query);
                 while ($info = mysql_fetch_assoc($result)) {
                     $querries[] = "delete from healingcrystals_user_visited_pages where user_id='" . $this->logged_user->getId() . "' and page_url='" . $info['page_url'] . "' and access_time='" . $info['access_time'] . "'";
                 }
             }
             foreach ($querries as $query) {
                 mysql_query($query);
             }
         }
         $_SESSION['pg_ttl'] = '';
         mysql_close($link);
     }
 }
 /**
  * Add application level constroller
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     parent::__construct();
     $this->addHelper('application');
 }
 public function __construct()
 {
     parent::__construct();
     $this->add_css('reset');
     $this->add_css('portfolio', 4);
 }
 public function __construct()
 {
     $view = new EditView(Template::ADMIN_EDIT, null);
     parent::__construct($view);
 }
 public function __construct()
 {
     $view = new CartView(Template::CART, new CartModel());
     parent::__construct($view);
 }
 public function __construct()
 {
     header('HTTP/1.0 404 Not Found');
     parent::__construct();
 }
 public function __construct()
 {
     $view = new MyDataView(Template::MY_DATA, null);
     parent::__construct($view);
 }
 /**
  * Add application level constroller
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     trace(__FILE__, '__construct()');
     parent::__construct();
     $this->addHelper('application');
 }
 public function __construct()
 {
     $view = new LoginView(Template::LOGIN, new LoginModel());
     parent::__construct($view);
 }
예제 #27
0
 public function __construct($status)
 {
     parent::__construct();
     $this->cssFiles['index.css'] = array('index.css');
     $this->status = $status;
 }
 public function __construct()
 {
     $view = new CreateView(Template::ADMIN_CREATE, null);
     parent::__construct($view);
 }
예제 #29
0
 public function __construct()
 {
     parent::__construct();
     $this->jsFiles['index.js'] = array('index.js');
     $this->cssFiles['index.css'] = array('index.css');
 }
 public function __construct()
 {
     $view = new TermsView(Template::TERMS, null);
     parent::__construct($view);
 }