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


PHP Load::model方法代码示例

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


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

示例1: codes

 function codes()
 {
     Load::model('user');
     $User = new User();
     $param['codes'] = $User->get_codes();
     Load::view('codes', $param);
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:7,代码来源:account.php

示例2: display

 function display()
 {
     Load::model('transaction');
     $Transaction = new Transaction();
     $param['data'] = $Transaction->viewAll();
     Load::view('request', $param);
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:7,代码来源:request.php

示例3: index

 /**
  * Método principal
  */
 public function index()
 {
     $pais = new Pais();
     $estado = new Estado();
     $municipio = new Municipio();
     if (Input::hasPost('empresa')) {
         if (DwSecurity::isValidKey(Input::post('empresa_id_key'), 'form_key')) {
             if (Empresa::setEmpresa('save', Input::post('empresa'))) {
                 DwMessage::valid('Los datos se han actualizado correctamente');
             } else {
                 DwMessage::get('error_form');
             }
         }
     }
     $empresa = new Empresa();
     if (!$empresa->getInformacionEmpresa()) {
         DwMessage::get('id_no_found');
         return DwRedirect::toRoute('module: dashboard', 'controller: index');
     }
     if (!APP_OFFICE) {
         $sucursal = new Sucursal();
         $this->sucursal = $sucursal->getInformacionSucursal(1);
         $this->ciudades = Load::model('params/ciudad')->getCiudadesToJson();
     }
     $this->empresa = $empresa;
     $this->pais = $pais->getListadoPais();
     $this->estado = $estado->getListadoEstado();
     $this->municipio = $municipio->getListadoMunicipio();
     $this->page_title = 'Información de la empresa';
 }
开发者ID:RFDO93,项目名称:mantenimiento,代码行数:33,代码来源:empresa_controller.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     try {
         $model = Load::model('Index');
     } catch (LoadException $e) {
         die($e->getMessage());
     }
 }
开发者ID:aboxall,项目名称:v0.2-current,代码行数:9,代码来源:Index.php

示例5: display

 function display()
 {
     Load::model('company');
     $Company = new Company();
     $param['income'] = $Company->get_income();
     $param['expense'] = $Company->get_expense();
     //$param['onhand'] = $this->get_cashonhand();
     //$param['aff_money'] = $this->get_affmoney();
     Load::view('business-status', $param);
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:10,代码来源:bstatus.php

示例6: delete

 public function delete($id)
 {
     $role = Load::model("roles")->find($id);
     if ($role->delete()) {
         Flash::valid("role Eliminado");
     } else {
         Flash::error("No se elimino el role");
     }
     Router::redirect("roles/");
 }
开发者ID:jaimeirazabal1,项目名称:mailer,代码行数:10,代码来源:roles_controller.php

示例7: delete

 public function delete($id)
 {
     $lista = Load::model('listas')->find_first("id={$id}");
     if ($lista) {
         $this->data = $lista->delete();
     } else {
         $this->data = 'No existe una lista con ese codigo';
         $this->error($this->data, 404);
     }
 }
开发者ID:ComfamiliarCurso2,项目名称:ClaseInicial,代码行数:10,代码来源:listas_controller.php

示例8: FIRST

 function FIRST()
 {
     Load::model('geology');
     $Geology = new Geology();
     $result = $Geology->get_summary();
     include 'ewallet.php';
     $Ewallet = new Ewallet();
     $this->param['weekly'] = $Ewallet->get_weekly($result['OUT']);
     Load::view('dashboard', $this->param);
 }
开发者ID:etuyco,项目名称:v2.inlight-marketing,代码行数:10,代码来源:dashboard.php

示例9: get

 public function get($model, $id = null, $parentid = null)
 {
     if ($id == 'parent') {
         $this->data = Load::model($model)->fillbyowner($parentid);
     } elseif (!empty($id)) {
         $this->data = Load::model($model)->fillby($id);
     } else {
         $this->data = Load::model($model)->fill();
     }
 }
开发者ID:ennerperez,项目名称:sgas,代码行数:10,代码来源:estructuras_controller.php

示例10: get_empresas

 public function get_empresas()
 {
     $tags = Load::model("usuarios")->find("columns: empresa", "group: empresa");
     $array_tags = array();
     foreach ($tags as $key => $value) {
         $array_tags[] = $value->empresa;
     }
     View::select(null, "json");
     $this->data = $array_tags;
 }
开发者ID:jaimeirazabal1,项目名称:admin_bootstrap_kumbia_php,代码行数:10,代码来源:index_controller.php

示例11: getTags

 /**
  * Retorna los tag de un post
  *
  * @param int $idPost
  * @param string $separator
  */
 public static function getTags($id_post = null, $separator = ', ')
 {
     $tags = array();
     if ($id_post) {
         foreach (Load::model('tags')->getTagByPost($id_post) as $tag) {
             $tags[] = $tag->name;
         }
         return implode($separator, $tags);
     }
 }
开发者ID:al3jandro,项目名称:Tellus,代码行数:16,代码来源:helpers.php

示例12: delete

 public function delete($id_contacto, $id_usuario_contacto)
 {
     $contacto = Load::model("contactos")->find($id_contacto);
     if ($contacto->delete()) {
         Flash::valid("Contacto Eliminado");
     } else {
         Flash::error("No se eliminó el contacto");
     }
     Router::redirect("contactos/usuario/{$id_usuario_contacto}");
 }
开发者ID:jaimeirazabal1,项目名称:mailer,代码行数:10,代码来源:contactos_controller.php

示例13: get

 public function get($model, $nip = null)
 {
     if (empty($model)) {
         $model = "Directorio";
     }
     if (empty($nip)) {
         $this->data = Load::model($model)->fill();
     } else {
         $this->data = Load::model($model)->fillbynip($nip);
     }
 }
开发者ID:ennerperez,项目名称:sgas,代码行数:11,代码来源:directorios_controller.php

示例14: __construct

 function __construct()
 {
     $this->user = Load::model('user_model');
     if (isset($_SESSION['time'])) {
         if (Session::timeOut()) {
             Helper::redirect('user/logout');
         } else {
             Session::set('time', time());
         }
     }
 }
开发者ID:tucuta,项目名称:CMS-1,代码行数:11,代码来源:user.php

示例15: editar_constante

 function editar_constante($id)
 {
     $this->constante = Load::model('constantetipoensayo')->find_first("id={$id}");
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         if (!$this->constante->update(Input::post('constante'))) {
             Flash::error('Se presento un error al actualizar el registro');
         } else {
             Router::redirect('/variable/constantes/' . $this->constante->tipoensayo_id);
         }
     }
 }
开发者ID:criferlo,项目名称:empolab,代码行数:11,代码来源:variable_controller.php


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