Replace corrupted files
This commit is contained in:
parent
d0db619281
commit
aa7fe36d9c
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.
Binary file not shown.
|
@ -1,115 +1,111 @@
|
||||||
var API_XHR = new XMLHttpRequest()
|
var API_XHR = new XMLHttpRequest();
|
||||||
var API_URL = 'index.php'
|
var API_URL = "index.php";
|
||||||
function api(cmd,ok = function (res) { }, error = function (res) { }){
|
function api(cmd,ok = function (res) { }, error = function (res) { }){
|
||||||
API_XHR.open('POST', API_URL, true)
|
API_XHR.open("POST", API_URL, true);
|
||||||
API_XHR.setRequestHeader('Content-Type', 'application/json')
|
API_XHR.setRequestHeader("Content-Type", "application/json");
|
||||||
API_XHR.onreadystatechange = function () {
|
API_XHR.onreadystatechange = function () {
|
||||||
if (API_XHR.readyState === 4){
|
if (API_XHR.readyState === 4){
|
||||||
if(API_XHR.status === 200) {
|
if(API_XHR.status === 200) {
|
||||||
var res = JSON.parse(API_XHR.responseText)
|
var res = JSON.parse(API_XHR.responseText);
|
||||||
ok(res)
|
ok(res);
|
||||||
}else{
|
}else{
|
||||||
error({ res: 'error', msg: 'conection error' })
|
error({"res":"error","msg":"conection error"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
API_XHR.send(JSON.stringify(cmd));
|
||||||
}
|
}
|
||||||
API_XHR.send(JSON.stringify(cmd))
|
var ultima_aba_mostrada = ""
|
||||||
}
|
|
||||||
var ultima_aba_mostrada = ''
|
|
||||||
function mostrar_aba(aba){
|
function mostrar_aba(aba){
|
||||||
if (ultima_aba_mostrada != '') {
|
if(ultima_aba_mostrada!=""){ document.getElementById(ultima_aba_mostrada).style.display = "none";}
|
||||||
document.getElementById(ultima_aba_mostrada).style.display = 'none'
|
document.getElementById(aba).style.display = "block"
|
||||||
}
|
|
||||||
document.getElementById(aba).style.display = 'block'
|
|
||||||
ultima_aba_mostrada = aba
|
ultima_aba_mostrada = aba
|
||||||
//document.getElementById("titulo_do_menu").innerHTML = aba
|
//document.getElementById("titulo_do_menu").innerHTML = aba
|
||||||
}
|
}
|
||||||
function DEVICE_IS_MOBILE() {
|
function DEVICE_IS_MOBILE() {
|
||||||
if (
|
if( navigator.userAgent.match(/Android/i)
|
||||||
navigator.userAgent.match(/Android/i) ||
|
|| navigator.userAgent.match(/webOS/i)
|
||||||
navigator.userAgent.match(/webOS/i) ||
|
|| navigator.userAgent.match(/iPhone/i)
|
||||||
navigator.userAgent.match(/iPhone/i) ||
|
|| navigator.userAgent.match(/iPad/i)
|
||||||
navigator.userAgent.match(/iPad/i) ||
|
|| navigator.userAgent.match(/iPod/i)
|
||||||
navigator.userAgent.match(/iPod/i) ||
|
|| navigator.userAgent.match(/BlackBerry/i)
|
||||||
navigator.userAgent.match(/BlackBerry/i) ||
|
|| navigator.userAgent.match(/Windows Phone/i)
|
||||||
navigator.userAgent.match(/Windows Phone/i)
|
){return true;}else{return false;}
|
||||||
) {
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function findGetParameter(parameterName) {
|
function findGetParameter(parameterName) {
|
||||||
var result = null,
|
var result = null,
|
||||||
tmp = []
|
tmp = [];
|
||||||
var items = location.search.substr(1).split('&')
|
var items = location.search.substr(1).split("&");
|
||||||
for (var index = 0; index < items.length; index++) {
|
for (var index = 0; index < items.length; index++) {
|
||||||
tmp = items[index].split('=')
|
tmp = items[index].split("=");
|
||||||
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1])
|
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
|
||||||
}
|
}
|
||||||
return result
|
return result;
|
||||||
}
|
}
|
||||||
function setCookie(name,value,days=1) {
|
function setCookie(name,value,days=1) {
|
||||||
var expires = ''
|
var expires = "";
|
||||||
if (days) {
|
if (days) {
|
||||||
var date = new Date()
|
var date = new Date();
|
||||||
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)
|
date.setTime(date.getTime() + (days*24*60*60*1000));
|
||||||
expires = '; expires=' + date.toUTCString()
|
expires = "; expires=" + date.toUTCString();
|
||||||
}
|
}
|
||||||
document.cookie = name + '=' + (value || '') + expires + '; path=/'
|
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||||
}
|
}
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
var nameEQ = name + '='
|
var nameEQ = name + "=";
|
||||||
var ca = document.cookie.split(';')
|
var ca = document.cookie.split(';');
|
||||||
for(var i=0;i < ca.length;i++) {
|
for(var i=0;i < ca.length;i++) {
|
||||||
var c = ca[i]
|
var c = ca[i];
|
||||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length)
|
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length)
|
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
||||||
}
|
}
|
||||||
return null
|
return null;
|
||||||
}
|
}
|
||||||
function eraseCookie(name) {
|
function eraseCookie(name) {
|
||||||
document.cookie = name + '=; Max-Age=-99999999;'
|
document.cookie = name+'=; Max-Age=-99999999;';
|
||||||
}
|
}
|
||||||
var IMPRIMIR_NO_CONSOLE = true
|
var IMPRIMIR_NO_CONSOLE = true;
|
||||||
function p(text) {
|
function p(text) {
|
||||||
if(IMPRIMIR_NO_CONSOLE){
|
if(IMPRIMIR_NO_CONSOLE){
|
||||||
console.log(text)
|
console.log(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function sortArrayByKeys(dict,reverter=false) {
|
function sortArrayByKeys(dict,reverter=false) {
|
||||||
var sorted = []
|
var sorted = [];
|
||||||
for(var key in dict) {
|
for(var key in dict) {
|
||||||
sorted[sorted.length] = key
|
sorted[sorted.length] = key;
|
||||||
}
|
}
|
||||||
sorted.sort()
|
sorted.sort();
|
||||||
if(reverter){
|
if(reverter){
|
||||||
sorted.reverse()
|
sorted.reverse();
|
||||||
}
|
}
|
||||||
var tempDict = {}
|
var tempDict = {};
|
||||||
for(var i = 0; i < sorted.length; i++) {
|
for(var i = 0; i < sorted.length; i++) {
|
||||||
tempDict[sorted[i]] = dict[sorted[i]]
|
tempDict[sorted[i]] = dict[sorted[i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return tempDict
|
return tempDict;
|
||||||
}
|
}
|
||||||
function arrayRemove(arr, value) {
|
function arrayRemove(arr, value) {
|
||||||
|
|
||||||
return arr.filter(function(ele){
|
return arr.filter(function(ele){
|
||||||
return ele != value
|
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())
|
||||||
|
};
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user