Exemple #1
0
 public function updateLuceneIndex($id)
 {
     $thong_bao = $this->getThongBao($id);
     $link = new Zend_View_Helper_Url();
     $url = $link->url(array('controller' => 'thong-bao', 'action' => 'chi-tiet', 'id' => $thong_bao['id']), null, true);
     $data = array('pk' => 'tb_' . $thong_bao['id'], 'code' => '', 'title' => $thong_bao['tieu_de'], 'description' => '<span style="font-size: 11px;color: graytext;">Ngày đăng : ' . $thong_bao['ngay_tao'] . '</span>', 'cate' => '2', 'link' => $url);
     // add job to the index
     Default_Model_LuceneIndex::update($data);
 }
Exemple #2
0
 public function updateLuceneIndex($id)
 {
     $de_tai = $this->getChiTietDeTai($id);
     $description = '<table><tr>';
     $description .= '<td>Chủ nhiệm : ' . $de_tai['hoc_vi'] . ' ' . $de_tai['ten_chu_nhiem'] . '</td>';
     $description .= '<td>Lĩnh vực : ' . $de_tai['ten_linh_vuc'] . '</td>';
     $description .= '</tr><tr>';
     $description .= '<td width="50%">Đơn vị : ' . $de_tai['ten_don_vi'] . '</td>';
     $description .= '<td>Tình trạng : ' . $de_tai['tinh_trang'] . '</td>';
     $description .= '</tr></table>';
     $link = new Zend_View_Helper_Url();
     $url = $link->url(array('controller' => 'de-tai', 'action' => 'chi-tiet', 'id' => $de_tai['id']), null, true);
     $data = array('pk' => 'dt_' . $de_tai['id'], 'code' => $de_tai['ma'], 'title' => $de_tai['ten'], 'description' => $description, 'cate' => '0', 'link' => $url);
     // add job to the index
     Default_Model_LuceneIndex::update($data);
 }
Exemple #3
0
 public function updateLuceneIndex($id)
 {
     $tin_tuc = $this->getTinTuc($id);
     $link = new Zend_View_Helper_Url();
     $url = $link->url(array('controller' => 'tin-tuc', 'action' => 'chi-tiet', 'id' => $tin_tuc['id']), null, true);
     $data = array('pk' => 'tt_' . $tin_tuc['id'], 'code' => '', 'title' => $tin_tuc['tieu_de'], 'description' => '<span style="font-size: 11px;color: graytext;">Ngày đăng : ' . $tin_tuc['ngay_tao'] . '</span><div>' . $tin_tuc['mo_ta_tom_tat'] . '...</div>', 'cate' => '1', 'link' => $url);
     // add job to the index
     Default_Model_LuceneIndex::update($data);
 }
Exemple #4
0
 public function updateLuceneIndex()
 {
     $capQLs = Default_Model_Constraints::hoithao_capquanly();
     $don_vi = new Default_Model_DonVi();
     $link = new Zend_View_Helper_Url();
     $url = $link->url(array('controller' => 'hoi-thao', 'action' => 'chi-tiet', 'id' => $this->id), null, true);
     $description = '<table><tr>';
     $description .= '<td width="50%">Cấp quản lý : ' . $capQLs[$this->cap_quan_ly] . '</td>';
     $description .= '<td>Ngày tổ chức : ' . date('d/m/Y', strtotime($this->ngay_to_chuc)) . '</td>';
     $description .= '</tr><tr>';
     $description .= '<td colspan="2">Đơn vị phụ trách : ' . $this->don_vi_phu_trach . '</td>';
     $description .= '</tr></table>';
     $data = array('pk' => 'ht_' . $this->id, 'code' => '', 'title' => $this->chu_de, 'description' => $description, 'cate' => '3', 'link' => $url);
     // add job to the index
     Default_Model_LuceneIndex::update($data);
 }