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/theme.9b31fda5.js
var $G=[];
$G['lang']=1;
$G['relative']='../';
$G['items']=20;
$G['type']=2;

	
$(document).ready(function(){
	$('notice[type][id]').each(function(){
		bosscms = true;
		$.post($G['relative']+'api/notice/?lang='+$G['lang'],{
			'type': $(this).attr('type'),
			'id': $(this).attr('id')
		},function(data){
			if(data){
				$('notice[type="'+data.type+'"][id="'+data.id+'"]').before(data.notice).remove();
			}
		},'json');
	});
	
	if($('div[comment*="_"]').length>0){
		var comment=$('div[comment]').attr('comment').match(/^(\d+)_(\d+)$/);
		$G['model']=comment[1];
		$G['gid']=comment[2];
		$(document).on('click','div[comment] a[pages][parent]',function(){
			(function(the){
				$.get($G['relative']+'api/member/?action=comment&lang='+$G['lang'],{
					'model': $G['model'],
					'gid': $G['gid'],
					'pages': the.attr('pages'),
					'parent': the.attr('parent')
				},function(data){
					div = $('<div>'+data.replace(/\.\.\/\.\.\//g,$G['relative'])+'</div>');
					the.prev('ul').append(div.children('ul').html());
					a = div.children('a');
					if(a.length > 0){
						the.attr('pages',a.attr('pages'));
						the.attr('parent',a.attr('parent'));
						the.html(a.html());
					}else{
						the.remove();
					}
				});
			})($(this));
		})
		.on('click','div[comment] ul>li>dl>dd>a[like][did]',function(){
			(function(the){
				$.post($G['relative']+'api/member/?action=comment&func=like&jsonmsg=true&lang='+$G['lang'],{'id':the.attr('did')},function(data){
					if(mat = data.msg.match(/^([+-])(\d+)$/)){
						the.html(mat[2]);
						if(mat[1] == '-'){
							the.addClass('fa-thumbs-o-up').removeClass('fa-thumbs-up');
						}else{
							the.addClass('fa-thumbs-up').removeClass('fa-thumbs-o-up');
						}
					}else{
						_alert(data.msg);
					}
				},'json');
			})($(this));
		})
		.on('click','div[comment] ul>li>dl>dd>a[reply][did]',function(){
			div = $(this).parent('dd').next('div');
			if(div.find('textarea').length>0){
				$(this).removeClass('fa-commenting on').addClass('fa-commenting-o');
				div.html('');
			}else{
				$('div[comment] ul>li>dl>dd>a[reply][did]').removeClass('fa-commenting on').addClass('fa-commenting-o');
				$(this).removeClass('fa-commenting-o').addClass('fa-commenting on');
				$('div[comment] ul>li>dl>div').html('');
				html = $('div[comment]>div').html();
				html = $(html).attr('placeholder',$(this).html()+$(this).parent('dd').parent('dl').find('dt>b').html());
				div.html( html );
			}
		})
		.on('click','div[comment] div>p>button',function(){
			(function(the){
				div = the.parent('p').parent('div');
				did = div[0].hasAttribute('did')?div.attr('did')*1:0;
				pid = div[0].hasAttribute('pid')?div.attr('pid')*1:0;
				$.post($G['relative']+'api/member/?action=comment&func=publish&jsonmsg=true&lang='+$G['lang'],{
					'model': $G['model'],
					'gid': $G['gid'],
					'parent': pid?pid:did,
					'superior': did,
					'content': the.parent('p').prev('textarea').val(),
					'anonymity': the.next('label').find('input').prop('checked')?1:0
				},function(data){
					if(!data.state.match(/^\w+$/)){
						div = the.parent('p').parent('div');
						if(div[0].hasAttribute('did')){
							div.prev('dd').find('a[reply]').click();
						}else{
							div.find('textarea').val('');
							div.find('input[type="checkbox"]').prop('checked',false);
						}
						_alert(data.msg,'green');
					}else{
						_alert(data.msg,'red');
					}
				},'json');
			})($(this));
		});
	}
});