diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index 80f6714c..98eca59a 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -389,7 +389,7 @@ class ReviewController extends Zend_Controller_Action '; - $sql = "select att.realname,att.id from attachments att + $sql = "select att.realname,att.id,att.filesize from attachments att left join mdreviewattach ratt on ratt.attachid = att.id where ratt.reviewid = $rid"; @@ -399,8 +399,16 @@ class ReviewController extends Zend_Controller_Action foreach($rows as $k=>$v) { + if($v['filesize'] > 1024*1024) + { + $v['filesize'] = round($v['filesize']/1024/1024,2) . "MB"; + } + else + { + $v['filesize'] = round($v['filesize']/1024,2) . "KB"; + } $list[] = ' -
  • '.$v['realname'].' +
  • '.$v['realname'].'  ('.$v['filesize'].') 下载
  • ';