当前位置: 首页>>代码示例>>PHP>>正文


PHP Helper_Config::getSystemId方法代码示例

本文整理汇总了PHP中Helper_Config::getSystemId方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper_Config::getSystemId方法的具体用法?PHP Helper_Config::getSystemId怎么用?PHP Helper_Config::getSystemId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper_Config的用法示例。


在下文中一共展示了Helper_Config::getSystemId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveParam

 private function saveParam()
 {
     $this->load->file('application/modules/app/system_setting_param/form/setting_param_form.php');
     $resAjax = new Response_Ajax();
     $frm_data = new Form_App_System_Setting_Param(TRUE);
     $logo = 'logo';
     $id_system = Helper_Config::getSystemId();
     try {
         if (!$this->permission->update) {
             throw new Exception('No tiene permisos para editar/actualizar');
         }
         if (!$frm_data->isValid()) {
             throw new Exception('Debe ingresar la información en todos los campos');
         }
         if (!isset($_FILES[$logo])) {
             $oBusUploadLogo = Business_App_Configuration_System::uploadLogo($id_system, $logo);
             if (!$oBusUploadLogo->isSuccess()) {
                 throw new Exception($oBusUploadLogo->message());
             }
         }
         $oBusLoadLogo = Business_App_Configuration_System::loadLogo($id_system);
         if (!$oBusLoadLogo->isSuccess()) {
             throw new Exception($oBusLoadLogo->message());
         }
         $dataLogo = $oBusLoadLogo->data();
         $eConfigurationSystem = $frm_data->getConfigurationSystemEntity();
         $eConfigurationSystem->id = $id_system;
         $eConfigurationSystem->logo = $dataLogo['uri'];
         $frm_data->logo = $eConfigurationSystem->logo;
         $oBus = Business_App_Configuration_System::saveConfigurationSystem($eConfigurationSystem);
         if (!$oBus->isSuccess()) {
             throw new Exception($oBus->message());
         }
         $resAjax->isSuccess(TRUE);
         $resAjax->message($oBus->message());
     } catch (Exception $ex) {
         $resAjax->isSuccess(FALSE);
         $resAjax->message($ex->getMessage());
     }
     $resAjax->form('setting', $frm_data->toArray());
     echo $resAjax->toJsonEncode();
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:42,代码来源:system_setting_paramx.php

示例2: layout

 static function layout($view, $arrParams = array(), $arrParamsLayout = array(), $useIframe = FALSE)
 {
     $MY =& MY_Controller::get_instance();
     /* @var $mConfigurationSystem Configuration_System_Model */
     $mConfigurationSystem =& $MY->mConfigurationSystem;
     /* @var $mCompany Company_Model */
     $mCompany =& $MY->mCompany;
     /* @var $mCompanyBranch Company_Branch_Model */
     $mCompanyBranch =& $MY->mCompanyBranch;
     /* @var $mProfile profile_Model */
     $mProfile =& $MY->mProfile;
     /* @var $mUser User_Model */
     $mUser =& $MY->mUser;
     /* @var $mPerson Person_Model */
     $mPerson =& $MY->mPerson;
     /* @var $mUserProfile User_Profile_Model*/
     $mUserProfile =& $MY->mUserProfile;
     /* @var $mUserProfileCompanyBranch User_Profile_Company_Branch_Model */
     $mUserProfileCompanyBranch =& $MY->mUserProfileCompanyBranch;
     /* @var $mAppVersion App_Version_Model */
     $mAppVersion =& $MY->mAppVersion;
     $id_system = Helper_Config::getSystemId();
     $id_company = Helper_App_Session::getCompanyId();
     $id_company_branch = Helper_App_Session::getCompanyBranchId();
     $id_profile = Helper_App_Session::getProfileId();
     $id_user = Helper_App_Session::getUserId();
     /* @var $eConfigurationSystem eConfigurationSystem */
     $eConfigurationSystem = $mConfigurationSystem->load($id_system);
     /* @var $eCompany eCompany */
     $eCompany = $mCompany->load($id_company);
     /* @var $eProfile eProfile */
     $eProfile = $mProfile->load($id_profile);
     /* @var $eUser eUser */
     $eUser = $mUser->load($id_user);
     /* @var $ePerson ePerson */
     $ePerson = $mPerson->load($eUser->id_person);
     /* @var $eAppVersion eAppVersion  */
     $eAppVersion = $mAppVersion->loadArray(array('isActive' => 1, 'isProject' => 1));
     $resources_path = 'resources/assets/app';
     $arrMenu = Helper_App_Permission::getMenu();
     $controller_current = $MY->uri->rsegment(1);
     $function_current = $MY->uri->rsegment(2);
     // ================================================================
     // ================================================================
     $eProfiles = $mUserProfile->listProfilesByUser($id_user, 1);
     $show_combo_perfiles = TRUE;
     $combo_perfiles = Helper_Array::entitiesToIdText($eProfiles, 'id', 'name', 'value', 'text', $id_profile);
     // ================================================================
     // ================================================================
     if (empty($eProfiles)) {
         $flash = new Response_Flash();
         $flash->message('Ningun Perfil disponible!');
         $flash->flashType(Response_Flash::FLASH_ERROR);
         Helper_App_Flash::set($flash);
         $show_combo_perfiles = FALSE;
         $useIframe = TRUE;
         $view = 'app/html/error/403';
     }
     // ================================================================
     // ================================================================
     $eCompanyBranches = Helper_App_Session::isSuperAdminProfile() || Helper_App_Session::isAdminProfile() ? $mCompanyBranch->listByCompany($id_company) : $mUserProfileCompanyBranch->listCompanyBranchsByUserProfile($id_user, $id_profile);
     $show_combo_sedes = TRUE;
     $combo_sedes = Helper_Array::entitiesToIdText($eCompanyBranches, 'id', 'name', 'value', 'text', $id_company_branch);
     if (empty($eCompanyBranches)) {
         $flash = new Response_Flash();
         $flash->message('Ninguna Sucursal disponible!');
         $flash->flashType(Response_Flash::FLASH_ERROR);
         Helper_App_Flash::set($flash);
         $show_combo_sedes = FALSE;
         $useIframe = TRUE;
         $view = 'app/html/error/403';
     }
     $content = '';
     if (is_array($view)) {
         foreach ($view as $v) {
             $content .= $MY->load->view($v, $arrParams, true);
         }
     } else {
         $content = $MY->load->view($view, $arrParams, true);
     }
     $browser = Helper_App_Session::isIExplorer();
     $arrParamsLayoutDefault = array('useIframe' => $useIframe, 'resources_path' => $resources_path, 'content' => $content, 'arrMenu' => $arrMenu, 'controller_current' => $controller_current, 'function_current' => $function_current, 'navegador' => $browser, 'eConfigurationSystem' => $eConfigurationSystem, 'eCompany' => $eCompany, 'eProfile' => $eProfile, 'ePerson' => $ePerson, 'eUser' => $eUser, 'eAppVersion' => $eAppVersion, 'show_combo_perfiles' => $show_combo_perfiles, 'combo_perfiles' => $combo_perfiles, 'show_combo_sedes' => $show_combo_sedes, 'combo_sedes' => $combo_sedes);
     $MY->load->view('app/html/layout/layout', array_merge($arrParamsLayoutDefault, $arrParamsLayout));
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:84,代码来源:view_helper.php

示例3: inInactivity

 public static function inInactivity()
 {
     $MY =& MY_Controller::get_instance();
     /* @var $mConfigurationSystem Configuration_System_Model */
     $mConfigurationSystem =& $MY->mConfigurationSystem;
     $id_system = Helper_Config::getSystemId();
     /* @var $eConfigurationSystem eConfigurationSystem */
     $eConfigurationSystem = $mConfigurationSystem->load($id_system);
     $lastTime = self::getLastTime();
     $now = date("Y-m-d H:i:s");
     $time = strtotime($now) - strtotime($lastTime);
     $limit_min = is_null($eConfigurationSystem->session_time_limit_min) ? 600 : $eConfigurationSystem->session_time_limit_min;
     $limit_max = is_null($eConfigurationSystem->session_time_limit_max) ? 1200 : $eConfigurationSystem->session_time_limit_max;
     if (ENVIRONMENT != 'development') {
         if ($time >= $limit_max) {
             self::logout();
             return FALSE;
         } elseif ($time >= $limit_min) {
             self::setInactivity(FALSE);
             self::setBlock(TRUE);
             //return FALSE;
         } else {
             self::setLastTime($now);
             self::setInactivity(TRUE);
             self::setBlock(FALSE);
             //return TRUE;
         }
     }
     return self::getInactivity();
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:30,代码来源:session_helper.php


注:本文中的Helper_Config::getSystemId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。