Ejemplo n.º 1
0
 function dangKyMail($email)
 {
     $this->assignRef('lang', ilandCommonUtils::getLanguage());
     $this->assignRef('SiteDBConfig', ilandCommonUtils::getSiteDBConfig());
     // global config
     global $u_reGlobalConfig;
     // get data from post
     $data = array();
     $data['du_an_id'] = '-1';
     $data['ten_du_an'] = '';
     $data['ho_ten'] = '';
     $data['dia_chi'] = '';
     $data['dien_thoai'] = '';
     $data['email'] = $email;
     $data['yeu_cau'] = 'Nhận tin mới qua mail';
     $data['ngay_gui'] = '' . time();
     $data['dat_cho'] = '0';
     $data['giao_dich_thanh_cong'] = '0';
     // luu data
     $projectModel = new U_ReModelProjects();
     $result = $projectModel->luuThongTinDatChoDuAn($data);
     // chuyen sang trang thong bao luu thanh cong
     $templatePath = "templates/" . $u_reGlobalConfig['DB']['template'] . "/html/com_u_re/projects/";
     $this->addTemplatePath($templatePath);
     // hardcode template name
     $this->setLayout('dang_ky_mail_thanh_cong');
     $linkData = array();
     $linkData['linkTrangChu'] = 'index.php';
     $linkData['linkListDuAn'] = 'index.php?option=com_u_re&controller=projects&Itemid=24';
     // assign
     $this->assignRef('linkData', $linkData);
     // display template
     parent::display();
 }