Codeigniter で開発された単純なカスタム グリッドがあります。グリッドには次の列があります。
Sl - CheckValue(チェックボックス) - ユーザーID - ユーザー名 - 電子メール
したがって、誰かが行をチェックして送信すると、選択した行の値を取得できるはずです..
だから、誰でもコードイグナイターで同じことをする方法を教えてもらえますか..
function showattendee($id, $offset=0)
{
$person = $this->Person_model->get_by_id($id)->row();
$this->form_data->id = $person->tab_classid;
$this->form_data->classtitle = $person->tab_classtitle;
$this->form_data->classdate = $person->tab_classtime;
$this->form_data->createddate = $person->tab_crtdate;
$this->form_data->peremail = $person->tab_pemail;
$this->form_data->duration = $person->tab_classduration;
//Show User Grid - Attendee>>>>>>>>>>>>>>>>>>>>>>>>
$uri_segment = 0;
$offset = $this->uri->segment($uri_segment);
$courses = $this->Mycourses->my_courses($this->limit,$offset,$this- >form_data->classtitle)->result();
// generate pagination
$this->load->library('pagination');
$config['base_url'] = site_url('person/index/');
$config['total_rows'] = $this->Mycourses->count_all();
$config['per_page'] = $this->limit;
$config['uri_segment'] = $uri_segment;
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
// generate table data
$this->load->library('table');
$this->table->set_empty(" ");
$this->table->set_heading('Ref#','Check', 'User Id','User Name', 'Email');
$i = 0 + $offset;
foreach ($courses as $course)
{
$checkarray=array('name'=>'chkclsid[]','id'=>'chkclsid','value'=>$course->user_id);
$this->table->add_row($course->mycourse_id,form_checkbox($checkarray), $course->user_id, $course->user_name, $course->user_email);
}
$data['table'] = $this->table->generate();
//グリッドコード終了
// load view
// set common properties
$data['title'] = 'Assign Attendees';
$msg = '';
$data['message'] = $msg;
$data['action'] = site_url('person/CreateAttendees');
//$data['value'] = "sssssssssssssssssss";
$session_data = $this->session->userdata('logged_in');
$data['username'] = "<p>Welcome:"." ".$session_data['username']. " | " . anchor('home/logout', 'Logout')." | ". "Userid :"." ".$session_data['id']; "</p>";
$data['link_back'] = anchor('person/index/','Back to list of Classes',array('class'=>'back'));
$this->load->view('common/header',$data);
$this->load->view('adminmenu');
$this->load->view('addattendee_v', $data);
}