load->model('commonsql_model'); $tableName="module"; $whereData=array('status'=>1); $module_list=$CI->commonsql_model->selectTable($tableName, $whereData,'','','','module_order'); $tableName="module_sub"; $whereData=array('status'=>1); $sub_module_list=$CI->commonsql_model->selectTable($tableName, $whereData,''); ?>
num_rows()>0) { $i=1; foreach($module_list->result() as $m_list) { $module_id=$m_list->module_id; $module_name=$m_list->module_name; $tableName="page_access"; $whereData=array('page_module_id'=>$module_id,'page_role_id'=>$role,'page_user_id'=>$emp,'status'=>1); $access=$CI->commonsql_model->selectTable($tableName,$whereData); //echo $CI->db->last_query(); $page_add="0"; $page_view="0"; $page_edit="0"; $page_delete="0"; $page_notify="0"; if($access->num_rows()>0) { $acc=$access->row(); $page_add = $acc->page_add; $page_view = $acc->page_view; $page_edit = $acc->page_edit; $page_delete = $acc->page_delete; $page_notify = $acc->page_notify; } ?> num_rows()>0) { $i=1; foreach($sub_module_list->result() as $s_list) { $sub_module_id=$s_list->sub_module_id; $sub_module_name=$s_list->sub_module_name; $sub_module_module_id=$s_list->sub_module_module_id; $tableName="page_access"; $whereData=array('page_submodule_id'=>$sub_module_id,'page_module_id'=>$sub_module_module_id,'page_role_id'=>$role,'page_user_id'=>$emp,'status'=>1); $access1=$CI->commonsql_model->selectTable($tableName,$whereData); //echo $CI->db->last_query(); $page_add="0"; $page_view="0"; $page_edit="0"; $page_delete="0"; $page_notify="0"; if($access1->num_rows()>0) { $acc1=$access1->row(); $page_add = $acc1->page_add; $page_view = $acc1->page_view; $page_edit = $acc1->page_edit; $page_delete = $acc1->page_delete; $page_notify = $acc1->page_notify; } if($module_id == $sub_module_module_id) { ?>
MODULE SUB MODULE ADD VIEW EDIT DELETE Notification
checked > checked > checked > checked > checked >
checked > checked > checked > checked > checked >