commit 45c8017ebda705ec38ebad5403732672ce24380f Author: msyu Date: Sat Aug 16 14:53:13 2025 +0300 initial diff --git a/Application.cfc b/Application.cfc new file mode 100644 index 0000000..4c0c351 --- /dev/null +++ b/Application.cfc @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + ---> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ), + DE( "https://" ), + DE( "http://" ) + ) & + cgi.http_host & + reReplace( + getDirectoryFromPath( arguments.template ), "([^\\/]+[\\/]){#local.requestDepth#}$", + "", + "one" + ) + ) /> + + + + + + + + + + + + + + + + + + + + + + + + + #login# + + + select usr_id from usr where login='#login#' + + + + + + + #cfcatch.message# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select value as stand from config + where name='STAND' + + + + + + + + + + + + \ No newline at end of file diff --git a/inc/functions.cfm b/inc/functions.cfm new file mode 100644 index 0000000..6959b87 --- /dev/null +++ b/inc/functions.cfm @@ -0,0 +1,356 @@ + +/* Все глобальные функции экспортированы в request scope */ +function plain2htm(s) { + return replace(replace(s, chr(13),'',"ALL"),chr(10),'
', "ALL"); +} +request.plain2htm = plain2htm; + +function htm2plain(s) { + return replaceNoCase(s, '
', '#chr(13)##chr(10)#', "ALL"); +} +request.htm2plain = htm2plain; + +function cleanHtm(s) { + return replaceList(s, '<,>,"', '<,>,"'); +} +request.cleanHtm = cleanHtm; + +function clean4CDATA(s) { + LF = chr(10); + return replaceNoCase(replaceList(s, '[,]', '&91;,&93;'),"
",LF,"ALL"); +} +request.clean4CDATA = clean4CDATA; + +function numFmt(num, decimalPlaces = 0){ + var sFormat = ","; + if (decimalPlaces GT 0) {sFormat = sFormat & "." & repeatString("0", decimalPlaces);} + return replace(NumberFormat(num, sFormat), ",", " ", "ALL"); +} +request.numFmt = numFmt; + +function nFmt(num, decimalPlaces = 2){ + if (num EQ 0) return ""; + return numFmt(num, decimalPlaces); +} +request.nFmt = nFmt; + +function dateFmt(date, sFormat = 'YYYY-MM-DD'){ + return dateFormat(date, sFormat); +} +request.dateFmt = dateFmt; + +function dateTimeFmt(date, sDateFormat = 'YYYY-MM-DD', sTimeFormat='HH:MM'){ + return dateFormat(date, sDateFormat) & ' ' & timeFormat(date, sTimeFormat); +} +request.dateTimeFmt = dateTimeFmt; + +function timeFmt(date, sFormat = 'HH:MM'){ + return timeFormat(date, sFormat); +} +request.timeFmt = timeFmt; + +function usrAuthenticated() { + return request.usr_id GT 0 AND NOT (request.usr_id EQ request.ANONYMOUS_USR_ID); +} +request.usrAuthenticated = usrAuthenticated; + +function filterOn(filter) { + return (isStruct(filter) AND NOT structIsEmpty(filter)); +} +request.filterOn = filterOn; + +function stripWhiteSpace(sNumber) { + return reReplace(sNumber, "[[:space:]]", "", "ALL"); +} +request.stripWhiteSpace = stripWhiteSpace; +/* +// never used +function cleanNumber(sNumber) { + var s = reReplace(sNumber, "[[:space:]]", "", "ALL"); + if ( find(",", s) ) { //watch argument order!!! + // assume Russian format with decimal comma and spaces for thousand separator + return replace(s, ",", "."); + } else { + // assume English format with decimal point and commas for thousand separator + return replace(s, ",", "", "ALL"); + } +} +request.cleanNumber = cleanNumber; +*/ + +/*https://cflib.org/udf/queryColumnToArray*/ +/** + * Takes a selected column of data from a query and converts it into an array. + * + * @param query The query to scan. (Required) + * @param column The name of the column to return data from. (Required) + * @return Returns an array. + * @author Peter J. Farrell (pjf@maestropublishing.com) + * @version 1, July 22, 2005 + */ +function queryColumnToArray(qry, column) { + var arr = arrayNew(1); + var ii = ""; + var loop_len = arguments.qry.recordcount; + for (ii=1; ii lte loop_len; ii=ii+1) { + arrayAppend(arr, arguments.qry[arguments.column][ii]); + } + return arr; +} +request.queryColumnToArray = queryColumnToArray; + +/* ************************************* */ + +function loginPasswordPolicyCheck(usr_id, login, passwd, passwd2) { + msg = ""; + // для старого логина длина не проверяется, все равно ничего не поделаешь + if (NOT(usr_id GT 0) AND len(login) LE 3) { + msg="Слишком короткий логин (минимальная длина логина 3 символа)"; + } else { + if (passwd NEQ passwd2) { + msg="Пароль и подтверждение не совпадают"; + } else { + if (len(passwd) LT "8") msg="Слишком короткий пароль (минимальная длина пароля 8 символов)"; + } + } + return msg; +} +request.loginPasswordPolicyCheck = loginPasswordPolicyCheck; + +function i18(label,label_en=label) { + //примитивная 2-язычная версия + if (request.language EQ 'en') { + return label_en; + } else { + return label; + }; +} +request.i18 = i18; + +function passwordHashCreate(password) { + return GenerateArgon2Hash('#ARGUMENTS.password#', 'argon2id', 1, 16000, 2); +} +request.passwordHashCreate = passwordHashCreate; + +function passwordHashCheck(password, passwordHash) { + return Argon2CheckHash('#ARGUMENTS.password#', ARGUMENTS.passwordHash, 'argon2id'); +} +request.passwordHashCheck = passwordHashCheck; +/* +function skuCode(area_code="", abstract_service_code="") { + var s="#arguments[1]#.#arguments[2]#"; + if (arrayLen(arguments) GE 3) { + if (len(arguments[3]) GT 0) { + s="#s#.#arguments[3]#"; + } else { + s="#s#.0"; + }; + }; + if (arrayLen(arguments) GE 4) { + if (len(arguments[4]) GT 0) { + s="#s#.#arguments[4]#" + } + }; + if (arrayLen(arguments) GE 5) { + var pricingModelSuffix=arguments[5]; + s="#s#-#pricingModelSuffix#"; + } + return s; +} +request.skuCode = skuCode; +*/ +function roundSafe(a, precision) { + return (isNumeric(a) AND isNumeric(precision)) ? round(a,precision) : a; +} +request.roundSafe = roundSafe; + +function timeUnitLabel(n, value=0, locale="ru") { + var labels = ["сек.","мин.","ч.","д.","мес."]; + if (n LE 5 AND n GE 1) {return labels[n];} + else if (n EQ 6) { // в зависимости от числа - "год" г. или "лет" л. + var m = value MOD 100; + if (m GE 11 AND m LE 20) { + return "л."; + } + m = m MOD 10; + if (m GE 1 AND m LE 4) { + return "г."; + } + return "л."; + } + throw (message="timeUnitLabelRu: index out of bounds", detail="Index must be from 1 to 6"); +} +request.timeUnitLabel = timeUnitLabel; + +function dateDiffVerbose(dateFrom, dateTo, maxParts=6, maxPrecision=1, locale="ru") { +// returns formatted datetime interval duration, e.g. 1 hour 5 minutes or 3 years 0 months 12 days +//(currently, only Russian supported) +// +//maxParts specifies, how many parts to display +//maxPrecision starts froms seconds: 1=seconds, 2=minutes, 3=hours, 4=days, 5=months, 6=years +//if maxPrecision specified is greater than given time interval, output is nothing +//locale=ru just for interface, not used +//attention: truncates the tail, not rounds +//example: request.dateDiffVerbose(Now(),Now()+373.1234567, 3, 1) produces 1 г. 0 мес. 8 д. +//example: request.dateDiffVerbose(Now(),Now()+373.1234567, 6, 1) produces 1 г. 0 мес. 8 д. 2 ч. 57 мин. 46 сек. +//intended common usage: request.dateDiffVerbose(dateFrom, dateTo, 2, 1) - prints 2 senior parts of the interval, +//with presision not better than second +// +// this is not the same task as converting number of seconds to days-hours-minutes-seconds, +// because months contain different number of days, and days number of february depends on year + try { + if (NOT (isDate(dateFrom) AND isDate(dateTo))) return ""; + var UNIT_CODES = ["s","n","h","d","m","yyyy"]; + var start = dateFrom; + var finish = dateTo; + + var sOut = ""; + var nUnits = 0; + var nPrintedPositions = 0; + var printStart = false; + + for (i=ArrayLen(UNIT_CODES); i GT 0; i=i-1) { + nUnits = dateDiff(UNIT_CODES[i], start, finish); + start = dateAdd(UNIT_CODES[i], nUnits, start); + if (nPrintedPositions GT 0) {nPrintedPositions=nPrintedPositions+1;} //print started, so increment position + if (nPrintedPositions GT maxParts) {break;} + if (i LT maxPrecision) {break;} + if (nUnits NEQ 0 AND nPrintedPositions EQ 0) {nPrintedPositions=1;} + if (nPrintedPositions GT 0) { + if (len(sOut)) {sOut=sOut & " ";} + sOut=sOut & nUnits & " " & request.timeUnitLabel(i, nUnits, "ru"); + } + } + return sOut; + } catch(e) { + return ""; + } +} +request.dateDiffVerbose = dateDiffVerbose; + +/* +function secondsToDHMS(nSeconds,partsToKeep) { +//format seconds to days-hours-minutes-seconds and truncate to specified precision + { + days = n / (24 * 3600); + + n = n % (24 * 3600); + hours = n / 3600; + + n %= 3600; + minutes = n / 60 ; + + n %= 60; + seconds = n; + + return days & " " & "days " + & hours & " " & "hours " + & minutes & " " & "minutes " + & seconds & " " & "seconds "); + } +} +*/ +/** + * Formats a JSON string with indents and new lines. + * v1.0 by Ben Koshy (modified) + * + * @param str JSON string (Required) + * @return Returns a string of indent-formated JSON + * @author Ben Koshy (cf@animex.com) + * @version 0, September 16, 2012 + */ +// formatJson() :: formats and indents JSON string +// based on blog post @ http://ketanjetty.com/coldfusion/javascript/format-json/ +// modified for CFScript By Ben Koshy @animexcom +// usage: result = formatJson('STRING TO BE FORMATTED') OR result = formatJson(StringVariableToFormat); + +// генерирует html разметку, чтобы не использовать
 и выровнять пробелы
+// содержит ошибку: делает перевод строки после запятой в строке в кавычках
+public string function formatJsonString(str) {
+    var fjson = '';
+    var pos = 0;
+    var strLen = len(arguments.str);
+    var indentStr = '  '; // Adjust Indent Token If you Like (замыкающий пробел - для выравнивания при пробелах после запятой)
+    var newLine = '
'; // Adjust New Line Token If you Like
+ + for (var i=1; i<=strLen; i++) { //fix: <= + var char = mid(arguments.str,i,1); + + if (char == '}' || char == ']') { + fjson &= newLine; + pos = pos - 1; + + for (var j=1; j <= pos; j++) { + fjson &= indentStr; + } + } + + fjson &= char; + + if (char == '{' || char == '[' || char == ',') { + fjson &= newLine; + + if (char == '{' || char == '[') { + pos = pos + 1; + } + + for (var k=1; k <= pos; k++) { + fjson &= indentStr; + } + } + } + + return fjson; +} +request.formatJsonString = formatJsonString; +//нужна еще функция, которая сериализует структуру как pretty printed json. См. https://github.com/bennadel/JsonSerializer.cfc (все не совсем просто, например, не заранее не определен формат даты) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index — копия.cfm b/index — копия.cfm new file mode 100644 index 0000000..7654c5b --- /dev/null +++ b/index — копия.cfm @@ -0,0 +1,241 @@ + + + + +Нужно еще применить политики бесплатного минимума + + +Трафик хранится в той же таблице, что и остальной юзадж, можно было бы доставать в общем резалтсете + + + select sum(bytes_sent) as bytes, + placement.name as placement + 'WZ'||lpad(user_info.name, 5, '0') as wz + from s3billing.usage_bucket_by_user + join s3billing.user_info on usage_bucket_by_user.user_id=user_info.id + join s3billing.category on usage_bucket_by_user.category_id=category.id + join s3billing.bucket_info on usage_bucket_by_user.bucketid=bucket_info.id + join s3billing.placement on bucket_info.placement_id=placement.id + where 1=1 + AND usage_bucket_by_user.time >= + AND usage_bucket_by_user.time < + group by user_info.name + order by user_info.name; + + + + + + select sum(bytes_sent) as bytes, + 'WZ'||lpad(user_info.name, 5, '0') as wz + from s3billing.usage_bucket_by_user + join s3billing.user_info on usage_bucket_by_user.user_id=user_info.id + join s3billing.category on usage_bucket_by_user.category_id=category.id + --join s3billing.bucket_info on usage_bucket_by_user.bucketid=bucket_info.id + --join s3billing.placement on bucket_info.placement_id=placement.id AND placement.name='default-placement' + where s3billing.usage_bucket_by_user.bucketid='0' + AND usage_bucket_by_user.time >= + AND usage_bucket_by_user.time < + group by user_info.name + order by user_info.name; + + + + \ No newline at end of file diff --git a/index.cfm b/index.cfm new file mode 100644 index 0000000..e78b937 --- /dev/null +++ b/index.cfm @@ -0,0 +1,457 @@ + + + + + +Внимание! округление вверх при расчете метрик + + + + + + + + + + + select /* *** ниже дублирование кода агрегации round ceil etc, обратить внимание при правке */ + (sum(bucket_stat.usage_rgw_main_size_actual)/) as vol_B + ,round(sum(bucket_stat.usage_rgw_main_size_actual)//1024/1024/1024) as vol_GB + ,greatest(round(sum(bucket_stat.usage_rgw_main_size_actual)/ + /1024/1024/1024)- + case when bucket_stat.placement_id = 1 then 1 else 0 end, 0) as vol_GB_free_tier_substracted /*считается не в точности так, как в функции*/ + + ,case + when bucket_stat.placement_id = 1 then 'paas.s3.ceph' + when bucket_stat.placement_id = 2 then 'paas.s3.cphc' + else 'unknown' end as code + --,bucket_stat.placement_id + ,'WZ'||lpad(bucket_stat.owner, 5, '0') as wz -- *** здесь не число, а строка, поэтому другая формула обратной сборки WZ + + from s3billing.bucket_stat + join s3billing.placement ON s3billing.placement.id=bucket_stat.placement_id + join s3billing.bucket_info ON bucket_info.id=bucket_stat.bucket_id + where bucket_stat.placement_id in (1,2) + AND bucket_stat.timestamp_addition >= + AND bucket_stat.timestamp_addition < + group by bucket_stat.owner, bucket_stat.placement_id + order by bucket_stat.owner, bucket_stat.placement_id; + + + + +select + sum( + CASE WHEN + (category.name LIKE 'get%' + OR category.name LIKE 'head%' + OR category.name LIKE 'options%' + ) THEN ops ELSE 0 END + ) as get + ,ceil(sum( + CASE WHEN + (category.name LIKE 'get%' + OR category.name LIKE 'head%' + OR category.name LIKE 'options%' + ) THEN ops ELSE 0 END + )/10000) as get_10k + ,greatest(ceil(sum( + CASE WHEN + (category.name LIKE 'get%' + OR category.name LIKE 'head%' + OR category.name LIKE 'options%' + ) THEN ops ELSE 0 END + )/10000) - CASE WHEN bucket_info.placement_id = 1 THEN 10 ELSE 0 END, 0 + ) as get_10k_free_tier_subtracted + + ,sum( + CASE WHEN + (category.name LIKE 'put%' + OR category.name LIKE 'post%' + OR category.name LIKE 'patch%' + OR category.name LIKE 'list%' + ) THEN ops ELSE 0 END + ) as put + ,ceil(sum( + CASE WHEN + (category.name LIKE 'put%' + OR category.name LIKE 'post%' + OR category.name LIKE 'patch%' + OR category.name LIKE 'list%' + ) THEN ops ELSE 0 END + )/10000) as put_10k + ,greatest(ceil(sum( + CASE WHEN + (category.name LIKE 'put%' + OR category.name LIKE 'post%' + OR category.name LIKE 'patch%' + OR category.name LIKE 'list%' + ) THEN ops ELSE 0 END + )/10000) - CASE WHEN bucket_info.placement_id = 1 THEN 1 ELSE 0 END, 0 + ) as put_10k_free_tier_subtracted + + ,(sum(bytes_sent)) as bytes_sent + ,ceil(sum(bytes_sent)/1024/1024/1024) as bytes_sent_GB + ,greatest(ceil(sum(bytes_sent)/1024/1024/1024) - CASE WHEN bucket_info.placement_id = 1 THEN 100 ELSE 0 END, 0 + ) as bytes_sent_GB_free_tier_subtracted + + ,case + when bucket_info.placement_id = 1 then 'paas.s3.ceph' + when bucket_info.placement_id = 2 then 'paas.s3.cphc' + else 'unknown' end as code + ,bucket_info.placement_id + --category.name, bucket_info.name + ,'WZ'||lpad(user_info.name, 5, '0') as wz + from s3billing.usage_bucket_by_user + join s3billing.user_info on usage_bucket_by_user.user_id=user_info.id + join s3billing.category on usage_bucket_by_user.category_id=category.id + join s3billing.bucket_info on usage_bucket_by_user.bucketid=bucket_info.id + join s3billing.placement on bucket_info.placement_id=placement.id + where 1=1 + AND usage_bucket_by_user.time >= + AND usage_bucket_by_user.time < + group by user_info.name, bucket_info.placement_id + order by user_info.name, bucket_info.placement_id; + + + + + + + + + + + select sum(bytes_sent) as bytes, + --placement.name as placement, + case + when placement.name = 'COLD' then 'paas.s3.cphc' + when placement.name = 'default-placement' then 'paas.s3.ceph' + else 'unknown' end as code, + 'WZ'||lpad(user_info.name, 5, '0') as wz + from s3billing.usage_bucket_by_user + join s3billing.user_info on usage_bucket_by_user.user_id=user_info.id + join s3billing.category on usage_bucket_by_user.category_id=category.id + join s3billing.bucket_info on usage_bucket_by_user.bucketid=bucket_info.id + join s3billing.placement on bucket_info.placement_id=placement.id + where 1=1 + AND usage_bucket_by_user.time >= + AND usage_bucket_by_user.time < + group by user_info.name, placement.name + order by user_info.name; + + ---> + + + + + + + + + + + + + diff --git a/lib/ac.cfm b/lib/ac.cfm new file mode 100644 index 0000000..823d1cb --- /dev/null +++ b/lib/ac.cfm @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select coalesce(max(permission),0) as permission + from usr_role ur + join acl on acl.role_id=ur.role_id + where ur.usr_id= + and acl.obj in () + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/contenttype_icon.cfm b/lib/contenttype_icon.cfm new file mode 100644 index 0000000..1f8f3b1 --- /dev/null +++ b/lib/contenttype_icon.cfm @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/lib/controls/checkbox.cfm b/lib/controls/checkbox.cfm new file mode 100644 index 0000000..38ec2e2 --- /dev/null +++ b/lib/controls/checkbox.cfm @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + id=#ATTRIBUTES.id# value="#ATTRIBUTES.value#" checked="checked" disabled="disabled" #attr#="#structFind(ATTRIBUTES,attr)#"/> \ No newline at end of file diff --git a/lib/controls/column.cfm b/lib/controls/column.cfm new file mode 100644 index 0000000..47cf2d8 --- /dev/null +++ b/lib/controls/column.cfm @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/controls/column_head.cfm b/lib/controls/column_head.cfm new file mode 100644 index 0000000..f189b06 --- /dev/null +++ b/lib/controls/column_head.cfm @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ATTRIBUTES.title# + \ No newline at end of file diff --git a/lib/controls/combo.cfm b/lib/controls/combo.cfm new file mode 100644 index 0000000..13e2832 --- /dev/null +++ b/lib/controls/combo.cfm @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if (isArray(sel)) { + for(i=1; i <= ArrayLen(sel); i++){ + if (sel[i]==key) {return true;} + } + return false; + } else { //считаем, что из сложных типов тут бывает только массив + if (!isSimpleValue(sel)) {return false;} + /*return (sel == key);*/ + return listFind(sel,key); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #preserveSingleQuotes(ATTRIBUTES.queryString)# + + + + + + + + + + + + + + + + + + + + + + select * from qSel where #ATTRIBUTES.key# in (#selectedList#)1=0 + + + +
#attr#="#structFind(ATTRIBUTES,attr)#"> + +
#Evaluate(ATTRIBUTES.display)#
+
+ + +     + +     +
+
+
+ + + + + +
+ +
+ + + diff --git a/lib/controls/date.cfm b/lib/controls/date.cfm new file mode 100644 index 0000000..b6a3f6f --- /dev/null +++ b/lib/controls/date.cfm @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + id=#ATTRIBUTES.id# value="#dateFormat(value, ATTRIBUTES.format)#" size="#ATTRIBUTES.size#" disabled="disabled" #attr#="#structFind(ATTRIBUTES,attr)#"/> \ No newline at end of file diff --git a/lib/controls/datetime.cfm b/lib/controls/datetime.cfm new file mode 100644 index 0000000..5b1f4fa --- /dev/null +++ b/lib/controls/datetime.cfm @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + id=#ATTRIBUTES.id# value="#value#" size="#ATTRIBUTES.size#" disabled="disabled" #attr#="#structFind(ATTRIBUTES,attr)#"/> \ No newline at end of file diff --git a/lib/controls/detail_buttons.cfm b/lib/controls/detail_buttons.cfm new file mode 100644 index 0000000..1484050 --- /dev/null +++ b/lib/controls/detail_buttons.cfm @@ -0,0 +1,18 @@ + + \ No newline at end of file diff --git a/lib/controls/grid_head.cfm b/lib/controls/grid_head.cfm new file mode 100644 index 0000000..55090e8 --- /dev/null +++ b/lib/controls/grid_head.cfm @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/controls/link_add.cfm b/lib/controls/link_add.cfm new file mode 100644 index 0000000..b6fbf5b --- /dev/null +++ b/lib/controls/link_add.cfm @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/lib/controls/link_del.cfm b/lib/controls/link_del.cfm new file mode 100644 index 0000000..bd911e9 --- /dev/null +++ b/lib/controls/link_del.cfm @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lib/controls/link_edit.cfm b/lib/controls/link_edit.cfm new file mode 100644 index 0000000..eccea83 --- /dev/null +++ b/lib/controls/link_edit.cfm @@ -0,0 +1,9 @@ + + + + + + + + +title="#ATTRIBUTES.title_edit#" class="edit"title="#ATTRIBUTES.title_view#" class="view"> \ No newline at end of file diff --git a/lib/controls/link_view.cfm b/lib/controls/link_view.cfm new file mode 100644 index 0000000..4cf9e70 --- /dev/null +++ b/lib/controls/link_view.cfm @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lib/controls/link_view_edit.cfm b/lib/controls/link_view_edit.cfm new file mode 100644 index 0000000..e676a5a --- /dev/null +++ b/lib/controls/link_view_edit.cfm @@ -0,0 +1,9 @@ + + + + + + + + +title="#ATTRIBUTES.title_edit#" class="edit"title="#ATTRIBUTES.title_view#" class="view"> \ No newline at end of file diff --git a/lib/controls/menu_item.cfm b/lib/controls/menu_item.cfm new file mode 100644 index 0000000..6c4a45d --- /dev/null +++ b/lib/controls/menu_item.cfm @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + +
  • #ATTRIBUTES.label#
  • +
  • #ATTRIBUTES.label#
  • \ No newline at end of file diff --git a/lib/controls/nowbutton.cfm b/lib/controls/nowbutton.cfm new file mode 100644 index 0000000..a142ece --- /dev/null +++ b/lib/controls/nowbutton.cfm @@ -0,0 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + + #markup# + + + + \ No newline at end of file diff --git a/lib/data/del_condition.cfm b/lib/data/del_condition.cfm new file mode 100644 index 0000000..5cae40c --- /dev/null +++ b/lib/data/del_condition.cfm @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/data/dep_field.cfm b/lib/data/dep_field.cfm new file mode 100644 index 0000000..0d065da --- /dev/null +++ b/lib/data/dep_field.cfm @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/data/dep_param.cfm b/lib/data/dep_param.cfm new file mode 100644 index 0000000..7084ec2 --- /dev/null +++ b/lib/data/dep_param.cfm @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/lib/data/dependency.cfm b/lib/data/dependency.cfm new file mode 100644 index 0000000..19322dc --- /dev/null +++ b/lib/data/dependency.cfm @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + + + , #field.expression# + + from + + #from.expression# + + where + + + AND + #condition.expression#= + + order by + + + , #order.expression# + + + + + + diff --git a/lib/data/dependency_condition.cfm b/lib/data/dependency_condition.cfm new file mode 100644 index 0000000..1b668ba --- /dev/null +++ b/lib/data/dependency_condition.cfm @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/lib/data/dependency_field.cfm b/lib/data/dependency_field.cfm new file mode 100644 index 0000000..4a3c282 --- /dev/null +++ b/lib/data/dependency_field.cfm @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/data/dependency_from.cfm b/lib/data/dependency_from.cfm new file mode 100644 index 0000000..83fbd4f --- /dev/null +++ b/lib/data/dependency_from.cfm @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lib/data/dependency_order_by.cfm b/lib/data/dependency_order_by.cfm new file mode 100644 index 0000000..48b990d --- /dev/null +++ b/lib/data/dependency_order_by.cfm @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lib/data/field.cfm b/lib/data/field.cfm new file mode 100644 index 0000000..8fa07da --- /dev/null +++ b/lib/data/field.cfm @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/data/field_set.cfm b/lib/data/field_set.cfm new file mode 100644 index 0000000..b990b40 --- /dev/null +++ b/lib/data/field_set.cfm @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/data/param.cfm b/lib/data/param.cfm new file mode 100644 index 0000000..2433014 --- /dev/null +++ b/lib/data/param.cfm @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/data/status.cfc b/lib/data/status.cfc new file mode 100644 index 0000000..6e956c5 --- /dev/null +++ b/lib/data/status.cfc @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/data/submit_collection.cfm b/lib/data/submit_collection.cfm new file mode 100644 index 0000000..bc1c10b --- /dev/null +++ b/lib/data/submit_collection.cfm @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/data/submit_param.cfm b/lib/data/submit_param.cfm new file mode 100644 index 0000000..799a3ec --- /dev/null +++ b/lib/data/submit_param.cfm @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/detail_page_info.cfc b/lib/detail_page_info.cfc new file mode 100644 index 0000000..1a0d1e8 --- /dev/null +++ b/lib/detail_page_info.cfc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/dispatch_detail.cfm b/lib/dispatch_detail.cfm new file mode 100644 index 0000000..30bffcd --- /dev/null +++ b/lib/dispatch_detail.cfm @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/filter_build.cf_ b/lib/filter_build.cf_ new file mode 100644 index 0000000..146c197 --- /dev/null +++ b/lib/filter_build.cf_ @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #item# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/filter_build.cfm b/lib/filter_build.cfm new file mode 100644 index 0000000..ccd55fb --- /dev/null +++ b/lib/filter_build.cfm @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + AND #listGetAt(fltr.expression,i,"?")##fltr.field# = <> <= < >= > LIKE NOT LIKE LIKE NOT LIKE IN () = #fltr.field# + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/filter_page_info.cfc b/lib/filter_page_info.cfc new file mode 100644 index 0000000..ea82758 --- /dev/null +++ b/lib/filter_page_info.cfc @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/lib/filter_rebuild.cfm b/lib/filter_rebuild.cfm new file mode 100644 index 0000000..e69de29 diff --git a/lib/filter_settings.cfm b/lib/filter_settings.cfm new file mode 100644 index 0000000..4d6089d --- /dev/null +++ b/lib/filter_settings.cfm @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/filterparam.cfm b/lib/filterparam.cfm new file mode 100644 index 0000000..8fe4962 --- /dev/null +++ b/lib/filterparam.cfm @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if (!IsSimpleValue(val)){ + if (isArray(val)) { + return (arrayLen(val) == 0); + } + return false; + } + return ((val==def) OR (val=="")); + + + + + + ", ",,,")/> + + diff --git a/lib/form_page_info.cfc b/lib/form_page_info.cfc new file mode 100644 index 0000000..5d0d6ac --- /dev/null +++ b/lib/form_page_info.cfc @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/generic_page_info.cfc b/lib/generic_page_info.cfc new file mode 100644 index 0000000..08c50d3 --- /dev/null +++ b/lib/generic_page_info.cfc @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/init_settings.cfm b/lib/init_settings.cfm new file mode 100644 index 0000000..f51c235 --- /dev/null +++ b/lib/init_settings.cfm @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/location.cfm b/lib/location.cfm new file mode 100644 index 0000000..06ceafe --- /dev/null +++ b/lib/location.cfm @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/lib/ls_catch.cfm b/lib/ls_catch.cfm new file mode 100644 index 0000000..918f958 --- /dev/null +++ b/lib/ls_catch.cfm @@ -0,0 +1,24 @@ + + + + + + + Ошибка при обращении к базе данных. Возможно, программа некорректно сформировала условия фильтра или сортировки. В качестве временной меры попробуйте сбросить условия фильтра и сортировки. Просьба сообщить об ошибке администратору.
    + #ATTRIBUTES.catch.message#
    + #ATTRIBUTES.catch.detail#
    +
    +
    + + + + + + + + + + + + +
    \ No newline at end of file diff --git a/lib/ls_page_info.cfc b/lib/ls_page_info.cfc new file mode 100644 index 0000000..32e352c --- /dev/null +++ b/lib/ls_page_info.cfc @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/lib/menu_item.cfm b/lib/menu_item.cfm new file mode 100644 index 0000000..632e78a --- /dev/null +++ b/lib/menu_item.cfm @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/mimetype_icon.cfm b/lib/mimetype_icon.cfm new file mode 100644 index 0000000..6128b1a --- /dev/null +++ b/lib/mimetype_icon.cfm @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/lib/order_build.cfm b/lib/order_build.cfm new file mode 100644 index 0000000..bda0f97 --- /dev/null +++ b/lib/order_build.cfm @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/prepare_detail.cfm b/lib/prepare_detail.cfm new file mode 100644 index 0000000..d84a00a --- /dev/null +++ b/lib/prepare_detail.cfm @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/prepare_filter.cfm b/lib/prepare_filter.cfm new file mode 100644 index 0000000..07eb829 --- /dev/null +++ b/lib/prepare_filter.cfm @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/prepare_form.cfm b/lib/prepare_form.cfm new file mode 100644 index 0000000..baccc32 --- /dev/null +++ b/lib/prepare_form.cfm @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/prepare_ls.cfm b/lib/prepare_ls.cfm new file mode 100644 index 0000000..01a6e05 --- /dev/null +++ b/lib/prepare_ls.cfm @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/rest_api_helper.cfc b/lib/rest_api_helper.cfc new file mode 100644 index 0000000..23221d9 --- /dev/null +++ b/lib/rest_api_helper.cfc @@ -0,0 +1,396 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/settings.cfm b/lib/settings.cfm new file mode 100644 index 0000000..c7e5784 --- /dev/null +++ b/lib/settings.cfm @@ -0,0 +1,216 @@ + + + + + + +Разрешение конфликта версий при обновлении софта +Конфликт версий: код требует параметр, отсутствующий в сохраненной версии. Например, одна версия фильтра сохранила свои настройки, +а другая, более новая, пытается прочесть несуществующий ключ. +Другой вариант - несуществующее поле (убранное в очередной версии) - этот конфликт проявится только при запросе к БД. +Варианты решения +- создание параметра с дефолтными значениями при запросе (во все запросы добавить значения по умолчанию). Недостаток - возможно создание помойки +- контроль номера версии. Выглядит сложным в сопровождении +*** Возможно, это была плохая идея - разрешить доступ по длинному ключу. Когда доставали и записывали целиком объект, было меньше возможностей для ошибок +---> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select settings from usr where usr_id='#request.usr_id#' + + + + + + Err: + #cfcatch.message# + + + + + + + + + + + + + + + + + + select count(*) as cnt from usr_serrings where usr_id= + + + + + + + insert int usr_settings (usr_id, settings) + values(, ) + + + + update usr_settings + set settings= + where usr_id= + + + + + + + diff --git a/lib/silent.cfm b/lib/silent.cfm new file mode 100644 index 0000000..7f2f6f2 --- /dev/null +++ b/lib/silent.cfm @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/lib/sortparam.cfm b/lib/sortparam.cfm new file mode 100644 index 0000000..1648d2b --- /dev/null +++ b/lib/sortparam.cfm @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/track.cfm b/lib/track.cfm new file mode 100644 index 0000000..169d97d --- /dev/null +++ b/lib/track.cfm @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/upload.cfm b/lib/upload.cfm new file mode 100644 index 0000000..7d9c22e --- /dev/null +++ b/lib/upload.cfm @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/util/Application.cf_ b/util/Application.cf_ new file mode 100644 index 0000000..b7ab550 --- /dev/null +++ b/util/Application.cf_ @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/util/b64.cfm b/util/b64.cfm new file mode 100644 index 0000000..1ef2ac0 --- /dev/null +++ b/util/b64.cfm @@ -0,0 +1,16 @@ + + + + + + + + + #cfcatch.message# #cfcatch.detail# + + +
    + + + +
    \ No newline at end of file diff --git a/util/builder.cfm b/util/builder.cfm new file mode 100644 index 0000000..76f1aec --- /dev/null +++ b/util/builder.cfm @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + +select o.type, o.name from sys.objects o where o.type in ('U','V') order by o.type, o.name + + + + +select c.name, c.system_type_id, c.max_length, c.is_nullable, c.is_identity from sys.columns c join sys.objects o on (c.object_id=o.object_id) where o.name= + + + +
    + + + + + + + + + checked/> + + + + + + + checked/> + + +
    + + + + + + +
    +{
    +	#name#={prefix="#alias#", type="#cfType(system_type_id)#"},
    +	
    +}
    +
    +
    + + +
    +select 
    +<m:field_set titleMapOut="titleMap" lengthOut="fieldCount">
    +	<m:field title="#name#">convert(varchar(25), #alias#.#name#, 120) as #name##alias#.#name#</m:field><m:field title="#name#">#alias#.#name#</m:field>
    +</m:field_set>
    +from #obj# #alias#
    +
    +
    + + + +
    +select 
    +	,#alias#.#name#
    +from #obj# #alias#
    +
    +
    + + +
    +insert into #obj# (	
    +	,#name#
    +) values (
    +	,<cfqueryparam cfsqltype="cf_sql_#fieldType(system_type_id)#" value="###name###"/>
    +)
    +
    +
    + + + +
    +update #obj# set 
    +	,#name#=<cfqueryparam cfsqltype="cf_sql_#fieldType(system_type_id)#" value="###name###"/>
    +where #obj#_id=<cfqueryparam cfsqltype="cf_sql_integer" value="###obj#_id##" null=##!isNumeric(#obj#_id)##/>
    +
    +
    + + +
    +<d:bean readonly=#!pageInfo.writePermitted()# table="#obj#" datasource="#request.DS#" output="d" status="status">
    +	
    +		<d:param field="creator_id" type="integer" value="##request.usr_id##" skipUpdate/>
    +		<d:param field="modifier_id" type="integer" value="##request.usr_id##"/>
    +		<d:param field="dt_created" type="timestamp" value="##Now()##" skipUpdate/>
    +		<d:param field="dt_modified" type="timestamp" value="##Now()##"/>
    +		<d:param field="#name#" type="#fieldType(system_type_id)#" size="#max_length#" preprocessor=##cleanInput## preprocessor=##plain2HtmClean## key autoincrement forNull="" default="0" init="0"/>
    +	
    +</d:bean>
    +
    +
    + + +
    +<table class="worktable">	
    +	<thead>	
    +		<layout:grid_head titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray#>		
    +			<th><layout:column_head name="#name#"/></th>
    +			
    +		</layout:grid_head>
    +	</thead>
    +	
    +	<cfoutput query="qRead" maxrows="#pageInfo.recordsPerPage#" startrow="#pageInfo.nStart#">
    +		<tr>
    +			<td class="c">##dateFormat(#name#,'YYYY-MM-DD')#name###</td>
    +			
    +		</tr>
    +	</cfoutput>		
    +</table>
    +
    +
    + + +
    +<div class="detail">	
    +	
    +	<div class="tr">
    +		<div class="th">#name#</div>
    +		<div class="td"><input type="text" name="#name#" id="#name#" value="<textarea rows="5" cols="70" name="#name#" id="#name#"><input type="checkbox" name="#name#" id="name" value="1"<cfif (##dateFormat(d.#name#,'YYYY-MM-DD')d.#name###"/></textarea> GT 0)> checked</cfif>/></div>
    +	</div>
    +	
    +</div>
    +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/util/builder.pg.cfm b/util/builder.pg.cfm new file mode 100644 index 0000000..4744168 --- /dev/null +++ b/util/builder.pg.cfm @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + +select schema_name +from information_schema.schemata +order by schema_name + + + +select o.table_type as type, o.table_name as name +from information_schema.tables o +where o.table_type in ('BASE TABLE','VIEW') +AND table_schema= +order by o.table_type, o.table_name + + + + +select c.column_name as name, c.data_type, c.character_maximum_length as max_length, c.is_nullable, c.is_identity +from information_schema.columns c +join information_schema.tables o on (c.table_name=o.table_name AND c.table_schema=o.table_schema) +where o.table_name= + + + + + + +

    Генератор всякой всячины из таблицы PostgreSQL

    +
    + + + + + +
    + + Поля: + +   + + checked style="margin-right:0;"/>  + для некоторых вариантов предполагается, что таблица имеет целочисленный ключ "tablename_id" +
    + + Генерировать: + + +   + + + checked style="margin-right:0;"/> +   + + + +
    + + + + checked/> + + + + + +
    + +
    + + + + + + + + +
    +select 
    +	, #alias#.#name#
    +from #schema#.#obj# #alias#;
    +
    +
    + +
    + + +
    +insert into #schema#.#obj# (	
    +	,
    +	 #name#
    +) values (
    +	,
    +	 <cfqueryparam cfsqltype="#cfSqlType(data_type)#" value="###name###"/>
    +);
    +
    +
    + +
    + + + +select #column_list#* +from #schema#.#obj# + +
    +insert into #schema#.#obj# (	
    +	,
    +	 #name#
    +) 
    +values 
    +(, '#qExport[qCol.name]#'),
    +;
    +
    +
    + +
    + + + +
    +update #obj# set 
    +	, #name#=<cfqueryparam cfsqltype="#cfSqlType(data_type)#" value="###name###"/>
    +where #obj#_id=<cfqueryparam cfsqltype="cf_sql_integer" value="###obj#_id##" null=##!isNumeric(#obj#_id)##/>;
    +
    +
    + +
    + + +
    +<d:bean readonly=#!pageInfo.writePermitted()# table="#obj#" datasource="#request.DS#" output="d" status="status">
    +	
    +		<d:param field="creator_id" type="integer" value="##request.usr_id##" skipUpdate/>
    +		<d:param field="updater_id" type="integer" value="##request.usr_id##"/>
    +		<d:param field="dt_created" type="timestamp" value="##Now()##" skipUpdate/>
    +		<d:param field="dt_updated" type="timestamp" value="##Now()##"/>
    +		<d:param field="#name#" type="#translateDataType(data_type)#" size="#max_length#" preprocessor=##cleanInput## preprocessor=##plain2HtmClean## key autoincrement forNull="" default="0" init="0"/>
    +	
    +</d:bean>
    +
    +
    + +
    + + +
    +<table class="worktable">	
    +	<thead>	
    +		<layout:grid_head titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray#>
    +			<th><layout:column_head name="#name#"/></th>
    +		</layout:grid_head>
    +	</thead>
    +	
    +	<cfoutput query="qRead" maxrows="#pageInfo.recordsPerPage#" startrow="#pageInfo.nStart#">
    +		<tr>
    +			<td class="c">##dateFormat(#name#,'YYYY-MM-DD')#name###</td>
    +		</tr>
    +	</cfoutput>		
    +</table>
    +
    +
    + + +
    +<table class="worktable">	
    +	<thead>	
    +		<tr>
    +			<th>#name#</th>
    +		</tr>
    +	</thead>
    +	
    +	<cfoutput query="qRead">
    +		<tr>
    +			<td class="c">##dateFormat(#name#,'YYYY-MM-DD')#name###</td>
    +		</tr>
    +	</cfoutput>		
    +</table>
    +
    +
    + +
    + + +
    +
    +<div class="detail">	
    +	
    +	<div class="tr">
    +		<div class="th">#name#</div>
    +		<div class="td"><input type="text" name="#name#" id="#name#" value="<textarea rows="5" cols="70" name="#name#" id="#name#"><input type="checkbox" name="#name#" id="name" value="1"<cfif (##dateFormat(d.#name#,'YYYY-MM-DD')d.#name###"/></textarea> GT 0)> checked</cfif>/></div>
    +	</div>
    +	
    +</div>
    +
    +
    + +
    + + +
    +{ + + , #name#={prefix="#alias#", type="#cfSqlType(data_type)#"} +} +
    +
    +
    + + +
    +select 
    +<#tag_prefix#field_set titleMapOut="local.titleMap" lengthOut="fieldCount">
    +	<#tag_prefix#field title="#name#">to_char(#alias#.#name#, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as #name##alias#.#name#</#tag_prefix#field><#tag_prefix#field title="#name#">#alias#.#name#::text as #name#</#tag_prefix#field><#tag_prefix#field title="#name#">#alias#.#name#</#tag_prefix#field>
    +</#tag_prefix#field_set>
    +from #obj# #alias#;
    +
    +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/util/conn.cfm b/util/conn.cfm new file mode 100644 index 0000000..37bde3b --- /dev/null +++ b/util/conn.cfm @@ -0,0 +1,4 @@ + +select current_user; + + \ No newline at end of file diff --git a/util/debug.cfm b/util/debug.cfm new file mode 100644 index 0000000..7eaf17c --- /dev/null +++ b/util/debug.cfm @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/util/hash.cfm b/util/hash.cfm new file mode 100644 index 0000000..0f818e6 --- /dev/null +++ b/util/hash.cfm @@ -0,0 +1,15 @@ + + + +
    + + +
    + #GenerateArgon2Hash(#passwd#, 'argon2id', 1, 16000, 2)# + + +
    +
    + #(GetTickCount()-tStart)# ms +
    + diff --git a/util/secret.cfm b/util/secret.cfm new file mode 100644 index 0000000..0f818e6 --- /dev/null +++ b/util/secret.cfm @@ -0,0 +1,15 @@ + + + +
    + + +
    + #GenerateArgon2Hash(#passwd#, 'argon2id', 1, 16000, 2)# + + +
    +
    + #(GetTickCount()-tStart)# ms +
    + diff --git a/util/time.cfm b/util/time.cfm new file mode 100644 index 0000000..db049aa --- /dev/null +++ b/util/time.cfm @@ -0,0 +1,18 @@ + +Now():#Now()#
    +LSDateTimeFormat(Now()):#LSDateTimeFormat(Now())#
    +System TimeZone:#getSystemTZ()#
    +TimeStamp:#LSDateTimeFormat(Now(),"dd-MM-yyyy'T'HH:nn:ss.SSSZ")#
    + +
    +Server Date/Time: #lsdateFormat(date:now(),timezone:"jvm")# #lstimeFormat(time:now(),timezone:"jvm")#
    +Lucee Date/Time: #lsdateFormat(date:now())# #lstimeFormat(time:now())#
    +JVM(System) Timezone: #createobject("java","java.util.TimeZone").getDefault().getId()#
    +PageContext(Lucee) Timezone: #getPageContext().getTimeZone()# +
    + + +function getSystemTZ(){ + return createObject("java", "java.util.TimeZone").getDefault().getId(); +} + \ No newline at end of file