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


PHP Department::list_item方法代码示例

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


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

示例1: postGeneral

 public function postGeneral($id)
 {
     $id = Crypt::decrypt($id);
     $request = RRequest::find($id);
     if (Input::has('save')) {
         if (Input::get('employee') == 0 || Input::get('organization') == 0 || Input::get('r_plan') == 0 || Input::get('specialist') == 0 || strlen(Input::get('title')) < 2 || strlen(Input::get('description')) < 2) {
             Session::flash('sms_warn', trans('sta.require_field'));
         } else {
             $request->request_by_id = Input::get('employee');
             $request->for_organization_id = Input::get('organization');
             $request->for_planning_id = Input::get('r_plan');
             $request->to_department_id = Input::get('specialist');
             $request->request_title = Input::get('title');
             $request->description = Input::get('description');
             $request->request_date = date('Y-m-d');
             $request->created_by = Auth::user()->employee_id;
             if ($request->save()) {
                 Session::flash('sms_success', trans('sta.save_data_success'));
                 //return Redirect::to('branch_request/general/' . Crypt::encrypt($request->id));
             }
         }
     }
     $organizations = $this->array_list(Organization::list_item());
     $employees = $this->array_list(Employee::list_item());
     $department = $this->array_list(Department::list_item());
     $r_plans = $this->array_list(Rplan::list_item());
     return View::make('branch_request.edit_general', array('id' => $id, 'organizations' => $organizations, 'employees' => $employees, 'specialist' => $department, 'r_plans' => $r_plans, 'request' => $request));
 }
开发者ID:ravysin,项目名称:testgithub,代码行数:28,代码来源:BranchRequestController.php

示例2: postIndex

 public function postIndex()
 {
     $organize_list = $this->array_list(Organization::list_item());
     $department_list = $this->array_list(Department::list_item());
     $user_roll = $this->array_list(UserRoll::list_item());
     $organization = Input::get('organization');
     $condition = "";
     if (Input::has('em_name')) {
         $condition .= " and em.en like '%" . Input::get('em_name') . "%'";
     }
     if (Input::has('em_name_kh')) {
         $condition .= " and em.kh like '%" . Input::get('em_name_kh') . "%'";
     }
     if (Input::has('em_id')) {
         $condition .= " and em.code='" . Input::get('em_id') . "'";
     }
     if (Input::get('organization') > 0) {
         $condition .= " and org.id=" . Input::get('organization');
     }
     if (Input::get('department') > 0) {
         $condition .= " and de.id=" . Input::get('department');
     }
     if (Input::get('user_roll') > 0) {
         $condition .= " and ur.id=" . Input::get('user_roll');
     }
     $user_list = User::user_list($condition);
     return View::make('user.user', array('organize_list' => $organize_list, 'department_list' => $department_list, 'organization' => $organization, 'user_list' => $user_list, 'user_roll' => $user_roll));
 }
开发者ID:ravysin,项目名称:testgithub,代码行数:28,代码来源:UserController.php


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