public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
if(function_exists('ioncube_license_properties')) $properties = ioncube_license_properties();
$contactEmail = !empty($properties['email']['value']) ? $properties['email']['value'] : 'co@zentao.net';
$contactMobile = !empty($properties['mobile']['value']) ? $properties['mobile']['value'] : '4006 889923';
$contactQQ = !empty($properties['qq']['value']) ? $properties['qq']['value'] : 'co@zentao.net';
if($this->app->getModuleName() != 'upgrade' and ($this->app->getModuleName() != 'user' or $this->app->getMethodName() != 'logout'))
{
if(!empty($this->app->company->version))
{
$user = $this->dao->select("COUNT('*') as count")->from(TABLE_USER)
->where('deleted')->eq(0)
->beginIF(empty($this->app->user->feedback))->andWhere('feedback')->eq(0)->fi()
->beginIF(!empty($this->app->user->feedback))->andWhere("feedback")->eq(1)->fi()
->fetch();
$licenseFile = $this->app->getConfigRoot() . 'license' . DS . 'sites' . DS . $this->config->subDomain . '.php';
if(!file_exists($licenseFile)) die("
Error
没有授权文件
该站点使用的版本是{$this->app->company->version},没有该站点的授权文件,请联系我们购买授权文件。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
No license file.
The version used by this site is {$this->app->company->version}. There is no authorization file for this site. Please contact us for authorization file.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
");
$licenseContent = file_get_contents($licenseFile);
$fileContent = file_get_contents(__FILE__);
$licenseContent = substr($licenseContent, 0, strpos($licenseContent, '?>') + 2);
$fileContent = substr($fileContent, 0, strpos($fileContent, '?>') + 2);
if($licenseContent != $fileContent) die(str_replace('%LICENSEFILE%', $licenseFile, "
Error
授权文件未加密
文件 %LICENSEFILE% 没有加密,请联系我们获取授权文件。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Authorization files are not encrypted.
The file %LICENSEFILE% is not encrypted. Please contact us for an authorization file.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
"));
include $licenseFile;
if($this->config->subDomain != $saasLicense->domain) die(str_replace(array('%SUBDOMAIN%', '%LICENSEDOMAIN%'), array($this->config->subDomain, $saasLicense->domain), "
Error
二级域名跟授权不匹配
当前的二级域名是%SUBDOMAIN%,授权的二级域名是%LICENSEDOMAIN%,如果有问题,请联系我们修改绑定域名。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Second-level domain name does not match authorization.
The current second-level domain name is %SUBDOMAIN%, and the authorized second-level domain name is %LICENSEDOMAIN%. If you have any questions, please contact us to modify the bound domain name.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
"));
if($saasLicense->version != $this->app->company->version) die(str_replace('%VERSION%', $saasLicense->version, "
Error
使用的版本跟授权不匹配
当前使用的版本是{$this->app->company->version},授权版本为%VERSION%。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
The version used does not match the authorization.
The current version is {$this->app->company->version} and the authorized version is %VERSION%.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
"));
if(empty($this->app->user->feedback) and !empty($saasLicense->user) and $saasLicense->user < $user->count) die("
Error
集团版人数超出限制
您版本的用户数是{$properties['user']['value']},您目前系统中已有{$user->count}人,已经超过了限制,请联系我们增加人数授权。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Accounts has exceed the limit.
The accounts has exceed the limit of {$properties['user']['value']} peoples, please contact us to buy more licenses.
Email:Max@easysoft.ltd
Web:www.zentao.pm/
");
if(!empty($this->app->user->feedback) and (empty($saasLicense->feedback) or $saasLicense->feedback < $user->count)) die("
Error
集团版人数超出限制
您版本的用户数是{$properties['user']['value']},您目前系统中已有{$user->count}人,已经超过了限制,请联系我们增加人数授权。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Accounts has exceed the limit.
The accounts has exceed the limit of {$properties['user']['value']} peoples, please contact us to buy more licenses.
Email:Max@easysoft.ltd
Web:www.zentao.pm/
");
if(!empty($saasLicense->endDate) and $saasLicense->endDate < date('Y-m-d')) die(str_replace('%EXPIREDATE%', $saasLicense->endDate, "
Error
授权时间已经到期
该站点的授权时间是%EXPIREDATE%,请联系我们延长时间。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
The authorization time has expired.
The authorization time of this site is %EXPIREDATE%. Please contact us for time expand.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
"));
}
}
if(!empty($properties['sites']) and empty($this->app->company->version))
{
$sites = $this->dao->query("show databases like 'pms_%'")->fetchAll();
$siteCount = 0;
foreach($sites as $site)
{
$db = reset($site);
$company = $this->dao->query("select * from `$db`.`zt_company` limit 1")->fetch();
if($company and empty($company->version)) $siteCount ++;
}
if($siteCount > $properties['sites']['value']) die("
Error
集团版创建的站点数超出限制
您版本的站点数是{$properties['sites']['value']},您目前系统中已有{$siteCount}个站点,已经超过了限制,请联系我们增加站点数授权。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Sites has exceed the limit.
The sites has exceed the limit of {$properties['sites']['value']} sites, please contact us to buy more licenses.
Email:Max@easysoft.ltd
Web:www.zentao.pm/
");
}
if(!empty($properties['domain']))
{
$host = $_SERVER['HTTP_HOST'];
$portPos = strpos($host, ':');
if($portPos !== false) $host = substr($host, 0, $portPos);
$host .= $_SERVER['REQUEST_URI'];
$checkHost = false;
$allowHosts = explode(',', $properties['domain']['value']);
foreach($allowHosts as $allowHost)
{
if(strpos($host, $allowHost) !== false)
{
$checkHost = true;
break;
}
}
if(!$checkHost) die("
Error
集团版绑定域名访问错误
您版本绑定的域名是{$properties['domain']['value']},您目前访问的域名是{$_SERVER['HTTP_HOST']},如果有问题,请联系我们修改绑定域名。
Email:$contactEmail
电话:$contactMobile
QQ:$contactQQ
网址:www.zentao.net
Domain Binding Error.
The binding domain is {$properties['domain']['value']}, please contact us to change binding domain.
Email:tengfei@cnezsoft.com
Web:www.zentao.pm/
");
};
}