Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class Properties_model extends CI_Model { private $select = FALSE; pr..

Decoded Output download

<?php 
 
class Properties_model extends CI_Model { 
 
    private $select = FALSE; 
    private $sorted = FALSE; 
 
    public function __construct(){ 
        // Call the CI_Model constructor 
        parent::__construct(); 
    } 
 
    public function insert($insert){ 
        $user_info = $this->authenticate->isLoggedIn(); 
 
        $result = $this->db->insert(dbProPerties::TABLE, $insert); 
        if($result){ 
            return $this->db->insert_id(); 
        } 
        return FALSE; 
    } 
 
    public function update($update, $initial_data){ 
        $this->db->where(dbProPerties::ID, $initial_data[dbProPerties::ID]); 
        $result = $this->db->update(dbProPerties::TABLE, $update); 
        if($result) 
            return $initial_data[dbProPerties::ID]; 
        return FALSE; 
    } 
 
    public function filter_department_id(){ 
        $this->db->start_cache(); 
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::TITLE, $_SESSION['dept_id']); 
        $this->db->stop_cache(); 
    } 
 
    public function filter_search_title($keyword){ 
        $this->db->start_cache(); 
        $this->db->like(dbProPerties::TITLE, $keyword); 
        $this->db->stop_cache(); 
    } 
 
    public function count_rows(){ 
        return $this->db->count_all_results(dbProPerties::TABLE); 
    } 
 
    public function all_rows($limit = "", $start = ""){ 
        return self::_get_data(TRUE, $limit, $start); 
    } 
 
    public function get_detail($id){ 
        $this->db->start_cache(); 
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::ID, $id); 
        $this->db->stop_cache(); 
        return self::_get_data(FALSE, 1); 
    } 
 
 
    private function _get_data($all_rows = TRUE, $limit = "", $start = ""){ 
        if(!$this->select) 
            $this->db->select(dbProperties::TABLE.".*, ".dbUser::TABLE.".".dbUser::EMAIL.",".dbUser::TABLE.".".dbUser::MOBILE); 
        $this->db->join(dbUser::TABLE, dbUser::TABLE.".".dbUser::LOGIN_ID."=".dbProperties::TABLE.".".dbProperties::USER_ID); 
        if(!$this->sorted) 
            $this->db->order_by(dbProPerties::TABLE.".".dbProPerties::TITLE, "ASC"); 
        $result = $this->db->get(dbProPerties::TABLE, $limit, $start); 
        $this->select = FALSE; 
        $this->sorted = FALSE; 
        $this->db->flush_cache(); 
        if($all_rows) 
            return $result->result_array(); 
        else if($result->num_rows() > 0) { 
            return $result->row_array(); 
        } 
        else 
            return FALSE; 
    } 
 
    public function delete($primary_id){ 
        $initial_data = self::get_detail($primary_id); 
        if(!$initial_data) 
            show_404(); 
 
        $this->db->where(dbProPerties::ID, $initial_data[dbProPerties::ID]); 
        return $this->db->delete(dbProPerties::TABLE); 
    } 
 
    public function get_userid($id){ 
        $this->db->start_cache(); 
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::USER_ID, $id); 
        $this->db->stop_cache(); 
    } 
} ?>

Did this file decode correctly?

Original Code

<?php

class Properties_model extends CI_Model {

    private $select = FALSE;
    private $sorted = FALSE;

    public function __construct(){
        // Call the CI_Model constructor
        parent::__construct();
    }

    public function insert($insert){
        $user_info = $this->authenticate->isLoggedIn();

        $result = $this->db->insert(dbProPerties::TABLE, $insert);
        if($result){
            return $this->db->insert_id();
        }
        return FALSE;
    }

    public function update($update, $initial_data){
        $this->db->where(dbProPerties::ID, $initial_data[dbProPerties::ID]);
        $result = $this->db->update(dbProPerties::TABLE, $update);
        if($result)
            return $initial_data[dbProPerties::ID];
        return FALSE;
    }

    public function filter_department_id(){
        $this->db->start_cache();
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::TITLE, $_SESSION['dept_id']);
        $this->db->stop_cache();
    }

    public function filter_search_title($keyword){
        $this->db->start_cache();
        $this->db->like(dbProPerties::TITLE, $keyword);
        $this->db->stop_cache();
    }

    public function count_rows(){
        return $this->db->count_all_results(dbProPerties::TABLE);
    }

    public function all_rows($limit = "", $start = ""){
        return self::_get_data(TRUE, $limit, $start);
    }

    public function get_detail($id){
        $this->db->start_cache();
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::ID, $id);
        $this->db->stop_cache();
        return self::_get_data(FALSE, 1);
    }


    private function _get_data($all_rows = TRUE, $limit = "", $start = ""){
        if(!$this->select)
            $this->db->select(dbProperties::TABLE.".*, ".dbUser::TABLE.".".dbUser::EMAIL.",".dbUser::TABLE.".".dbUser::MOBILE);
        $this->db->join(dbUser::TABLE, dbUser::TABLE.".".dbUser::LOGIN_ID."=".dbProperties::TABLE.".".dbProperties::USER_ID);
        if(!$this->sorted)
            $this->db->order_by(dbProPerties::TABLE.".".dbProPerties::TITLE, "ASC");
        $result = $this->db->get(dbProPerties::TABLE, $limit, $start);
        $this->select = FALSE;
        $this->sorted = FALSE;
        $this->db->flush_cache();
        if($all_rows)
            return $result->result_array();
        else if($result->num_rows() > 0) {
            return $result->row_array();
        }
        else
            return FALSE;
    }

    public function delete($primary_id){
        $initial_data = self::get_detail($primary_id);
        if(!$initial_data)
            show_404();

        $this->db->where(dbProPerties::ID, $initial_data[dbProPerties::ID]);
        return $this->db->delete(dbProPerties::TABLE);
    }

    public function get_userid($id){
        $this->db->start_cache();
        $this->db->where(dbProPerties::TABLE.".".dbProPerties::USER_ID, $id);
        $this->db->stop_cache();
    }
}

Function Calls

None

Variables

None

Stats

MD5 26db3988dec58ed47537a8c67d7425da
Eval Count 0
Decode Time 98 ms