catalog/controller/mail/register.php
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerMailRegister extends Controller {
public function index(&$route, &$args, &$output) {
$this->load->language('mail/register');
$data['text_welcome'] = sprintf($this->language->get('text_welcome'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
$data['text_login'] = $this->language->get('text_login');
$data['text_approval'] = $this->language->get('text_approval');
$data['text_service'] = $this->language->get('text_service');
$data['text_thanks'] = $this->language->get('text_thanks');
$data['button_login'] = $this->language->get('button_login');
$this->load->model('account/customer_group');
if (isset($args[0]['customer_group_id'])) {
$customer_group_id = $args[0]['customer_group_id'];
} else {
$customer_group_id = $this->config->get('config_customer_group_id');
}
$customer_group_info = $this->model_account_customer_group->getCustomerGroup($customer_group_id);
if ($customer_group_info) {
$data['approval'] = $customer_group_info['approval'];
} else {
$data['approval'] = '';
}
$data['login'] = $this->url->link('account/login');
$data['store_url'] = HTTP_SERVER;
$data['store'] = html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8');
$this->load->model('tool/image');
$data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), $this->config->get('theme_default_image_location_width'), $this->config->get('theme_default_image_cart_height'), false);
$mail = new Mail($this->config->get('config_mail_engine'));
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
$mail->setTo($args[0]['email']);
$mail->setFrom($this->config->get('config_email'));
$mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));
$mail->setSubject(sprintf($this->language->get('text_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8')));
$mail->setHtml($this->load->view('mail/register', $data));
try {
$mail->send();
} catch (\Exception $e) {
$logger = Registry::getSingleton()->get('log');
$logger->write($e->getMessage());
}
}
public function alert(&$route, &$args, &$output) {
// Send to main admin email if new account email is enabled
后面还有 67 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
