403Webshell
Server IP : 103.48.194.25  /  Your IP : 216.73.216.74
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64
User : sieuthimay ( 1016)
PHP Version : 8.2.20
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/khonguyenlieu.vn/public_html/webadmin/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/khonguyenlieu.vn/public_html/webadmin/models/permission_model.php
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Permission_Model extends CI_Model
{
  function __construct() {
	  parent::__construct();
  }
  function get_all_permission(){
	  return $this->db->get('sys_permission')->result();
  }
  
  function get_permission_by_id(){
	  $ID = $this->uri->segment(3);
	  $this->db->where('permission_id',$ID);
	  return $this->db->get('sys_permission')->row();
  }
  
  function save(){
	  $permission_id = (int)$this->uri->segment(3);
	  $data = array(
		'permission_name' => $this->input->post('permission_name'),
		'permission_notice' => $this->input->post('permission_notice')
	  );
	  
	  if($permission_id!=0){
		  $this->db->where('permission_id',$permission_id);
		  if($this->db->update('sys_permission',$data)){
			  return true;
		  }else{
			  return false;
		  }
	  }else{
		  if($this->db->insert('sys_permission',$data)){
			  return true;
		  }else{
			  return false;
		  }
	  }
  }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit