webmain/system/sysfile/sysfileAction.php

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
class sysfileClassAction extends Action
{
	public $notedit,$isdelmu;
	public function initAction()
	{
		$this->isdelmu = array(''.UPDIR.'/logs', ''.UPDIR.'/sqllog',''.UPDIR.'/cache', ''.UPDIR.'/data/'.(date('Y')-1).'');
	}
	
	public function getdataAjax()
	{
		$notedit = ',exe,dll,zip,rar,gz,ocx,png,gif,jpg,ico,mp4,wmv,frx,psd,';
		$this->notedit = $notedit;
		$rows = array();
		$path = '';
		$isope= getconfig('sysfileview');
		if($this->adminid!=1 || getconfig('system')=='demo' || !$isope){
			if($this->adminid!=1)$rows[]=array('name'=>'非admin管理员不能查看');
			if(getconfig('system')=='demo')$rows[]=array('name'=>'演示不能查看');
			if(!$isope)$rows[]=array('name'=>'系统配置文件没有打开sysfileview选项,不能查看,可配置加上\'sysfileview\'=>true,即可');
		}else{
			$path = $this->jm->base64decode($this->get('path'));
			$rows = $this->getfilelist($path);
		}
		
		$total = count($rows);
		return array(
			'rows' => $rows,
			'totalCount'=> $total,
			'success' => true,
			'nowpath' => $path
		);
	}
	private function getfilelist($path)
	{
		$chk = c('check');
		$php5= version_compare(PHP_VERSION, '7.0.0','<');
		$dir_arr = @scandir(ROOT_PATH.'/'.$path);
		$darr1=	$rows = array();
		foreach($dir_arr as $key=>$val){
			if($val == '.' || $val == '..'){
			}else{
				if($php5 && $chk->isincn($val))$val = iconv('gb2312','utf-8', $val);
				$mulu = $path.'/'.$val.'';
				if(!$path)$mulu = $val;
				if(is_dir($mulu)){
					$isdel = 0;
					foreach($this->isdelmu as $sdif)if(strpos($mulu, $sdif)===0)$isdel=1;
					$rows[] = array(
						'name' => $val,
						'type'=>'folder-close-alt',
						'lei'=>0,
						'isdel'=>$isdel,
						'path'=> $this->jm->base64encode($mulu)
					);
				}else{
					$suhs = $this->getfilew($val, $mulu,'',0);
					if($suhs)$darr1[] = $suhs;
				}
			}
后面还有 122 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。