本文整理匯總了PHP中MY_Controller::core_admin_view方法的典型用法代碼示例。如果您正苦於以下問題:PHP MY_Controller::core_admin_view方法的具體用法?PHP MY_Controller::core_admin_view怎麽用?PHP MY_Controller::core_admin_view使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MY_Controller
的用法示例。
在下文中一共展示了MY_Controller::core_admin_view方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: verify_regis
public function verify_regis()
{
$this->form_validation->set_rules('username', 'ชื่อผู้ใช้', 'trim|required');
$this->form_validation->set_rules('password', 'รหัสผ่าน', 'trim|required');
$this->form_validation->set_rules('name', 'ชื่อ', 'trim|required');
$this->form_validation->set_rules('lname', 'นามสกุล', 'trim|required');
$this->form_validation->set_rules('usertype', 'ตำแหน่ง', 'trim|required');
$this->form_validation->set_message('required', 'คุณยังไม่ได้กรอก %s !!');
if ($this->form_validation->run() == FALSE) {
parent::core_admin_view('admin/add_user');
} else {
if ($this->input->post('usertype') == '2') {
$table = "doctors";
$pre = "doc_";
$funciton = "list_doctors";
} elseif ($this->input->post('usertype') == '3') {
$table = "staffs";
$pre = "sf_";
$funciton = "list_staff";
} elseif ($this->input->post('usertype') == '4') {
$table = "techs";
$pre = "tech_";
$funciton = "list_tech";
}
$data_user = array('username' => $this->input->post('username'), 'password' => $this->input->post('password'), 'usertype' => $this->input->post('usertype'), 'cr_date' => date('Y-m-d'), 'user_status' => 1);
$this->general_model->insert('users', $data_user);
$user_id = $this->db->insert_id();
$data_regis = array($pre . 'name' => $this->input->post('name'), $pre . 'lname' => $this->input->post('lname'), 'usertype' => $this->input->post('usertype'), 'user_id' => $user_id);
$this->general_model->insert($table, $data_regis);
redirect(base_url() . 'admin/' . $funciton);
die;
}
// parent::core_view('regis');
}