СОРМ3 Специальные технологии Омега v2.4

Ключ
Эта строка удалена.
Это слово было удалено. Это слово было добавлено.
Эта строка добавлена.

Изменения (1)

просмотр истории страницы
{code}

h2. /cfg/sorm3/REGIONS.sql

{code}
-- Отключает заголовки на каждые 10 строк,
-- они добавляются отдельным запросом в формате CSV
set heading off;
-- Запрос добавляет заголовок
select first 1
'DESCRIPTION;IP_TYPE;IPV4;IPV6;IP_MASK_TYPE;IPV4_MASK;IPV6_MASK;BEGIN_TIME;END_TIME;REGION_ID'
from nas
union all
-- Запрос выгружает план IP адресации
select
ip_pull.name || ';' || /* DESCRIPTION */
'0' || ';' || /* ip_type, для IPv4 = 0 */
uf_ip2hex(ip_pull.network_address) || ';' || /* IPV4 */
'' || ';' || /* IPV6 */
'0' || ';' || /* ip_mask_type, для IPv4 = 0 */
case
when coalesce(ip_pull.mask,24) = 0 then upper('00000000')
when coalesce(ip_pull.mask,24) = 1 then upper('80000000')
when coalesce(ip_pull.mask,24) = 2 then upper('c0000000')
when coalesce(ip_pull.mask,24) = 3 then upper('e0000000')
when coalesce(ip_pull.mask,24) = 4 then upper('f0000000')
when coalesce(ip_pull.mask,24) = 5 then upper('f8000000')
when coalesce(ip_pull.mask,24) = 6 then upper('fc000000')
when coalesce(ip_pull.mask,24) = 7 then upper('fe000000')
when coalesce(ip_pull.mask,24) = 8 then upper('ff000000')
when coalesce(ip_pull.mask,24) = 9 then upper('ff800000')
when coalesce(ip_pull.mask,24) = 10 then upper('ffc00000')
when coalesce(ip_pull.mask,24) = 11 then upper('ffe00000')
when coalesce(ip_pull.mask,24) = 12 then upper('fff00000')
when coalesce(ip_pull.mask,24) = 13 then upper('fff80000')
when coalesce(ip_pull.mask,24) = 14 then upper('fffc0000')
when coalesce(ip_pull.mask,24) = 15 then upper('fffe0000')
when coalesce(ip_pull.mask,24) = 16 then upper('ffff0000')
when coalesce(ip_pull.mask,24) = 17 then upper('ffff8000')
when coalesce(ip_pull.mask,24) = 18 then upper('ffffc000')
when coalesce(ip_pull.mask,24) = 19 then upper('ffffe000')
when coalesce(ip_pull.mask,24) = 20 then upper('fffff000')
when coalesce(ip_pull.mask,24) = 21 then upper('fffff800')
when coalesce(ip_pull.mask,24) = 22 then upper('fffffc00')
when coalesce(ip_pull.mask,24) = 23 then upper('fffffe00')
when coalesce(ip_pull.mask,24) = 24 then upper('ffffff00')
when coalesce(ip_pull.mask,24) = 25 then upper('ffffff80')
when coalesce(ip_pull.mask,24) = 26 then upper('ffffffc0')
when coalesce(ip_pull.mask,24) = 27 then upper('ffffffe0')
when coalesce(ip_pull.mask,24) = 28 then upper('fffffff0')
when coalesce(ip_pull.mask,24) = 29 then upper('fffffff8')
when coalesce(ip_pull.mask,24) = 30 then upper('fffffffc')
when coalesce(ip_pull.mask,24) = 31 then upper('fffffffe')
when coalesce(ip_pull.mask,24) = 32 then upper('ffffffff')
else 'ffffff00'
end || ';' || /* IPV4_MASK */
'' || ';' || /* IPV6_MASK */
'1970-01-01 00:00:00' || ';' || /* BEGIN_TIME */
'2030-01-01 23:59:59' || ';' || /* END_TIME */
coalesce(ip_pull.operator_id,3) /* REGION_ID */
from
ip_pull
where
ip_pull.pull_id >= 1000 /* Отсекаем служебные пулы: DNS-сервера, IP биллинга и т.д. */
;
{code}

h2. Pay_type.txt