You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
750 B
PHP
27 lines
750 B
PHP
<?php
|
|
class HeaderWidget extends ZcWidget {
|
|
|
|
/**
|
|
* @var AffiliateAccountService
|
|
*/
|
|
private $affiliateAccountService;
|
|
|
|
public function __construct() {
|
|
$this->affiliateAccountService = Zc::singleton('AffiliateAccountService');
|
|
$this->affiliateAccountId = $_SESSION[SessionConst::affiliateAccountId];
|
|
}
|
|
|
|
public function render($data = '') {
|
|
$data = array();
|
|
|
|
$data['route'] = $_GET['route'];
|
|
$data['nickname'] = $_SESSION[SessionConst::affiliateAccountName];
|
|
|
|
$account = $this->affiliateAccountService->getAffiliateAccount($this->affiliateAccountId);
|
|
$data['affiliateLink'] = $account['affiliate_link'];
|
|
|
|
$tplFile = 'affiliate/header';
|
|
|
|
return $this->renderFile($tplFile, $data);
|
|
}
|
|
} |