本文整理汇总了PHP中modules::run方法的典型用法代码示例。如果您正苦于以下问题:PHP modules::run方法的具体用法?PHP modules::run怎么用?PHP modules::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modules
的用法示例。
在下文中一共展示了modules::run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mid
public function mid()
{
if ($this->module_alias) {
$method = $this->uri->segment(4, 'index');
echo modules::run($this->module_alias . '/' . $method);
}
}
示例2: __construct
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->helper('url');
$user_id = $this->session->userdata('user_id');
if (!$user_id) {
redirect('sessions/login');
}
if (!isset(self::$is_loaded)) {
self::$is_loaded = TRUE;
$this->load->config('mcb_menu/mcb_menu');
modules::run('mcb_menu/check_permission', $this->uri->uri_string(), $this->session->userdata('global_admin'));
$this->load->database();
$this->load->helper(array('uri', 'mcb_currency', 'mcb_invoice', 'mcb_date', 'mcb_icon', 'mcb_custom', 'mcb_app', 'mcb_invoice_amount', 'mcb_invoice_item', 'mcb_invoice_payment', 'mcb_numbers'));
$this->load->model(array('mcb_modules/mdl_mcb_modules', 'mcb_data/mdl_mcb_data', 'mcb_data/mdl_mcb_userdata'));
$this->mdl_mcb_modules->set_module_data();
$this->mdl_mcb_data->set_session_data();
$this->mdl_mcb_userdata->set_session_data($user_id);
$this->mdl_mcb_modules->load_custom_languages();
$this->load->language('mcb', $this->mdl_mcb_data->setting('default_language'));
$this->load->model('fields/mdl_fields');
$this->load->library(array('form_validation', 'redir'));
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
if ($this->mdl_mcb_data->setting('enable_profiler')) {
$this->output->enable_profiler();
}
}
}
示例3: index
function index()
{
// $enemigos= $this->load->module('enemigos');
// $load['enemigos']= $enemigos->listar();
$load['enemigos'] = modules::run('enemigos/enemigos/listar', 'Amigos');
$this->load->view('saludo', $load);
}
示例4: render
public function render($label_template = '{title}', $back_url = NULL)
{
if (empty($this->mItems)) {
return '<p>No records are found.</p>';
} else {
$html = modules::run('adminlte/widget/box_open', 'Sort Order', 'primary');
// Render form with alert message
$html .= '<form action="' . current_full_url() . '" method="POST">';
$html .= $this->CI->system_message->render();
$html .= '<p>Drag and drop below items to sort them in ascending order:</p>';
// Generate item list by CodeIgniter Template Parser
$template = '<ul class="sortable list-group">
{items}
<li class="list-group-item">
<strong>' . $label_template . '</strong>
<input type="hidden" name="' . $this->mPostName . '[]" value="{id}" />
</li>
{/items}
</ul>';
$data = array('items' => $this->mItems);
$html .= $this->CI->parser->parse_string($template, $data, TRUE);
if ($back_url != NULL) {
$html .= modules::run('adminlte/widget/btn', 'Back', $back_url, 'reply', 'bg-purple') . ' ';
}
$html .= modules::run('adminlte/widget/btn_submit', 'Save');
$html .= '</form>';
$html .= modules::run('adminlte/widget/box_close');
return $html;
}
}
示例5: blog_category
public function blog_category()
{
$crud = $this->generate_crud('demo_blog_categories');
$crud->columns('title');
$this->mTitle .= 'Blog Categories';
$this->mViewData['crud_note'] = modules::run('adminlte/widget/btn', 'Sort Order', 'demo/blog_category_sortable');
$this->render_crud();
}
示例6: show_widgets
function show_widgets()
{
foreach ($this->mdl_mcb_modules->custom_modules as $module) {
if ($module->module_enabled and isset($module->module_config['dashboard_widget'])) {
echo modules::run($module->module_config['dashboard_widget']);
}
}
}
示例7: show
private function show($view, $user_data)
{
$this->load->helper('form');
$view_data['user'] = $user_data;
$view_data['status'] = array(0 => lang('user.status0'), 1 => lang('user.status1'));
$view_data['permissions'] = modules::run('permission/get_permissions_dropdown');
return $this->load->view($view . '.php', $view_data, true);
}
示例8: _custom_save
function _custom_save()
{
foreach ($this->mdl_mcb_modules->custom_modules as $module) {
if ($module->module_enabled and isset($module->module_config['settings_save'])) {
modules::run($module->module_config['settings_save']);
}
}
}
示例9: login
function login()
{
$data['title'] = "Login";
//validate form input
$this->form_validation->set_rules('identity', 'Identity', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');
if ($this->form_validation->run() == true) {
//cek pertama login pengguna dengan loading M_user di tb_pengguna
if ($this->ion_auth->cek_first($this->input->post('identity'), $this->input->post('password')) == TRUE) {
//buat akun dengan email dan password ini
//load M_user
$this->load->model('M_user');
$pengguna = $this->M_user->get_user_by_email($this->input->post('identity'));
$username = $pengguna->username;
$email = $pengguna->email;
$password = $pengguna->password;
$additional_data = array('pengguna_id' => $pengguna->pengguna_id);
//kalo sudah ada pengguna_id di tb_auth_user
//maka cukup update datanya saja....
$auth_user = $this->M_user->get_user_by_pengguna_id_auth_user($pengguna->pengguna_id);
if ($auth_user == TRUE) {
if ($auth_user->email != $pengguna->email) {
$this->ion_auth->update($auth_user->id, $data);
}
} else {
$this->session->set_userdata('email', $pengguna->email);
//go to login pertama pengelola
modules::run('redirection');
}
//then form masukkan kordinat dilengkapi dengan nama profil sekolah.
} else {
//check to see if the user is logging in
//check for "remember me"
$remember = (bool) $this->input->post('remember');
if ($this->ion_auth->login($this->input->post('identity'), $this->input->post('password'), $remember)) {
//if the login is successful
//redirect them back to the home page
$this->session->set_flashdata('message', $this->ion_auth->messages());
modules::run('redirection/cek_group');
// redirect('admin', 'refresh');
} else {
//if the login was un-successful
//redirect them back to the login page
$this->session->set_flashdata('message', $this->ion_auth->errors());
redirect('auth/login', 'refresh');
//use redirects instead of loading views for compatibility with MY_Controller libraries
}
}
} else {
//the user is not logging in so display the login page
//set the flash data error message if there is one
$data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
$data['identity'] = array('name' => 'identity', 'id' => 'identity', 'type' => 'text', 'value' => $this->form_validation->set_value('identity'));
$data['password'] = array('name' => 'password', 'id' => 'password', 'type' => 'password');
$this->template->set('title', 'Login Form');
$this->template->load($this->_template . 'login', 'content/V_login', $data);
}
}
示例10: index
public function index()
{
if ($this->session->userdata('user_id') == '') {
header('Location: ' . url('login'));
} else {
$content['content'] = $this->load->view('home', '', TRUE);
echo modules::run('_main/render', $content);
}
}
示例11: empcontract
public function empcontract()
{
$url = url();
$content['header_tags'] = '<link rel="stylesheet" href="' . $url . 'visaappres/css/font-awesome.min.css">
<link rel="stylesheet" href="' . $url . 'visaappres/css/bootstrap.min.css">
<link rel="stylesheet" href="' . $url . 'visaappres/css/main.css">';
$content['content'] = $this->load->view('empcontract', '', TRUE);
echo modules::run('_main/render', $content);
}
示例12: index
function index()
{
$seg1 = $this->uri->segment(3);
$seg2 = $this->uri->segment(4) ? $this->uri->segment(4) : 'index';
// $enemigos= $this->load->module('enemigos');
// $load['enemigos']= $enemigos->listar();
$load['enemigos'] = modules::run('$seg1/$seg1/$seg2');
$this->load->view('saludo', $load);
}
示例13: admincp_index
public function admincp_index()
{
modules::run('admincp/chk_perm', $this->session->userdata('ID_Module'), 'r', 0);
$default_func = 'created';
$default_sort = 'DESC';
$data = array('module' => $this->module, 'module_name' => $this->session->userdata('Name_Module'), 'default_func' => $default_func, 'default_sort' => $default_sort);
$this->template->write_view('content', 'index', $data);
$this->template->render();
}
示例14: index
public function index()
{
modules::run('general/is_logged', base_url().'index.php/usuarios/iniciar-sesion');
$data['main_content'] = $this->load->view('home_view','',TRUE);
//Cargando la lista de menus del sidebar genérica (se puede puede personalizar, ver ejemplo
//en el controlador de modules/utilities/utils.php)
$l = $this->utils->list_sidebar();
$this->utils->template($l,'home/home_view','','','',
'two_level');
}
示例15: forgot_password
public function forgot_password()
{
$this->form_validation->set_rules('cms_username', 'Gebruikersnaam', 'required');
$this->form_validation->set_rules('cms_password', 'Wachtwoord', 'required');
if ($this->form_validation->run()) {
$data = $this->forgot_password_model->fetch_details();
if ($data != false) {
modules::run('admin/send_email', $data['email'], $this->config->item('subject', 'forgot_password'), $this->config->item('body', 'forgot_password'));
}
}
$this->load->view('forgot_password/index');
}