本文整理汇总了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);
}
示例2: display
function display()
{
Load::model('transaction');
$Transaction = new Transaction();
$param['data'] = $Transaction->viewAll();
Load::view('request', $param);
}
示例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';
}
示例4: __construct
public function __construct()
{
parent::__construct();
try {
$model = Load::model('Index');
} catch (LoadException $e) {
die($e->getMessage());
}
}
示例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);
}
示例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/");
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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;
}
示例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);
}
}
示例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}");
}
示例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);
}
}
示例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());
}
}
}
示例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);
}
}
}