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/bs.kntsleep.com/cache/js/global.8c56ffd3.mobile.js
var at = window.location.hash.match(/#_alert=(.+?),(red|green|blue|yellow|gold)/);
if(at){
	_alert(decodeURI(at[1]),at[2]);
	window.location.hash = window.location.hash.replace(at[0],'');
}
function _alert(str, type){
	var date = new Date();
	now = date.getTime();
	$('body').append('<h6 class="alert '+type+'" time="'+now+'" style="z-index:'+now+';"><b>'+str.replace(/</g,'&lt;').replace(/>/g,'&gt;')+'</b></h6>');
	tha = $('h6.alert[time="'+now+'"]');
	tha.animate({top:78,opacity:1},288);
	(function(tha){
		window.setTimeout(function(){
			tha.remove();
		},
		tha.hasClass('green')?3000:2000);
	})(tha);
}
function _finput(obj){
	obj.each(function(){
		$(this).after('<div class="file_input">'+$(this)[0].outerHTML+'<input type="text" placeholder="'+$(this).attr('placeholder')+'" /><i class="fa fa-folder-open-o"></i></div>');
		$(this).remove();
	})
}
_finput($('dl.form8 input[name^="params"][type="file"]'));
$(document).on('change','div.file_input input[type=file]',function(e){
	files = e.target.files;
	if(files.length>0){
		$(this).next('input[type=text]').val(files[0].name);
	}
}).on('change','select[tight]',function(){
    select = $(this);
    $.get($G['relative']+'system/web/common/tight/'+$(this).attr('tight')+'.json',function(data){
        parent = select.attr('parent');
        val = select.val();
        if(val!==""){
            for(k in data){
                if(k.match(new RegExp('^'+parent+',')) && data[k]==val){
                    select.nextAll('select[tight]').remove();
                    id = k.split(',')[1];
                    option = '';
                    for(k2 in data){
                        if(k2.match(new RegExp('^'+id+','))){
                            option += '<option value="'+data[k2]+'">'+data[k2]+'</option>';
                        }
                    }
                    if(option){
                        newsel = $(select[0].outerHTML);
                        ph = newsel.attr('ph');
                        ph = ph?JSON.parse(ph):[];
                        newsel.attr('parent',id);
                        newsel.attr('required','required');
                        newsel.html('<option value="">'+ph[select.index()+1]+'</option>'+option);
                        select.after(newsel);
                    }
                    break;
                }
            }
        }else{
            select.nextAll('select[tight]').remove();
        }
    },'json');
});

$('.head article>.search-box>i').click(function(){
	if($(this).hasClass('on')){
		$(this).removeClass('on');
	}else{
		$(this).addClass('on');
	}
});
$('.head article>.menu-box').click(function(){
	if($(this).hasClass('on')){
		$(this).removeClass('on');
	}else{
		$(this).addClass('on');
	}
});
var nav = $('.nav').html(),
	nav_li_more = '<li class="more has"><a href="javascript:;"><b>更多</b></a><div><ul></ul></div></li>';
function nav_li_func(){
	$('.nav').html(nav);
	var nav_win992 = $(window).width()<992;
	if(nav_win992){
		$('.head .menu-box').click(function(){
			$(this).removeClass('on active');
			$('.nav').addClass('active');
		});
		$('.nav').prepend('<a class="close" href="javascript:;"></a>');
		$('.nav article>div>ul').prepend('<li class="close"><a href="javascript:;"></a></li>');
		$('.nav>a.close, .nav article>div>ul>li.close>a').click(function(){
			$('.nav').removeClass('active');
		});
		$('.nav div>ul>li>strong').remove();
		$('.nav div>ul>li.has').prepend('<strong></strong>');
		$('.nav div>ul>li.has>strong').click(function(){
			var li = $(this).parent('li');
			if(li.hasClass('active')){
				li.removeClass('active');
			}else{
				li.addClass('active');
			}
		});
		$('.nav article>div>ul div>ul').prepend('<li class="back"><a href="javascript:;"></a></li>');
		$('.nav article>div>ul div>ul>li.back>a').click(function(){
			$(this).parent('li').parent('ul').parent('div').parent('li').removeClass('active');
		});
	}else{
		$('.nav article>div>ul').append(nav_li_more);
		var nav_li = [],
			nav_li_width = [],
			nav_li_number = 0,
			nav_html = '',
			nav_html_outer = '',
			nav_width = $('.nav article>div>ul').width(),
			nav_html_width = 0,
		    nav_more_width = $('.nav article>div>ul>li.more').width();
		$('.nav article>div>ul>li.more').remove();
		$('.nav article>div>ul>li').each(function(i, e){
			nav_li[i] = $(this)[0].outerHTML;
			nav_li_width[i] = $(this).width();
			nav_li_number++;
		});
		for(i=0; i<nav_li_number; i++){
			nav_html_width += nav_li_width[i]*1;
			if(nav_html_width<nav_width || (nav_html_width+nav_more_width)<nav_width){ 
				nav_html += nav_li[i];
			}else{
				nav_html_outer += nav_li[i];
			}
		}
		$('.nav article>div>ul').html(nav_html);
		if(nav_html_outer != ''){
			$('.nav article>div>ul').append(nav_li_more);
			$('.nav article>div>ul>li.more>div>ul').html(nav_html_outer);
		}
		$('.nav article>div>ul>li>div>ul li').mouseover(function(){
			div = $(this).children('div');
			if(div.length>0 && (div.width() + div.offset().left > $(window).width())){
				$(this).addClass('right');
			}
		});
	}
}
nav_li_func();
$(window).resize(function(){
	nav_li_func();
});
if($('.banner>ul>li').length>1){
	$('.banner>ul').after('<ol></ol>');
	$('.banner>ul').after('<dl><dt></dt><dd></dd></dl>');
	new Swiper('.banner',{
		wrapperClass: 'banner>ul',
		slideClass: 'banner>ul>li',
		autoplay: 5 * 1000,
		loop: true, 
		watchSlidesProgress: true,
		watchSlidesVisibility: true,
		observer: true,
		observeParents: true,
		slidesPerView: 1,
		simulateTouch: false,
		keyboardControl: true,
		pagination: '.banner>ol',
		paginationElement: 'li',
		paginationClickable: true,
		bulletActiveClass: 'active',
		slideDuplicatedActiveClass: 'active',
		slideVisibleClass: 'visible',
		slideActiveClass: 'active',
		prevButton: '.banner>dl>dt',
		nextButton: '.banner>dl>dd'
	});
}
$('.subnav ul').each(function(index, element) {
    li = $(this).children('li.on');
	if(li.length>0){
		$(this).scrollLeft( li.last().position().left );
	}
});
$('.subnav ul li.has>a').click(function(){
	if($(window).width()<992){
		li = $(this).parent('li');
		if(li.hasClass('active')){
			li.removeClass('active');
		}else{
			li.siblings().removeClass('active');
			li.addClass('active');
		}
		return false;
	}
});