private function _readQuaTrinh() { $quatrinh_id = JRequest::getInt('id', 0); // $model = JModelLegacy::getInstance('Tochuc','TochucModel'); $model = Core::model('Tochuc/Tochuc'); $mapperFile = Core::model('Core/Attachment'); $row = $model->getOneQuaTrinhById($quatrinh_id); $dept = Core::read('ins_dept', array('id = ' => $row['dept_id'])); $row['vanban'] = TochucHelper::getVanBanById($row['vanban_id']); $row['file'] = $mapperFile->getRowByObjectIdAndTypeId($row['vanban_id'], 1); $row['hieuluc_ngay'] = TochucHelper::strDateMySqltoVN($row['hieuluc_ngay']); $row['dept_name'] = $dept['name']; $this->_printJson($row); }
<table class="table table-striped table-bordered table-hover"> <thead> <tr> <th>#</th> <th>Năm</th> <th>Nghiệp vụ</th> <th>Quyết định</th> <th>Chi tiết</th> <th width="90%">Ghi chú</th> </tr> </thead> <tbody> <?php for ($i = 0; $i < count($this->quatrinh_bienche); $i++) { $row = $this->quatrinh_bienche[$i]; $vanban = TochucHelper::getVanBanById($row['vanban_id']); if ($vanban != null) { if (Core::loadResult('core_attachment', 'COUNT(*)', array('object_id=' => $vanban['id'], 'type_id=' => 1)) > 0) { $vanban['mahieu'] = '<a href="' . JUri::root(true) . '/uploader/index.php?download=1&type_id=1&object_id=' . $vanban['id'] . '" target="_blank">' . $vanban['mahieu'] . '</a>'; } //$vanban['mahieu'] = '<a href="index.php?option=com_tochuc&controller=tochuc&task=download&id='.$vanban['id'].'" target="_blank">'.$vanban['mahieu'].', ngày '.$vanban['ngaybanhanh'].'</a>'; } else { $vanban = array(); } ?> <tr> <td><?php echo $i + 1; ?> </td> <td nowrap="nowrap"><?php