Ejemplo n.º 1
0
 /**
  *
  */
 public function log()
 {
     $file_list = array();
     $files_list = array();
     File::getFiles(LOG_PATH, $file_list, '#\\.log#i');
     foreach ($file_list as $key => $value) {
         $files_list_temp = array();
         $files_list_temp['id'] = base64_encode($value);
         $files_list_temp['name'] = $value;
         $files_list_temp['size'] = File::realSize($value);
         $files_list_temp['create_time'] = date("Y-m-d H:i:s", File::filectime($value));
         $files_list_temp['mod_time'] = date("Y-m-d H:i:s", File::filemtime($value));
         $files_list[] = $files_list_temp;
     }
     $files_list = array_sort($files_list, "mod_time");
     $this->assign('logs_list', $files_list);
     $this->display();
 }
Ejemplo n.º 2
0
 /**
  *
  */
 public function restoreFile()
 {
     $handle = opendir(System_Backup_PATH);
     $file_list = array();
     File::getFiles(System_Backup_PATH, $file_list, '#\\.zip$#i');
     foreach ($file_list as $key => $value) {
         $files_list_temp = array();
         $files_list_temp['id'] = base64_encode($value);
         $files_list_temp['name'] = $value;
         $files_list_temp['size'] = File::realSize($value);
         $files_list_temp['create_time'] = date("Y-m-d H:i:s", File::filectime($value));
         $files_list_temp['mod_time'] = date("Y-m-d H:i:s", File::filemtime($value));
         $files_list[] = $files_list_temp;
     }
     $this->assign('backup', $files_list);
     $this->display();
 }