本文整理汇总了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');
}