403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/governmentgrants.us/vx/usa/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/governmentgrants.us/vx/usa/js/start.js
function request(p, q, t) {
	var r = '';
	$.ajax ({
		cache: true,
		async: false,
		data: q,
		type: "POST",
		dataType: t,
		url: p,
		success: function(d)
		{
			if(t=='json')
			{ r = d; }
			else if(t=='html')
			{ r = d; }
			else 
			{ r = ''; }
			if($("#loader").length>0)
			{
				$("#loader").hide();
			}
		},error: function(jqXHR, ts, et) {
			r = 'error';
		}
	});
	if(r){ return r; }else{ return false; }
}

function formQueryString(form) { 
	var qs = "";
	$(form).find('input, select, checkbox, textarea, radio').each(function(){
		input = $(this);
		var name = input.attr('name');
		var type = input.attr('type');
		var value = input.val();
        if (type == "submit" || type == "button")
        {
            // ignore
        }
        else if (type == "checkbox" || type == "radio")
        {
            if (type == "radio" && input.is(':checked'))
            {
				qs += escape(name)+"=1&";
            }
            else
            {
                if (input.is(':checked'))
                {
					qs += escape(name)+"=1&";
                }
                else
                {
					qs += escape(name)+"=0&";
				}
			}
        }
        else
        {
			qs += escape(name)+"="+encodeURIComponent(value)+"&";
		}
	});
	qs += "null=0";
	return qs;
}

function resetInput()
{
	$scope.email = '';	
}

function setLoginForm()
{
	if($('#loginContainer').is(":visible"))
	{
		$('#loginContainer').fadeOut(200);
	}
	else
	{
		$('#loginContainer').fadeIn(200);
	}
}

function setTutorial(obj)
{
	obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}

function favoriteGrant(grant, obj)
{
    var qs = "grant="+grant;
    var req = request("/vx/usa/functions/favorite.php", qs, "json");
    if (req.result == 'success') {
        var c = $(obj).attr('class');
        if (c.indexOf('gray') > -1) {
            $(obj).removeClass("gray").addClass("bred");
            $(obj).removeClass("fa-heart-o").addClass("fa-heart");
        }
        else {
            $(obj).removeClass("bred").addClass("gray");
            $(obj).removeClass("fa-heart").addClass("fa-heart-o");
        }
    }
}

function loadTrainingPage()
{
    
    var controllerElement = document.querySelector('[ng-controller="Content"]');
    var scope = angular.element(controllerElement).scope();
    scope.$apply(function () {
        $('#additionalLoader').html("");
    });
}

function toTitleCase(str)
{
    return (str + '')
        .replace(/^(.)|\s+(.)/g, function ($1) {
            return $1.toUpperCase()
        })
}

var selectState = "";
function setSelectState()
{
    selectState = $('#stateSelection').val();
    var cstate = selectState;
    cstate = cstate.toLowerCase();
    cstate = cstate.split(" ").join("_");

    var controllerElement = document.querySelector('[ng-controller="Members"]');
    var scope = angular.element(controllerElement).scope();
    scope.$apply(function () {
        scope.searchFields.state = selectState;
        scope.showMap = false;
        scope.getMoreGrants(1);
    });
    if (cstate == 'any')
    {
        var path = request('/vx/svgs/states/any.svg', '', 'html');
        $("#selectedState").html(path);
    }
    else
    {
        $(document).find('.state').each(function () {
            var classes = $(this).attr('class');
            classes = classes.replace(' stateSelected', '');
            $(this).attr('class', classes);
            var isState = classes.indexOf(" " + cstate);
            if (isState >= 0) {
                $(this).attr('class', classes + " stateSelected");
                var spec_state = cstate.toLowerCase();
                spec_state = spec_state.replace(" ", "_");
                var path = request('/vx/svgs/states/' + spec_state + '.svg', '', 'html');
                $("#selectedState").html(path);
            }
        });
    }
}

function checkZip(me) {
	if($(me).val().length==5) {
		var str = 'zip=' + $(me).val();
		$.ajax({
			cache: false,
			type: "POST",
			url: "/vx/usa/functions/checkZip.php",
			data: str,
			success: function(result) {
				if(result=='success') {
					$('.zip_success').show();
					$('.zip_error').hide();
				} else {
					$('.zip_success').hide();
					$('.zip_error').show();
				}
			}
		});
	} else {
		$('.zip_success').hide();
		$('.zip_error').show();
	}
}

$(document).ready(function () {
    $("path.state").click(function () {
        var state = $(this).attr('class');
        state = state.replace("state ", "");
        var cstate = state;
        state = state.split("_").join(" ");
        state = toTitleCase(state);
        var controllerElement = document.querySelector('[ng-controller="Members"]');
        var scope = angular.element(controllerElement).scope();
        scope.$apply(function () {
            scope.searchFields.state = state;
            scope.showMap = false;
            scope.getMoreGrants(1);
        });
        selectState = state;
        $('#stateSelection').val(state);
        $(document).find('.state').each(function () {
            var classes = $(this).attr('class');
            classes = classes.replace(' stateSelected', '');
            $(this).attr('class', classes);
            var isState = classes.indexOf(" " + cstate);
            if (isState >= 0)
            {
                var spec_state = state.toLowerCase();
                spec_state = spec_state.split(" ").join("_");
                var path = request('/vx/svgs/states/' + spec_state + '.svg', '', 'html');
                $("#selectedState").html(path);
            }
        });
    });
	$('input.phone_number').formatter({
	  'pattern': '({{999}}) {{999}}-{{9999}}',
	  'persistent': false
	});
	$('input.zip').formatter({
	  'pattern': '{{99999}}',
	  'persistent': false
	});
});

Youez - 2016 - github.com/yon3zu
LinuXploit