commit 7dfd93d6991f093c552276c31245e99bd5cbd9fa Author: msyu Date: Tue Aug 19 17:18:23 2025 +0300 initial diff --git a/Application.cfc b/Application.cfc new file mode 100644 index 0000000..7da8f27 --- /dev/null +++ b/Application.cfc @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ---> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ), + 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' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select 1; + + + + + + + + + + + + + + \ 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/inc/menu.cfm b/inc/menu.cfm new file mode 100644 index 0000000..a055d93 --- /dev/null +++ b/inc/menu.cfm @@ -0,0 +1,54 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/layout/attribute.cfm b/layout/attribute.cfm new file mode 100644 index 0000000..89bd22e --- /dev/null +++ b/layout/attribute.cfm @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layout/column_head.cfm b/layout/column_head.cfm new file mode 100644 index 0000000..480b8a5 --- /dev/null +++ b/layout/column_head.cfm @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#ATTRIBUTES.title# + \ No newline at end of file diff --git a/layout/detail_buttons.cfm b/layout/detail_buttons.cfm new file mode 100644 index 0000000..36a9912 --- /dev/null +++ b/layout/detail_buttons.cfm @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/layout/detail_line.cfm b/layout/detail_line.cfm new file mode 100644 index 0000000..7381cbb --- /dev/null +++ b/layout/detail_line.cfm @@ -0,0 +1,10 @@ + + + +
+
#ATTRIBUTES.title#
+
\ No newline at end of file diff --git a/layout/filter_buttons.cfm b/layout/filter_buttons.cfm new file mode 100644 index 0000000..5626fea --- /dev/null +++ b/layout/filter_buttons.cfm @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/layout/filter_link.cfm b/layout/filter_link.cfm new file mode 100644 index 0000000..b1f51a1 --- /dev/null +++ b/layout/filter_link.cfm @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + #request.i18("Фильтр...","Filter")##request.i18("Фильтр","Filter")# + (#request.i18("снять","reset")#) + \ No newline at end of file diff --git a/layout/grid_head.cfm b/layout/grid_head.cfm new file mode 100644 index 0000000..2d3d599 --- /dev/null +++ b/layout/grid_head.cfm @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layout/grid_summary.cfm b/layout/grid_summary.cfm new file mode 100644 index 0000000..cc56219 --- /dev/null +++ b/layout/grid_summary.cfm @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
 
+
+ + + Выбрано #ATTRIBUTES.recordCount# + + из #ATTRIBUTES.totalCount# + + + + + + + + + + +
+
+ #paginator.links# +
+
+
+
+ + + + +
+ #paginator.links# +
+
+
+
+ + diff --git a/layout/json.cfm b/layout/json.cfm new file mode 100644 index 0000000..47ebf3b --- /dev/null +++ b/layout/json.cfm @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + ---> + + + + + + + + + + + + + [{"#listGetAt(#columnsOut#,i)#":"#qry[listGetAt(#columnsIn#,i)]#",},] + ---> + + + + + + + + + + + + + + + //copy fields to structure, renaming fields, this preserves data type + + + + + + + + + + + + + + + + + + + +#query2json(ATTRIBUTES.qRead,ATTRIBUTES.convertSnakeToCamel)# + \ No newline at end of file diff --git a/layout/language_switch.cfm b/layout/language_switch.cfm new file mode 100644 index 0000000..6533051 --- /dev/null +++ b/layout/language_switch.cfm @@ -0,0 +1,9 @@ + + +   +   +   + style="font-weight:bold;">Ru + style="font-weight:bold;">En + + \ No newline at end of file diff --git a/layout/page.cfm b/layout/page.cfm new file mode 100644 index 0000000..5b43472 --- /dev/null +++ b/layout/page.cfm @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +---> + + + + + + + + + + + + +<cfoutput>#pageTitle#</cfoutput> + + + + + + + + ---> + + + + + + + + + + +
+
+ + +
+ + + +
enctype="#ATTRIBUTES.pageInfo.formEncType#"> + + + +
+
+ + + + +
+ #title# +
+
+ #controls# +
+
+
+ +
+ + + + #ATTRIBUTES.pageInfo.status.errorMessage# + + + + + + +
+ + + +
+ + +
+ + + +
+ + + + + +
diff --git a/layout/xls.cfm b/layout/xls.cfm new file mode 100644 index 0000000..5d8a964 --- /dev/null +++ b/layout/xls.cfm @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#title##fieldArray[i]#
#dateFormat(data,'YYYY-MM-DD')# #timeFormat(data,'HH:mm')##Replace(data, '.', ',')##data##data#
+
+
+ + + + + + \ No newline at end of file diff --git a/layout/xlshtm.cfm b/layout/xlshtm.cfm new file mode 100644 index 0000000..b74ad64 --- /dev/null +++ b/layout/xlshtm.cfm @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#structFind(ATTRIBUTES.titleMap,field).title#
+ #ATTRIBUTES.qRead[field]# +
+ + +
+
+ + + + \ No newline at end of file diff --git a/layout/xml.cfm b/layout/xml.cfm new file mode 100644 index 0000000..65e7e41 --- /dev/null +++ b/layout/xml.cfm @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + xls-generator + + + + + + + + + + + + + + + ss:ExpandedColumnCount="#ListLen(qRead.ColumnList)#" + + ss:ExpandedRowCount="#(qRead.RecordCount + 1)#" + x:FullColumns="1" + x:FullRows="1"> + + + + + + + + + + + + + + + + + + select coalesce(max(length(#field#)),0) as maxlen from qRead + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #columns[i].title# + + + + + + + ss:StyleID="DateTime">#dateFormat(qRead[field],"YYYY-MM-DD")#T#timeFormat(qRead[field],"HH:mm:ss.l")##qRead[field]#
+ +
+ +
+ +
+ + + + + + + + \ No newline at end of file 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/s3current.cfm b/s3current.cfm new file mode 100644 index 0000000..61f6270 --- /dev/null +++ b/s3current.cfm @@ -0,0 +1,115 @@ + + + + + + select * from s3billing.buskets_current_stat() + + + +Имена колонок из резалтсета (универсальный код) select * from s3billing.buskets_current_stat(account) + + + + + + + + + + + + + + + +
    #col#
    #qS3Current[col]#
    + +Колонки поименованы в шаблоне + + select + + name + placement + bucket_quota_enabled + bucket_quota_max_size + bucket_quota_max_objects + usage_rgw_main_size_actual + usage_rgw_main_num_objects + + from s3billing.buskets_current_stat() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    #name##placement##bucket_quota_enabled##bucket_quota_max_size##bucket_quota_max_objects##usage_rgw_main_size_actual##usage_rgw_main_num_objects#
    + +Резалтсет в JSON (названия колонок переведены в camelCase) +
    +#query2json(qS3CurrentM,true)#
    +
    + + + + + + + + + + + + + + //copy fields to structure, renaming fields, this preserves data type + + + + + + + + + + + + + + + + + \ No newline at end of file