<?php

    // Initialize
    // ...........................................
    $CONFIG_ADDRESS = '/' . PHPVC_STR::VAR_DLEFT($_GET['url'], 4 + 10);
    $CONFIG_ADDRESS = '/' . PHPVC_STR::VAR_DRIGHT($_GET['url'], 3);
    
    
    // Check Config
    // ...........................................
    $GET_MAP_ARRAY = PHPCUS_CATEGORY_CUSTOMIZE::CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
    $GET_MAP_ARRAY['PARAM_CAT_CUSTOM_URL'] = $CONFIG_ADDRESS;
    $GET_MAP_ARRAY['PARAM_CAT_CUSTOM_CODE'] = 'DGVREORDER';
    
    
    // Execute Stored Procedure
    // ...........................................
    $DATA_SET = PHPCUS_CATEGORY_CUSTOMIZE::CUS_GET_RELATED_MA($GET_MAP_ARRAY);
    
    
    // Reault To JSON
    // ...........................................
    $DATA_SET["URI"] = $CONFIG_ADDRESS;
    $DATA_SET["IS_SUCCESS"] = "TRUE";
    $RESULT_VALUE = PHPRC_PDO_MYSQL_ARRAY::REF_TO_JSON($DATA_SET);
    $RESULT_VALUE = PHPVC_STR::VAR_REPLACE($RESULT_VALUE, "'", "\'");
    
    
    // Return as Javascript variable
    // ...........................................
    header('Content-Type: application/javascript');
    echo "var JSTOOL_CUSTOMIZE_CONFIG_DGV_REORDER = '" . $RESULT_VALUE . "';";
    exit;

?>