本文整理汇总了PHP中getAll函数的典型用法代码示例。如果您正苦于以下问题:PHP getAll函数的具体用法?PHP getAll怎么用?PHP getAll使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAll函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: add_row
function add_row($id)
{
$data['id'] = $id;
$data['barang'] = getAll('barang')->result_array();
$data['satuan'] = getAll('satuan')->result_array();
$this->load->view('penyesuaian/row', $data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:7,代码来源:penyesuaian.php
示例2: update_component
function update_component()
{
$comp = GetAllSelect('payroll_component', 'id')->result();
foreach ($comp as $c) {
$data = array('session_id' => $this->new_session, 'payroll_component_id' => $c->id);
$filter = array('session_id' => 'where/' . $this->new_session, 'payroll_component_id' => 'where/' . $c->id);
$num_rows = GetAllSelect('payroll_component_session', 'id', $filter)->num_rows();
if ($num_rows > 0) {
$this->db->where('session_id', $this->new_session)->where('payroll_component_id', $c->id)->update('payroll_component_session', $data);
} else {
$this->db->insert('payroll_component_session', $data);
}
$filter2 = array('session_id' => 'where/' . $this->old_session, 'payroll_component_id' => 'where/' . $c->id);
$comp_sess_before = getValue('id', 'payroll_component_session', $filter2);
print_ag($comp_sess_before);
$comp_value = getAll('payroll_component_value', array('payroll_component_session_id' => 'where/' . $comp_sess_before))->row();
print_ag($comp_value);
$comp_sess_new = getValue('id', 'payroll_component_session', $filter);
$num_rows_new = GetAllSelect('payroll_component_value', 'id', array('payroll_component_session_id' => 'where/' . $comp_sess_new))->num_rows();
if (!empty($comp_value)) {
$data2 = array('payroll_component_session_id' => $comp_sess_new, 'from' => $comp_value->from, 'to' => $comp_value->to, 'formula' => $comp_value->formula, 'is_condition' => $comp_value->is_condition, 'min' => $comp_value->min, 'max' => $comp_value->max, 'created_by' => sessId(), 'created_on' => dateNow());
if ($num_rows_new > 0) {
$this->db->where('payroll_component_session_id', $comp_sess_new)->update('payroll_component_value', $data2);
} else {
$this->db->insert('payroll_component_value', $data2);
}
}
print_ag($this->db->last_query());
}
}
开发者ID:pay-test,项目名称:ci2,代码行数:30,代码来源:generate_new_session.php
示例3: load_msg_header
function load_msg_header()
{
//CHAT
$data['users'] = getAll('users', array('username' => 'order/asc'), array('!=id' => sessId()));
$data['unread_all'] = GetAllSelect('chat', 'is_read', array('is_read' => 'where/0', 'receiver_id' => 'where/' . sessId()))->num_rows();
$data['messages'] = getAll('chat', array('receiver_id' => 'where/' . sessId(), 'limit' => 'limit/3', 'id' => 'order/desc'))->result();
$this->load->view('chat/header', $data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:8,代码来源:chat.php
示例4: index
function index()
{
$this->data['title'] = ucfirst($this->title);
$this->data['page_title'] = $this->page_title;
$this->data['period'] = getAll('payroll_period');
permission();
$this->_render_page($this->filename, $this->data);
}
开发者ID:pay-test,项目名称:ci2,代码行数:8,代码来源:medical.php
示例5: detail
function detail($id)
{
permissionUser();
$notif = $this->data['notif'] = getAll($this->table_name, array('receiver_id' => 'where/' . sessId(), 'id' => 'where/' . $id))->row();
$photo_link = getValue('photo', 'users', array('id' => 'where/' . $notif->sender_id));
$photo_link = base_url() . 'uploads/' . $notif->sender_id . '/' . $photo_link;
$file_headers = @get_headers($photo_link);
$this->data['sender_photo'] = $file_headers[0] != 'HTTP/1.1 404 Not Found' ? $photo_link : assets_url('assets/images/no-image-mid.png');
$this->load->view('notification/detail', $this->data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:10,代码来源:notification.php
示例6: artikel
function artikel()
{
$sql = "SELECT P.partnumber,P.description,P.unit,P.weight,t.rate,P.sellprice,P.listprice,P.priceupdate,";
$sql .= "PG.partsgroup,P.notes,P.image,P.onhand,P.buchungsgruppen_id as bugru FROM ";
$sql .= "chart c left join tax t on c.taxkey_id=t.taxkey, parts P left join partsgroup PG on ";
$sql .= "PG.id=P.partsgroup_id left join buchungsgruppen B on P.buchungsgruppen_id = B.id ";
$sql .= "WHERE P.shop='t' and c.id=B.income_accno_id_0";
$rs = getAll("erp", $sql, "artikel");
return $rs;
}
开发者ID:jquade,项目名称:lxoffice-erp,代码行数:10,代码来源:erpexport.php
示例7: get_all_url
function get_all_url()
{
//从数据库中查处所有已经有的数据,进行对比,如果有,则不插入
$mysql_str = "SELECT cn_thinkphp_tuijian.title_url from cn_thinkphp_tuijian ORDER BY id ;";
$res_datas = getAll($mysql_str);
$arr_exit = array();
foreach ($res_datas as $res_data) {
$arr_exit[] = $res_data[0];
}
return $arr_exit;
}
开发者ID:yunkaiyueming,项目名称:cnblogs_query,代码行数:11,代码来源:record_cn_thinkphp.php
示例8: index
function index()
{
$this->data['title'] = ucfirst($this->title);
$this->data['page_title'] = $this->page_title;
$filter = array('is_deleted' => 'where/0', 'is_active' => 'where/1', 'component_type_id' => 'order/asc', 'code' => 'order/asc');
$this->data['p_component'] = $list_component = getAll('payroll_component', $filter)->result_array();
$filter = array('status_cd' => 'where/normal');
$this->data['job_class'] = $this->all_model->GetAll('hris_job_class', $filter, 'job_class_level');
//lastq();
permission();
$this->_render_page($this->filename, $this->data);
}
开发者ID:pay-test,项目名称:ci2,代码行数:12,代码来源:payroll_group.php
示例9: get_dari_so
function get_dari_so($id)
{
permissionUser();
$num_rows = getAll($this->table_name)->num_rows();
$last_id = $num_rows > 0 ? $this->db->select('id')->order_by('id', 'asc')->get($this->table_name)->last_row()->id : 0;
$this->data['last_id'] = $num_rows > 0 ? $last_id + 1 : 1;
$order_id = getValue('ref', 'stok_pengeluaran', array('id' => 'where/' . $id));
$so = $this->db->where('id', $order_id)->get('sales_order')->row()->so;
$this->data['tgl_terima'] = getValue('tgl', 'stok_pengeluaran', array('id' => 'where/' . $id));
$this->data['order'] = $this->main->get_detail_po($so);
$this->data['order_list'] = getAll('stok_pengeluaran_list', array('pengeluaran_id' => 'where/' . $id));
$this->load->view($this->module . '/' . $this->file_name . '/dari_so', $this->data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:13,代码来源:retur.php
示例10: getAllCats
function getAllCats()
{
$result = json_decode(getAll('category'));
if (!empty($result->category)) {
$result->category = array_map(function ($t) {
if (!empty($t->icon)) {
$t->icon_url = SITEURL . 'category_icons/' . $t->icon;
}
return $t;
}, $result->category);
}
echo json_encode($result);
}
开发者ID:krishnendubhattacharya,项目名称:mFoodGateApi,代码行数:13,代码来源:category.php
示例11: get_dari_po
function get_dari_po($id)
{
permissionUser();
$num_rows = getAll($this->table_name)->num_rows();
$last_id = $num_rows > 0 ? $this->db->select('id')->order_by('id', 'asc')->get($this->table_name)->last_row()->id : 0;
$this->data['last_id'] = $num_rows > 0 ? $last_id + 1 : 1;
$order_id = getValue('ref_id', 'stok_penerimaan', array('id' => 'where/' . $id));
$this->data['tgl_terima'] = getValue('tgl', 'stok_penerimaan', array('ref_id' => 'where/' . $id));
$this->data['order'] = $this->main->get_detail_po($id);
$this->data['order_list'] = getAll('purchase_order_list', array('order_id' => 'where/' . $id));
//print_mz($this->data['order_list']->result());
$this->load->view($this->module . '/' . $this->file_name . '/dari_po', $this->data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:13,代码来源:retur.php
示例12: 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);
}
开发者ID:jhanojan,项目名称:gsm,代码行数:14,代码来源:order.php
示例13: input
function input()
{
if (!$this->ion_auth->logged_in()) {
//redirect them to the login page
redirect('auth/login', 'refresh');
} else {
$sess_id = $this->data['sess_id'] = $this->session->userdata('user_id');
$this->get_bu();
$this->data['all_users'] = getAll('users', array('active' => 'where/1', 'username' => 'order/asc'), array('!=id' => '1'));
$this->get_user_atasan();
$this->data['subordinate'] = getAll('users', array('superior_id' => 'where/' . get_nik($sess_id)));
$this->_render_page('form_promosi/input', $this->data);
}
}
开发者ID:ocpyosep78,项目名称:hris_client,代码行数:14,代码来源:form_promosi.php
示例14: edit
function edit()
{
$session_id = $this->input->post('session_id');
permission();
$filter = array('session_id' => 'where/' . $session_id);
$num_rows = getAll('payroll_umk', $filter)->num_rows();
//lastq();
$data = array('value' => str_replace(',', '', $this->input->post('value')), 'session_id' => $session_id);
if ($num_rows > 0) {
$this->db->where('session_id', $session_id)->update('payroll_umk', $data);
} else {
$this->db->insert('payroll_umk', $data);
}
return true;
}
开发者ID:pay-test,项目名称:ci2,代码行数:15,代码来源:payroll_umk.php
示例15: get_chart
function get_chart()
{
$tanggal = array();
$num_data = array();
for ($i = 7; $i > 0; $i--) {
$d = new dateTime("{$i} days ago");
$tanggal[] = $d->format('d M');
$num_data_po[] = getAll('purchase_order', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
$num_data_so[] = getAll('sales_order', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
$num_data_penerimaan[] = getAll('stok_penerimaan', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
$num_data_pengeluaran[] = getAll('stok_pengeluaran', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
$num_data_pembelian[] = getAll('pembelian', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
$num_data_penjualan[] = getAll('penjualan', array('created_on' => 'where/' . $d->format('Y-m-d')))->num_rows();
}
echo json_encode(array('tanggal' => $tanggal, 'num_data_po' => $num_data_po, 'num_data_pembelian' => $num_data_pembelian, 'num_data_so' => $num_data_so, 'num_data_penjualan' => $num_data_penjualan, 'num_data_penerimaan' => $num_data_penerimaan, 'num_data_pengeluaran' => $num_data_pengeluaran));
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:16,代码来源:Dashboard.php
示例16: edit
function edit($id)
{
$this->data['title'] = 'Edit ' . $this->title;
$this->data['file_name'] = $this->file_name;
$this->data['module'] = $this->module;
permissionUser();
$filter = array('is_deleted' => 0);
$this->data['jenis'] = getAll('kontak_jenis', $filter);
$this->data['tipe'] = getAll('kontak_tipe', $filter);
$this->data['r'] = $r = $this->main->get_detail($id);
$this->data['up'] = explode(',', $r->up);
//print_mz($this->data['up']);
$this->data['telepon'] = explode(',', $r->telepon);
$this->data['alamat'] = explode(',', $r->alamat);
$this->_render_page($this->module . '/' . $this->file_name . '/edit', $this->data);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:16,代码来源:kontak.php
示例17: index
function index($fname = "fn:", $sort_by = "id", $sort_order = "asc", $offset = 0)
{
if (!$this->ion_auth->logged_in()) {
//redirect them to the login page
redirect('auth/login', 'refresh');
} elseif (!$this->ion_auth->is_admin()) {
$id = $this->session->userdata('user_id');
//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.');
redirect('person/detail/' . $id);
} else {
//set the flash data error message if there is one
$this->data['message'] = validation_errors() ? validation_errors() : $this->session->flashdata('message');
//set sort order
$this->data['sort_order'] = $sort_order;
//set sort by
$this->data['sort_by'] = $sort_by;
//set filter by title
$this->data['fname_param'] = $fname;
$exp_fname = explode(":", $fname);
$fname_re = str_replace("_", " ", $exp_fname[1]);
$fname_post = strlen($fname_re) > 0 ? array('users.username' => $fname_re) : array();
//set default limit in var $config['list_limit'] at application/config/ion_auth.php
$this->data['limit'] = $limit = strlen($this->input->post('limit')) > 0 ? $this->input->post('limit') : 25;
$this->data['offset'] = 6;
//list of filterize all approval
$this->data['approval_all'] = $this->approval_model->like($fname_post)->where('is_deleted', 0)->approval()->result();
$this->data['num_rows_all'] = $this->approval_model->like($fname_post)->where('is_deleted', 0)->approval()->num_rows();
$this->data['approval'] = $this->approval_model->like($fname_post)->where('is_deleted', 0)->limit($limit)->offset($offset)->order_by($sort_by, $sort_order)->approval()->result();
//list of filterize limit approval for pagination d();
$this->data['_num_rows'] = $this->approval_model->like($fname_post)->where('is_deleted', 0)->limit($limit)->offset($offset)->order_by($sort_by, $sort_order)->approval()->num_rows();
//config pagination
$config['base_url'] = base_url() . 'approval/index/fn:' . $exp_fname[1] . '/' . $sort_by . '/' . $sort_order . '/';
$config['total_rows'] = $this->data['num_rows_all'];
$config['per_page'] = $limit;
$config['uri_segment'] = 6;
//inisialisasi config
$this->pagination->initialize($config);
//create pagination
$this->data['halaman'] = $this->pagination->create_links();
$this->data['fname_search'] = array('name' => 'title', 'id' => 'title', 'type' => 'text', 'value' => $this->form_validation->set_value('title'));
$this->data['users'] = getAll('users', array('active' => 'where/1', 'username' => 'order/asc'), array('!=id' => '1'));
$this->data['form_type'] = getAll('form_type', array('is_deleted' => 'where/0'));
$this->_render_page('approval/index', $this->data);
}
}
开发者ID:ocpyosep78,项目名称:hris_client,代码行数:46,代码来源:approval.php
示例18: getMany
function getMany($class, $search_criteria = array())
{
if (empty($search_criteria)) {
return getAll($class);
}
foreach ($search_criteria as $key => $value) {
if (empty($value)) {
unset($search_criteria[$key]);
}
}
$finder = new $class();
$objects = $finder->find($search_criteria);
if (!$objects) {
$objects = array();
}
return $objects;
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:17,代码来源:main_utilities.php
示例19: show
function show($params = array())
{
if (!isset($params['id']) || !$params['id']) {
$staff_members = getAll('Staff');
if (!isset($params['start_date']) || !isset($params['end_date'])) {
$hours_criteria = array('current_week' => true);
$this->data->dates = array('start_date' => date('Y-m-d', strtotime('last Sunday')), 'end_date' => date('Y-m-d', strtotime('next Sunday')));
} else {
$hours_criteria = array('hour_search' => array('start_date' => $params['start_date'], 'end_date' => $params['end_date']));
$this->data->dates = array('start_date' => $params['start_date'], 'end_date' => $params['end_date']);
}
foreach ($staff_members as $staff) {
if (!$staff->get('active')) {
continue;
}
if (!isset($this->data->billable_hours_this_week)) {
$this->data->staff = array();
$this->data->billable_hours_this_week = array();
}
if (!isset($this->data->total_hours_this_week)) {
$this->data->staff = array();
$this->data->total_hours_this_week = array();
}
$this->data->staff[$staff->get('id')] = $staff->getName();
$this->data->billable_hours_this_week[$staff->get('id')] = $staff->getBillableHoursTotal($hours_criteria);
$this->data->total_hours_this_week[$staff->get('id')] = $staff->getHoursTotal($hours_criteria);
}
} else {
$this->data->active_projects = getMany('Project', array('active' => true));
$staff = new Staff($params['id']);
$this->data->staff = $staff;
$this->data->staff_hours = $staff->getHours();
$hours_criteria = array('current_month' => true);
$this->data->hours_this_month = $staff->getHoursTotal($hours_criteria);
$this->data->billable_hours_this_month = $staff->getBillableHoursTotal($hours_criteria);
$hours_criteria = array('current_week' => true);
$this->data->hours_this_week = $staff->getHoursTotal($hours_criteria);
$this->data->billable_hours_this_week = $staff->getBillableHoursTotal($hours_criteria);
$this->data->new_project = new Project();
$this->data->new_project->set(array('staff_id' => Session::getUserId()));
$this->data->new_support_hour = new Hour();
$this->data->new_support_hour->set(array('staff_id' => Session::getUserId(), 'date' => date('Y-m-d')));
$this->data->graph = array('staff' => $staff->id, 'call' => 'overview');
}
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:45,代码来源:StaffController.php
示例20: 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);
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:18,代码来源:assembly.php
注:本文中的getAll函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论