Replace corrupted files

This commit is contained in:
Douglas Barone 2023-04-18 09:29:39 -04:00
parent d0db619281
commit aa7fe36d9c
5 changed files with 108 additions and 112 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

View File

@ -1,115 +1,111 @@
var API_XHR = new XMLHttpRequest()
var API_URL = 'index.php'
function api(cmd, ok = function (res) {}, error = function (res) {}) {
API_XHR.open('POST', API_URL, true)
API_XHR.setRequestHeader('Content-Type', 'application/json')
API_XHR.onreadystatechange = function () {
if (API_XHR.readyState === 4) {
if (API_XHR.status === 200) {
var res = JSON.parse(API_XHR.responseText)
ok(res)
} else {
error({ res: 'error', msg: 'conection error' })
}
var API_XHR = new XMLHttpRequest();
var API_URL = "index.php";
function api(cmd,ok = function (res) { }, error = function (res) { }){
API_XHR.open("POST", API_URL, true);
API_XHR.setRequestHeader("Content-Type", "application/json");
API_XHR.onreadystatechange = function () {
if (API_XHR.readyState === 4){
if(API_XHR.status === 200) {
var res = JSON.parse(API_XHR.responseText);
ok(res);
}else{
error({"res":"error","msg":"conection error"});
}
}
};
API_XHR.send(JSON.stringify(cmd));
}
var ultima_aba_mostrada = ""
function mostrar_aba(aba){
if(ultima_aba_mostrada!=""){ document.getElementById(ultima_aba_mostrada).style.display = "none";}
document.getElementById(aba).style.display = "block"
ultima_aba_mostrada = aba
//document.getElementById("titulo_do_menu").innerHTML = aba
}
}
API_XHR.send(JSON.stringify(cmd))
}
var ultima_aba_mostrada = ''
function mostrar_aba(aba) {
if (ultima_aba_mostrada != '') {
document.getElementById(ultima_aba_mostrada).style.display = 'none'
}
document.getElementById(aba).style.display = 'block'
ultima_aba_mostrada = aba
//document.getElementById("titulo_do_menu").innerHTML = aba
}
function DEVICE_IS_MOBILE() {
if (
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPad/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/i) ||
navigator.userAgent.match(/Windows Phone/i)
) {
return true
} else {
return false
}
}
function findGetParameter(parameterName) {
var result = null,
tmp = []
var items = location.search.substr(1).split('&')
for (var index = 0; index < items.length; index++) {
tmp = items[index].split('=')
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1])
}
return result
}
function setCookie(name, value, days = 1) {
var expires = ''
if (days) {
var date = new Date()
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)
expires = '; expires=' + date.toUTCString()
}
document.cookie = name + '=' + (value || '') + expires + '; path=/'
}
function getCookie(name) {
var nameEQ = name + '='
var ca = document.cookie.split(';')
for (var i = 0; i < ca.length; i++) {
var c = ca[i]
while (c.charAt(0) == ' ') c = c.substring(1, c.length)
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length)
}
return null
}
function eraseCookie(name) {
document.cookie = name + '=; Max-Age=-99999999;'
}
var IMPRIMIR_NO_CONSOLE = true
function p(text) {
if (IMPRIMIR_NO_CONSOLE) {
console.log(text)
}
}
function sortArrayByKeys(dict, reverter = false) {
var sorted = []
for (var key in dict) {
sorted[sorted.length] = key
}
sorted.sort()
if (reverter) {
sorted.reverse()
}
var tempDict = {}
for (var i = 0; i < sorted.length; i++) {
tempDict[sorted[i]] = dict[sorted[i]]
}
return tempDict
}
function arrayRemove(arr, value) {
return arr.filter(function (ele) {
return ele != value
})
}
const rotateBase64Image = base64data => {
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
const image = new Image()
image.src = base64data
return new Promise(resolve => {
image.onload = () => {
ctx.translate(image.width, image.height)
ctx.rotate((45 * Math.PI) / 180)
ctx.drawImage(image, 0, 0)
resolve(canvas.toDataURL())
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)
){return true;}else{return false;}
}
})
}
function findGetParameter(parameterName) {
var result = null,
tmp = [];
var items = location.search.substr(1).split("&");
for (var index = 0; index < items.length; index++) {
tmp = items[index].split("=");
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
}
return result;
}
function setCookie(name,value,days=1) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
document.cookie = name+'=; Max-Age=-99999999;';
}
var IMPRIMIR_NO_CONSOLE = true;
function p(text) {
if(IMPRIMIR_NO_CONSOLE){
console.log(text);
}
}
function sortArrayByKeys(dict,reverter=false) {
var sorted = [];
for(var key in dict) {
sorted[sorted.length] = key;
}
sorted.sort();
if(reverter){
sorted.reverse();
}
var tempDict = {};
for(var i = 0; i < sorted.length; i++) {
tempDict[sorted[i]] = dict[sorted[i]];
}
return tempDict;
}
function arrayRemove(arr, value) {
return arr.filter(function(ele){
return ele != value;
});
}
const rotateBase64Image = (base64data) => {
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
const image = new Image();
image.src = base64data;
return new Promise(resolve => {
image.onload = () => {
ctx.translate(image.width, image.height);
ctx.rotate(45 * Math.PI / 180);
ctx.drawImage(image, 0, 0);
resolve(canvas.toDataURL())
};
})
}