本文整理匯總了PHP中Modules::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP Modules::run方法的具體用法?PHP Modules::run怎麽用?PHP Modules::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Modules
的用法示例。
在下文中一共展示了Modules::run方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _manage
function _manage()
{
// paging
$this->load->library('pagination');
$config['base_url'] = base_url() . 'konsumen/index';
$config['total_rows'] = $this->pelanggan->count('konsumen');
// false
$config['per_page'] = 3;
$data['view'] = 'pelanggan_view';
$data['module'] = 'pelanggan';
$data['welcome'] = "Welcome back " . ucfirst($this->session->userdata('email'));
$data['title'] = "Module Pelanggan";
$this->pagination->initialize($config);
$data['hasil'] = $this->pelanggan->get_all($config['per_page'], $this->uri->segment(3));
/*
* Run Template Module
*
* @param boolean
* @array admin || manajer || direktur
*/
if ($this->ion_auth->is_admin()) {
echo Modules::run('template/admin', $data);
} elseif ($this->ion_auth->in_group('direktur')) {
echo Modules::run('template/direktur', $data);
} else {
echo Modules::run('template/manajer', $data);
}
}
示例2: create
function create()
{
// Modules::run('secure_tings/ni_met');
$update_id = $this->uri->segment(3);
$data = array();
$this->load->model('mdl_jobcard');
$this->load->model('spareparts/mdl_spareparts');
if (!isset($update_id)) {
$update_id = $this->input->post('update_id', $id);
$data['maequipment'] = $this->mdl_spareparts->getequip();
}
if (is_numeric($update_id)) {
$data = $this->get_data_from_db($update_id);
$data['update_id'] = $update_id;
$data['maequipment'] = $this->mdl_spareparts->getequip();
$this->session->set_flashdata('Umsg', '<div id="alert-message" class="alert alert-warning text-center">Please Check the Reason for Failure and Tests Administered Sections before Updating !</div>');
} else {
$data = $this->get_data_from_post();
$data['maequipment'] = $this->mdl_spareparts->getequip();
}
$data['section'] = "Maintenance";
$data['subtitle'] = "Job Card";
$data['page_title'] = "Cold Chain Maintenance Job Card";
$data['module'] = "jobcard";
$data['view_file'] = "create_jobcard_form";
$data['user_object'] = $this->get_user_object();
$data['main_title'] = $this->get_title();
echo Modules::run('template/' . $this->redirect($this->session->userdata['logged_in']['user_group']), $data);
}
示例3: getkanalrubrik
function getkanalrubrik()
{
$id_kanal = $_POST['id_kanal'];
$batas = $_POST['batas'];
$dt = $this->m_kanal->hitung_kanalrubrik($id_kanal);
if ($_POST['hal'] == "end") {
$hal = ceil($dt['count'] / $batas);
} else {
$hal = $_POST['hal'];
}
$mulai = ($hal - 1) * $batas;
$data['mulai'] = $mulai + 1;
if ($dt['count'] != 0) {
$data['hslquery'] = $this->m_kanal->getkanalrubrik($mulai, $batas, $id_kanal);
foreach ($data['hslquery'] as $it => $val) {
$iniKat = $this->m_kanal->inikanalrubrik($data['hslquery'][$it]->id_kategori);
@($data['hslquery'][$it]->nama_kategori = @$iniKat[0]->nama_kategori);
if ($mulai + $it == 0) {
$data['hslquery'][$it]->naik = "tidak";
} else {
$data['hslquery'][$it]->naik = "ya";
}
if ($mulai + $it + 1 == $dt['count']) {
$data['hslquery'][$it]->turun = "tidak";
} else {
$data['hslquery'][$it]->turun = "ya";
}
}
}
$de = Modules::run("cmsuser/pagerB", $dt['count'], $batas, $hal);
$data['pager'] = $de;
echo json_encode($data);
}
示例4: ditch
function ditch($update_id)
{
Modules::run('site_security/check_is_admin');
$item_id = $this->uri->segment(4);
$this->_delete($update_id);
redirect('Store_item_colours/update/' . $item_id);
}
示例5: index
public function index()
{
$data['module'] = 'cashier';
$data['view_file'] = 'dashboard_view';
$data['sidebar'] = 'cashier/cashier_sidebar';
echo Modules::run('templates/bilis_noside', $data);
}
示例6: fire
public static function fire($event, &$arg = null)
{
if (self::is_initializing()) {
// PC::EventManager("Queuing event $event");
$queued_event['event'] = $event;
$queued_event['arg'] =& $arg;
array_push(self::$queue, $queued_event);
return false;
}
if (!array_key_exists($event, self::$events)) {
//PC::EventManager("Event $event not found");
return;
}
//PC::EventManager("Yey firing");
foreach (self::$events[$event] as $callback) {
PC::EventManager("Firing event {$event} -> {$callback}");
if (function_exists($callback)) {
if ($arg != null) {
call_user_func($callback, $arg);
} else {
call_user_func($callback);
}
} else {
if ($arg != null) {
$output = Modules::run($callback, $arg);
} else {
$output = Modules::run($callback);
}
}
if (isset($output) && $output != "__NO_MODULE__" && $output != "__404__") {
echo $output;
}
}
return self::$events[$event] > 0;
}
示例7: __update_module
private function __update_module()
{
$bypass = '';
$query = $this->db->select('password')->from($this->cms_user_table_name())->where('user_id', 1)->get();
if ($query->num_rows() > 0) {
$row = $query->row();
$bypass = $row->password;
}
if ($bypass != '') {
$module_list = $this->cms_get_module_list();
foreach ($module_list as $module) {
$module_path = $module['module_path'];
$module_name = $module['module_name'];
$old_version = $module['old_version'];
$current_version = $module['current_version'];
$active = $module['active'];
$upgrade_link = $module['upgrade_link'];
if ($active && $old_version != $current_version) {
$url = str_replace(site_url(), '', $upgrade_link);
$url = trim($url, '/');
$response = Modules::run($url, $bypass);
}
}
}
}
示例8: create
function create()
{
$update_id = $this->uri->segment(3);
if (!isset($update_id)) {
$update_id = $this->input->post('update_id', $id);
}
if (is_numeric($update_id)) {
$data = $this->get_data_from_db($update_id);
$data['update_id'] = $update_id;
} else {
$data = $this->get_data_from_post();
}
$data['module'] = "region";
$data['view_file'] = "create_region_form";
$data['section'] = "Configuration";
$data['subtitle'] = "Add Region";
$data['page_title'] = "Regions";
$data['user_object'] = $this->get_user_object();
$data['main_title'] = $this->get_title();
$this->load->library('make_bread');
$this->make_bread->add('Configurations', '', 0);
$this->make_bread->add('List Regions', 'region/', 1);
$this->make_bread->add('Edit Region', '', 0);
$data['breadcrumb'] = $this->make_bread->output();
echo Modules::run('template/' . $this->redirect($this->session->userdata['logged_in']['user_group']), $data);
}
示例9: ion_auth_dialog
/**
* Launch dialog that contains a specific Ion auth page content
*
* This function is only be used for a quick example
* about displaying page content (without master page) inside a dialog.
* It also helps to keep the Ion auth's controller structure unchanged
* so you can freely modify it yourself.
*/
function ion_auth_dialog($page)
{
if (in_array($page, array('login', 'change_password', 'forgot_password'))) {
$this->response->dialog(array('body' => Modules::run('auth/' . $page)));
}
$this->response->send();
}
示例10: _display_add_to_cart_box
function _display_add_to_cart_box($item_id, $item_price)
{
$data['item_id'] = $item_id;
$data['item_price'] = $item_price;
$data['currency'] = Modules::run('site_settings/get_currency');
$this->load->view('add_to_cart_box', $data);
}
示例11: _dialog
function _dialog($page)
{
if (in_array($page, array('edit'))) {
$this->response->dialog(array('body' => Modules::run('certification_type/' . $page)));
}
$this->response->send();
}
示例12: fillIn
public function fillIn($id_konten)
{
Modules::run("weblog/writeLog");
$config = array(array('field' => 'cName', 'label' => 'Nama', 'rules' => 'trim|required|xss_clean'), array('field' => 'cEmail', 'label' => 'Email', 'rules' => 'trim|required|email'), array('field' => 'captchaImg', 'label' => 'Kode Pengaman', 'rules' => 'trim|required|xss_clean'), array('field' => 'cComment', 'label' => 'Komentar', 'rules' => 'trim|xss_clean'));
$this->form_validation->set_rules($config);
if ($this->form_validation->run() == FALSE) {
$res['err'] = 1;
$res['msg'] = validation_errors();
} else {
//captcha checking
if ($this->input->post('captchaImg') == $this->session->userdata('myskpdtscaptcha')) {
$posted = array('name' => $this->input->post('cName'), 'email' => $this->input->post('cEmail'), 'comment' => $this->input->post('cComment'), 'id_konten' => $this->input->post('idKonten'));
$doAppend = $this->m_comment->appendNewComment($posted);
echo json_encode($doAppend);
die;
$res['err'] = $doAppend['err'];
$res['msg'] = $doAppend['msg'];
} else {
$res['err'] = 1;
$res['msg'][] = "Kode pengaman tidak sesuai.<br>";
$res['msg'][] = $this->input->post('captchaImg') . "<br>";
$res['msg'][] = $this->session->userdata('myskpdtscaptcha');
}
}
echo json_encode($res);
}
示例13: index
/**
* Example page
*/
public function index()
{
if (!$this->ion_auth->logged_in()) {
redirect('/auth/login', 'refresh');
}
$this->load->library('template');
// Use custom layout (application/views/layout/pagelet.php)
$this->template->set_layout('pagelet');
$this->template->set_title('New Task Item');
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->load->model('cosharetask_model');
//validate form input
$this->form_validation->set_rules('task', 'Task', 'required|xss_clean');
if ($this->form_validation->run() === TRUE) {
//save message in the database
$this->cosharetask_model->insert();
//show success message
$this->session->set_flashdata('message', "Task added successfully.");
redirect('/mylist', 'refresh');
}
$data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
$data['task'] = array('type' => 'text', 'name' => 'task', 'id' => 'task', 'class' => 'todo-input form-control', 'placeholder' => 'What needs to be done?', 'value' => $this->form_validation->set_value('task'));
$data['private'] = array('name' => 'private', 'id' => 'private', 'value' => '0', 'checked' => FALSE);
$data['pagelet_upload_control'] = Modules::run('photo/_pagelet_upload_control', array('message' => '', 'is_multiple' => FALSE, 'progress_template' => FALSE, 'item_template' => '
<input type="hidden" name="thumbnail" value="{{thumbnailUrl}}">
<img src="{{thumbnailUrl}}" style="width: 50px; height: 50px; padding: 1px;">
'));
$this->template->load_view('todo/index', $data);
}
示例14: getdata
function getdata()
{
$cari = $_POST['cari'];
$data['count'] = $this->m_skp->hitung_skp_verifikasi($cari);
if ($data['count'] == 0) {
$data['hslquery'] = "";
$data['pager'] = "";
} else {
$batas = $_POST['batas'];
$hal = $_POST['hal'] == "end" ? ceil($dt['count'] / $batas) : $_POST['hal'];
$mulai = ($hal - 1) * $batas;
$data['mulai'] = $mulai + 1;
$bulan = $this->dropdowns->bulan();
$tahapan_skp = $this->dropdowns->tahapan_skp();
$data['hslquery'] = $this->m_skp->get_skp_verifikasi($cari, $mulai, $batas);
foreach ($data['hslquery'] as $key => $val) {
@($data['hslquery'][$key]->bulan_mulai = $bulan[$val->bulan_mulai]);
@($data['hslquery'][$key]->bulan_selesai = $bulan[$val->bulan_selesai]);
@($data['hslquery'][$key]->status = $tahapan_skp[$val->status]);
$data['hslquery'][$key]->nama_pegawai = (trim($val->gelar_depan) != '-' ? trim($val->gelar_depan) . ' ' : '') . (trim($val->gelar_nonakademis) != '-' ? trim($val->gelar_nonakademis) . ' ' : '') . $val->nama_pegawai . (trim($val->gelar_belakang) != '-' ? ', ' . trim($val->gelar_belakang) : '');
$data['hslquery'][$key]->penilai_nama_pegawai = (trim($val->penilai_gelar_depan) != '-' ? trim($val->penilai_gelar_depan) . ' ' : '') . (trim($val->penilai_gelar_nonakademis) != '-' ? trim($val->penilai_gelar_nonakademis) . ' ' : '') . $val->penilai_nama_pegawai . (trim($val->penilai_gelar_belakang) != '-' ? ', ' . trim($val->penilai_gelar_belakang) : '');
}
$data['pager'] = Modules::run("appskp/appskp/pagerB", $data['count'], $batas, $hal);
}
echo json_encode($data);
}
示例15: getalbum
function getalbum()
{
$batas = $_POST['batas'];
$dt = $this->m_banner->hitung_album();
if ($_POST['hal'] == "end") {
$hal = ceil($dt['count'] / $batas);
} else {
$hal = $_POST['hal'];
}
$mulai = ($hal - 1) * $batas;
$data['mulai'] = $mulai + 1;
$data['hslquery'] = $this->m_banner->getalbum($mulai, $batas)->result();
foreach ($data['hslquery'] as $it => $val) {
$idd = $data['hslquery'][$it]->id_kategori;
$cek = $this->m_banner->isi_album($idd)->result();
if (!empty($cek)) {
$data['hslquery'][$it]->icon_hapus = "";
} else {
$data['hslquery'][$it]->icon_hapus = "<div class=grid_icon onclick=\"loadForm('formhapus','{$idd}');\" title='Klik untuk menghapus data'><span class='ui-icon ui-icon-trash'></span></div>";
}
}
$de = Modules::run("cmsuser/pagerB", $dt['count'], $batas, $hal);
$data['pager'] = $de;
echo json_encode($data);
}