JHtml::_('date', $p_end_time, 'Y-m-d H:i')
PFactory::getDate($persontestResultInfo->start_time)->toSql
//引入邮件
require_once JPATH_SITE.'/components/com_jobmail/controller.php';
$controller = new JobmailController();
$controller->addModelPath(JPATH_SITE.'/components/com_jobmail/models');
$model = $controller->getModel("Email", "JobmailModel");
$this->setRedirect(url);
定义初始化数组
$ex_data = new stdclass();
后端引入jobmail类验证email
// Validate email format
jimport('joomla.mail.helper');
foreach ($interviewers as $k => $each) {
if( !JMailHelper::isEmailAddress($each) ) {
$this->setError("请输入正确的邮箱格式");
return false;
}
}
$config = JFactory::getConfig();
$tomorrow = JFactory::getDate('tomorrow', $config->get('offset'));
$from = $tomorrow->format("Y-m-d H:i:s"); // Tomorrow time UTC
$to = $tomorrow->add(new DateInterval("PT".(24*60*60)."S"))->format('Y-m-d H:i:s'); // The day after tomorrow
CacheHelper::triggerRemove($user_id, array('#__user_quota_orders'));
$query = 'SELECT SQL_CALC_FOUND_ROWS j.*, js.specialization, jje.exp_name, jst.salary_type, pj.sheetid as has_persontest, ' .
'ps.shorttitle as persontest_shorttitle, jjp.position, '.
($masteruser ? ' 1 as admin, ' : ' IF(jm.jobid IS NULL, 0, 1) as admin, ') .
'(SELECT SUBSTRING_INDEX(GROUP_CONCAT(u.displayname), ",",2) FROM *PREFIX*users_extended AS ue
LEFT JOIN *PREFIX*users AS u ON u.uid=ue.uid
LEFT JOIN *PREFIX*hr_jobmanager AS jm ON jm.manager=ue.uid
WHERE ue.block=0 AND ue.deleted=0 AND jm.jobid=j.id AND !(ue.permissions & ' . $db->quote(PERMISSION_JOB_ADMIN_ALL) . ') AND ue.owner=' . $userid . ') AS adminusers '.
' from #__jobs_job as j '.
' left join #__jobs_job_spec as js on j.id_job_spec_categ=js.id '.
' left join #__jobs_job_exp as jje on jje.id=j.id_job_exp '.
' left join #__jobs_salary_type as jst on jst.id=j.id_salary_type '.
' left join #__persontest_jobsheet as pj on pj.jobid=j.id '.
' left join #__persontest_sheet as ps on ps.id=pj.sheetid '.
' left join #__jobs_job_position as jjp on jjp.id=j.id_pos_type '.
($masteruser ? '' : ' LEFT JOIN *PREFIX*hr_jobmanager AS jm ON (jm.jobid=j.id AND jm.manager=' . $db->quote(OC_User::getUser()) . ') ') .
' where j.employer_id=' . intval($userid) . $searchSql .
' group by j.id ORDER BY j.publish_date DESC, j.id DESC';