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
/
Community.php
/
/
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Community extends CI_Controller { public $menu; function __construct() { parent::__construct(); isLoggedIn(); $this->load->model('community/Community_model'); $this->load->model('community/Community_table'); } //Account form public function index() { if (hasPermission('community_create')) { $page_data['page_title'] = 'Community'; $page_data['page_name'] = 'admin/community/community'; $this->load->view('admin/template', $page_data); } else { redirect(base_url('dashboard')); } } public function exist() { $caste_name = $this->input->post('caste_name'); $caste_id = $this->input->post('id'); echo $this->Community_model->exist($caste_id, $caste_name); } public function add() { if (hasPermission('community_create')) { $page_data['page_title'] = 'Add Community'; $page_data['page_name'] = 'admin/community/add'; $this->load->view('admin/template', $page_data); } else { redirect(base_url('dashboard')); } } public function ajax_list() { $list = $this->Community_table->get_datatables(); $data = array(); $start = $_POST['start']; $count_row = 0; $count_filtered = 0; foreach ($list as $daybook) { $row = array(); $caste_id = $daybook['caste_id']; $id = $daybook['caste_id']; $caste_name = $daybook['caste']; $status = $daybook['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>'; $editUrl = base_url("community/edit/$caste_id"); $delUrl = base_url("community/active"); $deleteUrl = base_url("community/delete"); $action = '<center>'; if (hasPermission('caste_update') || hasPermission('caste_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('caste_update')) { $action .= '<li><a href="' . $editUrl . '">Edit </a> </li>'; } if (hasPermission('caste_active')) { $action .= '<li><a href="javascript:void(0)" data-id="' . $id . '" data-msg="' . $id . '" class="active_status" data-status="' . $data_status . '" data-label="quality name" data-url="' . $delUrl . '"> ' . $btn_title_change . ' </a></li>'; } if (hasPermission('caste_delete')) { $action .= '<li><a href="javascript:void(0);" data-id="' . $caste_id . '" data-msg="delete" class="delete" data-status="2" data-label="Ads name" data-url="' . $deleteUrl . '"> Delete </a></li></ul></div>'; } } $action .= '</center>'; $row[] = $start + 1; $row[] = $caste_name; $row[] = $active; $row[] = $action; $row['DT_RowId'] = $caste_id; $data[] = $row; $start++; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->Community_table->count_all(), "recordsFiltered" => $this->Community_table->count_filtered(), "data" => $data, ); //output to json format echo json_encode($output); } public function insert() { $error_type = ''; $msg = ''; $result = false; $id = $this->input->post('id'); $caste = strtoupper($this->input->post('caste_name')); $this->form_validation->set_rules('caste_name', 'caste name', 'trim|required'); if ($this->form_validation->run() == FALSE) { $error_type = 'v'; $msg = validation_errors('<p class="error">', '</p>'); //validation_errors(); $result = false; } else { $created_by = $this->session->userdata('user_id'); $created_on = date('Y-m-d H:i:s'); $data = array( 'caste' => $caste, 'created_on' => $created_on, 'created_by' => $created_by, ); $result = $this->db->insert('caste', $data); // $daybook_id = $this->db->insert_id(); logActivity('Community ' . $caste." is created ", LOG_COMMUNITY); set_alert('success', "Community information created successfully."); $error_type = 'm'; $msg = 'Community Successful added'; $result = true; } echo json_encode(array('rs' => $result, 'errType' => $error_type, 'msg' => $msg)); } public function edit() { if (hasPermission('community_update')) { $id = $this->uri->segment(3); if ($id != '') { $get = $this->Community_model->get($id)->row_array(); $data = array( 'page_title' => 'Edit Caste', 'page_name' => 'admin/community/edit', 'caste_id' => $get['caste_id'], 'caste_name' => $get['caste'], ); $this->load->view('admin/template', $data); } else { redirect(base_url('group')); } } else { redirect(base_url('dashboard')); } } public function update() { $error_type = ''; $msg = ''; $result = false; $this->form_validation->set_rules('caste_name', 'caste name', 'trim|required'); if ($this->form_validation->run() == FALSE) { $error_type = 'v'; $msg = validation_errors('<p class="error">', '</p>'); //validation_errors(); $result = false; } else { $caste_id = $this->input->post('caste_id'); $new_name = strtoupper($this->input->post('caste_name')); $result1 = $this->Community_model->get_community($caste_id)->row_array(); $old_comm = $result1['caste']; $created_by = $this->session->userdata('user_id'); $created_on = date('Y-m-d H:i:s'); $data = array( 'caste' => $new_name, 'updated_by' => $created_by, 'updated_on' => $created_on ); $result = $this->db->where('caste_id', $caste_id)->update('caste', $data); logActivity('Community is updated from ' .$old_comm. " ". 'to '.$new_name, LOG_COMMUNITY); set_alert('success', "Community information updated successfully."); $error_type = 'm'; $msg = 'Community Successful update'; $result = true; } echo json_encode(array('rs' => $result, 'errType' => $error_type, 'msg' => $msg)); } public function delete() { if (hasPermission('sundry_party_delete')) { $id = $this->input->post('id'); $community_name = $this->Community_model->get_community($id)->row_array(); $caste_name = $community_name['caste']; $msg = $this->input->post('msg'); $status = $this->input->post('status'); $log = ($status == 2) ? 'deleted' : ''; $data = array(); $data['status'] = $status; $result = $this->Community_model->active_update($id, $data); $result = ($result > 0) ? True : False; ($result) ? logActivity('Community '.$caste_name. " is ". $log, LOG_COMMUNITY) : ''; echo json_encode(array('rs' => $result, 'log' => $log, 'msg' => $msg)); } else { redirect(base_url('dashboard')); } } public function active() { $id = $this->input->post('id'); $res = $this->Community_model->get_community($id)->row_array(); $caste_name = $res['caste']; $msg = $this->input->post('msg'); $status = $this->input->post('status'); $log = ($status == 1) ? 'Activated' : 'Deactivated'; $data = array(); $data['status'] = $status; $result = $this->Community_model->active_update($id, $data); $result = ($result > 0) ? True : False; ($result) ? logActivity('Community '.$caste_name." is ".$log, LOG_COMMUNITY) : ''; echo json_encode(array('rs' => $result, 'log' => $log, 'msg' => $msg)); //echo $result; } }
/var/www/yapwebtv.com/../../www/krcollege.co/application/controllers/Community.php