+ finish task #669.
This commit is contained in:
@@ -65,7 +65,8 @@ class admin extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->admin->registerByAPI();
|
||||
$response = $this->admin->registerByAPI();
|
||||
if($response == 'success') die(js::locate(inlink('index'), 'parent'));
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
@@ -81,7 +82,8 @@ class admin extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->admin->loginByAPI();
|
||||
$response = $this->admin->loginByAPI();
|
||||
if($response == 'success') die(js::locate(inlink('index'), 'parent'));
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
|
||||
@@ -45,7 +45,7 @@ $lang->admin->register->notice->realname = 'The realname must not be empty';
|
||||
$lang->admin->register->notice->email = 'Please input your correct email address';
|
||||
$lang->admin->register->notice->notEqual = 'The password and confirm password is not equal';
|
||||
$lang->admin->register->notice->registered = 'The username has been registered';
|
||||
$lang->admin->register->notice->success = 'Register success';
|
||||
$lang->admin->register->notice->success = 'Register successfully';
|
||||
$lang->admin->register->notice->failed = 'Register failed';
|
||||
|
||||
$lang->admin->login->caption = 'Login zentao community';
|
||||
@@ -53,5 +53,5 @@ $lang->admin->login->join = 'login';
|
||||
|
||||
$lang->admin->login->notice->account = 'The account must be a series of letters and/or numbers, at least three';
|
||||
$lang->admin->login->notice->password = 'The password must be a series of letters and/or numbers, at least six';
|
||||
$lang->admin->login->notice->success = 'Login success';
|
||||
$lang->admin->login->notice->success = 'Login successfully';
|
||||
$lang->admin->login->notice->failed = 'Login failed';
|
||||
|
||||
@@ -121,7 +121,6 @@ class adminModel extends model
|
||||
->set('value')->eq($this->post->account)
|
||||
->exec(false);
|
||||
echo js::alert($this->lang->admin->register->notice->success);
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
break;
|
||||
case 'failed':
|
||||
echo js::alert($this->lang->admin->register->notice->failed);
|
||||
@@ -147,6 +146,7 @@ class adminModel extends model
|
||||
default:
|
||||
echo js::alert($this->lang->admin->register->notice->failed);
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,7 +170,6 @@ class adminModel extends model
|
||||
->set('value')->eq($this->post->account)
|
||||
->exec(false);
|
||||
echo js::alert($this->lang->admin->login->notice->success);
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
break;
|
||||
case 'userError':
|
||||
echo js::alert($this->lang->admin->login->notice->account);
|
||||
@@ -184,6 +183,7 @@ class adminModel extends model
|
||||
default:
|
||||
echo js::alert($this->lang->admin->login->notice->failed);
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->admin->info->caption;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->admin->info->currentVersion;?></th>
|
||||
<th class='rowhead w-100px'><?php echo $lang->admin->info->currentVersion;?></th>
|
||||
<td><?php echo $config->version;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -21,6 +21,8 @@ class install extends control
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
parent::__construct();
|
||||
$this->loadModel('admin');
|
||||
$this->loadModel('user');
|
||||
$this->config->webRoot = $this->install->getWebRoot();
|
||||
}
|
||||
|
||||
@@ -119,14 +121,16 @@ class install extends control
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->session->set('account', $this->post->account);
|
||||
$this->install->grantPriv();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('setting')->updateVersion($this->config->version);
|
||||
$this->setting->setSN();
|
||||
echo (js::alert($this->lang->install->success));
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
die(js::locate('index.php', 'parent'));
|
||||
//echo (js::alert($this->lang->install->success));
|
||||
//unset($_SESSION['installing']);
|
||||
//session_destroy();
|
||||
//die(js::locate('index.php', 'parent'));
|
||||
die(js::locate(inlink('step5'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->install->getPriv;
|
||||
@@ -141,4 +145,51 @@ class install extends control
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Join zentao community or login pms.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step5()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register zentao.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->app->user->account = $this->session->account;
|
||||
$response = $this->admin->registerByAPI();
|
||||
if($response == 'success') die(js::locate('index.php', 'parent'));
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Login zentao.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function login()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->app->user->account = $this->session->account;
|
||||
$response = $this->admin->loginByAPI();
|
||||
if($response == 'success') die(js::locate('index.php', 'parent'));
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,4 +102,12 @@ $lang->install->account = 'Administrator';
|
||||
$lang->install->password = 'Admin password';
|
||||
$lang->install->errorEmptyPassword = "Can't be empty";
|
||||
|
||||
$lang->install->success = "Success installed, please login into ZenTaoPMS, create groups and grant priviledges.";
|
||||
$lang->install->success = "Success installed";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
You have installed ZentaoPMS %s successfully. <strong class='red'>Please remove install.php in time</strong>。Now, you can:
|
||||
|
||||
<a href=%s>Register</a> or <a href=%s>login</a> into Zetao community, feed back and get support.
|
||||
|
||||
<a href='/'>Login</a> into ZenTaoPMS, create groups and grant priviledges.
|
||||
EOT;
|
||||
|
||||
@@ -102,5 +102,12 @@ $lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->errorEmptyPassword = '密码不能为空';
|
||||
|
||||
$lang->install->success = "安装成功!请删除install.php,登录禅道管理系统,设置用户及分组!";
|
||||
$lang->install->success = "安装成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已经成功安装禅道管理系统%s,<strong class='red'>请及时删除install.php</strong>。现在,您可以:
|
||||
|
||||
<a href=%s>注册</a>或<a href=%s>登录</a>禅道社区,反馈建议并获得技术支持。
|
||||
|
||||
<a href='/'>登录</a>禅道管理系统,设置用户及分组!
|
||||
EOT;
|
||||
|
||||
@@ -102,5 +102,12 @@ $lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->errorEmptyPassword = '密碼不能為空';
|
||||
|
||||
$lang->install->success = "安裝成功!請刪除install.php,登錄禪道管理系統,設置用戶及分組!";
|
||||
$lang->install->success = "安裝成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已經成功安裝禪道管理系統%s,<strong class='red'>請及時刪除install.php</strong>。現在,您可以:
|
||||
|
||||
<a href=%s>註冊</a>或<a href=%s>登錄</a>禪道社區,反饋建議並獲得技術支持。
|
||||
|
||||
<a href='/'>登錄</a>禪道管理系統,設置用戶及分組!
|
||||
EOT;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step4 method of install module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoPMS
|
||||
* @version $Id: step5.html.php 2568 2012-02-18 16:32:05Z zhujinyong@cnezsoft.com$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<form method="post" target="hiddenwin">
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->admin->login->caption;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><?php echo html::input('account', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->password;?></th>
|
||||
<td><?php echo html::password('password', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><td colspan="2" class="a-center"><?php echo html::submitButton() . html::hidden('sn', $sn);?></td></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step4 method of install module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoPMS
|
||||
* @version $Id: step4.html.php 2568 2012-02-09 06:56:35Z shiyangyangwork@yahoo.cn $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<form method="post" target="hiddenwin">
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->admin->register->caption;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><?php echo html::input('account', '', "class='text-3'") . '<font color="red">*</font>' . $lang->admin->register->lblAccount;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->realname;?></th>
|
||||
<td><?php echo html::input('realname', '', "class='text-3'") . '<font color="red">*</font>';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->company;?></th>
|
||||
<td><?php echo html::input('company', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->phone;?></th>
|
||||
<td><?php echo html::input('phone', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->email;?></td>
|
||||
<td><?php echo html::input('email', '', "class='text-3'") . '<font color="red">*</font>';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="rowhead"><?php echo $lang->user->password;?></th>
|
||||
<td><?php echo html::password('password1', '', "class='text-3'") . '<font color="red">*</font>' . $lang->admin->register->lblPasswd;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->password2;?></td>
|
||||
<td><?php echo html::password('password2', '', "class='text-3'") . '<font color="red">*</font>';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><td colspan="2" class="a-center"><?php echo html::submitButton() . html::hidden('sn', $sn);?></td></th>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of install module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
|
||||
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoPMS
|
||||
* @version $Id: step5.html.php 2568 2012-02-18 15:53:35Z zhujinyong@cnezsoft.com$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->success;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo nl2br(sprintf($lang->install->joinZentao, $config->version, inlink('register'), inlink('login')));?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
Reference in New Issue
Block a user