Пример #1
0
 /**
  * Constructor
  *
  * @param $template \SP\Template con instancia de plantilla
  */
 public function __construct(\SP\Template $template = null)
 {
     parent::__construct($template);
     $this->view->assign('tabs', array());
     $this->view->assign('sk', SessionUtil::getSessionKey(true));
     $this->view->assign('isDemoMode', \SP\Util::demoIsEnabled() && !Session::getUserIsAdminApp());
     $this->view->assign('isDisabled', \SP\Util::demoIsEnabled() && !Session::getUserIsAdminApp() ? 'DISABLED' : '');
 }
Пример #2
0
 /**
  * Constructor
  *
  * @param $template \SP\Template con instancia de plantilla
  */
 public function __construct(\SP\Template $template = null)
 {
     parent::__construct($template);
     $this->view->assign('tabs', array());
     $this->view->assign('sk', SessionUtil::getSessionKey(true));
     $this->_userId = Session::getUserId();
     $this->_userPrefs = UserPreferences::getPreferences($this->_userId);
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param \SP\Template $template              instancia del motor de plantillas
  * @param              $lastAction            int con la última acción realizada
  * @param null         $accountId             int con el id de la cuenta
  */
 public function __construct(\SP\Template $template = null, $lastAction, $accountId = null)
 {
     parent::__construct($template);
     $this->setId($accountId);
     $this->view->assign('changesHash', '');
     $this->view->assign('chkUserEdit', '');
     $this->view->assign('chkGroupEdit', '');
     $this->view->assign('gotData', $this->isGotData());
     $this->view->assign('sk', SessionUtil::getSessionKey(true));
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param      $template   \SP\Template con instancia de plantilla
  * @param null $page       El nombre de página para la clase del body
  * @param bool $initialize Si es una inicialización completa
  */
 public function __construct(\SP\Template $template = null, $page = null, $initialize = true)
 {
     parent::__construct($template);
     if ($initialize) {
         $this->view->assign('startTime', microtime());
         $this->view->addTemplate('header');
         $this->view->addTemplate('body-start');
         $this->view->assign('sk', SessionUtil::getSessionKey(true));
         $this->view->assign('appInfo', Util::getAppInfo());
         $this->view->assign('appVersion', Util::getVersionString());
         $this->view->assign('isDemoMode', Util::demoIsEnabled());
         $this->view->assign('page', $page);
         $this->view->assign('loggedIn', \SP\Init::isLoggedIn());
         $this->view->assign('logoIcon', Init::$WEBURI . '/imgs/logo.png');
         $this->view->assign('logoNoText', Init::$WEBURI . '/imgs/logo.svg');
         $this->view->assign('logo', Init::$WEBURI . '/imgs/logo_full.svg');
         $this->view->assign('httpsEnabled', Util::httpsEnabled());
         // Cargar la clave pública en la sesión
         SessionUtil::loadPublicKey();
         $this->getResourcesLinks();
         $this->setResponseHeaders();
     }
 }
Пример #5
0
 /**
  * Obtener los datos para la pestaña de campos personalizados
  */
 public function getCustomFields()
 {
     $this->setAction(self::ACTION_MGM_CUSTOMFIELDS);
     if (!$this->checkAccess()) {
         return;
     }
     $this->view->assign('sk', SessionUtil::getSessionKey(true));
     $tableProp = array('tblId' => 'tblCustomFields', 'header' => '', 'tblHeaders' => array(_('Módulo'), _('Nombre'), _('Tipo')), 'tblRowSrc' => array('module', 'name', 'typeName'), 'tblRowSrcId' => 'id', 'onCloseAction' => self::ACTION_MGM, 'actions' => array('new' => array('id' => self::ACTION_MGM_CUSTOMFIELDS_NEW, 'title' => _('Nuevo Campo'), 'onclick' => 'sysPassUtil.Common.appMgmtData(this,' . self::ACTION_MGM_CUSTOMFIELDS_NEW . ',\'' . $this->view->sk . '\')', 'img' => 'imgs/new.png', 'skip' => true), 'edit' => array('id' => self::ACTION_MGM_CUSTOMFIELDS_EDIT, 'title' => _('Editar Campo'), 'onclick' => 'sysPassUtil.Common.appMgmtData(this,' . self::ACTION_MGM_CUSTOMFIELDS_EDIT . ',\'' . $this->view->sk . '\')', 'img' => 'imgs/edit.png', 'icon' => 'mode_edit'), 'del' => array('id' => self::ACTION_MGM_CUSTOMFIELDS_DELETE, 'title' => _('Eliminar Campo'), 'onclick' => 'sysPassUtil.Common.appMgmtDelete(this,' . self::ACTION_MGM_CUSTOMFIELDS_DELETE . ',\'' . $this->view->sk . '\')', 'img' => 'imgs/delete.png', 'icon' => 'delete', 'isdelete' => true)));
     $tableProp['cellWidth'] = floor(65 / count($tableProp['tblHeaders']));
     $this->view->append('tabs', array('title' => _('Campos Personalizados'), 'query' => \SP\CustomFieldDef::getCustomFields(), 'props' => $tableProp, 'time' => round(microtime() - $this->view->queryTimeStart, 5)));
 }
Пример #6
0
 /**
  * Inicializar la vista de cambio de clave de usuario
  */
 public function getUserPass()
 {
     $this->setAction(self::ACTION_USR_USERS_EDITPASS);
     // Comprobar si el usuario a modificar es distinto al de la sesión
     if ($this->view->userId != Session::getUserId() && !$this->checkAccess()) {
         return;
     }
     $this->view->addTemplate('userspass');
     $this->view->assign('actionId', self::ACTION_USR_USERS_EDITPASS);
     // Obtener de nuevo el token de seguridad por si se habñia regenerado antes
     $this->view->assign('sk', SessionUtil::getSessionKey());
 }
Пример #7
0
 /**
  * Constructor
  *
  * @param $template \SP\Template con instancia de plantilla
  */
 public function __construct(\SP\Template $template = null)
 {
     parent::__construct($template);
     $this->view->assign('sk', SessionUtil::getSessionKey(true));
 }