本文整理汇总了PHP中Staff::list_drop方法的典型用法代码示例。如果您正苦于以下问题:PHP Staff::list_drop方法的具体用法?PHP Staff::list_drop怎么用?PHP Staff::list_drop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::list_drop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Staff
function sign_up()
{
// Staffs
$staff = new Staff();
$list_staff = $staff->list_drop();
$staff_selected = '';
$data['form_action'] = '';
$data['staff_id'] = form_dropdown('staff_id', $list_staff, $staff_selected);
// Role
$role = new Role();
$list_role = $role->list_drop();
$role_selected = '';
$data['role_id'] = form_dropdown('role_id', $list_role, $role_selected);
$data['username'] = array('name' => 'username', 'placeholder' => 'Username', 'class' => 'input-block-level');
$data['password'] = array('name' => 'password', 'placeholder' => 'password', 'class' => 'input-block-level');
$data['btn_sign_up'] = array('name' => 'btn_sign_up', 'value' => 'Sign Up', 'class' => 'btn btn-primary btn-large');
$this->load->view('users/sign_up', $data);
}
示例2: edit
function edit($id)
{
$this->filter_access('Assets', 'roled_edit', 'assets/index');
$asset = new Asset();
$rs = $asset->where('asset_id', $id)->get();
$data['id'] = $rs->asset_id;
$data['asset_name'] = array('name' => 'asset_name', 'value' => $rs->asset_name);
$options_status = array('1' => 'Enable', '0' => 'Disable');
$status_selected = $rs->asset_status;
$data['asset_status'] = form_dropdown('asset_status', $options_status, $status_selected);
// Staffs
$staff = new Staff();
$list_staff = $staff->list_drop();
$staff_selected = $rs->staff_id;
$data['staff_id'] = form_dropdown('staff_id', $list_staff, $staff_selected);
$data['date'] = array('name' => 'date', 'id' => 'date', 'value' => $rs->date);
$data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
$data['title'] = 'Update';
$data['form_action'] = site_url('assets/update');
$data['link_back'] = anchor('assets/', 'Back', array('class' => 'btn'));
$this->load->view('assets/frm_assets', $data);
}
示例3: edit
function edit()
{
$asset_detail = new Asset_Detail();
$rs = $asset_detail->where('assetd_id', $this->detail_id)->get();
$data['id'] = $rs->assetd_id;
$data['date'] = array('name' => 'date', 'id' => 'date', 'value' => $rs->date);
$options_status = array('1' => 'Enable', '0' => 'Disable');
$status_selected = $rs->assetd_status;
$data['assetd_status'] = form_dropdown('assetd_status', $options_status, $status_selected);
// Staffs
$staff = new Staff();
$list_staff = $staff->list_drop();
$staff_selected = $rs->staff_id;
$data['staff_id'] = form_dropdown('staff_id', $list_staff, $staff_selected);
$data['descriptions'] = array('name' => 'descriptions', 'value' => $rs->date);
$data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
$data['title'] = 'Update';
$data['form_action'] = site_url('assets/' . $this->asset_id . '/details/update');
$data['link_back'] = anchor('assets/', 'Back', array('class' => 'btn'));
$this->load->view('assets_details/frm_assets_detail', $data);
}