示例#1
0
function install_locations()
{
    // first of all we check if is a international or a specific installation
    if (!isset($_POST['c_country'])) {
        return false;
    }
    require_once ABS_PATH . 'oc-includes/osclass/model/Country.php';
    require_once ABS_PATH . 'oc-includes/osclass/model/Region.php';
    require_once ABS_PATH . 'oc-includes/osclass/model/City.php';
    if (isset($_POST['city'])) {
        location_by_city();
    } else {
        if (isset($_POST['region'])) {
            location_by_region();
        } else {
            if (isset($_POST['country'])) {
                location_by_country();
            } else {
                location_international();
            }
        }
    }
}
示例#2
0
function install_locations()
{
    if (Params::getParam('c_country') == '') {
        return false;
    }
    require_once ABS_PATH . 'oc-includes/osclass/model/Country.php';
    require_once ABS_PATH . 'oc-includes/osclass/model/Region.php';
    require_once ABS_PATH . 'oc-includes/osclass/model/City.php';
    if (Params::getParam('city') != '') {
        return location_by_city();
    } else {
        if (Params::getParam('region') != '') {
            return location_by_region();
        } else {
            if (Params::getParam('country') != '') {
                return location_by_country();
            }
        }
    }
    return location_international();
}