!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/almazenServer/application/controllers/   drwxr-xr-x
Free 10.02 GB of 29.4 GB (34.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     webService.php (3.83 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php if (!defined('BASEPATH')) {
    exit(
'No direct script access allowed');
}

define('DIRECCION_API'"http://104.131.18.172:8080/almazen_alfa/");
class 
webService extends CI_Controller {
    public function 
__construct() {
        
parent::__construct();
        
$this->load->model('consultas_model');
        
/* Cargamos la base de datos */
        
$this->load->database();
        
$this->load->library('javascript');
        
$this->load->library('session');

        
/* AƱadimos el helper al controlador */
        
$this->load->helper('url');
    }

    public function 
getProductos() {
        
$this->load->library('curl');
        
$curl_handle curl_init();
        
curl_setopt($curl_handleCURLOPT_URLDIRECCION_API 'product');
        
$buffer curl_exec($curl_handle);
        
curl_close($curl_handle);
        
$result json_decode($buffer);
        return 
$result;
    }
    public function 
getClientes() {
        
$this->load->library('curl');
        
$curl_handle curl_init();
        
curl_setopt($curl_handleCURLOPT_URLDIRECCION_API 'client');
        
$buffer curl_exec($curl_handle);
        
curl_close($curl_handle);
        
$result json_decode($buffer);
        return 
$result;
    }
    
//alta de producto
    
public function insertarProducto() {

        
$postdata file_get_contents("php://input");
        
$request  json_decode($postdata);

        
// accediendo a la base de datos

        //accediendo a la api
        
$this->load->library('curl');
        
$curl_handle curl_init();
        
curl_setopt($curl_handleCURLOPT_URLDIRECCION_API 'product');

        
$data = array('name' => strval($request->name),
            
'code'               => strval($request->numero),
            
'description'        => strval($request->descripcion),
            
'price'              => strval($request->precio),
            
'sell_price'         => strval($request->precio),
            
'category'           => '',
            
'photo'              => '',
            
'thumbnail'          => '',
            
'vendor'             => '',
            
'stock'              => strval($request->stock));
        
$data_json json_encode($data);
        
curl_setopt($curl_handleCURLOPT_HTTPHEADER, array('Content-Type: application/json'));
        
curl_setopt($curl_handleCURLOPT_POST1);
        
curl_setopt($curl_handleCURLOPT_POSTFIELDS$data_json);
        
curl_setopt($curl_handleCURLOPT_RETURNTRANSFERtrue);
        
$buffer curl_exec($curl_handle);
        
curl_close($curl_handle);
        
$result json_decode($buffer);
        
var_dump($result);die();
        return 
$result;
    }
    
//alta de cliente
    
public function insertarCliente() {
        
// accediendo a la base de datos
        /*
        {
        "id": "string",
        "name": "string",
        "business_name": "string",
        "commercial_name": "string",
        "address": "string",
        "city": "string",
        "telephone": "string",
        "cuit": "string",
        "mail": "string",
        "province": "string",
        "expresso": "string"
        }

         */

        
die();
        
//accediendo a la api
        
$this->load->library('curl');
        
$curl_handle curl_init();
        
curl_setopt($curl_handleCURLOPT_URLDIRECCION_API 'client');

        
$data      = array('username' => 'dog''password' => 'tall');
        
$data_json json_encode($data);
        
curl_setopt($curl_handleCURLOPT_HTTPHEADER, array('Content-Type: application/json'));
        
curl_setopt($curl_handleCURLOPT_POST1);
        
curl_setopt($curl_handleCURLOPT_POSTFIELDS$data_json);
        
curl_setopt($curl_handleCURLOPT_RETURNTRANSFERtrue);
        
$buffer curl_exec($curl_handle);
        
curl_close($curl_handle);
        
$result json_decode($buffer);
        return 
$result;
    }

    public function 
guardarEdicion() {
        
var_dump($_POST);die();
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0072 ]--