pluginbase(); } function onindex() { if(!$ucfiles = @file(UC_ROOT.'./control/admin/ucfiles.md5')) { $this->message('file_check_failed'); } $this->load('app'); $applist = $_ENV['app']->get_apps(); $this->view->assign('applist', $applist); $this->checkfiles('./', '\.php', 0, '\.php|\.xml'); $this->checkfiles('control/', '\.php'); $this->checkfiles('model/', '\.php'); $this->checkfiles('lib/', '\.php'); $this->checkfiles('view/', '\.php|\.htm'); $this->checkfiles('js/', '\.js'); foreach($ucfiles as $line) { $file = trim(substr($line, 34)); $md5datanew[$file] = substr($line, 0, 32); if($md5datanew[$file] != $this->md5data[$file]) { $modifylist[$file] = $this->md5data[$file]; } $md5datanew[$file] = $this->md5data[$file]; } $weekbefore = $timestamp - 604800; $addlist = @array_diff_assoc($this->md5data, $md5datanew); $dellist = @array_diff_assoc($md5datanew, $this->md5data); $modifylist = @array_diff_assoc($modifylist, $dellist); $showlist = @array_merge($this->md5data, $md5datanew); $doubt = 0; $dirlist = $dirlog = array(); foreach($showlist as $file => $md5) { $dir = dirname($file); if(@array_key_exists($file, $modifylist)) { $fileststus = 'modify'; } elseif(@array_key_exists($file, $dellist)) { $fileststus = 'del'; } elseif(@array_key_exists($file, $addlist)) { $fileststus = 'add'; } else { $filemtime = @filemtime($file); if($filemtime > $weekbefore) { $fileststus = 'doubt'; $doubt++; } else { $fileststus = ''; } } if(file_exists($file)) { $filemtime = @filemtime($file); $fileststus && $dirlist[$fileststus][$dir][basename($file)] = array(number_format(filesize($file)).' Bytes', $this->date($filemtime)); } else { $fileststus && $dirlist[$fileststus][$dir][basename($file)] = array('', ''); } } $result = $resultjs = ''; $dirnum = 0; foreach($dirlist as $status => $filelist) { $dirnum++; $result .= '