This commit is contained in:
wangyidong
2017-03-22 14:34:50 +08:00
parent 5eaa1d1b83
commit ca08397cc6
4 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -328,7 +328,7 @@ $lang->user->menu = $lang->company->menu;
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => 'Homepage|admin|index');
$lang->admin->menu->index = array('link' => 'Homepage|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->custom = array('link' => 'Custom|custom|set', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
+1 -1
View File
@@ -328,7 +328,7 @@ $lang->user->menu = $lang->company->menu;
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => '首页|admin|index');
$lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->custom = array('link' => '自定义|custom|set', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
+9 -7
View File
@@ -277,7 +277,7 @@ class mail extends control
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->test;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->test;
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs();
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->andWhere('deleted')->eq(0)->orderBy('account')->fetchPairs();
$this->display();
}
@@ -520,7 +520,7 @@ class mail extends control
$this->view->title = $this->lang->mail->ztCloud;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->ztCloud;
if(!empty($this->config->mail->ztcloud->secretKey))
if(!empty($this->config->mail->ztcloud->secretKey) and !empty($this->config->global->community))
{
$mailConfig = new stdclass();
$mailConfig->fromAddress = $this->config->mail->fromAddress;
@@ -535,16 +535,18 @@ class mail extends control
die($this->display());
}
if($this->cookie->ztCloudLicense != 'yes')
{
$this->view->step = 'license';
die($this->display());
}
if(empty($this->config->global->ztPrivateKey) or $this->config->global->community == 'na' or empty($this->config->global->community))
{
if(!empty($this->config->global->community) and $this->config->global->community != 'na') die(js::locate($this->createLink('admin', 'bind', 'from=mail')));
die(js::locate($this->createLink('admin', 'register', 'from=mail')));
}
if($this->cookie->ztCloudLicense != 'yes')
{
$this->view->step = 'license';
die($this->display());
}
$result = $this->loadModel('admin')->getSecretKey();
if(empty($result))die(js::alert($this->lang->mail->connectFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
if($result->result == 'fail' and empty($result->data)) die(js::alert($this->lang->mail->centifyFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
+3 -3
View File
@@ -21,12 +21,12 @@ include '../../common/view/header.html.php';
<table class='table table-form' id='selectmta'>
<tr>
<td class='text-center'>
<?php if(common::hasPriv('mail', 'detect')):?>
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
<?php if($this->app->getClientLang() != 'en' and common::hasPriv('mail', 'ztCloud')):?>
<?php echo html::a(inlink('ztCloud'), $lang->mail->ztCloud, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
<?php if(common::hasPriv('mail', 'detect')):?>
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
</td>
</tr>
</table>