Exemplo n.º 1
0
 public function getFileList($limit = null, $offset = null)
 {
     $userPerms = new Userpermission_Model();
     $fileIdArray = $userPerms->getViewableFileIds($limit, $offset);
     //$fullIdArray = $userPerms->getViewableFileIds($limit);
     $fileList = $this->globalFunctions->listFiles($fileIdArray, $userPerms, $this->config->item('dataDir'), false);
     $size = count($fileIdArray);
     $data = array('size' => $size, 'fileList' => $fileList);
     return $data;
 }
Exemplo n.º 2
0
 public function drawDashboard()
 {
     $userPerms = new Userpermission_Model($this->uid);
     $fileIdArray = $userPerms->getViewableFileIds(true);
     if ($fileIdArray !== null) {
         $chartData = $this->chart->listFiles($fileIdArray, $userPerms, $this->config->item('dataDir'), false);
     } else {
         $chartData = null;
     }
     $fileCount = $this->chart->fileCount();
     $fileCountCategory = $this->chart->fileCountCategory();
     $fileCountOwner = $this->chart->fileCountOwner();
     $fileCountDept = $this->chart->fileCountDept();
     $fileCountStatus = $this->chart->fileCountStatus();
     $docChartData[] = array('chartData' => $chartData, 'fileCount' => $fileCount, 'fileCountCategory' => $fileCountCategory, 'fileCountOwner' => $fileCountOwner, 'fileCountDept' => $fileCountDept, 'fileCountStatus' => $fileCountStatus);
     return json_encode($docChartData, JSON_NUMERIC_CHECK | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
 }