catalog/controller/account/affiliate.php
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerAccountAffiliate extends Controller {
private $error = array();
public function add() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/affiliate');
$this->response->redirect($this->url->link('affiliate/login'));
}
$this->load->language('account/affiliate');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('account/affiliate');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_account_affiliate->addAffiliate($this->customer->getId(), $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('account/account'));
}
$this->getForm();
}
public function edit() {
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('account/affiliate');
$this->response->redirect($this->url->link('affiliate/login'));
}
$this->load->language('account/affiliate');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('account/affiliate');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_account_affiliate->editAffiliate($this->customer->getId(), $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('account/account'));
}
$this->getForm();
}
public function getForm() {
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home')
);
后面还有 240 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
