本文整理汇总了PHP中permissionUser函数的典型用法代码示例。如果您正苦于以下问题:PHP permissionUser函数的具体用法?PHP permissionUser怎么用?PHP permissionUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了permissionUser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: item_clicked
public function item_clicked()
{
permissionUser();
$id = $this->input->post('id');
$this->db->where('id', $id)->update($this->table_name, array('is_read' => 1));
return true;
}
示例2: ajax_list
public function ajax_list()
{
permissionUser();
$list = $this->main->get_datatables();
$data = array();
$no = $_POST['start'];
foreach ($list as $r) {
$no++;
$row = array();
$row[] = $no;
$row[] = $r->kode;
$row[] = $r->barang;
$row[] = $r->dalam_stok;
$row[] = $r->minimum_stok;
$row[] = $r->satuan;
$row[] = $r->gudang;
//add html for action
/*$row[] = '<a class="btn btn-sm btn-primary" href="javascript:void(0);" title="Edit" onclick="edit_user('."'".$r->id."'".')"><i class="glyphicon glyphicon-pencil"></i></a>
<a class="btn btn-sm btn-danger" href="javascript:void(0)" title="Hapus" onclick="delete_user('."'".$r->id."'".')"><i class="glyphicon glyphicon-trash"></i></a>';
*/
$data[] = $row;
}
$output = array("draw" => $_POST['draw'], "recordsTotal" => $this->main->count_all(), "recordsFiltered" => $this->main->count_filtered(), "data" => $data);
//output to json format
echo json_encode($output);
}
示例3: message_clicked
public function message_clicked()
{
permissionUser();
$id = $this->input->post('id');
$f_name = getValue('sender_id', 'chat', array('id' => 'where/' . $id));
$this->db->where('sender_id', $f_name)->update($this->table_name, array('is_read' => 1));
echo base_url('message');
}
示例4: index
function index()
{
permissionUser();
$num_rows = getAll($this->table_name, array('receiver_id' => 'where/' . sessId()))->num_rows();
$this->data['last_id'] = $last_id = $num_rows > 0 ? $this->db->select('id')->where('receiver_id', sessId())->order_by('id', 'asc')->get($this->table_name)->last_row()->id : 0;
$this->data['last_notif'] = getAll($this->table_name, array('receiver_id' => 'where/' . sessId(), 'id' => 'where/' . $last_id))->row();
$this->data['all_notification'] = GetAll('notifikasi', array('receiver_id' => 'where/' . sessId(), 'id' => 'order/desc'));
$this->_render_page('notification/index', $this->data);
}
示例5: print_pdf
function print_pdf($id)
{
permissionUser();
$this->data['id'] = $id;
$this->data['r'] = GetAll('stok_pemindahan', array('id' => 'where/' . $id))->row();
$this->data['list'] = $this->main->get_list($id)->result_array();
$this->load->library('pdf');
$html = $this->load->view($this->module . '/' . $this->file_name . '/pdf', $this->data, true);
$this->pdf->load_html($html);
$this->pdf->render();
$this->pdf->stream($id . '-' . $this->title . '.pdf');
}
示例6: input
function input()
{
permissionUser();
$num_rows = getAll('order')->num_rows();
$last_id = $num_rows > 0 ? $this->db->select('id')->order_by('id', 'asc')->get('order')->last_row()->id : 0;
$this->data['last_id'] = $num_rows > 0 ? $last_id + 1 : 1;
$this->data['barang'] = getAll('barang')->result_array();
$this->data['satuan'] = getAll('satuan')->result_array();
$this->data['kurensi'] = getAll('kurensi')->result();
$this->data['metode'] = getAll('metode_pembayaran')->result();
$this->data['gudang'] = getAll('gudang')->result();
$this->data['options_supplier'] = options_row($this->model_name, 'get_supplier', 'id', 'title', '-- Pilih Supplier --');
$this->_render_page('transaksi/order/input', $this->data);
}
示例7: add
function add()
{
permissionUser();
$list = array('barang_id' => $this->input->post('barang_id'), 'catatan_barang' => $this->input->post('catatan_barang'), 'buku' => $this->input->post('buku'), 'satuan_buku' => $this->input->post('satuan_buku'), 'fisik' => $this->input->post('fisik'), 'satuan_id' => $this->input->post('satuan_id'));
$data = array('no' => $this->input->post('no'), 'tgl' => date('Y-m-d', strtotime($this->input->post('tgl'))), 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$this->db->insert($this->module . '_' . $this->file_name, $data);
$insert_id = $this->db->insert_id();
for ($i = 0; $i < sizeof($list['barang_id']); $i++) {
$data2 = array($this->file_name . '_id' => $insert_id, 'barang_id' => $list['barang_id'][$i], 'catatan' => $list['catatan_barang'][$i], 'buku' => str_replace(',', '', $list['buku'][$i]), 'satuan_buku' => str_replace(',', '', $list['satuan_buku'][$i]), 'fisik' => str_replace(',', '', $list['fisik'][$i]), 'satuan_id' => $list['satuan_id'][$i]);
$this->db->insert($this->module . '_' . $this->file_name . '_list', $data2);
$this->db->where(array('barang_id' => $list['barang_id'][$i]));
$this->db->update('stok', array('dalam_stok' => $list['fisik'][$i]));
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例8: send_notification
function send_notification($id)
{
permissionUser();
$url = base_url() . $this->file_name . '/detail/' . $id;
$subject = 'Pengajuan Work Order';
$isi = getName(sessId()) . " membuat Work Order, Untuk melihat detail silakan <a href={$url}> KLIK DISINI </a>.";
$no = getValue('no', $this->table_name, array('id' => 'where/' . $id));
//SEND NOTIFICATION TO PRODUCTION
$group_id = array('8');
$user_id = $this->db->select('user_id')->where_in('group_id', $group_id)->get('users_groups')->result();
foreach ($user_id as $u) {
$data = array('sender_id' => sessId(), 'receiver_id' => $u->user_id, 'sent_on' => dateNow(), 'judul' => $subject, 'isi' => $isi, 'no' => $no, 'url' => $url);
$this->db->insert('notifikasi', $data);
$this->send_email(getEmail($u->user_id), $subject, $isi);
}
return TRUE;
}
示例9: index
function index($id = null)
{
permissionUser();
$this->data['title'] = $this->title;
$this->data['main_title'] = $this->module . '';
$q = $this->stok->get_judul();
$this->data['tipedokumen'] = $q->result();
$filter['statusisasi'] = 'where/1';
if ($this->session->userdata('webmaster_grup') == 10) {
$filter['id'] = 'where/2';
}
$this->data['opt_dok'] = $this->GetOptDoc($id);
$this->data['options_barang'] = options_row($this->model_name, 'get_barang', 'kode', 'title', '-- Pilih Barang --');
$this->data['options_satuan'] = options_row($this->model_name, 'get_satuan', 'id', 'title', '-- Pilih Satuan --');
$this->data['options_gudang'] = options_row($this->model_name, 'get_gudang', 'id', 'title', '-- Pilih Gudang --');
$this->data['options_kurensi'] = options_row($this->model_name, 'get_kurensi', 'id', 'title', '-- Pilih Kurensi --');
$this->_render_page('report/menu/menu', $this->data);
}
示例10: index
function index()
{
permissionUser();
$this->data['num_data_po'] = getAll('purchase_order', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_data_pembelian'] = getAll('pembelian', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_data_so'] = getAll('sales_order', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_data_penjualan'] = getAll('penjualan', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_data_penerimaan'] = getAll('stok_penerimaan', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_data_pengeluaran'] = getAll('stok_pengeluaran', array('created_on' => 'where/' . date('Y-m-d')))->num_rows();
$this->data['num_stok'] = getAll('barang')->num_rows();
$this->data['num_barang'] = getAll('barang')->num_rows();
$this->data['num_stok_tersedia'] = getAll('stok', array(), array('!=dalam_stok' => '0'))->num_rows();
$this->data['num_stok_minimum'] = $this->db->where('dalam_stok < minimum_stok')->get('stok')->num_rows();
$this->data['num_stok_minimum'] = $this->db->where('dalam_stok < minimum_stok')->get('stok')->num_rows();
$this->data['num_barang_jadi'] = getAll('barang', array('jenis_barang_id' => 'where/1'))->num_rows();
$this->data['num_barang_mentah'] = getAll('barang', array('jenis_barang_id' => 'where/2'))->num_rows();
$this->data['persen_barang_jadi'] = $this->data['num_barang_jadi'] / $this->data['num_barang'] * 100;
$this->data['persen_barang_mentah'] = $this->data['num_barang_mentah'] / $this->data['num_barang'] * 100;
$this->_render_page('dashboard/index', $this->data);
}
示例11: add
function add()
{
permissionUser();
$id = $this->input->post('id');
$list = array('kode_barang' => $this->input->post('kode_barang'), 'jumlah' => $this->input->post('jumlah'), 'satuan' => $this->input->post('satuan'));
$data = array('barang_id' => $this->input->post('output'), 'created_on' => date("Y-m-d"), 'created_by' => sessId());
if ($id > 0) {
$this->db->where('id', $id);
$this->db->update($this->file_name, $data);
$insert_id = $id;
$this->db->query("DELETE FROM assembly_list WHERE assembly_id='{$id}'");
} else {
$this->db->insert($this->file_name, $data);
$insert_id = $this->db->insert_id();
}
for ($i = 0; $i < sizeof($list['kode_barang']); $i++) {
$data2 = array('assembly_id' => $insert_id, 'kode_barang' => $list['kode_barang'][$i], 'jumlah' => str_replace(',', '.', $list['jumlah'][$i]), 'satuan_id' => $list['satuan'][$i]);
$this->db->insert($this->file_name . '_list', $data2);
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例12: bast
function bast($id = NULL)
{
permissionUser();
$this->data['id'] = $id;
/*
$this->data[$this->file_name] = $this->main->get_detail($id);
$this->data[$this->file_name.'_list'] = $this->main->get_list_detail($id); */
$this->load->library('mpdf60/mpdf');
$html = $this->load->view($this->module . '/' . $this->file_name . '/bast', $this->data, true);
$mpdf = new mPDF();
$mpdf = new mPDF('A4');
$mpdf->WriteHTML($html);
$mpdf->Output($id . '_BAST-' . $title . '.pdf', 'I');
}
示例13: index
function index()
{
permissionUser();
redirect('transaksi/order', 'refresh');
}
示例14: list_inv
public function list_inv()
{
permissionUser();
$list = $this->inv->get_datatables();
$data = array();
$no = $_POST['start'];
foreach ($list as $r) {
$photo_link = base_url() . 'uploads/barang/' . $r->id . '/' . $r->photo;
$file_headers = @get_headers($photo_link);
$photo = $this->data['photo'] = $file_headers[0] != 'HTTP/1.1 404 Not Found' && !empty($r->photo) ? $photo_link : assets_url('assets/images/no-image-mid.png');
$no++;
$row = array();
$row[] = $no;
$row[] = "<img height='75px' width='100px' src='{$photo}' />";
$row[] = $r->kode;
$row[] = $r->title;
$row[] = $r->jenis_inventaris;
$row[] = $r->harga_beli;
$row[] = $r->umur_ekonomis;
$row[] = $r->akumulasi;
$row[] = $r->beban_perbulan;
$row[] = $r->nilai_buku;
//add html for action
$row[] = '<a class="btn btn-sm btn-primary" href="javascript:void(0);" title="Edit" onclick="edit_inv(' . "'" . $r->id . "'" . ')"><i class="glyphicon glyphicon-pencil"></i></a>
<a class="btn btn-sm btn-danger" href="javascript:void(0)" title="Hapus" onclick="delete_inv(' . "'" . $r->id . "'" . ')"><i class="glyphicon glyphicon-trash"></i></a>';
$data[] = $row;
}
$output = array("draw" => $_POST['draw'], "recordsTotal" => $this->inv->count_all(), "recordsFiltered" => $this->inv->count_filtered(), "data" => $data);
//output to json format
echo json_encode($output);
}
示例15: get_up
function get_up($id)
{
permissionUser();
$up = getValue('up', 'kontak', array('id' => 'where/' . $id));
$this->data['up'] = explode(',', $up);
$this->_render_page('purchase/order/up', $this->data);
}