uawdijnntqw1x1x1
IP : 216.73.217.47
Hostname : srv913213
Kernel : Linux srv913213 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
yapwebtv.com
/
..
/
..
/
www
/
krcollege.co
/
application
/
controllers
/
Fees_type.php
/
/
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Fees_type extends CI_Controller { function __construct() { parent::__construct(); isLoggedIn(); $this->load->model('fees_type/Fees_type_model'); $this->load->model('academic/Academic_model'); $this->load->model('admission/Admission_model'); } public function index() { if(hasPermission('fee_type_create')){ $page_data['page_title'] = 'Manage Fees Type'; $page_data['page_name'] = 'admin/fees_type/list'; $this->load->view('admin/template', $page_data); } else { redirect(base_url('dashboard')); } } public function add() { if(hasPermission('fee_type_create')){ $college = $this->Academic_model->getCollege()->result_array(); $academic_year = $this->Academic_model->getAcademicYear()->result_array(); $session_college_id = $this->session->userdata('college_id'); $session_course_id = $this->session->userdata('course_id'); $session_academic_id = $this->session->userdata('academic_id'); if($session_course_id >0 && $session_academic_id >0){ $college_name = $this->Fees_type_model->getCollegename($session_college_id)->row_array(); $acadamic_from_year = $this->Fees_type_model->getAcademicfromyear($session_academic_id)->row_array(); $course = $this->Fees_type_model->getCoursename($session_course_id)->row_array(); $page_data['page_title'] = 'Create Fees Type'; $page_data['page_name'] = 'admin/fees_type/add'; $page_data['course'] = $course; $page_data['college'] = $college; $page_data['academic_year'] = $academic_year; $page_data['college_name'] = $college_name; $page_data['acadamic_from_year'] = $acadamic_from_year; $this->load->view('admin/template', $page_data); }else{ set_alert('warning', "Please select the course and academic year."); redirect(base_url('fees_type')); } } else { redirect(base_url('dashboard')); } } public function ajax_list() { $CI = & get_instance(); $CI->load->model('fees_type/Fees_type_table'); $lists = $this->Fees_type_table->get_datatables(); $start = $_POST['start']; $data = array(); foreach ($lists as $list) { $row = array(); $id = $list['fee_type_id']; $college_name = $list['college_name']; $course_name= $list['course_name']; $academic_from_year = $list['academic_from_year']."-".$list['academic_to_year']; $type_name = $list['type_name']; $status = $list['status']; $status_class = ($status == 1) ? "label label-primary" : "label label-danger"; $status_lable = ($status == 1) ? "Active" : "Inactive"; $status_title = ($status == 1) ? "Active" : "Inactive"; $status_padding = ($status == 1) ? "padding-left: 10px ;padding-right: 10px;" : ""; $btn_title_change = ($status == 1) ? "Deactivate" : "Activate"; $btn_color_change = ($status == 1) ? "btn btn-danger" : "btn btn-info"; $btn_padding = ($status == 0) ? "padding-right:18px;padding-left:18px" : ""; $data_status = ($status == 1) ? '0' : '1'; $active = '<center> <span class="' . $status_class . '" title="' . $status_title . '"style="' . $status_padding . '" >' . $status_lable . '</span> </center>'; $viewUrl = base_url("fees_type/view/$id"); $editUrl = base_url("fees_type/edit/$id"); $delUrl = base_url("fees_type/active"); $deleteUrl = base_url("fees_type/delete"); $action = '<center>'; if(hasPermission('fee_type_view')){ $action .='<div class="col-md-6"><a href="' . $viewUrl . '"><button type="button" class="btn btn-primary btn-sm">view </button> </a> </div>'; } if(hasPermission('fee_type_update') || hasPermission('fee_type_status') || hasPermission('fee_type_delete')) { $action .='<div class="col-md-6"> <div class="dropdown "><a class="dropdown-toggle" type="button" data-toggle="dropdown"><i class="glyphicon glyphicon-option-horizontal fs-24"></i></a> <ul class="dropdown-menu dropdown-menu-right">'; if(hasPermission('fee_type_update')){ $action .= '<li><a href="' . $editUrl . '">Edit </a> </li>'; } if(hasPermission('fee_type_status')){ $action .='<li><a href="javascript:void(0)" data-id="' . $id . '" data-msg="' . $type_name . '" class="active-type" data-status="' . $data_status . '" data-label="course name" data-url="' . $delUrl . '"> ' . $btn_title_change . ' </a></li>'; } if(hasPermission('fee_type_delete')){ $action .='<li><a href="javascript:void(0)" data-id="' . $id . '" data-msg="' . $type_name . '" class="delete-type" data-status="2" data-label="course name" data-url="' . $deleteUrl . '"> Delete</a></li>'; } $action .= '</ul></div>'; $action .= '</div>'; } $action .= '</center>'; $row[] = $start + 1; $row[] = $college_name; $row[] = $course_name; $row[] = $academic_from_year; $row[] = $type_name; $row[] = $active; $row[] = $action; $row['DT_RowId'] = $id; $data[] = $row; $start++; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $CI->Fees_type_table->count_all(), "recordsFiltered" => $CI->Fees_type_table->count_filtered(), "data" => $data, ); echo json_encode($output); } public function feestype_exist() { $id = $this->input->post('id'); $name = $this->input->post('name'); $course = $this->input->post('course'); $academic = $this->input->post('academic'); echo $this->Fees_type_model->feestype_exist($name, $id,$course,$academic); } public function extrafee_exist() { $id = $this->input->post('id'); $name = $this->input->post('name'); echo $this->Fees_type_model->extrafee_exist($name, $id); } public function getAcademicYear() { $id = $this->input->post('id'); $res = $this->Fees_type_model->getCourse($id); echo $res; } public function insert() { $error_type = ''; $msg = ''; $result = false; $this->form_validation->set_rules('college_id', 'college ', 'trim|required'); $this->form_validation->set_rules('course_id', 'Course ', 'trim|required'); $this->form_validation->set_rules('academic_year_id', 'Academic Year', 'trim|required'); $this->form_validation->set_rules('type_name', 'Type name', 'trim|required'); $this->form_validation->set_rules('fee_type', 'Fees Type', 'trim|required'); if ($this->form_validation->run() == FALSE) { $error_type = 'v'; $msg = validation_errors('<p class="error">', '</p>'); //validation_errors(); $result = false; } else { $type_name = $this->input->post('type_name'); $college_id = $this->input->post('college_id'); $course_id = $this->input->post('course_id'); $academic_year_id = $this->input->post('academic_year_id'); $fee_type = $this->input->post('fee_type'); $course_det = $this->Admission_model->getcourse_study($course_id)->row_array(); $course_name_log = $course_det['course_name']; $acadameic_det = $this->Admission_model->get_academicyear($academic_year_id)->row_array(); $acc_year = $acadameic_det['academic_from_year'] .'-'. $acadameic_det['academic_to_year']; $created_by= $this->session->userdata('user_id'); $created_on=date("Y-m-d H:i:s"); $data = array( 'type_name' => $type_name, 'college_id' => $college_id, 'course_id' => $course_id, 'academic_year_id' => $academic_year_id, 'fee_type' => $fee_type, 'created_by' => $created_by, 'created_on' => $created_on, ); $result = $this->Fees_type_model->insert($data); set_alert('success', "Fees Type information created successfully."); $error_type = 'm'; $msg = 'Fees Type created successfully.'; $result = true; ($result) ? logActivity('Fees Type ('.$type_name.') created for course and acadamic year (' .$course_name_log.'-'.$acc_year.')',LOG_FEESTYPE) : ''; } echo json_encode(array('rs' => $result, 'errType' => $error_type, 'msg' => $msg)); } public function update() { $error_type = ''; $msg = ''; $result = false; $this->form_validation->set_rules('college_id', 'college ', 'trim|required'); $this->form_validation->set_rules('course_id', 'Course ', 'trim|required'); $this->form_validation->set_rules('academic_year_id', 'Academic Year', 'trim|required'); $this->form_validation->set_rules('type_name', 'Type name', 'trim|required'); $this->form_validation->set_rules('fee_type', 'Fees Type', 'trim|required'); if ($this->form_validation->run() == FALSE) { $error_type = 'v'; $msg = validation_errors('<p class="error">', '</p>'); //validation_errors(); $result = false; } else { $fee_type_id = $this->input->post('fee_type_id'); $type_name = $this->input->post('type_name'); $college_id = $this->input->post('college_id'); $course_id = $this->input->post('course_id'); $academic_year_id = $this->input->post('academic_year_id'); $fee_type = $this->input->post('fee_type'); $course_det = $this->Admission_model->getcourse_study($course_id)->row_array(); $course_name_log = $course_det['course_name']; $acadameic_det = $this->Admission_model->get_academicyear($academic_year_id)->row_array(); $acc_year = $acadameic_det['academic_from_year'] .'-'. $acadameic_det['academic_to_year']; $get_fee_type_det = $this->Fees_type_model->get($fee_type_id)->row_array(); $fees_type_name_log = $get_fee_type_det['type_name']; $updated_by= $this->session->userdata('user_id'); $updated_on=date("Y-m-d H:i:s"); $data = array( 'type_name' => $type_name, 'course_id' => $course_id, 'college_id' => $college_id, 'academic_year_id' => $academic_year_id, 'fee_type' => $fee_type, 'updated_by' => $updated_by, 'updated_on' => $updated_on, ); $result = $this->Fees_type_model->update($fee_type_id,$data); set_alert('success', "Fees Type information updated successfully."); $error_type = 'm'; $msg = 'Fees Type updated successfully.'; $result = true; ($result) ? logActivity('Fees Type updated from '.$fees_type_name_log.' to '. $type_name .' for course and acadamic year (' .$course_name_log.'-'.$acc_year.')',LOG_FEESTYPE) : ''; } echo json_encode(array('rs' => $result, 'errType' => $error_type, 'msg' => $msg)); } public function edit() { if(hasPermission('fee_type_update')){ $college = $this->Academic_model->getCollege()->result_array(); $id = $this->uri->segment(3); if ($id != '') { $qry = $this->Fees_type_model->get($id); if($qry->num_rows() > 0) { $clg_data = $qry->row(); $college_id= $clg_data->college_id; $course = $this->Academic_model->getCourse($college_id)->result_array(); $academic_year_id = $clg_data->academic_year_id; $academic_year = $this->Academic_model->getAcademicYear()->result_array(); $data = array( 'page_title' => 'Update Fees Type', 'page_name' => 'admin/fees_type/edit', 'course' => $course, 'college' => $college, 'academic_year' => $academic_year, 'fee_type_id' => $clg_data->fee_type_id, 'type_name' => $clg_data->type_name, 'college_id' => $clg_data->college_id, 'college_name' => $clg_data->college_name, 'course_name' => $clg_data->course_name, 'course_id' => $clg_data->course_id, 'academic_year_id' => $clg_data->academic_year_id, 'academic_to_year' => $clg_data->academic_to_year, 'academic_from_year' => $clg_data->academic_from_year, 'fee_type' => $clg_data->fee_type, ); $this->load->view('admin/template', $data); } else { redirect(base_url('fees_type')); } } }else{ redirect(base_url('dashboard')); } } public function view() { if(hasPermission('fee_type_view')){ $id = $this->uri->segment(3); if ($id != '') { $qry = $this->Fees_type_model->get($id); if($qry->num_rows() > 0) { $clg_data = $qry->row(); $data = array( 'page_title' => 'Update Fees Type', 'page_name' => 'admin/fees_type/view', 'fee_type_id' => $clg_data->fee_type_id, 'type_name' => $clg_data->type_name, 'course_id' => $clg_data->course_id, 'college_id' => $clg_data->college_id, 'college_name' => $clg_data->college_name, 'course_name' => $clg_data->course_name, 'academic_year_id' => $clg_data->academic_year_id, 'fee_type' => $clg_data->fee_type, 'academic_from_year' => $clg_data->academic_from_year, 'academic_to_year' => $clg_data->academic_to_year, 'course_name' => ucwords($clg_data->course_name), ); $this->load->view('admin/template', $data); } else { redirect(base_url('fees_type')); } } }else{ redirect(base_url('dashboard')); } } public function delete() { $id = $this->input->post('id'); $msg = $this->input->post('msg'); $status = $this->input->post('status'); $log =($status == 2 ) ? 'Deleted' : 'Deleted' ; $data = array(); $data['status'] = $status; $get_fee_type_det = $this->Fees_type_model->get($id)->row_array(); $fees_type_name_log = $get_fee_type_det['type_name']; $result = $this->Fees_type_model->update($id,$data); //echo $this->db->last_query(); $result = ($result > 0) ? True : False; ($result) ? logActivity('Fees Type ('. $fees_type_name_log.') has been'.$log ,LOG_FEESTYPE) : ''; echo json_encode(array('rs' => $result, 'log' => $log, 'msg' => $msg)); } public function active() { if(hasPermission('fee_type_status')){ $id = $this->input->post('id'); $msg = $this->input->post('msg'); $status = $this->input->post('status'); $log =($status == 1 ) ? 'Activated' : 'Deactivated' ; $data = array(); $data['status'] = $status; $get_fee_type_det = $this->Fees_type_model->get($id)->row_array(); $fees_type_name_log = $get_fee_type_det['type_name']; $result = $this->Fees_type_model->update($id, $data); //echo $this->db->last_query(); $result = ($result > 0) ? True : False; ($result) ? logActivity('Fees Type ('. $fees_type_name_log.') has been'.$log ,LOG_FEESTYPE) : ''; echo json_encode(array('rs' => $result, 'log' => $log, 'msg' => $msg)); //echo $result; } else { redirect(base_url('dashboard')); } } }
/var/www/yapwebtv.com/../../www/krcollege.co/application/controllers/Fees_type.php