| Server IP : 104.21.21.239 / Your IP : 216.73.216.25 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/tgnewdev/js/ |
Upload File : |
function sidebar_calendar_increment(increment) {
//alert(increment);
var cur_month = parseInt($('#sidebar_calendar_select_month').val(), 10);
var cur_year = parseInt($('#sidebar_calendar_select_year').val(), 10);
console.log(cur_year);
var new_month = cur_month;
var new_year = cur_year;
if (increment == -1) {
if (cur_month == 1) {
new_month = 12;
new_year = cur_year - 1;
} else {
new_month = cur_month - 1;
}
} else if (increment = 1) {
if (cur_month == 12) {
new_month = 1;
new_year = cur_year + 1;
} else {
new_month = cur_month + 1;
}
}
//console.log('cur_year: ' + cur_year + "\n" + 'cur_month: ' + cur_month + "\n" + 'new_year: ' + new_year + "\n" + 'new_month: ' + new_month + "\n");
$('#sidebar_calendar_select_month').val(new_month.toString());
$('#sidebar_calendar_select_year').val(new_year.toString()).change();
}
function sidebar_calendar_load_month() {
var cur_month = parseInt($('#sidebar_calendar_select_month').val(), 10);
var cur_year = parseInt($('#sidebar_calendar_select_year').val(), 10);
if (cur_month > 0 && cur_year > 0) {
$('#sidebar_calendar_loading_icon'). show();
$.ajax({
url: "ajax.php?call=sidebar_calendar_ajax&func=load_month&year=" + cur_year + "&month=" + cur_month,
cache: false,
dataType: "html",
success: function(html) {
//alert(html);
$('#sidebar_calendar_grid').html(html);
}
,error: function (request, status, error) { alert(status + ", " + error); }
,complete: function() {
$('#sidebar_calendar_loading_icon'). hide();
}
});
}
}
function clear_search_parms (btn) {
$('.form_search .date_range').val('');
$('.form_search .select2').val(null).trigger('change');
//$('.form_search .select2').val('');
$('.form_search .title_search').val('');
$('.form_search .text_search').val('');
var $form = $(btn).closest('form');
$form.submit();
}
function internal_track_event(category, action, label, reference_type, reference_id) {
$.ajax({
url: "ajax.php?call=tracking_ajax&func=track_event",
cache: false,
type: 'POST',
data: {
category: category,
action: action,
label: label,
reference_type: reference_type,
reference_id: reference_id,
},
success: function(response) {
//alert(response);
}
,error: function (request, status, error) {
alert(status + ", " + error);
}
,complete: function() {
}
});
}
function ga_track_event(category, action, label, universal, bounce, reference_type = null, reference_id = null) {
var event_category = category || '';
var event_action = action || '';
var event_label = label || '';
var event_bounce = !!bounce;
internal_track_event(event_category, event_action, event_label, reference_type, reference_id);
// GA4
if (typeof window.gtag === 'function') {
var eventName = event_action || 'custom_event';
window.gtag('event', eventName, {
event_category: event_category,
event_label: event_label,
non_interaction: event_bounce
});
return;
}
// Universal Analytics
if (typeof window.ga === 'function') {
window.ga('send', 'event', event_category, event_action, event_label, {
nonInteraction: event_bounce
});
return;
}
// Classic Analytics
if (Array.isArray(window._gaq)) {
window._gaq.push(['_trackEvent', event_category, event_action, event_label, null, event_bounce]);
return;
}
// WordPress alias
if (typeof window.__gaTracker === 'function') {
window.__gaTracker('send', 'event', event_category, event_action, event_label, {
nonInteraction: event_bounce
});
return;
}
console.warn('No Google Analytics client detected.');
}
function menu_scroll() {
var header_height = $('#pagetop_home').outerHeight();
var scrollY = $(this).scrollTop();
var margin = Math.max(header_height - scrollY - 40, 0);
$('.slicknav_menu').css('margin-top', margin + 'px');
}
$(document).ready(function() {
$('.date_range').flatpickr({
mode: 'range',
//rangeSeparator: ' - ',
});
$('.select2').select2({
placeholder: 'Select Categories',
});
window.addEventListener('scroll', function() {
menu_scroll();
});
window.addEventListener('resize', function() {
menu_scroll();
});
menu_scroll();
$('.article_slider').slick({
infinite: true, // loop infinitely
slidesToShow: 2, // show 2 slides on desktop
slidesToScroll: 1,
autoplay: true, // auto-rotate
autoplaySpeed: 3000, // 3 seconds
speed: 900,
responsive: [
{
breakpoint: 768, // mobile breakpoint
settings: {
slidesToShow: 1 // show 1 slide on mobile
}
}
],
//appendArrows: $('.article_slider'), // put arrows inside the slider container
prevArrow: '<button class="slick-prev" aria-label="Previous">' +
'<svg aria-hidden="true" class="e-font-icon-svg e-eicon-chevron-left" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M304 487C304 504 309 521 321 533L617 854C629 867 646 875 663 875 679 875 696 871 708 863 720 850 729 833 729 817 729 800 725 783 713 771L454 492 709 233C721 221 725 204 725 187 725 171 717 154 704 142 692 129 679 125 663 125 642 125 629 133 617 146L321 446C309 454 304 471 304 487Z"></path>' +
'</svg>' +
'</button>',
nextArrow: '<button class="slick-next" aria-label="Next">' +
'<svg aria-hidden="true" class="e-font-icon-svg e-eicon-chevron-right" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z"></path>' +
'</svg>',
});
$('.event_slider').slick({
infinite: true, // loop infinitely
slidesToShow: 4, // show 2 slides on desktop
slidesToScroll: 1,
autoplay: true, // auto-rotate
autoplaySpeed: 3000, // 3 seconds
speed: 900,
responsive: [
{
breakpoint: 768, // mobile breakpoint
settings: {
slidesToShow: 1 // show 1 slide on mobile
}
}
],
prevArrow: '<button class="slick-prev" aria-label="Previous">' +
'<svg aria-hidden="true" class="e-font-icon-svg e-eicon-chevron-left" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M304 487C304 504 309 521 321 533L617 854C629 867 646 875 663 875 679 875 696 871 708 863 720 850 729 833 729 817 729 800 725 783 713 771L454 492 709 233C721 221 725 204 725 187 725 171 717 154 704 142 692 129 679 125 663 125 642 125 629 133 617 146L321 446C309 454 304 471 304 487Z"></path>' +
'</svg>' +
'</button>',
nextArrow: '<button class="slick-next" aria-label="Next">' +
'<svg aria-hidden="true" class="e-font-icon-svg e-eicon-chevron-right" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">' +
'<path d="M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z"></path>' +
'</svg>',
});
});