コード例 #1
0
 /**
  * Construct the MailController
  *
  * @access public
  * @param void
  * @return MailController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     Env::useHelper('MailUtilities.class', $this->plugin_name);
     require_javascript("AddMail.js", $this->plugin_name);
 }
コード例 #2
0
 /**
  * Construct controller and check if we have logged in user
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     trace(__FILE__, '__construct() - begin');
     parent::__construct();
     trace(__FILE__, '__construct() - prepare_company_website_controller');
     prepare_company_website_controller($this, 'dashboard');
 }
コード例 #3
0
	/**
	 * Construct the FilesController
	 *
	 * @access public
	 * @param void
	 * @return FilesController
	 */
	function __construct() {
		parent::__construct();
		
		$protocol = (strpos($_SERVER['SERVER_PROTOCOL'], 'HTTPS')) ? 'https' : 'http';
		
		prepare_company_website_controller($this, 'website');
	} // __construct
コード例 #4
0
	/**
	 * Construct the AccountController
	 *
	 * @access public
	 * @param void
	 * @return AccountController
	 */
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'website');
		if (array_var($_GET, 'current') != 'administration') {
			ajx_set_panel("account");
		}
	} // __construct
コード例 #5
0
 function __construct()
 {
     trace(__FILE__, '__construct()');
     parent::__construct();
     trace(__FILE__, '__construct() - prepare_company_website_controller');
     prepare_company_website_controller($this, 'project_website');
     trace(__FILE__, '__construct() - add textile');
     $this->addHelper('textile');
 }
コード例 #6
0
 /**
  * Construct the TimeController
  *
  * @access public
  * @param void
  * @return TimeController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     if (!can_manage_time(logged_user(), true)) {
         flash_error(lang('no access permissions'));
         ajx_current("empty");
     }
 }
コード例 #7
0
	/**
	 * Construct the ApplicationController
	 *
	 * @param void
	 * @return ApplicationController
	 */
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'website');

		// Access permissios
		if(!can_manage_configuration(logged_user())) {
			flash_error(lang('no access permissions'));
			ajx_current("empty");
		} // if
	} // __construct
コード例 #8
0
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'website');
		ajx_set_panel("administration");

		// Access permissios
		if(!logged_user()->isCompanyAdmin(owner_company())) {
			flash_error(lang('no access permissions'));
			ajx_current("empty");
		} // if
	}
コード例 #9
0
 /**
  * Construct the ProjectSettingsController
  *
  * @access public
  * @param void
  * @return ProjectSettingsController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'project_website');
     // Access permissions
     if (!logged_user()->isAdministrator(owner_company())) {
         flash_error(lang('no access permissions'));
         $this->redirectTo('dashboard');
     }
     // if
 }
コード例 #10
0
 /**
  * Construct the AdministrationController
  *
  * @access public
  * @param void
  * @return AdministrationController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     //ajx_set_panel("administration");
     // Access permissions
     if (!logged_user()->isExecutiveGroup()) {
         flash_error(lang('no access permissions'));
         ajx_current("empty");
     }
     // if
     //Autentify password
     if (config_option('ask_administration_autentification')) {
         $last_login = array_var($_SESSION, 'admin_login', 0);
         if ($last_login < time() - ADMIN_SESSION_TIMEOUT) {
             if (array_var($_GET, 'a') != 'password_autentify') {
                 $ref_controller = null;
                 $ref_action = null;
                 $ref_params = array();
                 foreach ($_GET as $k => $v) {
                     $ref_var_name = $k;
                     switch ($ref_var_name) {
                         case 'c':
                             $ref_controller = $v;
                             break;
                         case 'a':
                             $ref_action = $v;
                             break;
                         default:
                             $ref_params[$ref_var_name] = $v;
                     }
                     // switch
                 }
                 $url = get_url($ref_controller, $ref_action, $ref_params);
                 $this->redirectTo('administration', 'password_autentify', array('url' => $url));
             }
         } else {
             $_SESSION['admin_login'] = time();
         }
     }
     //if
 }
コード例 #11
0
 /**
  * Construct controller and check if we have logged in user
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'dashboard');
 }
コード例 #12
0
	/**
	 * Construct the ToolController
	 *
	 * @access public
	 * @param void
	 * @return ToolController
	 */
	function __construct() {
		parent::__construct();
		prepare_company_website_controller($this, 'html');
	} // __construct
コード例 #13
0
 /**
  * Construct the MessageController
  *
  * @access public
  * @param void
  * @return MessageController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'project_website');
 }
コード例 #14
0
 /**
  * Construct the AccountController
  *
  * @access public
  * @param void
  * @return AccountController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'account');
 }
コード例 #15
0
 /**
  * Construct the ContactController
  *
  * @access public
  * @param void
  * @return ContactController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     $this->addHelper('contact_render_tab_functions');
 }
コード例 #16
0
 function update_prefs()
 {
     prepare_company_website_controller($this, 'account');
     $user = logged_user();
     if (!$user instanceof User) {
         flash_error(lang('user dnx'));
         $this->redirectTo('dashboard');
     }
     // if
     $company = $user->getCompany();
     if (!$company instanceof Company) {
         flash_error(lang('company dnx'));
         $this->redirectToReferer(get_url('administration'));
     }
     // if
     if (!$user->canUpdateProfile(logged_user())) {
         flash_error(lang('no access permissions'));
         $this->redirectTo('dashboard');
     }
     // if
     $redirect_to = array_var($_GET, 'redirect_to');
     if (trim($redirect_to) == '' || !is_valid_url($redirect_to)) {
         $redirect_to = $user->getCardUrl();
     }
     // if
     $this->setTemplate('edit_preferences');
     $reminder_prefs = Reminders::findById(logged_user()->getId());
     if (!$reminder_prefs instanceof Reminder) {
         $reminder_prefs = new Reminder();
     }
     $prefs_form = array_var($_POST, 'prefs_form');
     $reminder_prefs->setUserId(logged_user()->getId());
     $reminder_prefs->setRemindersEnabled($prefs_form['reminders_enabled']);
     $reminder_prefs->setSummarizedBy($prefs_form['summarized_by']);
     $reminder_prefs->setRemindersFuture($prefs_form['future']);
     $reminder_prefs->setIncludeEveryone($prefs_form['ivsteam']);
     $weekArray = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
     $days = '';
     for ($i = 0; $i < 7; $i++) {
         if (isset($prefs_form[$weekArray[$i]])) {
             $days .= "" . $weekArray[$i] . ",";
         }
     }
     $reminder_prefs->setReminderDaysToSend($days);
     $reminder_prefs->setReportsEnabled($prefs_form['reports_enabled']);
     $reminder_prefs->setReportsSummarizedBy($prefs_form['reports_summarized']);
     $reminder_prefs->setReportsIncludeEveryone($prefs_form['ivsteam2']);
     $reminder_prefs->setReportDay($prefs_form['reportDay']);
     $reminder_prefs->setReportsIncludeActivity($prefs_form['report_activity']);
     try {
         DB::beginWork();
         $reminder_prefs->save();
         DB::commit();
         flash_success(lang('prefs updated'));
     } catch (Exception $e) {
         DB::rollback();
         flash_error('Error: ' . $e);
     }
     $dayOfWeek = ConfigOptions::getByName('calendar_first_day_of_week');
     tpl_assign('dayOfWeek', $dayOfWeek->getValue());
     tpl_assign('redirect_to', $redirect_to);
     tpl_assign('user', $user);
     tpl_assign('company', $company);
     tpl_assign('reminder_prefs', $reminder_prefs);
 }
コード例 #17
0
	function __construct() {
		$this->pagination = new StdClass();
		parent::__construct();
		prepare_company_website_controller($this, 'website');
		ajx_set_panel("search");
		self::$MYSQL_MIN_WORD_LENGHT = (int)array_var(DB::executeOne("SHOW variables LIKE 'ft_min_word_len' "),"Value");
	}
コード例 #18
0
 function __construct()
 {
     trace(__FILE__, '__construct()');
     parent::__construct();
     prepare_company_website_controller($this, 'project_website');
 }
コード例 #19
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     $this->setLayout('empty');
 }
コード例 #20
0
 /**
  * Prepare this controller
  *
  * @access public
  * @param void
  * @return ProjectController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'project_website');
     $this->addHelper('textile');
 }
コード例 #21
0
 /**
  * Construct controller and check if we have logged in user
  *
  * @param voidnetaractivi
  * @return null
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     $this->addHelper('calendar');
 }
コード例 #22
0
 function __construct()
 {
     if (!defined('PLUGIN_MANAGER') && !defined('PLUGIN_MANAGER_CONSOLE')) {
         die(lang('no access permissions'));
     }
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     if (!can_manage_plugins(logged_user())) {
         die(lang('no access permissions'));
     }
 }
コード例 #23
0
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     ajx_set_panel("search");
 }
コード例 #24
0
 /**
  * Construct the I18nController
  *
  * @access public
  * @param void
  * @return I18nController 
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'administration');
 }
コード例 #25
0
 /**
  * Construct the ReportingController
  *
  * @access public
  * @param void
  * @return ReportingController
  */
 function __construct()
 {
     parent::__construct();
     prepare_company_website_controller($this, 'website');
     Env::useHelper('grouping');
 }