function XsellErase()
{
    global $_POST;
    $ProdID = xtc_db_prepare_input($_POST['prodid']);
    $XsellID = xtc_db_prepare_input($_POST['xsellid']);
    if (isset($ProdID) && isset($XsellID)) {
        $res = xtc_db_query("delete from " . TABLE_PRODUCTS_XSELL . " where products_id='" . $ProdID . "' and xsell_id='" . $XsellID . "'");
        print_xml_status(0, $_POST['action'], 'OK', '', 'SQL_RES', $res);
    } else {
        print_xml_status(99, $_POST['action'], 'PARAMETER ERROR', '', '', '');
    }
}
        if ($check_customer['customers_status'] != '0') {
            SendXMLHeader();
            print_xml_status(106, $_POST['action'], 'WRONG LOGIN', '', '', '');
            exit;
        }
        // check if Admin is allowed to access xml_export
        $access_query = xtc_db_query("SELECT\n                                xml_export\n                                from admin_access\n                                WHERE customers_id='" . $check_customer['customers_id'] . "'");
        $access_data = xtc_db_fetch_array($access_query);
        if ($access_data['xml_export'] != 1) {
            SendXMLHeader();
            print_xml_status(107, $_POST['action'], 'WRONG LOGIN', '', '', '');
            exit;
        }
        if (!($check_customer['customers_password'] == $password or $check_customer['customers_password'] == md5($password) or $check_customer['customers_password'] == md5(substr($password, 2, 40)))) {
            SendXMLHeader();
            print_xml_status(108, $_POST['action'], 'WRONG PASSWORD', '', '', '');
            exit;
        }
    }
}
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    switch ($_GET['action']) {
        case 'version':
            // Ausgabe Scriptversion
            SendXMLHeader();
            SendScriptVersion();
            exit;
        case 'categories_export':
            SendXMLHeader();
            SendCategories();
            exit;
function CustomersErase()
{
    global $_POST;
    $cID = olc_db_prepare_input($_POST['cID']);
    $sec_query = olc_db_query("SELECT customers_status FROM " . TABLE_CUSTOMERS . " where customers_id='" . $cID . "'");
    $sec_data = olc_db_fetch_array($sec_query);
    if ($sec_data['customers_status'] == 0) {
        print_xml_status(120, $_POST['action'], 'CAN NOT CHANGE ADMIN USER!', '', '', '');
        return;
    }
    if (isset($cID)) {
        olc_db_query("update " . TABLE_REVIEWS . " set customers_id = null where customers_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $cID . "'");
        olc_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . $cID . "'");
        print_xml_status(0, $_POST['action'], 'OK', '', 'SQL_RES1', $res1);
    } else {
        print_xml_status(99, $_POST['action'], 'PARAMETER ERROR', '', '', '');
    }
}