本文整理汇总了PHP中Branch::list_drop方法的典型用法代码示例。如果您正苦于以下问题:PHP Branch::list_drop方法的具体用法?PHP Branch::list_drop怎么用?PHP Branch::list_drop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Branch
的用法示例。
在下文中一共展示了Branch::list_drop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
function edit($id)
{
$staff = new Staff();
$rs = $staff->where('staff_id', $id)->get();
$data['id'] = $rs->staff_id;
$data['staff_nik'] = array('name' => 'staff_nik', 'value' => $rs->staff_nik);
$data['staff_kode_absen'] = array('name' => 'staff_kode_absen', 'value' => $rs->staff_kode_absen);
$data['staff_name'] = array('name' => 'staff_name', 'value' => $rs->staff_name);
$data['staff_address'] = array('name' => 'staff_address', 'rows' => '2', 'value' => $rs->staff_address);
$data['staff_email'] = array('name' => 'staff_email', 'value' => $rs->staff_email);
$data['staff_email_alternatif'] = array('name' => 'staff_email_alternatif', 'value' => $rs->staff_email_alternatif);
$data['staff_phone_home'] = array('name' => 'staff_phone_home', 'value' => $rs->staff_phone_home);
$data['staff_phone_hp'] = array('name' => 'staff_phone_hp', 'value' => $rs->staff_phone_hp);
// Status Pajak Karyawan
$tax_employee = new Tax_Employee();
$list_spk = $tax_employee->list_drop();
$spk_selected = $staff->staff_status_pajak;
$data['staff_status_pajak'] = form_dropdown('staff_status_pajak', $list_spk, $spk_selected);
// Status Nikah
$marital = new Marital();
$list_sn = $marital->list_drop();
$sn_selected = $staff->staff_status_nikah;
$data['staff_status_nikah'] = form_dropdown('staff_status_nikah', $list_sn, $sn_selected);
// Status Karyawan
$employee_status = new Employee_Status();
$list_sk = $employee_status->list_drop();
$sk_selected = $staff->staff_status_karyawan;
$data['staff_status_karyawan'] = form_dropdown('staff_status_karyawan', $list_sk, $sk_selected);
// Branch
$branch = new Branch();
$list_branch = $branch->list_drop();
$branch_selected = $staff->staff_cabang;
$data['staff_cabang'] = form_dropdown('staff_cabang', $list_branch, $branch_selected);
// Departement
$dept = new Department();
$list_dpt = $dept->list_drop();
$dpt_selected = $staff->staff_departement;
$data['staff_departement'] = form_dropdown('staff_departement', $list_dpt, $dpt_selected);
//Jabatan
$title = new Title();
$list_jbt = $title->list_drop();
$jbt_selected = $staff->staff_jabatan;
$data['staff_jabatan'] = form_dropdown('staff_jabatan', $list_jbt, $jbt_selected);
$data['staff_photo'] = array('name' => 'staff_photo', 'value' => $staff->staff_photo);
$data['staff_birthdate'] = array('name' => 'staff_birthdate', 'id' => 'staff_birthdate', 'value' => $staff->staff_birthdate);
$data['staff_birthplace'] = array('name' => 'staff_birthplace', 'value' => $staff->staff_birthplace);
$options_sex = array('Laki' => 'Laki', 'Perempuan' => 'Perempuan');
$sex_selected = $staff->staff_sex;
$data['staff_sex'] = form_dropdown('staff_sex', $options_sex, $sex_selected);
$data['staff_password'] = array('name' => 'staff_password');
$data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
$data['title'] = 'Update Staff';
$data['message'] = '';
$data['form_action'] = site_url('staffs/update');
$data['link_back'] = anchor('staffs/', 'Back');
/*$component_a = new Salary_Component_A();
$data["component_a"] = $component_a->get()->all;
$component_b = new Salary_Component_B();
$data["component_b"] = $component_b->get()->all;
$family = new Family();
$data["family"] = $family->get()->all;*/
$this->load->view('staffs/frm_staff', $data);
}