Changeset 814


Ignore:
Timestamp:
Mar 20, 2015 3:44:03 PM (10 years ago)
Author:
quyenla
Message:

preview file

Location:
pro-violet-viettel/www/deploy/api/platform/modules/space
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/www/deploy/api/platform/modules/space/actions/actions.class.php

    r812 r814  
    218218            $c->add(TblspacefilePeer::FILE_TYPE, explode(';', $filter), Criteria::IN);
    219219        $c->addAscendingOrderByColumn(TblspacefilePeer::FILE_NAME);
     220        $this->userId= $userId;
    220221        $this->tblfiles = TblspacefilePeer::doSelect($c);
    221222        $this->isGetAll = $isGetAll;
     
    417418    }
    418419
    419     public function createPreview($fileurl, $userId, $fileid) {
     420    private function createPreview($fileurl, $userId, $fileid) {
    420421
    421422       
  • pro-violet-viettel/www/deploy/api/platform/modules/space/templates/dirSuccess.php

    r784 r814  
    2424      $fileName = $tblres->getFullFilename();
    2525      $fileName=  str_replace('/srv/www/violet/web', 'http://sbgapi.violet.vn', $fileName);
     26      $thumbnail="";
     27      if (file_exists("previews/$userId/".$tblfile->getFileId()."/0.png"))
     28      {
     29          $thumbnail="http://sbgapi.violet.vn/previews/$userId/".$tblfile->getFileId()."/0.png";
     30      }
    2631      ?>
    27     <file fileurl="<?php echo $fileName;?>" id="<?php echo $tblfile->getFileId() ?>" parentid="<?php echo $tblfile->getFileCategory() ?>" filetype="<?php echo $tblfile->getFileType() ?>"><?php echo $tblfile->getFileName() ?></file>
     32    <file thumbnail="<?php echo $thumbnail;?>" fileurl="<?php echo $fileName;?>" id="<?php echo $tblfile->getFileId() ?>" parentid="<?php echo $tblfile->getFileCategory() ?>" filetype="<?php echo $tblfile->getFileType() ?>"><?php echo $tblfile->getFileName() ?></file>
    2833  <?php endforeach; ?>
    2934  </filelist>
Note: See TracChangeset for help on using the changeset viewer.