コード例 #1
0
ファイル: view.html.php プロジェクト: omarmm/MangLuoiBDS
 function editItem()
 {
     JRequest::setVar('hidemainmenu', 1);
     $cid = JRequest::getVar('cid', array(0), '', 'array');
     if ($idurl = JFactory::getURI()->getVar("id")) {
         $id = $idurl;
     } else {
         $id = $cid[0];
     }
     // print_r( $id );
     //$item =& $this->get('item');
     //$this->assign( $item );
     //print_r( $this->image);
     // exit;
     $ModelRealtors = new JeaModelRealtors();
     $Chitietnhamoigioi = $ModelRealtors->layChiTietNhaMoiGioi($id);
     $this->assignRef('row', $Chitietnhamoigioi[0]);
     $this->assignRef('image', ilandCommonUtils::getRealtorImage($id));
     $this->image['xoa'] = JURI::root() . 'administrator/index.php?option=com_jea' . '&controller=realtors&task=deleteimg&id=' . $this->row['id'];
     //exit;
     //	print_r($Chitietnhamoigioi);
     //	echo $this->row['id'];
     // exit;
     $title = "";
     $title .= ' : ';
     $title .= $this->row['id'] ? JText::_('Edit') . ' ' . $this->escape($this->row['ten']) : JText::_('New');
     JToolBarHelper::title($title, 'jea.png');
     JToolBarHelper::save();
     JToolBarHelper::apply();
     JToolBarHelper::cancel();
     $templatePath = "../templates/WebGH/html/com_u_re/realtors/";
     $this->addTemplatePath($templatePath);
     $this->setLayout('detail');
     parent::display();
 }