当前位置: 首页>>代码示例>>PHP>>正文


PHP Staff::count方法代码示例

本文整理汇总了PHP中Staff::count方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::count方法的具体用法?PHP Staff::count怎么用?PHP Staff::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Staff的用法示例。


在下文中一共展示了Staff::count方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index($offset = 0)
 {
     $staff_list = new Staff();
     switch ($this->input->get('c')) {
         case "1":
             $data['col'] = "staff_nik";
             break;
         case "2":
             $data['col'] = "staff_name";
             break;
         case "3":
             $data['col'] = "staff_address";
             break;
         case "4":
             $data['col'] = "staff_email";
             break;
         case "5":
             $data['col'] = "staff_phone_home";
             break;
         case "6":
             $data['col'] = "staff_phone_hp";
             break;
         case "7":
             $data['col'] = "staff_cabang";
             break;
         case "8":
             $data['col'] = "staff_departement";
             break;
         case "9":
             $data['col'] = "staff_jabatan";
             break;
         case "10":
             $data['col'] = "staff_id";
             break;
         default:
             $data['col'] = "staff_id";
     }
     if ($this->input->get('d') == "1") {
         $data['dir'] = "DESC";
     } else {
         $data['dir'] = "ASC";
     }
     $total_rows = $staff_list->count();
     $data['title'] = "Staffs";
     $data['btn_add'] = anchor('staffs/add', 'Add New', array('class' => 'btn btn-primary'));
     $data['btn_home'] = anchor(base_url(), 'Back', array('class' => 'btn'));
     $uri_segment = 3;
     $offset = $this->uri->segment($uri_segment);
     $staff_list->order_by($data['col'], $data['dir']);
     $data['staff_list'] = $staff_list->get($this->limit, $offset)->all;
     $config['base_url'] = site_url("staffs/index");
     $config['total_rows'] = $total_rows;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = $uri_segment;
     $this->pagination->initialize($config);
     $data['pagination'] = $this->pagination->create_links();
     $this->load->view('staffs/index', $data);
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:58,代码来源:staffs.php

示例2: index

 public function index()
 {
     $staff = new Staff();
     $data['staffs'] = $staff->get();
     $data['staff_count'] = $staff->count();
     $data['highchart_cabang'] = $this->highchart_cabang();
     $data['highchart_get_name_branch'] = $this->highchart_get_name_branch();
     $data['highchart_get_name_dept'] = $this->highchart_get_name_dept();
     $data['btn_new_staff'] = anchor('staffs/add', '<span class="icon-white icon-plus"></span>', array('class' => 'btn btn-primary bootstrap-tooltip', 'data-placement' => 'top', 'data-title' => 'Add new Employee'));
     $this->load->view('welcome_message', $data);
 }
开发者ID:anggadjava,项目名称:payroll,代码行数:11,代码来源:welcome.php


注:本文中的Staff::count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。