%PDF-
%PDF-
Mini Shell
Mini Shell
function ProcessButton(btn) {
$(btn).attr('disabled', 'disabled');
$(btn).attr("_text", $(btn).html());
$(btn).text("Processing...");
}
function CompleteButton(btn) {
$(btn).html($(btn).attr("_text"));
$(btn).removeAttr('disabled');
}
function GetUser() {
if (localStorage.getItem('user') == null)
window.location.href = "/login.php";
return JSON.parse(localStorage.getItem('user'))[0];
}
function FormatDate(strDt) {
var date = new Date(strDt);
if (date.getFullYear() <= 2000)
return "";
var months = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
return months[date.getMonth()] + " " + date.getDate() + ", " + date.getFullYear();
}
function FormatTime(strDt) {
var date = new Date(strDt);
if (date.getFullYear() <= 2000)
return "";
var hours = date.getHours();
var minutes = date.getMinutes();
var ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0' + minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
return strTime;
}
function FormatDateTime(strDt) {
return FormatDate(strDt) + " " + FormatTime(strDt);
//13/1/2023 12:45 am
//1 Jan, 2023 12:45 am
//Jan 1, 2023 12:45 AM
}
function FormatCurrency(amount) {
return "$" + amount.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
function GetQS() {
var url = document.location.href;
var qs = url.substring(url.indexOf('?') + 1).split('&');
for (var i = 0, result = {}; i < qs.length; i++) {
qs[i] = qs[i].split('=');
result[qs[i][0]] = decodeURIComponent(qs[i][1]);
}
return result;
}
function CopyToCB(lnk)
{
navigator.clipboard.writeText($(lnk).attr("href"));
round_success_noti("Linke Copied to ClipBoard");
}
/*
function FormatCurrency(amount, decimalPlaces, currencySymbol) {
return currencySymbol + ' ' + amount;
}
*/
/*itenary operator*/
Zerion Mini Shell 1.0