}
        // Update category choice
        if (isset($c) && 'update' === $c) {
            if (isset($valid) && 'no' === $valid) {
                $btOk = "admin.php?p=product&a=create_cat&c=update&valid=yes&id={$id}";
                $oCat->RequestConfirmation('modif', 'confirmez-vous modification ?', $btOk, $sInitLink, $lang);
            } else {
                $oCat->UpdateCategory($id, $_SESSION['name_cat']);
            }
        }
    }
    //  CREATE PRODUCT SUBMENU
} elseif (isset($a) && 'create_prod' === $a) {
    $aMsgPost = $oAdmin->getItemTransation('PRODUCT', 'BACK', $lang, 'CREATE_PROD');
    $oCat = new Product();
    $aCat = $oCat->getDataCategories();
    $aDataProd = array();
    if (!isset($conf)) {
        if (isset($_SESSION['products'])) {
            $prod_name = $_SESSION['products']['name'];
            $prod_desc = $_SESSION['products']['desc'];
        } else {
            $prod_name = '';
            $prod_desc = '';
        }
    }
    if (isset($c) && 'add_product' === $c) {
        $oTicket = new ProductContext('Ticket');
        if (!isset($conf)) {
            $oProduct = new Product($_POST);
            $oTicket->memorizeData($oProduct, $_POST);
<?php

// read paypal settings
$oPaypal = new Paypal();
$aSettings = $oPaypal->getSettings();
$aMoneyCodes = $oPaypal->getMoneyCodes();
$prod = (bool) $aSettings['prod'];
$oProd = new Product();
$aCat = $oProd->getDataCategories();
if ($c == 'update_main') {
    $aSettings['user'] = filter_input(INPUT_POST, 'user', FILTER_SANITIZE_STRING);
    $aSettings['pwd'] = filter_input(INPUT_POST, 'pwd', FILTER_SANITIZE_STRING);
    $aSettings['signature'] = filter_input(INPUT_POST, 'signature', FILTER_SANITIZE_STRING);
    $aSettings['endpoint'] = filter_input(INPUT_POST, 'endpoint', FILTER_VALIDATE_URL);
    $aSettings['version'] = filter_input(INPUT_POST, 'version', FILTER_SANITIZE_STRING);
    $aSettings['money'] = filter_input(INPUT_POST, 'money', FILTER_SANITIZE_STRING);
    $aSettings['prod'] = filter_input(INPUT_POST, 'opt-use', FILTER_VALIDATE_BOOLEAN);
    $oPaypal->UpdatePaypalSettings($aSettings);
} else {
    include 'core/admin/view/back-paypal-settings.php';
}