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


PHP MY_Controller::get_instance方法代码示例

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


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

示例1: readPost

 public function readPost()
 {
     $MY =& MY_Controller::get_instance();
     //PERSON
     $this->id_person = $MY->input->post('id_person');
     $this->name = $MY->input->post('name');
     $this->surname = $MY->input->post('surname');
     $this->tipo_documento = $MY->input->post('tipo_documento');
     $this->document = $MY->input->post('document');
     $this->birthday = $MY->input->post('birthday');
     $this->gender = $MY->input->post('gender');
     $this->address = $MY->input->post('address');
     $this->phone_cell = $MY->input->post('phone_cell');
     $this->email = $MY->input->post('email');
     $this->estado_civil = $MY->input->post('estado_civil');
     $this->tipo_sangre = $MY->input->post('tipo_sangre');
     $this->id_ciudad = $MY->input->post('id_ciudad');
     //USER
     $this->id_user = $MY->input->post('id_user');
     $this->username = $MY->input->post('username');
     $this->password_new = $MY->input->post('password_new');
     $this->password_new_repeat = $MY->input->post('password_new_repeat');
     //PROFILE
     $this->id_profile = $MY->input->post('id_profile');
     $this->isActive = $MY->input->post('isActive');
     //COMPANY_BRANCH
     $this->id_company_branchs = $MY->input->post('id_company_branchs');
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:28,代码来源:user_settings_form.php

示例2: readPost

 public function readPost()
 {
     $MY =& MY_Controller::get_instance();
     $this->password_current = $MY->input->post('password_current');
     $this->password_new = $MY->input->post('password_new');
     $this->password_new_repeat = $MY->input->post('password_new_repeat');
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:layout_password_data.php

示例3: set

 public static function set($eSessionActivity)
 {
     $MY =& MY_Controller::get_instance();
     /* @var $mSessionsActivity Session_Activity_Model */
     $mSessionsActivity =& $MY->mSessionsActivity;
     $mSessionsActivity->save($eSessionActivity);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:activity_helper.php

示例4: remVar

 static function remVar($name_key)
 {
     $MY =& MY_Controller::get_instance();
     $MY->load->library('libsession');
     $MY->libsession->setSessionGroup(self::$params_session['session_group']);
     $MY->libsession->rem($name_key);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:flash_helper.php

示例5: write

 public static function write($var, $LOG_TYPE = self::LOG_DEFAULT)
 {
     $MY =& MY_Controller::get_instance();
     $folder = '';
     if ($LOG_TYPE == self::LOG_DEFAULT) {
     }
     if ($LOG_TYPE == self::LOG_APP) {
         $folder = 'app';
     }
     if ($LOG_TYPE == self::LOG_DB) {
         $folder = 'db';
     }
     if ($LOG_TYPE == self::LOG_PROCESS) {
         $folder = 'process';
     }
     if ($LOG_TYPE == self::LOG_PUBLIC) {
         $folder = 'public';
     }
     $path = BASEPATH . "../application/logs" . (empty($folder) ? '' : "/{$folder}") . "/";
     if (!file_exists($path)) {
         mkdir($path, 0777);
     }
     if (is_array($var) || is_object($var)) {
         $var = print_r($var, TRUE);
     }
     $path .= date('Y') . '/' . date('m') . '/' . date('d');
     if (!file_exists($path)) {
         mkdir($path, 0777, TRUE);
     }
     $file = $path . "/" . date("H.i.s") . '.txt';
     $template = "========================" . date("Y-m-d H:i:s") . "========================\n\n" . $var . "\n\n" . "Desde la IP: " . $MY->input->ip_address() . "\n\n" . "=======================================================================\n\n";
     write_file($file, $template, FOPEN_READ_WRITE_CREATE);
     chmod($file, 0777);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:34,代码来源:log_helper.php

示例6: sendEmail

 public static function sendEmail($data)
 {
     $MY =& MY_Controller::get_instance();
     $config_email = Helper_Config::getEmail();
     $MY->load->library('email', $config_email);
     $oBus = new Response_Business();
     $smtp_user = $config_email['smtp_user'];
     $messege = "De: " . $data['name'] . " <br>";
     $messege .= "Email:" . $data['email'] . " <br>";
     $messege .= "Detalle:" . $data['message'] . " <br>";
     try {
         $MY->email->from($smtp_user, $data['name']);
         $MY->email->to('taylorluis93@gmail.com');
         $MY->email->subject($data['subject']);
         $MY->email->message($messege);
         if (!$MY->email->send()) {
             throw new Exception($MY->email->print_debugger());
         }
         $oBus->isSuccess(TRUE);
         $oBus->message('Email enviado!');
     } catch (Exception $ex) {
         $oBus->isSuccess(FALSE);
         $oBus->message($ex->getMessage());
     }
     return $oBus;
 }
开发者ID:crodriguezn,项目名称:luis-rodriguez-ec,代码行数:26,代码来源:mail_helper.php

示例7: post

 public static function post($name_or_prefix = NULL, $post_field_type = self::POST_FIELD_NAME)
 {
     $MY =& MY_Controller::get_instance();
     if (empty($name_or_prefix)) {
         $post = $MY->input->post();
         $arrData = array();
         if (!empty($post)) {
             foreach ($post as $field_name => $field_value) {
                 $arrData[$field_name] = is_array($field_value) ? $field_value : trim($field_value);
             }
         }
         return $arrData;
     }
     if ($post_field_type == self::POST_FIELD_NAME) {
         $res = $MY->input->post($name_or_prefix);
         return is_array($res) ? $res : trim($res);
     }
     $arrData = array();
     $post = $MY->input->post();
     if (!empty($post)) {
         foreach ($post as $field_name => $field_value) {
             $matches = NULL;
             if (preg_match("/^{$name_or_prefix}([^.]+\$)/i", $field_name, $matches)) {
                 $arrData[$matches[1]] = is_array($field_value) ? $field_value : trim($field_value);
             }
         }
     }
     return $arrData;
 }
开发者ID:crodriguezn,项目名称:luis-rodriguez-ec,代码行数:29,代码来源:request_helper.php

示例8: transaccion

 public static function transaccion($TRANSACCION_TYPE, $DB_TYPE = self::DB_DEFAULT)
 {
     $MY =& MY_Controller::get_instance();
     $db = NULL;
     switch ($DB_TYPE) {
         case self::DB_DEFAULT:
             $db =& $MY->db;
             break;
         case self::DB_DIGIFORT:
             $db =& $MY->dbd;
             break;
     }
     if (!empty($db)) {
         switch ($TRANSACCION_TYPE) {
             case self::TRANSACCION_BEGIN:
                 $db->trans_begin();
                 break;
             case self::TRANSACCION_COMMIT:
                 $db->trans_commit();
                 break;
             case self::TRANSACCION_ROLLBACK:
                 $db->trans_rollback();
                 break;
         }
     }
 }
开发者ID:crodriguezn,项目名称:luis-rodriguez-ec,代码行数:26,代码来源:MY_Business.php

示例9: uploadLogo

 public static function uploadLogo($id_company, $field_name_post = 'logo')
 {
     $oBus = new Response_Business();
     $MY =& MY_Controller::get_instance();
     /* @var $upload CI_Upload */
     $upload =& $MY->upload;
     try {
         $path_company = BASEPATH . '../resources/uploads/company';
         $path = "{$path_company}/{$id_company}";
         if (!file_exists($path)) {
             if (!mkdir($path, 0777, TRUE)) {
                 throw new Exception("Error al subir el archivo");
             }
         }
         $upload->initialize(array('upload_path' => $path, 'allowed_types' => 'png', 'max_width' => '1080', 'max_height' => '1080', 'max_size' => '50000', 'overwrite' => TRUE, 'is_image' => TRUE, 'file_name' => 'logo', 'image_width' => '225', 'image_height' => '225', 'image_type' => 'png'));
         $wasUploaded = $upload->do_upload($field_name_post);
         if (!$wasUploaded) {
             throw new Exception(strip_tags($upload->display_errors()));
         }
         $oBus->isSuccess(TRUE);
         $data = $upload->data();
         $oBus->data(array('data' => $data));
     } catch (Exception $e) {
         $oBus->isSuccess(FALSE);
         $oBus->message($e->getMessage());
     }
     return $oBus;
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:28,代码来源:company_business.php

示例10: saveProfilePermission

 public static function saveProfilePermission($id_profile, $arr_eProfilePermissions)
 {
     $oBus = new Response_Business();
     $MY =& MY_Controller::get_instance();
     /* @var $mProfilePermission Profile_Permission_Model */
     $mProfilePermission =& $MY->mProfilePermission;
     $oTransaction = new MY_Business();
     $oTransaction->begin();
     try {
         $mProfilePermission->deleteByProfile($id_profile);
         /* @var $eProfilePermission eProfilePermission*/
         foreach ($arr_eProfilePermissions as $eProfilePermission) {
             if (!empty($eProfilePermission->id_permission)) {
                 $mProfilePermission->save($eProfilePermission);
             }
         }
         $oTransaction->commit();
         $oBus->isSuccess(TRUE);
         $oBus->message("Guardado exitosamente");
     } catch (Exception $e) {
         $oTransaction->rollback();
         $oBus->isSuccess(FALSE);
         $oBus->message($e->getMessage());
     }
     return $oBus;
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:26,代码来源:profile_business.php

示例11: listBinnacle

 public static function listBinnacle($txt_filter, $limit, $offset, $arrTxtAction, $dateBegin, $dateEnd)
 {
     $oBus = new Response_Business();
     $MY =& MY_Controller::get_instance();
     /* @var $mUserLog User_Log_Model */
     $mUserLog =& $MY->mUserLog;
     $eUsers = array();
     $eUserLogs = array();
     $count = 0;
     try {
         $filter = new filterUserLog();
         $filter->limit = $limit;
         $filter->offset = $offset;
         $filter->text = $txt_filter;
         $filter->action = $arrTxtAction;
         $filter->date_begin = $dateBegin;
         $filter->date_end = $dateEnd;
         $mUserLog->filter($filter, $eUserLogs, $eUsers, $count);
         $oBus->isSuccess(TRUE);
     } catch (Exception $ex) {
         $oBus->isSuccess(FALSE);
         $oBus->message($ex->getMessage());
     }
     $oBus->data(array('eUserLogs' => $eUserLogs, 'eUsers' => $eUsers, 'count' => $count));
     return $oBus;
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:26,代码来源:binnacle_business.php

示例12: listing

 public function listing($id_profile = 0)
 {
     $arrModules = array();
     $MY =& MY_Controller::get_instance();
     /* @var $mRolModule Rol_Module_Model */
     $mRolModule =& $MY->mRolModule;
     /* @var $mPermission Permission_Model */
     $mPermission =& $MY->mPermission;
     /* @var $mProfile Profile_Model */
     $mProfile =& $MY->mProfile;
     /* @var $mProfilePermission Profile_Permission_Model */
     $mProfilePermission =& $MY->mProfilePermission;
     /* @var $eProfile eProfile */
     $eProfile = $mProfile->load($id_profile);
     $arrModules = $mRolModule->listModulesByRol($eProfile->id_rol, NULL);
     /* @var $module eModule */
     foreach ($arrModules as $num => $module) {
         $arrModules[$num]->{'_permissions'} = $mPermission->listByModule($module->id);
         $arrModules[$num]->{'_submodules'} = $mRolModule->listModulesByRol($eProfile->id_rol, $module->id);
         if (isset($arrModules[$num]->{'_submodules'}) && !empty($arrModules[$num]->{'_submodules'})) {
             foreach ($arrModules[$num]->{'_submodules'} as $num2 => $submodule) {
                 $arrModules[$num]->{'_submodules'}[$num2]->{'_permissions'} = $mPermission->listByModule($submodule->id);
             }
         }
     }
     $arrProfilePermissionResult = array();
     $arrProfilePermission = $mProfilePermission->listByProfile($id_profile);
     if (!empty($arrProfilePermission)) {
         foreach ($arrProfilePermission as $profile_permission) {
             $arrProfilePermissionResult[] = $profile_permission["id_permission"];
         }
     }
     Helper_App_View::layout('app/html/pages/security_profile/listing', array('arrModuleResult' => $arrModules, 'eProfile' => $eProfile, 'arrProfilePermissionResult' => $arrProfilePermissionResult, 'save' => $this->permission->update_permission));
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:34,代码来源:permissions.php

示例13: index

 public function index()
 {
     $login_title = 'INGRESO AL SISTEMA';
     $MY =& MY_Controller::get_instance();
     /* @var $mCompany Company_Model */
     $mCompany =& $MY->mCompany;
     /* @var $mProfile Profile_Model */
     $mProfile =& $MY->mProfile;
     /* @var $mUser User_Model */
     $mUser =& $MY->mUser;
     /* @var $mPerson Person_Model */
     $mPerson =& $MY->mPerson;
     /* @var $mAppVersion App_Version_Model */
     $mAppVersion =& $MY->mAppVersion;
     $id_company = Helper_App_Session::getCompanyId();
     $id_profile = Helper_App_Session::getProfileId();
     $id_user = Helper_App_Session::getUserId();
     $id_person = Helper_App_Session::getPersonId();
     /* @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($id_person);
     /* @var $eAppVersion eAppVersion  */
     $eAppVersion = $mAppVersion->loadArray(array('isActive' => 1, 'isProject' => 1));
     $params_view = array('login_title' => $login_title, 'browser_message' => $this->browser['isSuccess'] ? $this->browser['message'] : '', 'ePerson' => $ePerson, 'eProfile' => $eProfile, 'eUser' => $eUser, 'eCompany' => $eCompany, 'eAppVersion' => $eAppVersion);
     Helper_App_View::view('app/html/pages/login/advanced', $params_view);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:31,代码来源:login_advanced.php

示例14: decryptBlockCipher

 public static function decryptBlockCipher($value_encoded, $encryption_key = '')
 {
     $MY =& MY_Controller::get_instance();
     $MY->load->library('library_zend2');
     $cipher = \Zend\Crypt\BlockCipher::factory('mcrypt', array('algorithm' => 'aes'));
     $cipher->setKey(empty($encryption_key) ? self::$Encryption_Key : $encryption_key);
     return $cipher->decrypt($value_encoded);
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:8,代码来源:encrypt_helper.php

示例15: readPost

 public function readPost()
 {
     $MY =& MY_Controller::get_instance();
     $this->name = $MY->input->post('name');
     $this->description = $MY->input->post('description');
     $this->name_key = $MY->input->post('name_key');
     $this->phone = $MY->input->post('phone');
 }
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:8,代码来源:company_form.php


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