catalog/controller/account/voucher.php
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerAccountVoucher extends Controller {
private $error = array();
public function index() {
$this->load->language('account/voucher');
$this->document->setTitle($this->language->get('heading_title'));
if (!isset($this->session->data['vouchers'])) {
$this->session->data['vouchers'] = array();
}
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->session->data['vouchers'][mt_rand()] = array(
'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->request->post['amount'], $this->session->data['currency']), $this->request->post['to_name']),
'to_name' => $this->request->post['to_name'],
'to_email' => $this->request->post['to_email'],
'from_name' => $this->request->post['from_name'],
'from_email' => $this->request->post['from_email'],
'voucher_theme_id' => $this->request->post['voucher_theme_id'],
'message' => $this->request->post['message'],
'amount' => $this->currency->convert($this->request->post['amount'], $this->session->data['currency'], $this->config->get('config_currency'))
);
$this->response->redirect($this->url->link('account/voucher/success'));
}
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account')
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_voucher'),
'href' => $this->url->link('account/voucher')
);
$data['help_amount'] = sprintf($this->language->get('help_amount'), $this->currency->format($this->config->get('config_voucher_min'), $this->session->data['currency']), $this->currency->format($this->config->get('config_voucher_max'), $this->session->data['currency']));
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
if (isset($this->error['to_name'])) {
$data['error_to_name'] = $this->error['to_name'];
} else {
$data['error_to_name'] = '';
}
if (isset($this->error['to_email'])) {
后面还有 158 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
