HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.baofufacai.com/bb/static/js/common.js
$(document).ready(function() {
    $(".head_nav").click(function() {
        $(".head_navs").slideToggle(500);
		$(".head_searchs").hide();
		$(".head_flags").hide();
		headSwitchClass();
    });

    $(".head_navs").click(function() {
        $(".head_navs").slideToggle(500);
        headSwitchClass();
    });

    $(".head_navs nav").click(function(event) {
        event.stopPropagation();
    });

	$(".head_cart").click(function() {
		window.location.href="/go/cart";
	});

	$(".head_search").click(function() {
		$(".head_searchs").toggle();
		$(".head_navs").hide();
		$(".head_nav").removeClass('head_nav_click');
		$(".head_flags").hide();
	});

	$(".head_searchs").click(function () {
		$(".head_searchs").toggle();
	});

	$(".head_search_form").click(function(event) {
        event.stopPropagation();
    });

	$(".list_pic a").height($(".list").width());
	
	$(".head_flag").click(function() {
		$(".head_searchs").hide();
		$(".head_navs").hide();
		$(".head_nav").removeClass('head_nav_click');
		$(".head_flags").toggle();

		var region = $(this).data("region");
		var language = $(this).data("language");

		$(".head_flag_region_content ." + region).click();
		$(".head_flag_language_content ." + language).click();
	});

	$(".head_flags, .head_flag_button .button_cancel").click(function() {
		$(".head_flags").toggle();
	});

	$(".head_flags .head_flag_content").click(function(event) {
        event.stopPropagation();
	});
	
	$(".head_flag_button .button_confirm").click(function() {
		var region = $(this).data("region");
		var language = $(this).data("language");
		$.post("?c=index&a=change", {"region" : region, "language" : language}, function(data) {
			if (data.status == 'success') {
				window.location.reload();
			} else {
				alert(data.message);
			}
		}, "json");
	});

	$(".head_flag_region").click(function() {
		var region = $(this).data("region");
		var languages = $(this).data("languages");
		var languageArray = languages.split(',');
		var languageContent = '';
		languageArray.forEach(function(language) {
			languageArray = language.split('=');
			languageContent += '<div class="head_flag_language ' + languageArray[0] + '" data-language="' + languageArray[0] + '">' + languageArray[1] + '</div>';
		});

		$(".head_flag_language_content").html(languageContent);
		$(".head_flag_region").removeClass("selected");
		$(this).addClass("selected");

		$(".head_flag_language").eq(0).click();
		$(".button_confirm").attr("data-region", region);
	});

	$(".head_flag_language_content").on("click", ".head_flag_language", function() {
		var language = $(this).data("language");
		$(".head_flag_language").removeClass("selected");
		$(this).addClass("selected");

		$(".button_confirm").attr("data-language", language);
	});
});

function headSwitchClass() {
	if (!$(".head_nav").hasClass('head_nav_click')) {
		$(".head_nav").addClass('head_nav_click');
	} else {
		$(".head_nav").removeClass('head_nav_click');
	}
}