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/system/admin/iframe/iframe.class.php
<?php
/*
 * Copyright (c) Huyin Information Technology Co., Ltd. All Rights Reserved.
 * BOSSCMS Content Management System (https://www.bosscms.net/)
 */
defined('IS_OK') or exit('Access Forbidden');

into::basic_class('admin');

class iframe extends admin
{	
    public function navs()
    {
		global $G;
		$ismob = isMobile();
		into::basic_json('navadm',true);
		$nav = $G['navadm'];
		unset($G['navadm']);
		$plugin = arrOptions(page::plugin_list('*'),'name');
		$sort = array();
		foreach($nav as $key=>$val){
			foreach($val['child'] as $k=>$v){
				if($G['manager']['level']!=1){
					if($v['child']){
						foreach($v['child'] as $l=>$w){
							if(!$this->cover($this->build($w),'R',true)){
								if($ns = into::load_class('admin','manager','manager','new')->isnav($w['mold'],$w['part'])){
									$u = array_shift($ns);
									foreach(array('mold','part','func','param') as $p){
										$nav[$key]['child'][$k]['child'][$l][$p] = $u[$p];
									}
								}else{
									unset($nav[$key]['child'][$k]['child'][$l]);
								}
							}
						}
					}
				}
				if($arr = $nav[$key]['child'][$k]['child']){
					foreach($arr as $l=>$w){
						if($w['mold']=='plugin'){
							$tags = array($w['tag']);
							foreach($plugin as $k2=>$v2){
								if(!$v2['must']){
									$tags[] = (is_file(ROOT_PATH.'system/plugin/'.$k2.'/navadm.json')?'plugin_':'').$k2;
								}
							}
							$nav[$key]['child'][$k]['child'][$l]['tag'] = implode(' ',$tags);
						}
						if($ismob && $w['mold']=='miniprogram'){
							unset($nav[$key]['child'][$k]['child'][$l]);
						}
						if($pg = $plugin[$w['mold']]){
							$nav[$key]['plugin'] = $w['mold'].' '.($pg['must']?'':'hide');
						}
					}
				}
				if(!$nav[$key]['child'][$k]['child'] && !strstr($nav[$key]['icon'],'plugin')){
					unset($nav[$key]['child'][$k]);
				}
			}
			if(!$nav[$key]['child']){
				unset($nav[$key]);
			}
			$sort[$key] = isset($val['sort'])?$val['sort']:99;
		}
		asort($sort);
		$navs = array();
		foreach($sort as $k=>$v){
			$navs[$k] = $nav[$k];
		}
		unset($nav);
        return $navs;
    }
	
	public function init()
	{
		global $G;
		$G['no_copyright'] = true;
		$G['plugin_must'] = array();	
		$plugin_must = page::plugin_list('*','must=1','id DESC');	
		foreach($plugin_must as $k=>$v){
			if(!is_file(ROOT_PATH.'system/plugin/'.$v['name'].'/navadm.json')){
				$config = load::plugin($v['name']);
				$G['plugin_must'][$k] = array(
					'title' => $config['title'],
					'mold' => $v['name'],
					'check' => $config['check']?$config['check']:'R'
				);
				if(!$this->cover($v['name'],'R',true)){
					if($ns = into::load_class('admin','manager','manager','new')->isnav($v['name'],$v['name'])){
						$u = array_shift($ns);
						foreach(array('mold','part','func','param') as $p){
							$G['plugin_must'][$k][$p] = $u[$p];
						}
					}else{
						unset($G['plugin_must'][$k]);
					}
				}
			}
		}	
		$data = array();
        $data['language'] = page::language_list();
		$data['navs'] = self::navs();
		echo $this->theme('iframe/iframe', $data);
	}
	
	public function bgcolor()
	{
		global $G;
		mysql::select_set(array('name'=>'admin_theme_bgcolor','value'=>$G['config']['admin_theme_bgcolor']?'':'black','parent'=>'0','type'=>'1','lang'=>'0'),'config',array('value'));
		alert('切换成功');
	}
	
	public function update()
	{
		global $G;
		header('content-type:application/json;charset=utf-8');
		into::basic_class('curl');
		$file = ROOT_PATH.'cache/json/bosscms_update.json';
		if(is_file($file)){
			$res = file_get_contents($file);
		}else{
			$res = curl::request('https://api.bosscms.net/rest/version/?version='.$G['config']['version']);
			dir::create($file, $res);
		}
		echo $res;
	}
}
?>