public static function SendEmail($emailAll) { $action_lang = \Lib\common\Language::loadLangPack($emailAll['lang']); if (defined('THEME_ROOT_PATH')) { include THEME_ROOT_PATH . 'email/' . $emailAll['theme']; } else { include $emailAll['theme']; } if (!isset($emailLR)) { include $emailAll['theme']; } $email_from = isset($emailAll['email_from']) && !empty($emailAll['email_from']) ? $emailAll['email_from'] : ''; $emailuser = isset($emailAll['emailuser']) && !empty($emailAll['emailuser']) ? $emailAll['emailuser'] : ''; if (empty($email_from)) { $preFix = ''; switch ($emailAll['lang']) { case 'fr-fr': $preFix = 'france-'; break; case 'de-ge': $preFix = 'germany-'; break; case 'es-sp': $preFix = 'spanish-'; break; case 'it-it': $preFix = 'italia-'; break; case 'ru-ru': $preFix = 'russia-'; break; case 'pt-pt': $preFix = 'portugal-'; break; } $email_from = $preFix . '*****@*****.**'; } $data = array('username' => $email_from, 'from' => 'Milanoo.com<' . $email_from . '>', 'to' => $emailAll['email'], 'subject' => isset($action_lang[$emailAll['emailtitle']]) ? $action_lang[$emailAll['emailtitle']] : $emailAll['emailtitle'], 'content' => $emailLR, 'headers' => "Content-type:text/html;charset=utf-8;\r\n"); $mail = new \Lib\Mail(); $re = $mail->send($data); }
public function __construct() { $productId = R::getParams('productId'); $keyword = R::getParams('keyword'); $page = R::getParams('page'); $pageSize = R::getParams('pageSize'); if (!empty($productId)) { $page = !empty($page) ? $page : 1; $keyword = !empty($keyword) ? $keyword : ''; $pageSize = !empty($pageSize) ? $pageSize : 9; $searchTopQueryArray = array('productId' => $productId, 'searchContent' => $keyword, 'pageSize' => $pageSize, 'pageNo' => $page); $getTopQueryRecommend = new \Model\ItemOtherProducts(); $topQueryData = $getTopQueryRecommend->getTopQuery($searchTopQueryArray); $html = ''; if (!empty($topQueryData) && $topQueryData['code'] == 0) { header('Content-Type: text/html;charset=utf-8'); if (!empty($topQueryData['listResults']['results'])) { //去掉反斜杠 $topQueryData['listResults']['results'] = $this->dostrip($topQueryData['listResults']['results']); foreach ($topQueryData['listResults']['results'] as $val) { $html .= '<dl>'; if ($keyword) { $html .= '<dt><a href="' . Rewrite::rewrite(array('url' => '?module=thing&action=item&id=' . $val['productId'], 'seo' => $val['productName'], 'isxs' => 'no')) . '?searchKeyword=' . $keyword . '"><img src="' . CDN_UPLOAD_URL . 'upen/m/' . $val['firstPictureUrl'] . '" width="66" height="89" /></a></dt>'; } else { $html .= '<dt><a href="' . Rewrite::rewrite(array('url' => '?module=thing&action=item&id=' . $val['productId'], 'seo' => $val['productName'], 'isxs' => 'no')) . '"><img src="' . CDN_UPLOAD_URL . 'upen/m/' . $val['firstPictureUrl'] . '" width="66" height="89" /></a></dt>'; } $html .= '<dd><b>' . Currency . \Lib\common\Language::priceByCurrency($val['productPrice']) . '</b></dd>'; $html .= '</dl>'; } } echo $html; } else { echo ''; } } else { echo 'no productId'; } }