joomla工作笔记
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'));