本文整理汇总了PHP中GetAll函数的典型用法代码示例。如果您正苦于以下问题:PHP GetAll函数的具体用法?PHP GetAll怎么用?PHP GetAll使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetAll函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_notif_header
public function load_notif_header()
{
$data['notification'] = GetAll('notifikasi', array('is_read' => 'where/0', 'receiver_id' => 'where/' . sessId(), 'limit' => 'limit/3', 'id' => 'order/desc'));
$data['notifications'] = GetAll('notifikasi', array('is_read' => 'where/0', 'receiver_id' => 'where/' . sessId(), 'id' => 'order/desc'));
$data['notification_num'] = GetAll('notifikasi', array('is_read' => 'where/0', 'receiver_id' => 'where/' . sessId()))->num_rows();
$this->load->view('notification/head_notif_badge', $data);
}
示例2: 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);
}
示例3: detail
function detail($id)
{
$this->data['title'] = $this->title . ' - Detail';
permissionUser();
$this->data['id'] = $id;
$this->data['r'] = GetAll('stok_penyesuaian', array('id' => 'where/' . $id))->row();
$this->data['list'] = $this->main->get_list($id)->result();
$this->_render_page($this->module . '/' . $this->file_name . '/detail', $this->data);
}
示例4: 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');
}
示例5: response_cat
function response_cat($id = null)
{
//error_reporting(0);
if ($id != '') {
/* $qdep=$this->model_getdata->get_department();
$data['listdep']=$qdep->result();
$data['bulan']=$this->model_getdata->namabulan(); */
$data['document'] = GetAll('report', array('id' => 'where/' . $id));
if ($data['document']->num_rows() > 0) {
$this->load->view('report/category/main', $data);
} else {
echo "Dokumen Tidak Ditemukan";
}
}
}
示例6: index
function index()
{
if (!$this->ion_auth->logged_in()) {
//redirect them to the login page
redirect('auth/login', 'refresh');
} elseif (!$this->ion_auth->is_admin()) {
//redirect them to the home page because they must be an administrator to view this
//return show_error('You must be an administrator to view this page.');
return show_error('You must be an administrator to view this page.');
} else {
//set the flash data error message if there is one
$this->data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
$filter = array('is_deleted' => 0);
$query_options = GetAll('library', $filter);
$this->data['user_all'] = $query_options->num_rows() > 0 ? $query_options : array();
$this->_render_page('library_table/index', $this->data);
}
}
示例7: input
function input($id = NULL)
{
$this->data['val'] = $this->data['list'] = array();
if ($id > 0) {
$this->data['val'] = GetAll($this->file_name, array('id' => 'where/' . $id))->row_array();
$this->data['list'] = GetAll($this->file_name . '_list', array($this->file_name . '_id' => 'where/' . $id))->result_array();
}
$this->data['title'] = $this->title . ' - Input';
permissionUser();
$this->data['module'] = $this->module;
$this->data['file_name'] = $this->file_name;
$this->data['r'] = $this->main->get_detail($id);
$this->data['opt_barang'] = GetAll('barang')->result();
$this->data['barang'] = getAll('barang')->result_array();
$this->data['satuan'] = getAll('satuan')->result_array();
$this->data['opt_satuan'] = GetOptAll('satuan');
$this->_render_page($this->module . '/' . $this->file_name . '/input', $this->data);
}
示例8: _get_datatables_query
private function _get_datatables_query($param = NULL)
{
//Parameter
$where = "id > 0 ";
if (isset($param['divisi']) && $param['divisi'] > 0) {
$id_sec = "(";
$q = GetAll("hris_orgs", array("parent_id" => "where/" . $param['divisi']));
foreach ($q->result_array() as $r) {
$id_sec .= "'" . $r['org_id'] . "',";
}
$id_sec = substr($id_sec, 0, -1) . ")";
$where .= "AND org_id in " . $id_sec . " ";
}
if (isset($param['section']) && $param['section'] > 0) {
$where .= "AND org_id='" . $param['section'] . "' ";
}
if (isset($param['position']) && $param['position'] > 0) {
$where .= "AND job_class_id='" . $param['position'] . "' ";
}
if (isset($param['grade']) && $param['grade'] > 0) {
$where .= "AND grade_job_class='" . $param['grade'] . "' ";
}
if (isset($param['regs'])) {
if ($param['regs'] == "reguler") {
$where .= "AND group_shift='N.A.' ";
} else {
if ($param['regs'] == "shift") {
$where .= "AND group_shift in ('A', 'B', 'C', 'D') ";
}
}
//$this->db->where_in("group_shift", array("A","B","C","D"));
}
//Query
$select = "*";
$this->db->select($select);
$this->db->from("kg_view_cuti_platfon");
$this->db->where($where);
$this->db->order_by("person_nm", "asc");
}
示例9: upload_excel
function upload_excel()
{
$config['upload_path'] = './upload/files/excel';
$config['allowed_types'] = 'xlsx|xls|csv';
$config['overwrite'] = TRUE;
$config['max_size'] = '10000';
$val = 0;
$this->load->library('upload', $config);
if (!$this->upload->do_upload('excelfile')) {
$error = array('error' => $this->upload->display_errors());
die(print_r($error));
} else {
$data = array('upload_data' => $this->upload->data());
// echo "success";
$data_upload = $this->upload->data();
//die(print_r($data_upload));
$result = $this->run_import($data_upload);
//die(print_r($result));
foreach ($result as $row) {
$employee_ext_id = $row['A'];
$val = $row['C'];
$employee_id = GetValue('employee_id', 'hris_employee', array('employee_ext_id' => 'where/' . $employee_ext_id));
//count
$count = GetAll('payroll_monthly_deduction_medical', array('payroll_period_id' => 'where/' . $this->input->post('periode'), 'employee_id' => 'where/' . $employee_id))->num_rows();
if ($count > 0) {
$val_old = GetValue('value', 'payroll_monthly_deduction_medical', array('employee_id' => 'where/' . $employee_id, 'payroll_period_id' => 'where/' . $this->input->post('periode')));
$val_new = $val_old + $val;
$data_update = array('value' => $val_new);
$this->all_model->update('payroll_monthly_deduction_medical', $data_update, array('employee_id' => $employee_id, 'payroll_period_id' => $this->input->post('periode')));
//lastq();
} else {
$data_insert = array('payroll_period_id' => $this->input->post('periode'), 'employee_id' => $employee_id, 'value' => $val, 'created_by' => sessId(), 'created_on' => date('Y-m-d H:i:s'));
$this->all_model->insert('payroll_monthly_deduction_medical', $data_insert);
}
}
}
redirect('payroll/medical');
}
示例10: update_master_component_value
function update_master_component_value($component_id)
{
$today = date('Y-m-d');
$master_id = GetAllSelect('payroll_master_component', 'payroll_component_id, payroll_master_id', array('payroll_component_id' => 'where/' . $component_id))->result();
$emp_id = getValue('employee_id', 'payroll_master', array('id' => 'where/' . $master_id));
$filter = array('payroll_component_id' => 'where/' . $component_id, 'session_id' => 'where/' . $this->session_id);
$component_session_id = getValue('id', 'payroll_component_session', $filter);
//lastq();
$com_val = $this->db->select('*')->where('payroll_component_session_id', $component_session_id)->get('payroll_component_value')->result();
$formula = '';
if (!empty($com_val)) {
//print_ag($com_val);
foreach ($com_val as $c) {
$from = date('Y-m-d', strtotime($c->from));
$to = date('Y-m-d', strtotime($c->to));
//print_ag("$today lebih besar dari $from , $today kurang dari $to");
//print_mz($from);
//if($today > $from && $today < $to)die('s');
if ($today >= $from && $today <= $to) {
$formula = $c->formula;
//echo $formula;
$is_condition = $c->is_condition;
$min = $c->min;
$max = $c->max;
}
}
}
$tx = explode(' ', $formula);
$r = '';
foreach ($master_id as $value) {
if ($formula != null && $component_id != 60) {
if (!in_array('IF', $tx)) {
for ($i = 0; $i < sizeof($tx); $i++) {
//print_mz($tx);
if (preg_match("/[a-z]/i", $tx[$i])) {
$session_id = '2015';
$g = getValue('id', 'payroll_component', array('code' => 'where/' . $tx[$i]));
$detail = $this->payroll->get_employee_detail($emp_id);
$det = $detail->row();
$employee_job_id = getValue('job_id', 'hris_employee_job', array('employee_id' => 'where/' . $emp_id));
$job_value_id = getValue('job_value_id', 'hris_jobs', array('job_id' => 'where/' . $employee_job_id));
$filter = array('session_id' => 'where/' . $session_id, 'job_value_id' => 'where/' . $job_value_id, 'job_class_id' => 'where/' . $det->job_class_id);
$job_value_matrix = GetAll('payroll_job_value_matrix', $filter);
//lastq();
$job_value_matrix_num = GetAll('payroll_job_value_matrix', $filter)->num_rows();
//lastq();
if ($tx[$i] == 'JVM') {
$g = $jvm = $job_value_matrix_num > 0 ? $job_value_matrix->row()->value : 0;
//print_r('jvm='.$g.'-');
} elseif ($tx[$i] == 'VAR') {
$cm_param = GetAll('payroll_compensation_mix', array('session_id' => 'where/' . $session_id, 'job_class_id' => 'where/' . $det->job_class_id));
$cm_param_num = GetAll('payroll_compensation_mix', array('session_id' => 'where/' . $session_id, 'job_class_id' => 'where/' . $det->job_class_id))->num_rows();
//lastq();
$row = $cm_param->row();
$g = $var = $cm_param_num > 0 ? $row->var / 100 : 0 / 100;
//print_mz('var='.$var.'-');
} elseif ($tx[$i] == 'CONV') {
$g = getValue('value', 'payroll_exchange_rate', array('session_id' => 'where/' . $session_id));
} else {
$g = getValue('value', 'payroll_master_component', array('payroll_master_id' => 'where/' . $value->payroll_master_id, 'payroll_component_id' => 'where/' . $g));
//print_r($g.'-');
}
//print_r($value->component.'='.$g.'<br/>');
$tx[$i] = $g;
}
if (strpos($tx[$i], '%') !== false) {
$tx[$i] = substr_replace($tx[$i], '/100', -1);
} else {
false;
}
$r .= $tx[$i];
}
} else {
$com = explode(PHP_EOL, $formula);
//print_ag($com);
for ($j = 0; $j < sizeof($com); $j++) {
$ntx = '';
$bwgs = getValue('value', 'payroll_master_component', array('payroll_master_id' => 'where/' . $value->payroll_master_id, 'payroll_component_id' => 'where/60'));
$hous = getValue('value', 'payroll_master_component', array('payroll_master_id' => 'where/' . $value->payroll_master_id, 'payroll_component_id' => 'where/66'));
//print_mz($xj[$i]);
$bwgshous = $bwgs + $hous;
//print_mz($bwgshous);
$xj = explode(' ', $com[$j]);
//print_ag($xj);
$n = '';
for ($i = 7; $i < sizeof($xj); $i++) {
if (preg_match("/[a-z]/i", $xj[$i])) {
//echo $j.'-'.$xj[$i].'<br/>';
switch ($xj[$i]) {
case 'TK0':
$xj[$i] = getValue('value', 'payroll_ptkp', array('title' => 'where/' . 'TK0'));
break;
case 'K0':
$xj[$i] = getValue('value', 'payroll_ptkp', array('title' => 'where/' . 'K0'));
break;
case 'K1':
$xj[$i] = getValue('value', 'payroll_ptkp', array('title' => 'where/' . 'K1'));
//print_mz($xj[$i]);
break;
case 'K2':
//.........这里部分代码省略.........
示例11: _get_datatables_query
private function _get_datatables_query($param = NULL)
{
//Parameter
$exp = explode("~", $param['tgl']);
$where = "date_full >= '" . $exp[0] . "' AND date_full <= '" . $exp[1] . "' ";
if (isset($param['divisi']) && $param['divisi'] > 0) {
$id_sec = "(";
$q = GetAll("hris_orgs", array("parent_id" => "where/" . $param['divisi']));
foreach ($q->result_array() as $r) {
$id_sec .= "'" . $r['org_id'] . "',";
}
$id_sec = substr($id_sec, 0, -1) . ")";
$where .= "AND org_id in " . $id_sec . " ";
}
if (isset($param['section']) && $param['section'] > 0) {
$where .= "AND org_id='" . $param['section'] . "' ";
}
if (isset($param['position']) && $param['position'] > 0) {
$where .= "AND job_class_id='" . $param['position'] . "' ";
}
if (isset($param['grade']) && $param['grade'] > 0) {
$where .= "AND grade_job_class='" . $param['grade'] . "' ";
}
if (isset($param['regs'])) {
if ($param['regs'] == "reguler") {
$where .= "AND group_shift='N.A.' ";
} else {
if ($param['regs'] == "shift") {
$where .= "AND group_shift in ('A', 'B', 'C', 'D') ";
}
}
//$this->db->where_in("group_shift", array("A","B","C","D"));
}
$person_id = permission();
if ($person_id != 1) {
$bawahan = CekBawahan($person_id);
$id_bawahan = "('" . $person_id . "',";
foreach ($bawahan as $r) {
$id_bawahan .= "'" . $r . "',";
}
$id_bawahan = substr($id_bawahan, 0, -1) . ")";
$where .= "AND person_id in " . $id_bawahan . " ";
}
//Query
$select = "id, ext_id, person_nm, id_employee as a_id, SUM(jhk) as jhk, SUM(sakit) as sakit,\n SUM(cuti) as cuti,SUM(ijin) as ijin, SUM(late) as late, SUM(alpa) as alpa,SUM(off) as off, SUM(jh) as jh";
$this->db->select($select);
$this->db->from($this->table);
$i = 0;
$like = "";
foreach ($this->column as $item) {
if (isset($_POST['search']['value'])) {
//($i===0) ? $this->db->like($item, $_POST['search']['value']) : $this->db->or_like($item, $_POST['search']['value']);
$like .= $i === 0 ? " AND (" . $item . " LIKE '%" . $_POST['search']['value'] . "%' " : " OR " . $item . " LIKE '%" . $_POST['search']['value'] . "%' ";
}
$column[$i] = $item;
$i++;
}
if ($like != "") {
$like .= ")";
$this->db->where($where . $like);
} else {
$this->db->where($where);
}
$this->db->group_by(array("id_employee", "person_nm"));
if (isset($_POST['order'])) {
$this->db->order_by($column[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);
} else {
if (isset($this->order)) {
$order = $this->order;
$this->db->order_by(key($order), $order[key($order)]);
}
}
$this->db->order_by("person_nm", "asc");
}
示例12: detail_email
function detail_email($id)
{
$sess_id = $this->data['sess_id'] = $this->session->userdata('user_id');
$this->data['sess_nik'] = $sess_nik = get_nik($sess_id);
$this->data['recruitment'] = $this->recruitment_model->recruitment($id)->result();
$this->data['_num_rows'] = $this->recruitment_model->recruitment($id)->num_rows();
$this->data['status'] = getAll('recruitment_status', array('is_deleted' => 'where/0'));
$this->data['urgensi'] = getAll('recruitment_urgensi', array('is_deleted' => 'where/0'));
$jk = explode(',', getAll('users_recruitment_kualifikasi', array('id' => 'where/' . $id))->row('jenis_kelamin_id'));
$pendidikan = explode(',', getAll('users_recruitment_kualifikasi', array('id' => 'where/' . $id))->row('pendidikan_id'));
$komputer = explode(',', getAll('users_recruitment_kemampuan', array('id' => 'where/' . $id))->row('komputer'));
$this->data['jenis_kelamin'] = $this->recruitment_model->get_jk($jk);
$this->data['pendidikan'] = $this->recruitment_model->get_pendidikan($pendidikan);
$this->data['komputer'] = $this->recruitment_model->get_komputer($komputer);
$this->data['position_pengaju'] = $this->get_user_position($this->recruitment_model->recruitment($id)->row_array()['user_id']);
$this->data['approval_status'] = GetAll('approval_status', array('is_deleted' => 'where/0'));
return $this->load->view('form_recruitment/recruitment_mail', $this->data, TRUE);
}
示例13: add
function add()
{
error_reporting(0);
permissionUser();
//print_mz($this->input->post());
$laporan = $this->input->post('laporan');
$m_v = $this->input->post('m_v');
$user = $this->input->post('user_id');
foreach ($laporan as $m) {
$cek = GetAll('report_permission', array('user_id' => 'where/' . $user, 'menu_id' => 'where/' . $m))->num_rows();
$data['menu_id'] = $m;
$data['create'] = $m_c[$m] ? '1' : '0';
$data['view'] = $m_v[$m] ? '1' : '0';
$data['update'] = $m_u[$m] ? '1' : '0';
$data['delete'] = $m_d[$m] ? '1' : '0';
$data['user_id'] = $user;
$data['user_group'] = GetValue('group_id', 'users_groups', array('user_id' => 'where/' . $user));
if ($cek == 0) {
$this->db->insert('report_permission', $data);
} else {
$this->db->where(array('user_id' => $user, 'menu_id' => $m));
$this->db->update('report_permission', $data);
}
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例14: edit
function edit($id)
{
permission();
$q = GetAll("kg_kehadirandetil", array("id" => "where/" . $id));
$r = $q->result_array();
$data['val'] = $r[0];
$data['tgl'] = $r[0]['tahun'] . "-" . $r[0]['bulan'] . "-" . $r[0]['tanggal'];
$data['absensi'] = array(array("jh", "Hadir"), array("off", "Off"), array("cuti", "Cuti"), array("ijin", "Ijin"), array("sakit", "Sakit"), array("alpa", "Alpa"));
//print_mz($data['absensi']);
for ($i = 0; $i <= 20; $i++) {
$opt[$i] = $i;
}
$data['opt_lembur'] = $opt;
$this->load->view('attendance_edit', $data);
//$this->_render_page($this->filename.'_edit',$data);
}
示例15: INV
function INV($id)
{
permissionUser();
$this->data['id'] = $id;
$this->data[$this->file_name] = GetAll('cash_ledger', array('id' => 'where/' . $id));
$this->data[$this->file_name . '_list'] = GetAll('cash_ledger_list', array('id' => 'where/' . $id));
$this->load->library('mpdf60/mpdf');
$html = $this->load->view($this->module . '/' . $this->file_name . '/invoice', $this->data, true);
$mpdf = new mPDF();
$mpdf = new mPDF('A4');
$mpdf->WriteHTML($html);
$mpdf->Output($id . '-' . $title . '.pdf', 'I');
}