Fix IMG_PNG constant error, jquery update, other minor fixes
Big fix with IMG_PNG constant use. Switched to IMAGETYPE_* Some code cleanup in config files (array, DEFINE->define, etc) Code cleanup in DB:IO class, especially for consistent returning array/single data blocks Some javascript core lib update
This commit is contained in:
1 parent
b6c6d76b43
commit
6059b83637
12 files changed
+679
-349
No files matched your search
@@ -107,25 +107,46 @@ while ($res = $basic->dbReturn("SELECT * FROM max_test")) {
|
|||||||
print "[CACHED] TIME: ".$res['time']."<br>";
|
print "[CACHED] TIME: ".$res['time']."<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<pre>";
|
||||||
$status = $basic->dbExec("INSERT INTO foo (test) VALUES ('FOO TEST ".time()."') RETURNING test");
|
$status = $basic->dbExec("INSERT INTO foo (test) VALUES ('FOO TEST ".time()."') RETURNING test");
|
||||||
print "DIRECT INSERT STATUS: $status | PRIMARY KEY: ".$basic->dbGetInsertPK()." | PRIMARY KEY EXT: ".print_r($basic->insert_id_ext, true)." => ".print_r($basic->dbGetReturningExt(), true)."<br>";
|
print "DIRECT INSERT STATUS: $status | "
|
||||||
|
."PRIMARY KEY: ".$basic->dbGetInsertPK()." | "
|
||||||
|
."RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)." | "
|
||||||
|
."RETURNING ARRAY: ".print_r($basic->dbGetReturningArray(), true)."<br>";
|
||||||
|
|
||||||
// should throw deprecated error
|
// should throw deprecated error
|
||||||
// $basic->getReturningExt();
|
// $basic->getReturningExt();
|
||||||
print "DIRECT INSERT PREVIOUS INSERTED: ".print_r($basic->dbReturnRow("SELECT foo_id, test FROM foo WHERE foo_id = ".$basic->dbGetInsertPK()), true)."<br>";
|
print "DIRECT INSERT PREVIOUS INSERTED: ".print_r($basic->dbReturnRow("SELECT foo_id, test FROM foo WHERE foo_id = ".$basic->dbGetInsertPK()), true)."<br>";
|
||||||
$basic->dbPrepare("ins_foo", "INSERT INTO foo (test) VALUES ($1)");
|
$basic->dbPrepare("ins_foo", "INSERT INTO foo (test) VALUES ($1)");
|
||||||
$status = $basic->dbExecute("ins_foo", array('BAR TEST '.time()));
|
$status = $basic->dbExecute("ins_foo", array('BAR TEST '.time()));
|
||||||
print "PREPARE INSERT STATUS: $status | PRIMARY KEY: ".$basic->dbGetInsertPK()." | PRIMARY KEY EXT: ".print_r($basic->dbGetReturningExt(), true)."<br>";
|
print "PREPARE INSERT STATUS: $status | "
|
||||||
|
."PRIMARY KEY: ".$basic->dbGetInsertPK()." | "
|
||||||
|
."RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)." | "
|
||||||
|
."RETURNING RETURN: ".print_r($basic->dbGetReturningArray(), true)."<br>";
|
||||||
|
|
||||||
print "PREPARE INSERT PREVIOUS INSERTED: ".print_r($basic->dbReturnRow("SELECT foo_id, test FROM foo WHERE foo_id = ".$basic->dbGetInsertPK()), true)."<br>";
|
print "PREPARE INSERT PREVIOUS INSERTED: ".print_r($basic->dbReturnRow("SELECT foo_id, test FROM foo WHERE foo_id = ".$basic->dbGetInsertPK()), true)."<br>";
|
||||||
// returning test with multiple entries
|
// returning test with multiple entries
|
||||||
// $status = $basic->db_exec("INSERT INTO foo (test) values ('BAR 1 ".time()."'), ('BAR 2 ".time()."'), ('BAR 3 ".time()."') RETURNING foo_id");
|
// $status = $basic->db_exec("INSERT INTO foo (test) values ('BAR 1 ".time()."'), ('BAR 2 ".time()."'), ('BAR 3 ".time()."') RETURNING foo_id");
|
||||||
$status = $basic->dbExec("INSERT INTO foo (test) values ('BAR 1 ".time()."'), ('BAR 2 ".time()."'), ('BAR 3 ".time()."') RETURNING foo_id, test");
|
$status = $basic->dbExec("INSERT INTO foo (test) values ('BAR 1 ".time()."'), ('BAR 2 ".time()."'), ('BAR 3 ".time()."') RETURNING foo_id, test");
|
||||||
print "DIRECT MULTIPLE INSERT STATUS: $status | PRIMARY KEYS: ".print_r($basic->dbGetInsertPK(), true)." | PRIMARY KEY EXT: ".print_r($basic->dbGetReturningExt(), true)."<br>";
|
print "DIRECT MULTIPLE INSERT STATUS: $status | "
|
||||||
|
."PRIMARY KEYS: ".print_r($basic->dbGetInsertPK(), true)." | "
|
||||||
|
."RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)." | "
|
||||||
|
."RETURNING ARRAY: ".print_r($basic->dbGetReturningArray(), true)."<br>";
|
||||||
|
|
||||||
// no returning, but not needed ;
|
// no returning, but not needed ;
|
||||||
$status = $basic->dbExec("INSERT INTO foo (test) VALUES ('FOO; TEST ".time()."');");
|
$status = $basic->dbExec("INSERT INTO foo (test) VALUES ('FOO; TEST ".time()."');");
|
||||||
print "DIRECT INSERT STATUS: $status | PRIMARY KEY: ".$basic->dbGetInsertPK()." | PRIMARY KEY EXT: ".print_r($basic->dbGetReturningExt(), true)."<br>";
|
print "DIRECT INSERT STATUS: $status | "
|
||||||
|
."PRIMARY KEY: ".$basic->dbGetInsertPK()." | "
|
||||||
|
."RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)." | "
|
||||||
|
."RETURNING ARRAY: ".print_r($basic->dbGetReturningArray(), true)."<br>";
|
||||||
|
|
||||||
// UPDATE WITH RETURNING
|
// UPDATE WITH RETURNING
|
||||||
$status = $basic->dbExec("UPDATE foo SET test = 'SOMETHING DIFFERENT' WHERE foo_id = 3688452 RETURNING test");
|
$status = $basic->dbExec("UPDATE foo SET test = 'SOMETHING DIFFERENT' WHERE foo_id = 3688452 RETURNING test");
|
||||||
print "UPDATE STATUS: $status | RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)."<br>";
|
print "UPDATE STATUS: $status | "
|
||||||
|
."RETURNING EXT: ".print_r($basic->dbGetReturningExt(), true)." | "
|
||||||
|
."RETURNING ARRAY: ".print_r($basic->dbGetReturningArray(), true)."<br>";
|
||||||
|
print "</pre>";
|
||||||
|
|
||||||
// REEAD PREPARE
|
// REEAD PREPARE
|
||||||
if ($basic->dbPrepare('sel_foo', "SELECT foo_id, test, some_bool, string_a, number_a, number_a_numeric, some_time FROM foo ORDER BY foo_id DESC LIMIT 5") === false) {
|
if ($basic->dbPrepare('sel_foo', "SELECT foo_id, test, some_bool, string_a, number_a, number_a_numeric, some_time FROM foo ORDER BY foo_id DESC LIMIT 5") === false) {
|
||||||
print "Error in sel_foo prepare<br>";
|
print "Error in sel_foo prepare<br>";
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
// other master config to attach
|
// other master config to attach
|
||||||
// $__LOCAL_CONFIG = array(
|
// $__LOCAL_CONFIG = [
|
||||||
// 'db_host' => '',
|
// 'db_host' => '',
|
||||||
// 'location' => '',
|
// 'location' => '',
|
||||||
// 'debug_flag' => true,
|
// 'debug_flag' => true,
|
||||||
// 'site_lang' => 'en_utf8',
|
// 'site_lang' => 'en_utf8',
|
||||||
// 'login_enabled' => true
|
// 'login_enabled' => true
|
||||||
// );
|
// ];
|
||||||
|
|
||||||
// each host has a different db_host
|
// each host has a different db_host
|
||||||
$SITE_CONFIG = [
|
$SITE_CONFIG = [
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ define('LIBS', 'lib'.DS);
|
|||||||
define('CONFIGS', 'configs'.DS);
|
define('CONFIGS', 'configs'.DS);
|
||||||
// includes (strings, arrays for static, etc)
|
// includes (strings, arrays for static, etc)
|
||||||
define('INCLUDES', 'includes'.DS);
|
define('INCLUDES', 'includes'.DS);
|
||||||
// data folder (mostly in includes)
|
// data folder (mostly in includes, or root for internal data)
|
||||||
define('DATA', 'data'.DS);
|
define('DATA', 'data'.DS);
|
||||||
// layout base path
|
// layout base path
|
||||||
define('LAYOUT', 'layout'.DS);
|
define('LAYOUT', 'layout'.DS);
|
||||||
@@ -36,20 +36,22 @@ define('PICTURES', 'images'.DS);
|
|||||||
define('IMAGES', 'images'.DS);
|
define('IMAGES', 'images'.DS);
|
||||||
// icons (below the images/ folder)
|
// icons (below the images/ folder)
|
||||||
define('ICONS', 'icons'.DS);
|
define('ICONS', 'icons'.DS);
|
||||||
// media
|
// media (accessable from outside)
|
||||||
define('MEDIA', 'media'.DS);
|
define('MEDIA', 'media'.DS);
|
||||||
// flash-root (below media)
|
// flash-root (below media or data)
|
||||||
define('FLASH', 'flash'.DS);
|
define('FLASH', 'flash'.DS);
|
||||||
// uploads (anything to keep)
|
// uploads (anything to keep or data)
|
||||||
define('UPLOADS', 'uploads'.DS);
|
define('UPLOADS', 'uploads'.DS);
|
||||||
// files (binaries) (below media)
|
// files (binaries) (below media or data)
|
||||||
define('BINARIES', 'binaries'.DS);
|
define('BINARIES', 'binaries'.DS);
|
||||||
// files (videos) (below media)
|
// files (videos) (below media or data)
|
||||||
define('VIDEOS', 'videos'.DS);
|
define('VIDEOS', 'videos'.DS);
|
||||||
// files (documents) (below media)
|
// files (documents) (below media or data)
|
||||||
define('DOCUMENTS', 'documents'.DS);
|
define('DOCUMENTS', 'documents'.DS);
|
||||||
// files (pdfs) (below media)
|
// files (pdfs) (below media or data)
|
||||||
define('PDFS', 'documents'.DS);
|
define('PDFS', 'documents'.DS);
|
||||||
|
// files (general) (below media or data)
|
||||||
|
define('FILES', 'files'.DS);
|
||||||
// CSV
|
// CSV
|
||||||
define('CSV', 'csv'.DS);
|
define('CSV', 'csv'.DS);
|
||||||
// css
|
// css
|
||||||
@@ -104,15 +106,15 @@ define('PASSWORD_FORGOT', false);
|
|||||||
define('PASSWORD_MIN_LENGTH', 9);
|
define('PASSWORD_MIN_LENGTH', 9);
|
||||||
define('PASSWORD_MAX_LENGTH', 255);
|
define('PASSWORD_MAX_LENGTH', 255);
|
||||||
// defines allowed special characters
|
// defines allowed special characters
|
||||||
DEFINE('PASSWORD_SPECIAL_RANGE', '@$!%*?&');
|
define('PASSWORD_SPECIAL_RANGE', '@$!%*?&');
|
||||||
// password must have upper case, lower case, number, special
|
// password must have upper case, lower case, number, special
|
||||||
// comment out for not mandatory
|
// comment out for not mandatory
|
||||||
DEFINE('PASSWORD_LOWER', '(?=.*[a-z])');
|
define('PASSWORD_LOWER', '(?=.*[a-z])');
|
||||||
DEFINE('PASSWORD_UPPER', '(?=.*[A-Z])');
|
define('PASSWORD_UPPER', '(?=.*[A-Z])');
|
||||||
DEFINE('PASSWORD_NUMBER', '(?=.*\d)');
|
define('PASSWORD_NUMBER', '(?=.*\d)');
|
||||||
DEFINE('PASSWORD_SPECIAL', "(?=.*[".PASSWORD_SPECIAL_RANGE."])");
|
define('PASSWORD_SPECIAL', "(?=.*[".PASSWORD_SPECIAL_RANGE."])");
|
||||||
// define full regex
|
// define full regex
|
||||||
DEFINE('PASSWORD_REGEX', "/^".
|
define('PASSWORD_REGEX', "/^".
|
||||||
(defined('PASSWORD_LOWER') ? PASSWORD_LOWER : '').
|
(defined('PASSWORD_LOWER') ? PASSWORD_LOWER : '').
|
||||||
(defined('PASSWORD_UPPER') ? PASSWORD_UPPER : '').
|
(defined('PASSWORD_UPPER') ? PASSWORD_UPPER : '').
|
||||||
(defined('PASSWORD_NUMBER') ? PASSWORD_NUMBER : '').
|
(defined('PASSWORD_NUMBER') ? PASSWORD_NUMBER : '').
|
||||||
|
|||||||
@@ -16,6 +16,6 @@
|
|||||||
'perl_bin' => '',
|
'perl_bin' => '',
|
||||||
'other_url' => '',
|
'other_url' => '',
|
||||||
]
|
]
|
||||||
]*/
|
];*/
|
||||||
|
|
||||||
// __END__
|
// __END__
|
||||||
@@ -120,15 +120,17 @@ function setCenter(id, left, top)
|
|||||||
/**
|
/**
|
||||||
* goes to an element id position
|
* goes to an element id position
|
||||||
* @param {String} element element id to move to
|
* @param {String} element element id to move to
|
||||||
* @param {Number} offset offset from top, default is 0 (px)
|
* @param {Number} [offset=0] offset from top, default is 0 (px)
|
||||||
|
* @param {Number} [duration=500] animation time, default 500ms
|
||||||
|
* @param {String} [base='body,html'] base element for offset scroll
|
||||||
*/
|
*/
|
||||||
function goToPos(element, offset = 0)
|
function goToPos(element, offset = 0, duration = 500, base = 'body,html')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($('#' + element).length) {
|
if ($('#' + element).length) {
|
||||||
$('body,html').animate({
|
$(base).animate({
|
||||||
scrollTop: $('#' + element).offset().top - offset
|
scrollTop: $('#' + element).offset().top - offset
|
||||||
}, 500);
|
}, duration);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
errorCatch(err);
|
errorCatch(err);
|
||||||
@@ -190,9 +192,9 @@ if (Number.prototype.round) {
|
|||||||
*/
|
*/
|
||||||
function numberWithCommas(x)
|
function numberWithCommas(x)
|
||||||
{
|
{
|
||||||
var parts = x.toString().split(".");
|
var parts = x.toString().split('.');
|
||||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||||
return parts.join(".");
|
return parts.join('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
|
||||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+Line truncated
|
|
||||||
+580
-297
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,2 @@
|
|||||||
|
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
||||||
|
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^Line truncated
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
jquery-3.4.1.js
|
jquery-3.6.0.js
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
jquery-3.4.1.min.js
|
jquery-3.6.0.min.js
|
||||||
+18
-13
@@ -1701,6 +1701,10 @@ class Basic
|
|||||||
// label name, including leading space if flagged
|
// label name, including leading space if flagged
|
||||||
$pre = ($space ? ' ' : '').($labels[$exp] ?? '>E').($si ? 'i' : '').'B';
|
$pre = ($space ? ' ' : '').($labels[$exp] ?? '>E').($si ? 'i' : '').'B';
|
||||||
$bytes_calc = $abs_bytes / pow($unit, $exp);
|
$bytes_calc = $abs_bytes / pow($unit, $exp);
|
||||||
|
// if original is negative, reverse
|
||||||
|
if ($bytes < 0) {
|
||||||
|
$bytes_calc *= -1;
|
||||||
|
}
|
||||||
if ($adjust) {
|
if ($adjust) {
|
||||||
return sprintf("%.2f%sB", $bytes_calc, $pre);
|
return sprintf("%.2f%sB", $bytes_calc, $pre);
|
||||||
} else {
|
} else {
|
||||||
@@ -2179,8 +2183,8 @@ class Basic
|
|||||||
$thumbnail_write_path = null;
|
$thumbnail_write_path = null;
|
||||||
$thumbnail_web_path = null;
|
$thumbnail_web_path = null;
|
||||||
// path set first
|
// path set first
|
||||||
if ($img_type == IMG_JPG ||
|
if ($img_type == IMAGETYPE_JPEG ||
|
||||||
$img_type == IMG_PNG ||
|
$img_type == IMAGETYPE_PNG ||
|
||||||
$create_dummy === true
|
$create_dummy === true
|
||||||
) {
|
) {
|
||||||
// $this->debug('IMAGE PREPARE', "IMAGE TYPE OK: ".$inc_width.'x'.$inc_height);
|
// $this->debug('IMAGE PREPARE', "IMAGE TYPE OK: ".$inc_width.'x'.$inc_height);
|
||||||
@@ -2196,8 +2200,8 @@ class Basic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// do resize or fall back on dummy run
|
// do resize or fall back on dummy run
|
||||||
if ($img_type == IMG_JPG ||
|
if ($img_type == IMAGETYPE_JPEG ||
|
||||||
$img_type == IMG_PNG
|
$img_type == IMAGETYPE_PNG
|
||||||
) {
|
) {
|
||||||
// if missing width or height in thumb, use the set one
|
// if missing width or height in thumb, use the set one
|
||||||
if ($thumb_width == 0) {
|
if ($thumb_width == 0) {
|
||||||
@@ -2238,7 +2242,7 @@ class Basic
|
|||||||
) {
|
) {
|
||||||
// image, copy source image, offset in image, source x/y, new size, source image size
|
// image, copy source image, offset in image, source x/y, new size, source image size
|
||||||
$thumb = imagecreatetruecolor($thumb_width_r, $thumb_height_r);
|
$thumb = imagecreatetruecolor($thumb_width_r, $thumb_height_r);
|
||||||
if ($img_type == IMG_PNG) {
|
if ($img_type == IMAGETYPE_PNG) {
|
||||||
// preservere transaprency
|
// preservere transaprency
|
||||||
imagecolortransparent(
|
imagecolortransparent(
|
||||||
$thumb,
|
$thumb,
|
||||||
@@ -2249,10 +2253,10 @@ class Basic
|
|||||||
}
|
}
|
||||||
$source = null;
|
$source = null;
|
||||||
switch ($img_type) {
|
switch ($img_type) {
|
||||||
case IMG_JPG:
|
case IMAGETYPE_JPEG:
|
||||||
$source = imagecreatefromjpeg($filename);
|
$source = imagecreatefromjpeg($filename);
|
||||||
break;
|
break;
|
||||||
case IMG_PNG:
|
case IMAGETYPE_PNG:
|
||||||
$source = imagecreatefrompng($filename);
|
$source = imagecreatefrompng($filename);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2266,10 +2270,10 @@ class Basic
|
|||||||
}
|
}
|
||||||
// write file
|
// write file
|
||||||
switch ($img_type) {
|
switch ($img_type) {
|
||||||
case IMG_JPG:
|
case IMAGETYPE_JPEG:
|
||||||
imagejpeg($thumb, $thumbnail_write_path.$thumbnail, $jpeg_quality);
|
imagejpeg($thumb, $thumbnail_write_path.$thumbnail, $jpeg_quality);
|
||||||
break;
|
break;
|
||||||
case IMG_PNG:
|
case IMAGETYPE_PNG:
|
||||||
imagepng($thumb, $thumbnail_write_path.$thumbnail);
|
imagepng($thumb, $thumbnail_write_path.$thumbnail);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2371,10 +2375,10 @@ class Basic
|
|||||||
if ($orientation != 1) {
|
if ($orientation != 1) {
|
||||||
$this->debug('IMAGE FILE ROTATE', 'Need to rotate image ['.$filename.'] from: '.$orientation);
|
$this->debug('IMAGE FILE ROTATE', 'Need to rotate image ['.$filename.'] from: '.$orientation);
|
||||||
switch ($img_type) {
|
switch ($img_type) {
|
||||||
case IMG_JPG:
|
case IMAGETYPE_JPEG:
|
||||||
$img = imagecreatefromjpeg($filename);
|
$img = imagecreatefromjpeg($filename);
|
||||||
break;
|
break;
|
||||||
case IMG_PNG:
|
case IMAGETYPE_PNG:
|
||||||
$img = imagecreatefrompng($filename);
|
$img = imagecreatefrompng($filename);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2397,10 +2401,10 @@ class Basic
|
|||||||
}
|
}
|
||||||
// then rewrite the rotated image back to the disk as $filename
|
// then rewrite the rotated image back to the disk as $filename
|
||||||
switch ($img_type) {
|
switch ($img_type) {
|
||||||
case IMG_JPG:
|
case IMAGETYPE_JPEG:
|
||||||
imagejpeg($img, $filename);
|
imagejpeg($img, $filename);
|
||||||
break;
|
break;
|
||||||
case IMG_PNG:
|
case IMAGETYPE_PNG:
|
||||||
imagepng($img, $filename);
|
imagepng($img, $filename);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3394,6 +3398,7 @@ class Basic
|
|||||||
// Indesign
|
// Indesign
|
||||||
'application/x-indesign' => 'Adobe InDesign',
|
'application/x-indesign' => 'Adobe InDesign',
|
||||||
// Photoshop
|
// Photoshop
|
||||||
|
'image/vnd.adobe.photoshop' => 'Adobe Photoshop',
|
||||||
'application/photoshop' => 'Adobe Photoshop',
|
'application/photoshop' => 'Adobe Photoshop',
|
||||||
// Illustrator
|
// Illustrator
|
||||||
'application/illustrator' => 'Adobe Illustrator',
|
'application/illustrator' => 'Adobe Illustrator',
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ class IO extends \CoreLibs\Basic
|
|||||||
public $field_names = []; // array with the field names of the current query
|
public $field_names = []; // array with the field names of the current query
|
||||||
public $insert_id; // last inserted ID
|
public $insert_id; // last inserted ID
|
||||||
public $insert_id_ext; // extended insert ID (for data outside only primary key)
|
public $insert_id_ext; // extended insert ID (for data outside only primary key)
|
||||||
|
public $insert_id_arr; // always return as array, even if only one
|
||||||
private $temp_sql;
|
private $temp_sql;
|
||||||
// other vars
|
// other vars
|
||||||
private $nbsp = ''; // used by print_array recursion function
|
private $nbsp = ''; // used by print_array recursion function
|
||||||
@@ -595,8 +596,10 @@ class IO extends \CoreLibs\Basic
|
|||||||
private function __dbConvertEncoding($row)
|
private function __dbConvertEncoding($row)
|
||||||
{
|
{
|
||||||
// only do if array, else pass through row (can be false)
|
// only do if array, else pass through row (can be false)
|
||||||
if (is_array($row)) {
|
if (!is_array($row) || empty($this->to_encoding) || empty($this->db_encoding)
|
||||||
if ($this->to_encoding && $this->db_encoding) {
|
) {
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
// go through each row and convert the encoding if needed
|
// go through each row and convert the encoding if needed
|
||||||
foreach ($row as $key => $value) {
|
foreach ($row as $key => $value) {
|
||||||
$from_encoding = mb_detect_encoding($value);
|
$from_encoding = mb_detect_encoding($value);
|
||||||
@@ -605,8 +608,6 @@ class IO extends \CoreLibs\Basic
|
|||||||
$row[$key] = mb_convert_encoding($value, $this->to_encoding, $from_encoding);
|
$row[$key] = mb_convert_encoding($value, $this->to_encoding, $from_encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,9 +788,12 @@ class IO extends \CoreLibs\Basic
|
|||||||
// if we do not have a returning, we try to get it via the primary key and another select
|
// if we do not have a returning, we try to get it via the primary key and another select
|
||||||
if (!$this->returning_id) {
|
if (!$this->returning_id) {
|
||||||
$this->insert_id = $this->db_functions->__dbInsertId($this->query, $this->pk_name);
|
$this->insert_id = $this->db_functions->__dbInsertId($this->query, $this->pk_name);
|
||||||
|
$this->insert_id_ext = $this->insert_id;
|
||||||
|
$this->insert_id_arr[] = $this->insert_id;
|
||||||
} else {
|
} else {
|
||||||
$this->insert_id = [];
|
$this->insert_id = [];
|
||||||
$this->insert_id_ext = [];
|
$this->insert_id_ext = [];
|
||||||
|
$this->insert_id_arr = [];
|
||||||
// echo "** PREPARE RETURNING FOR CURSOR: ".$this->cursor."<br>";
|
// echo "** PREPARE RETURNING FOR CURSOR: ".$this->cursor."<br>";
|
||||||
// we have returning, now we need to check if we get one or many returned
|
// we have returning, now we need to check if we get one or many returned
|
||||||
// we'll need to loop this, if we have multiple insert_id returns
|
// we'll need to loop this, if we have multiple insert_id returns
|
||||||
@@ -799,6 +803,7 @@ class IO extends \CoreLibs\Basic
|
|||||||
)) {
|
)) {
|
||||||
// echo "*** RETURNING: ".print_r($_insert_id, true)."<br>";
|
// echo "*** RETURNING: ".print_r($_insert_id, true)."<br>";
|
||||||
$this->insert_id[] = $_insert_id;
|
$this->insert_id[] = $_insert_id;
|
||||||
|
$this->insert_id_arr[] = $_insert_id;
|
||||||
}
|
}
|
||||||
// if we have only one, revert from array to single
|
// if we have only one, revert from array to single
|
||||||
if (count($this->insert_id) == 1) {
|
if (count($this->insert_id) == 1) {
|
||||||
@@ -1613,7 +1618,7 @@ class IO extends \CoreLibs\Basic
|
|||||||
$this->error_id = 23;
|
$this->error_id = 23;
|
||||||
$this->__dbDebug('db', '<span style="color: red;"><b>DB-Error</b> '.$stm_name.': Array data count does not match prepared fields. Need: '.$this->prepare_cursor[$stm_name]['count'].', has: '.count($data).'</span>', 'DB_ERROR');
|
$this->__dbDebug('db', '<span style="color: red;"><b>DB-Error</b> '.$stm_name.': Array data count does not match prepared fields. Need: '.$this->prepare_cursor[$stm_name]['count'].', has: '.count($data).'</span>', 'DB_ERROR');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
}
|
||||||
if ($this->db_debug) {
|
if ($this->db_debug) {
|
||||||
$this->__dbDebug('db', $this->__dbDebugPrepare($stm_name, $data), 'dbExecPrep', 'Q');
|
$this->__dbDebug('db', $this->__dbDebugPrepare($stm_name, $data), 'dbExecPrep', 'Q');
|
||||||
}
|
}
|
||||||
@@ -1630,9 +1635,12 @@ class IO extends \CoreLibs\Basic
|
|||||||
) {
|
) {
|
||||||
if (!$this->prepare_cursor[$stm_name]['returning_id']) {
|
if (!$this->prepare_cursor[$stm_name]['returning_id']) {
|
||||||
$this->insert_id = $this->db_functions->__dbInsertId($this->prepare_cursor[$stm_name]['query'], $this->prepare_cursor[$stm_name]['pk_name']);
|
$this->insert_id = $this->db_functions->__dbInsertId($this->prepare_cursor[$stm_name]['query'], $this->prepare_cursor[$stm_name]['pk_name']);
|
||||||
|
$this->insert_id_ext = $this->insert_id;
|
||||||
|
$this->insert_id_arr[] = $this->insert_id;
|
||||||
} elseif ($result) {
|
} elseif ($result) {
|
||||||
$this->insert_id = [];
|
$this->insert_id = [];
|
||||||
$this->insert_id_ext = [];
|
$this->insert_id_ext = [];
|
||||||
|
$this->insert_id_arr = [];
|
||||||
// we have returning, now we need to check if we get one or many returned
|
// we have returning, now we need to check if we get one or many returned
|
||||||
// we'll need to loop this, if we have multiple insert_id returns
|
// we'll need to loop this, if we have multiple insert_id returns
|
||||||
while ($_insert_id = $this->db_functions->__dbFetchArray(
|
while ($_insert_id = $this->db_functions->__dbFetchArray(
|
||||||
@@ -1640,6 +1648,7 @@ class IO extends \CoreLibs\Basic
|
|||||||
$this->db_functions->__dbResultType(true)
|
$this->db_functions->__dbResultType(true)
|
||||||
)) {
|
)) {
|
||||||
$this->insert_id[] = $_insert_id;
|
$this->insert_id[] = $_insert_id;
|
||||||
|
$this->insert_id_arr[] = $_insert_id;
|
||||||
}
|
}
|
||||||
// if we have only one, revert from arry to single
|
// if we have only one, revert from arry to single
|
||||||
if (count($this->insert_id) == 1) {
|
if (count($this->insert_id) == 1) {
|
||||||
@@ -1678,7 +1687,6 @@ class IO extends \CoreLibs\Basic
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* neutral function to escape a string for DB writing
|
* neutral function to escape a string for DB writing
|
||||||
@@ -2076,6 +2084,15 @@ class IO extends \CoreLibs\Basic
|
|||||||
return $this->insert_id_ext;
|
return $this->insert_id_ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Always returns the returning block as an array
|
||||||
|
* @return array All returning data as array. even if one row only
|
||||||
|
*/
|
||||||
|
public function dbGetReturningArray(): array
|
||||||
|
{
|
||||||
|
return $this->insert_id_arr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the full array for cursor ext
|
* returns the full array for cursor ext
|
||||||
* @param string|null $q Query string, if not null convert to md5
|
* @param string|null $q Query string, if not null convert to md5
|
||||||
|
|||||||
Reference in new issue
Block a user