* convert to unix format.
This commit is contained in:
+201
-201
@@ -1,201 +1,201 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of install currentModule 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class install extends control
|
||||
{
|
||||
/**
|
||||
* Construct function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
parent::__construct();
|
||||
$this->loadModel('admin');
|
||||
$this->loadModel('user');
|
||||
$this->config->webRoot = $this->install->getWebRoot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Index page of install module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if(!isset($this->config->installed) or !$this->config->installed) $this->session->set('installing', true);
|
||||
|
||||
$this->view->header->title = $this->lang->install->welcome;
|
||||
|
||||
if($release = $this->install->getLatestRelease()) $this->view->latestRelease = $release;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the system.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->checking;
|
||||
$this->view->phpVersion = $this->install->getPhpVersion();
|
||||
$this->view->phpResult = $this->install->checkPHP();
|
||||
$this->view->pdoResult = $this->install->checkPDO();
|
||||
$this->view->pdoMySQLResult = $this->install->checkPDOMySQL();
|
||||
$this->view->jsonResult = $this->install->checkJSON();
|
||||
$this->view->tmpRootInfo = $this->install->getTmpRoot();
|
||||
$this->view->tmpRootResult = $this->install->checkTmpRoot();
|
||||
$this->view->dataRootInfo = $this->install->getDataRoot();
|
||||
$this->view->dataRootResult = $this->install->checkDataRoot();
|
||||
$this->view->iniInfo = $this->install->getIniInfo();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set configs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->setConfig;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the config file.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step3()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$return = $this->install->checkConfig();
|
||||
if($return->result == 'ok')
|
||||
{
|
||||
$this->view = (object)$_POST;
|
||||
$this->view->app = $this->app;
|
||||
$this->view->lang = $this->lang;
|
||||
$this->view->config = $this->config;
|
||||
$this->view->domain = $this->server->HTTP_HOST;
|
||||
$this->view->header->title = $this->lang->install->saveConfig;
|
||||
$this->display();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->saveConfig;
|
||||
$this->view->error = $return->error;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->locate($this->createLink('install'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create company, admin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step4()
|
||||
{
|
||||
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();
|
||||
die(js::locate(inlink('step5'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->install->getPriv;
|
||||
if(!isset($this->config->installed) or !$this->config->installed)
|
||||
{
|
||||
$this->view->error = $this->lang->install->errorNotSaveConfig;
|
||||
$this->display();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->pmsDomain = $this->server->HTTP_HOST;
|
||||
$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')
|
||||
{
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
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')
|
||||
{
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
die(js::locate('index.php', 'parent'));
|
||||
}
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of install currentModule 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class install extends control
|
||||
{
|
||||
/**
|
||||
* Construct function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
parent::__construct();
|
||||
$this->loadModel('admin');
|
||||
$this->loadModel('user');
|
||||
$this->config->webRoot = $this->install->getWebRoot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Index page of install module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if(!isset($this->config->installed) or !$this->config->installed) $this->session->set('installing', true);
|
||||
|
||||
$this->view->header->title = $this->lang->install->welcome;
|
||||
|
||||
if($release = $this->install->getLatestRelease()) $this->view->latestRelease = $release;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the system.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->checking;
|
||||
$this->view->phpVersion = $this->install->getPhpVersion();
|
||||
$this->view->phpResult = $this->install->checkPHP();
|
||||
$this->view->pdoResult = $this->install->checkPDO();
|
||||
$this->view->pdoMySQLResult = $this->install->checkPDOMySQL();
|
||||
$this->view->jsonResult = $this->install->checkJSON();
|
||||
$this->view->tmpRootInfo = $this->install->getTmpRoot();
|
||||
$this->view->tmpRootResult = $this->install->checkTmpRoot();
|
||||
$this->view->dataRootInfo = $this->install->getDataRoot();
|
||||
$this->view->dataRootResult = $this->install->checkDataRoot();
|
||||
$this->view->iniInfo = $this->install->getIniInfo();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set configs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->setConfig;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the config file.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step3()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$return = $this->install->checkConfig();
|
||||
if($return->result == 'ok')
|
||||
{
|
||||
$this->view = (object)$_POST;
|
||||
$this->view->app = $this->app;
|
||||
$this->view->lang = $this->lang;
|
||||
$this->view->config = $this->config;
|
||||
$this->view->domain = $this->server->HTTP_HOST;
|
||||
$this->view->header->title = $this->lang->install->saveConfig;
|
||||
$this->display();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->saveConfig;
|
||||
$this->view->error = $return->error;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->locate($this->createLink('install'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create company, admin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function step4()
|
||||
{
|
||||
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();
|
||||
die(js::locate(inlink('step5'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->install->getPriv;
|
||||
if(!isset($this->config->installed) or !$this->config->installed)
|
||||
{
|
||||
$this->view->error = $this->lang->install->errorNotSaveConfig;
|
||||
$this->display();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->pmsDomain = $this->server->HTTP_HOST;
|
||||
$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')
|
||||
{
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
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')
|
||||
{
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
die(js::locate('index.php', 'parent'));
|
||||
}
|
||||
}
|
||||
$this->view->sn = $this->admin->getSN();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
+113
-113
@@ -1,113 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The install module English file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = 'Install';
|
||||
$lang->install->next = 'Next';
|
||||
$lang->install->pre = 'Back';
|
||||
$lang->install->reload = 'Reload';
|
||||
$lang->install->error = 'Error ';
|
||||
|
||||
$lang->install->start = 'Start install';
|
||||
$lang->install->keepInstalling = 'Keep install this version';
|
||||
$lang->install->seeLatestRelease = 'See the latest release.';
|
||||
$lang->install->welcome = 'Welcome to use ZenTaoPMS.';
|
||||
$lang->install->desc = <<<EOT
|
||||
ZenTaoPMS is an opensource project management software licensed under LGPL. It has product manage, project mange, testing mange features, also with organization manage and affair manage.
|
||||
|
||||
ZenTaoPMS is developped by PHH and mysql under the zentaophp framework developped by the same team. Through the framework, ZenTaoPMS can be customed and extended very easily.
|
||||
|
||||
ZenTaoPMS is developped by <strong class='red'><a href='http://www.cnezsoft.com' target='_blank'>Nature EasySoft Network Tecnology Co.ltd, QingDao, China</a></strong>。
|
||||
The official website of ZenTaoPMS is <a href='http://en.zentao.net' target='_blank'>http://en.zentao.net</a>
|
||||
twitter:zentaopms
|
||||
|
||||
The version of current release is <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>Notice</strong>:There is a new version <strong class='red'>%s</strong>, released on %s。";
|
||||
$lang->install->choice = 'You can ';
|
||||
$lang->install->checking = 'System checking';
|
||||
$lang->install->ok = 'OK(√)';
|
||||
$lang->install->fail = 'Failed(×)';
|
||||
$lang->install->loaded = 'Loaded';
|
||||
$lang->install->unloaded = 'Not loaded';
|
||||
$lang->install->exists = 'Exists ';
|
||||
$lang->install->notExists = 'Not exists ';
|
||||
$lang->install->writable = 'Writable ';
|
||||
$lang->install->notWritable= 'Not writable ';
|
||||
$lang->install->phpINI = 'PHP ini file';
|
||||
$lang->install->checkItem = 'Items';
|
||||
$lang->install->current = 'Current';
|
||||
$lang->install->result = 'Result';
|
||||
$lang->install->action = 'How to fix';
|
||||
|
||||
$lang->install->phpVersion = 'PHP version';
|
||||
$lang->install->phpFail = 'Must > 5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO extension';
|
||||
$lang->install->pdoFail = 'Edit the php.ini file to load PDO extsion.';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL extension';
|
||||
$lang->install->pdoMySQLFail = 'Edit the php.ini file to load PDO_MySQL extsion.';
|
||||
$lang->install->json = 'JSON extension';
|
||||
$lang->install->jsonFail = 'Edit the php.ini file to load JSON extension';
|
||||
$lang->install->tmpRoot = 'Temp directory';
|
||||
$lang->install->dataRoot = 'Upload directory.';
|
||||
$lang->install->mkdir = '<p>Should creat the directory %s。<br /> Under linux, can try<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = 'Should change the permission of "%s".<br />Under linux, can try<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = 'Set database';
|
||||
$lang->install->webRoot = 'ZenTaoPMS path';
|
||||
$lang->install->requestType = 'URL type';
|
||||
$lang->install->defaultLang = 'Default Language';
|
||||
$lang->install->dbHost = 'Database host';
|
||||
$lang->install->dbHostNote = 'If localhost can not connect, try 127.0.0.1';
|
||||
$lang->install->dbPort = 'Host port';
|
||||
$lang->install->dbUser = 'Database user';
|
||||
$lang->install->dbPassword = 'Database password';
|
||||
$lang->install->dbName = 'Database name';
|
||||
$lang->install->dbPrefix = 'Table prefix';
|
||||
$lang->install->createDB = 'Auto create database';
|
||||
$lang->install->clearDB = 'Clear data if database exists.';
|
||||
|
||||
$lang->install->requestTypes['GET'] = 'GET';
|
||||
$lang->install->requestTypes['PATH_INFO'] = 'PATH_INFO';
|
||||
|
||||
$lang->install->errorConnectDB = 'Database connect failed.';
|
||||
$lang->install->errorCreateDB = 'Database create failed.';
|
||||
$lang->install->errorDBExists = 'Database alread exists, to continue install, check the clear db box.';
|
||||
$lang->install->errorCreateTable = 'Table create failed.';
|
||||
|
||||
$lang->install->setConfig = 'Create config file';
|
||||
$lang->install->key = 'Item';
|
||||
$lang->install->value = 'Value';
|
||||
$lang->install->saveConfig = 'Save config';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">Try to save the config auto, but failed.</span></div>Copy the text of the textareaand save to "<strong> %s </strong>".';
|
||||
$lang->install->saved2File = 'The config file has saved to "<strong>%s</strong> ".';
|
||||
$lang->install->errorNotSaveConfig = "Hasn't save the config file. ";
|
||||
|
||||
$lang->install->getPriv = 'Set admin';
|
||||
$lang->install->company = 'Company name';
|
||||
$lang->install->pms = 'ZenTaoPMS domain';
|
||||
$lang->install->pmsNote = 'The domain name or ip address of ZenTaoPMS, no http://';
|
||||
$lang->install->account = 'Administrator';
|
||||
$lang->install->password = 'Admin password';
|
||||
$lang->install->errorEmptyPassword = "Can't be empty";
|
||||
|
||||
$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;
|
||||
<?php
|
||||
/**
|
||||
* The install module English file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = 'Install';
|
||||
$lang->install->next = 'Next';
|
||||
$lang->install->pre = 'Back';
|
||||
$lang->install->reload = 'Reload';
|
||||
$lang->install->error = 'Error ';
|
||||
|
||||
$lang->install->start = 'Start install';
|
||||
$lang->install->keepInstalling = 'Keep install this version';
|
||||
$lang->install->seeLatestRelease = 'See the latest release.';
|
||||
$lang->install->welcome = 'Welcome to use ZenTaoPMS.';
|
||||
$lang->install->desc = <<<EOT
|
||||
ZenTaoPMS is an opensource project management software licensed under LGPL. It has product manage, project mange, testing mange features, also with organization manage and affair manage.
|
||||
|
||||
ZenTaoPMS is developped by PHH and mysql under the zentaophp framework developped by the same team. Through the framework, ZenTaoPMS can be customed and extended very easily.
|
||||
|
||||
ZenTaoPMS is developped by <strong class='red'><a href='http://www.cnezsoft.com' target='_blank'>Nature EasySoft Network Tecnology Co.ltd, QingDao, China</a></strong>。
|
||||
The official website of ZenTaoPMS is <a href='http://en.zentao.net' target='_blank'>http://en.zentao.net</a>
|
||||
twitter:zentaopms
|
||||
|
||||
The version of current release is <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>Notice</strong>:There is a new version <strong class='red'>%s</strong>, released on %s。";
|
||||
$lang->install->choice = 'You can ';
|
||||
$lang->install->checking = 'System checking';
|
||||
$lang->install->ok = 'OK(√)';
|
||||
$lang->install->fail = 'Failed(×)';
|
||||
$lang->install->loaded = 'Loaded';
|
||||
$lang->install->unloaded = 'Not loaded';
|
||||
$lang->install->exists = 'Exists ';
|
||||
$lang->install->notExists = 'Not exists ';
|
||||
$lang->install->writable = 'Writable ';
|
||||
$lang->install->notWritable= 'Not writable ';
|
||||
$lang->install->phpINI = 'PHP ini file';
|
||||
$lang->install->checkItem = 'Items';
|
||||
$lang->install->current = 'Current';
|
||||
$lang->install->result = 'Result';
|
||||
$lang->install->action = 'How to fix';
|
||||
|
||||
$lang->install->phpVersion = 'PHP version';
|
||||
$lang->install->phpFail = 'Must > 5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO extension';
|
||||
$lang->install->pdoFail = 'Edit the php.ini file to load PDO extsion.';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL extension';
|
||||
$lang->install->pdoMySQLFail = 'Edit the php.ini file to load PDO_MySQL extsion.';
|
||||
$lang->install->json = 'JSON extension';
|
||||
$lang->install->jsonFail = 'Edit the php.ini file to load JSON extension';
|
||||
$lang->install->tmpRoot = 'Temp directory';
|
||||
$lang->install->dataRoot = 'Upload directory.';
|
||||
$lang->install->mkdir = '<p>Should creat the directory %s。<br /> Under linux, can try<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = 'Should change the permission of "%s".<br />Under linux, can try<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = 'Set database';
|
||||
$lang->install->webRoot = 'ZenTaoPMS path';
|
||||
$lang->install->requestType = 'URL type';
|
||||
$lang->install->defaultLang = 'Default Language';
|
||||
$lang->install->dbHost = 'Database host';
|
||||
$lang->install->dbHostNote = 'If localhost can not connect, try 127.0.0.1';
|
||||
$lang->install->dbPort = 'Host port';
|
||||
$lang->install->dbUser = 'Database user';
|
||||
$lang->install->dbPassword = 'Database password';
|
||||
$lang->install->dbName = 'Database name';
|
||||
$lang->install->dbPrefix = 'Table prefix';
|
||||
$lang->install->createDB = 'Auto create database';
|
||||
$lang->install->clearDB = 'Clear data if database exists.';
|
||||
|
||||
$lang->install->requestTypes['GET'] = 'GET';
|
||||
$lang->install->requestTypes['PATH_INFO'] = 'PATH_INFO';
|
||||
|
||||
$lang->install->errorConnectDB = 'Database connect failed.';
|
||||
$lang->install->errorCreateDB = 'Database create failed.';
|
||||
$lang->install->errorDBExists = 'Database alread exists, to continue install, check the clear db box.';
|
||||
$lang->install->errorCreateTable = 'Table create failed.';
|
||||
|
||||
$lang->install->setConfig = 'Create config file';
|
||||
$lang->install->key = 'Item';
|
||||
$lang->install->value = 'Value';
|
||||
$lang->install->saveConfig = 'Save config';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">Try to save the config auto, but failed.</span></div>Copy the text of the textareaand save to "<strong> %s </strong>".';
|
||||
$lang->install->saved2File = 'The config file has saved to "<strong>%s</strong> ".';
|
||||
$lang->install->errorNotSaveConfig = "Hasn't save the config file. ";
|
||||
|
||||
$lang->install->getPriv = 'Set admin';
|
||||
$lang->install->company = 'Company name';
|
||||
$lang->install->pms = 'ZenTaoPMS domain';
|
||||
$lang->install->pmsNote = 'The domain name or ip address of ZenTaoPMS, no http://';
|
||||
$lang->install->account = 'Administrator';
|
||||
$lang->install->password = 'Admin password';
|
||||
$lang->install->errorEmptyPassword = "Can't be empty";
|
||||
|
||||
$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;
|
||||
|
||||
+113
-113
@@ -1,113 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-cn file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = '安装';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '错误 ';
|
||||
|
||||
$lang->install->start = '开始安装';
|
||||
$lang->install->keepInstalling = '继续安装当前版本';
|
||||
$lang->install->seeLatestRelease = '看看最新的版本';
|
||||
$lang->install->welcome = '欢迎使用禅道项目管理软件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
|
||||
禅道项目管理软件由<strong><a href='http://www.cnezsoft.com' target='_blank' class='red'>青岛易软天创网络科技有限公司</a>开发</strong>。
|
||||
官方网站:<a href='http://www.zentao.net' target='_blank'>http://www.zentao.net</a>
|
||||
技术支持: <a href='http://www.zentao.net/ask/' target='_blank'>http://www.zentao.net/ask/</a>
|
||||
新浪微博:<a href='http://t.sina.com.cn/zentaopms' target='_blank'>t.sina.com.cn/zentaopms</a>
|
||||
腾讯微博:<a href='http://t.qq.com/zentaopms/' target='_blank'>t.qq.com/zentaopms</a>
|
||||
|
||||
您现在正在安装的版本是 <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>提示</strong>:官网网站已有最新版本<strong class='red'>%s</strong>, 发布日期于 %s。";
|
||||
$lang->install->choice = '您可以选择:';
|
||||
$lang->install->checking = '系统检查';
|
||||
$lang->install->ok = '检查通过(√)';
|
||||
$lang->install->fail = '检查失败(×)';
|
||||
$lang->install->loaded = '已加载';
|
||||
$lang->install->unloaded = '未加载';
|
||||
$lang->install->exists = '目录存在 ';
|
||||
$lang->install->notExists = '目录不存在 ';
|
||||
$lang->install->writable = '目录可写 ';
|
||||
$lang->install->notWritable= '目录不可写 ';
|
||||
$lang->install->phpINI = 'PHP配置文件';
|
||||
$lang->install->checkItem = '检查项';
|
||||
$lang->install->current = '当前配置';
|
||||
$lang->install->result = '检查结果';
|
||||
$lang->install->action = '如何修改';
|
||||
|
||||
$lang->install->phpVersion = 'PHP版本';
|
||||
$lang->install->phpFail = 'PHP版本必须大于5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO扩展';
|
||||
$lang->install->pdoFail = '修改PHP配置文件,加载PDO扩展。';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL扩展';
|
||||
$lang->install->pdoMySQLFail = '修改PHP配置文件,加载pdo_mysql扩展。';
|
||||
$lang->install->json = 'JSON扩展';
|
||||
$lang->install->jsonFail = '修改PHP配置文件,加载JSON扩展。';
|
||||
$lang->install->tmpRoot = '临时文件目录';
|
||||
$lang->install->dataRoot = '上传文件目录';
|
||||
$lang->install->mkdir = '<p>需要创建目录%s。<br /> linux下面命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = '需要修改目录 "%s" 的权限。<br />linux下面命令为:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = '设置数据库';
|
||||
$lang->install->webRoot = 'PMS所在网站目录';
|
||||
$lang->install->requestType = 'URL方式';
|
||||
$lang->install->defaultLang = '默认语言';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
$lang->install->dbHostNote = '如果localhost无法访问,尝试使用127.0.0.1';
|
||||
$lang->install->dbPort = '服务器端口';
|
||||
$lang->install->dbUser = '数据库用户名';
|
||||
$lang->install->dbPassword = '数据库密码';
|
||||
$lang->install->dbName = 'PMS使用的库';
|
||||
$lang->install->dbPrefix = '建表使用的前缀';
|
||||
$lang->install->createDB = '自动创建数据库';
|
||||
$lang->install->clearDB = '清空现有数据';
|
||||
|
||||
$lang->install->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
|
||||
$lang->install->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$lang->install->errorDBExists = '数据库已经存在,继续安装请选择清空数据';
|
||||
$lang->install->errorCreateTable = '创建表失败';
|
||||
|
||||
$lang->install->setConfig = '生成配置文件';
|
||||
$lang->install->key = '配置项';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置文件';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">尝试写入配置文件,失败!</span></div>拷贝上面文本框中的内容,将其保存到 "<strong> %s </strong>"中。您以后还可继续修改此配置文件。';
|
||||
$lang->install->saved2File = '配置信息已经成功保存到" <strong>%s</strong> "中。您后面还可继续修改此文件。';
|
||||
$lang->install->errorNotSaveConfig = '还没有保存配置文件';
|
||||
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->pms = 'PMS地址';
|
||||
$lang->install->pmsNote = '即通过什么地址可以访问到禅道项目管理,设置域名或者IP地址即可,不需要http';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->errorEmptyPassword = '密码不能为空';
|
||||
|
||||
$lang->install->success = "安装成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已经成功安装禅道管理系统%s,<strong class='red'>请及时删除install.php</strong>。现在,您可以:
|
||||
|
||||
<a href=%s>注册</a>禅道社区,反馈建议并获得技术支持,系统赠送200积分。如果您已经拥有社区账号,只需<a href=%s>关联</a>账号,系统将赠送150积分。
|
||||
|
||||
直接<a href='/'>登录</a>禅道管理系统,设置用户及分组!
|
||||
EOT;
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-cn file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = '安装';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '错误 ';
|
||||
|
||||
$lang->install->start = '开始安装';
|
||||
$lang->install->keepInstalling = '继续安装当前版本';
|
||||
$lang->install->seeLatestRelease = '看看最新的版本';
|
||||
$lang->install->welcome = '欢迎使用禅道项目管理软件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
|
||||
禅道项目管理软件由<strong><a href='http://www.cnezsoft.com' target='_blank' class='red'>青岛易软天创网络科技有限公司</a>开发</strong>。
|
||||
官方网站:<a href='http://www.zentao.net' target='_blank'>http://www.zentao.net</a>
|
||||
技术支持: <a href='http://www.zentao.net/ask/' target='_blank'>http://www.zentao.net/ask/</a>
|
||||
新浪微博:<a href='http://t.sina.com.cn/zentaopms' target='_blank'>t.sina.com.cn/zentaopms</a>
|
||||
腾讯微博:<a href='http://t.qq.com/zentaopms/' target='_blank'>t.qq.com/zentaopms</a>
|
||||
|
||||
您现在正在安装的版本是 <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>提示</strong>:官网网站已有最新版本<strong class='red'>%s</strong>, 发布日期于 %s。";
|
||||
$lang->install->choice = '您可以选择:';
|
||||
$lang->install->checking = '系统检查';
|
||||
$lang->install->ok = '检查通过(√)';
|
||||
$lang->install->fail = '检查失败(×)';
|
||||
$lang->install->loaded = '已加载';
|
||||
$lang->install->unloaded = '未加载';
|
||||
$lang->install->exists = '目录存在 ';
|
||||
$lang->install->notExists = '目录不存在 ';
|
||||
$lang->install->writable = '目录可写 ';
|
||||
$lang->install->notWritable= '目录不可写 ';
|
||||
$lang->install->phpINI = 'PHP配置文件';
|
||||
$lang->install->checkItem = '检查项';
|
||||
$lang->install->current = '当前配置';
|
||||
$lang->install->result = '检查结果';
|
||||
$lang->install->action = '如何修改';
|
||||
|
||||
$lang->install->phpVersion = 'PHP版本';
|
||||
$lang->install->phpFail = 'PHP版本必须大于5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO扩展';
|
||||
$lang->install->pdoFail = '修改PHP配置文件,加载PDO扩展。';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL扩展';
|
||||
$lang->install->pdoMySQLFail = '修改PHP配置文件,加载pdo_mysql扩展。';
|
||||
$lang->install->json = 'JSON扩展';
|
||||
$lang->install->jsonFail = '修改PHP配置文件,加载JSON扩展。';
|
||||
$lang->install->tmpRoot = '临时文件目录';
|
||||
$lang->install->dataRoot = '上传文件目录';
|
||||
$lang->install->mkdir = '<p>需要创建目录%s。<br /> linux下面命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = '需要修改目录 "%s" 的权限。<br />linux下面命令为:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = '设置数据库';
|
||||
$lang->install->webRoot = 'PMS所在网站目录';
|
||||
$lang->install->requestType = 'URL方式';
|
||||
$lang->install->defaultLang = '默认语言';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
$lang->install->dbHostNote = '如果localhost无法访问,尝试使用127.0.0.1';
|
||||
$lang->install->dbPort = '服务器端口';
|
||||
$lang->install->dbUser = '数据库用户名';
|
||||
$lang->install->dbPassword = '数据库密码';
|
||||
$lang->install->dbName = 'PMS使用的库';
|
||||
$lang->install->dbPrefix = '建表使用的前缀';
|
||||
$lang->install->createDB = '自动创建数据库';
|
||||
$lang->install->clearDB = '清空现有数据';
|
||||
|
||||
$lang->install->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
|
||||
$lang->install->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$lang->install->errorDBExists = '数据库已经存在,继续安装请选择清空数据';
|
||||
$lang->install->errorCreateTable = '创建表失败';
|
||||
|
||||
$lang->install->setConfig = '生成配置文件';
|
||||
$lang->install->key = '配置项';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置文件';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">尝试写入配置文件,失败!</span></div>拷贝上面文本框中的内容,将其保存到 "<strong> %s </strong>"中。您以后还可继续修改此配置文件。';
|
||||
$lang->install->saved2File = '配置信息已经成功保存到" <strong>%s</strong> "中。您后面还可继续修改此文件。';
|
||||
$lang->install->errorNotSaveConfig = '还没有保存配置文件';
|
||||
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->pms = 'PMS地址';
|
||||
$lang->install->pmsNote = '即通过什么地址可以访问到禅道项目管理,设置域名或者IP地址即可,不需要http';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->errorEmptyPassword = '密码不能为空';
|
||||
|
||||
$lang->install->success = "安装成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已经成功安装禅道管理系统%s,<strong class='red'>请及时删除install.php</strong>。现在,您可以:
|
||||
|
||||
<a href=%s>注册</a>禅道社区,反馈建议并获得技术支持,系统赠送200积分。如果您已经拥有社区账号,只需<a href=%s>关联</a>账号,系统将赠送150积分。
|
||||
|
||||
直接<a href='/'>登录</a>禅道管理系统,设置用户及分组!
|
||||
EOT;
|
||||
|
||||
+113
-113
@@ -1,113 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-tw file 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 install
|
||||
* @version $Id: zh-tw.php 2594 2012-02-20 09:06:53Z zhujinyonging@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = '安裝';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '錯誤 ';
|
||||
|
||||
$lang->install->start = '開始安裝';
|
||||
$lang->install->keepInstalling = '繼續安裝當前版本';
|
||||
$lang->install->seeLatestRelease = '看看最新的版本';
|
||||
$lang->install->welcome = '歡迎使用禪道項目管理軟件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禪道項目管理軟件(ZenTaoPMS)是一款國產的,基于LGPL協議,開源免費的項目管理軟件,它集產品管理、項目管理、測試管理於一體,同時還包含了事務管理、組織管理等諸多功能,是中小型企業項目管理的首選。
|
||||
|
||||
禪道項目管理軟件使用PHP + MySQL開發,基于自主的PHP開發框架──ZenTaoPHP而成。第三方開發者或者企業可以非常方便的開發插件或者進行定製。
|
||||
|
||||
禪道項目管理軟件由<strong><a href='http://www.cnezsoft.com' target='_blank' class='red'>青島易軟天創網絡科技有限公司</a>開發</strong>。
|
||||
官方網站:<a href='http://www.zentao.net' target='_blank'>http://www.zentao.net</a>
|
||||
技術支持: <a href='http://www.zentao.net/ask/' target='_blank'>http://www.zentao.net/ask/</a>
|
||||
新浪微博:<a href='http://t.sina.com.cn/zentaopms' target='_blank'>t.sina.com.cn/zentaopms</a>
|
||||
騰訊微博:<a href='http://t.qq.com/zentaopms/' target='_blank'>t.qq.com/zentaopms</a>
|
||||
|
||||
您現在正在安裝的版本是 <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>提示</strong>:官網網站已有最新版本<strong class='red'>%s</strong>, 發佈日期于 %s。";
|
||||
$lang->install->choice = '您可以選擇:';
|
||||
$lang->install->checking = '系統檢查';
|
||||
$lang->install->ok = '檢查通過(√)';
|
||||
$lang->install->fail = '檢查失敗(×)';
|
||||
$lang->install->loaded = '已加載';
|
||||
$lang->install->unloaded = '未加載';
|
||||
$lang->install->exists = '目錄存在 ';
|
||||
$lang->install->notExists = '目錄不存在 ';
|
||||
$lang->install->writable = '目錄可寫 ';
|
||||
$lang->install->notWritable= '目錄不可寫 ';
|
||||
$lang->install->phpINI = 'PHP配置檔案';
|
||||
$lang->install->checkItem = '檢查項';
|
||||
$lang->install->current = '當前配置';
|
||||
$lang->install->result = '檢查結果';
|
||||
$lang->install->action = '如何修改';
|
||||
|
||||
$lang->install->phpVersion = 'PHP版本';
|
||||
$lang->install->phpFail = 'PHP版本必須大於5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO擴展';
|
||||
$lang->install->pdoFail = '修改PHP配置檔案,加載PDO擴展。';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL擴展';
|
||||
$lang->install->pdoMySQLFail = '修改PHP配置檔案,加載pdo_mysql擴展。';
|
||||
$lang->install->json = 'JSON擴展';
|
||||
$lang->install->jsonFail = '修改PHP配置檔案,加載JSON擴展。';
|
||||
$lang->install->tmpRoot = '臨時檔案目錄';
|
||||
$lang->install->dataRoot = '上傳檔案目錄';
|
||||
$lang->install->mkdir = '<p>需要創建目錄%s。<br /> linux下面命令為:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = '需要修改目錄 "%s" 的權限。<br />linux下面命令為:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = '設置資料庫';
|
||||
$lang->install->webRoot = 'PMS所在網站目錄';
|
||||
$lang->install->requestType = 'URL方式';
|
||||
$lang->install->defaultLang = '預設語言';
|
||||
$lang->install->dbHost = '資料庫伺服器';
|
||||
$lang->install->dbHostNote = '如果localhost無法訪問,嘗試使用127.0.0.1';
|
||||
$lang->install->dbPort = '伺服器連接埠';
|
||||
$lang->install->dbUser = '資料庫用戶名';
|
||||
$lang->install->dbPassword = '資料庫密碼';
|
||||
$lang->install->dbName = 'PMS使用的庫';
|
||||
$lang->install->dbPrefix = '建表使用的首碼';
|
||||
$lang->install->createDB = '自動創建資料庫';
|
||||
$lang->install->clearDB = '清空現有數據';
|
||||
|
||||
$lang->install->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '靜態友好方式';
|
||||
|
||||
$lang->install->errorConnectDB = '資料庫連接失敗 ';
|
||||
$lang->install->errorCreateDB = '資料庫創建失敗';
|
||||
$lang->install->errorDBExists = '資料庫已經存在,繼續安裝請選擇清空數據';
|
||||
$lang->install->errorCreateTable = '創建表失敗';
|
||||
|
||||
$lang->install->setConfig = '生成配置檔案';
|
||||
$lang->install->key = '配置項';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置檔案';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">嘗試寫入配置檔案,失敗!</span></div>拷貝上面文本框中的內容,將其保存到 "<strong> %s </strong>"中。您以後還可繼續修改此配置檔案。';
|
||||
$lang->install->saved2File = '配置信息已經成功保存到" <strong>%s</strong> "中。您後面還可繼續修改此檔案。';
|
||||
$lang->install->errorNotSaveConfig = '還沒有保存配置檔案';
|
||||
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->pms = 'PMS地址';
|
||||
$lang->install->pmsNote = '即通過什麼地址可以訪問到禪道項目管理,設置域名或者IP地址即可,不需要http';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->errorEmptyPassword = '密碼不能為空';
|
||||
|
||||
$lang->install->success = "安裝成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已經成功安裝禪道管理系統%s,<strong class='red'>請及時刪除install.php</strong>。現在,您可以:
|
||||
|
||||
<a href=%s>註冊</a>禪道社區,反饋建議並獲得技術支持,系統贈送200積分。如果您已經擁有社區賬號,只需<a href=%s>關聯</a>賬號,系統將贈送150積分。
|
||||
|
||||
直接<a href='/'>登錄</a>禪道管理系統,設置用戶及分組!
|
||||
EOT;
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-tw file 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 install
|
||||
* @version $Id: zh-tw.php 2594 2012-02-20 09:06:53Z zhujinyonging@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->install->common = '安裝';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '錯誤 ';
|
||||
|
||||
$lang->install->start = '開始安裝';
|
||||
$lang->install->keepInstalling = '繼續安裝當前版本';
|
||||
$lang->install->seeLatestRelease = '看看最新的版本';
|
||||
$lang->install->welcome = '歡迎使用禪道項目管理軟件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禪道項目管理軟件(ZenTaoPMS)是一款國產的,基于LGPL協議,開源免費的項目管理軟件,它集產品管理、項目管理、測試管理於一體,同時還包含了事務管理、組織管理等諸多功能,是中小型企業項目管理的首選。
|
||||
|
||||
禪道項目管理軟件使用PHP + MySQL開發,基于自主的PHP開發框架──ZenTaoPHP而成。第三方開發者或者企業可以非常方便的開發插件或者進行定製。
|
||||
|
||||
禪道項目管理軟件由<strong><a href='http://www.cnezsoft.com' target='_blank' class='red'>青島易軟天創網絡科技有限公司</a>開發</strong>。
|
||||
官方網站:<a href='http://www.zentao.net' target='_blank'>http://www.zentao.net</a>
|
||||
技術支持: <a href='http://www.zentao.net/ask/' target='_blank'>http://www.zentao.net/ask/</a>
|
||||
新浪微博:<a href='http://t.sina.com.cn/zentaopms' target='_blank'>t.sina.com.cn/zentaopms</a>
|
||||
騰訊微博:<a href='http://t.qq.com/zentaopms/' target='_blank'>t.qq.com/zentaopms</a>
|
||||
|
||||
您現在正在安裝的版本是 <strong class='red'>%s</strong>。
|
||||
EOT;
|
||||
|
||||
$lang->install->newReleased= "<strong class='red'>提示</strong>:官網網站已有最新版本<strong class='red'>%s</strong>, 發佈日期于 %s。";
|
||||
$lang->install->choice = '您可以選擇:';
|
||||
$lang->install->checking = '系統檢查';
|
||||
$lang->install->ok = '檢查通過(√)';
|
||||
$lang->install->fail = '檢查失敗(×)';
|
||||
$lang->install->loaded = '已加載';
|
||||
$lang->install->unloaded = '未加載';
|
||||
$lang->install->exists = '目錄存在 ';
|
||||
$lang->install->notExists = '目錄不存在 ';
|
||||
$lang->install->writable = '目錄可寫 ';
|
||||
$lang->install->notWritable= '目錄不可寫 ';
|
||||
$lang->install->phpINI = 'PHP配置檔案';
|
||||
$lang->install->checkItem = '檢查項';
|
||||
$lang->install->current = '當前配置';
|
||||
$lang->install->result = '檢查結果';
|
||||
$lang->install->action = '如何修改';
|
||||
|
||||
$lang->install->phpVersion = 'PHP版本';
|
||||
$lang->install->phpFail = 'PHP版本必須大於5.2.0';
|
||||
|
||||
$lang->install->pdo = 'PDO擴展';
|
||||
$lang->install->pdoFail = '修改PHP配置檔案,加載PDO擴展。';
|
||||
$lang->install->pdoMySQL = 'PDO_MySQL擴展';
|
||||
$lang->install->pdoMySQLFail = '修改PHP配置檔案,加載pdo_mysql擴展。';
|
||||
$lang->install->json = 'JSON擴展';
|
||||
$lang->install->jsonFail = '修改PHP配置檔案,加載JSON擴展。';
|
||||
$lang->install->tmpRoot = '臨時檔案目錄';
|
||||
$lang->install->dataRoot = '上傳檔案目錄';
|
||||
$lang->install->mkdir = '<p>需要創建目錄%s。<br /> linux下面命令為:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmod = '需要修改目錄 "%s" 的權限。<br />linux下面命令為:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->settingDB = '設置資料庫';
|
||||
$lang->install->webRoot = 'PMS所在網站目錄';
|
||||
$lang->install->requestType = 'URL方式';
|
||||
$lang->install->defaultLang = '預設語言';
|
||||
$lang->install->dbHost = '資料庫伺服器';
|
||||
$lang->install->dbHostNote = '如果localhost無法訪問,嘗試使用127.0.0.1';
|
||||
$lang->install->dbPort = '伺服器連接埠';
|
||||
$lang->install->dbUser = '資料庫用戶名';
|
||||
$lang->install->dbPassword = '資料庫密碼';
|
||||
$lang->install->dbName = 'PMS使用的庫';
|
||||
$lang->install->dbPrefix = '建表使用的首碼';
|
||||
$lang->install->createDB = '自動創建資料庫';
|
||||
$lang->install->clearDB = '清空現有數據';
|
||||
|
||||
$lang->install->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '靜態友好方式';
|
||||
|
||||
$lang->install->errorConnectDB = '資料庫連接失敗 ';
|
||||
$lang->install->errorCreateDB = '資料庫創建失敗';
|
||||
$lang->install->errorDBExists = '資料庫已經存在,繼續安裝請選擇清空數據';
|
||||
$lang->install->errorCreateTable = '創建表失敗';
|
||||
|
||||
$lang->install->setConfig = '生成配置檔案';
|
||||
$lang->install->key = '配置項';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置檔案';
|
||||
$lang->install->save2File = '<div class="a-center"><span class="fail">嘗試寫入配置檔案,失敗!</span></div>拷貝上面文本框中的內容,將其保存到 "<strong> %s </strong>"中。您以後還可繼續修改此配置檔案。';
|
||||
$lang->install->saved2File = '配置信息已經成功保存到" <strong>%s</strong> "中。您後面還可繼續修改此檔案。';
|
||||
$lang->install->errorNotSaveConfig = '還沒有保存配置檔案';
|
||||
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->pms = 'PMS地址';
|
||||
$lang->install->pmsNote = '即通過什麼地址可以訪問到禪道項目管理,設置域名或者IP地址即可,不需要http';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->errorEmptyPassword = '密碼不能為空';
|
||||
|
||||
$lang->install->success = "安裝成功";
|
||||
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
您已經成功安裝禪道管理系統%s,<strong class='red'>請及時刪除install.php</strong>。現在,您可以:
|
||||
|
||||
<a href=%s>註冊</a>禪道社區,反饋建議並獲得技術支持,系統贈送200積分。如果您已經擁有社區賬號,只需<a href=%s>關聯</a>賬號,系統將贈送150積分。
|
||||
|
||||
直接<a href='/'>登錄</a>禪道管理系統,設置用戶及分組!
|
||||
EOT;
|
||||
|
||||
+373
-373
@@ -1,373 +1,373 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class installModel extends model
|
||||
{
|
||||
/**
|
||||
* Check version of zentao.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkZenTaoVersion()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* get php version.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getPhpVersion()
|
||||
{
|
||||
return PHP_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get latest release.
|
||||
*
|
||||
* @access public
|
||||
* @return string or bool
|
||||
*/
|
||||
public function getLatestRelease()
|
||||
{
|
||||
if(!function_exists('json_decode')) return false;
|
||||
$snoopy = $this->app->loadClass('snoopy');
|
||||
if(@$snoopy->fetchText('http://www.zentao.net/misc-getlatestrelease.json'))
|
||||
{
|
||||
$result = json_decode($snoopy->results);
|
||||
if(isset($result->release) and $this->config->version != $result->release->version)
|
||||
{
|
||||
return $result->release;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check php version.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPHP()
|
||||
{
|
||||
return $result = version_compare(PHP_VERSION, '5.2.0') >= 0 ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check PDO.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPDO()
|
||||
{
|
||||
return $result = extension_loaded('pdo') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check PDO::MySQL
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPDOMySQL()
|
||||
{
|
||||
return $result = extension_loaded('pdo_mysql') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check json extension.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkJSON()
|
||||
{
|
||||
return $result = extension_loaded('json') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tempRoot info.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTmpRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getTmpRoot();
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check tmpRoot.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkTmpRoot()
|
||||
{
|
||||
$tmpRoot = $this->app->getTmpRoot();
|
||||
return $result = (is_dir($tmpRoot) and is_writable($tmpRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data root
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the data root.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkDataRoot()
|
||||
{
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
return $result = (is_dir($dataRoot) and is_writable($dataRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the php.ini info.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getIniInfo()
|
||||
{
|
||||
$iniInfo = '';
|
||||
ob_start();
|
||||
phpinfo(1);
|
||||
$lines = explode("\n", strip_tags(ob_get_contents()));
|
||||
ob_end_clean();
|
||||
foreach($lines as $line) if(strpos($line, 'ini') !== false) $iniInfo .= $line . "\n";
|
||||
return $iniInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get web root.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getWebRoot()
|
||||
{
|
||||
return rtrim(str_replace('\\', '/', pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME)), '/') . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check config ok or not.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$return->result = 'ok';
|
||||
|
||||
/* Connect to database. */
|
||||
$this->setDBParam();
|
||||
$this->dbh = $this->connectDB();
|
||||
if(!is_object($this->dbh))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorConnectDB . $this->dbh;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* Get mysql version. */
|
||||
$version = $this->getMysqlVersion();
|
||||
|
||||
/* If database no exits, try create it. */
|
||||
if(!$this->dbExists())
|
||||
{
|
||||
if(!$this->createDB($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateDB;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
elseif($this->post->clearDB == false)
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorDBExists;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* Create tables. */
|
||||
if(!$this->createTable($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateTable;
|
||||
return $return;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set database params.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setDBParam()
|
||||
{
|
||||
$this->config->db->host = $this->post->dbHost;
|
||||
$this->config->db->name = $this->post->dbName;
|
||||
$this->config->db->user = $this->post->dbUser;
|
||||
$this->config->db->password = $this->post->dbPassword;
|
||||
$this->config->db->port = $this->post->dbPort;
|
||||
$this->config->db->prefix = $this->post->dbPrefix;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to database.
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function connectDB()
|
||||
{
|
||||
$dsn = "mysql:host={$this->config->db->host}; port={$this->config->db->port}";
|
||||
try
|
||||
{
|
||||
$dbh = new PDO($dsn, $this->config->db->user, $this->config->db->password);
|
||||
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbh->exec("SET NAMES {$this->config->db->encoding}");
|
||||
return $dbh;
|
||||
}
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
return $exception->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check db exits or not.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->config->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mysql version.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getMysqlVersion()
|
||||
{
|
||||
$sql = "SELECT VERSION() AS version";
|
||||
$result = $this->dbh->query($sql)->fetch();
|
||||
return substr($result->version, 0, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create database.
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createDB($version)
|
||||
{
|
||||
$sql = "CREATE DATABASE `{$this->config->db->name}`";
|
||||
if($version > 4.1) $sql .= " DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
|
||||
return $this->dbh->query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create tables.
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createTable($version)
|
||||
{
|
||||
$dbFile = $this->app->getAppRoot() . 'db' . $this->app->getPathFix() . 'zentao.sql';
|
||||
$tables = explode(';', file_get_contents($dbFile));
|
||||
foreach($tables as $table)
|
||||
{
|
||||
$table = trim($table);
|
||||
if(empty($table)) continue;
|
||||
|
||||
if(strpos($table, 'CREATE') !== false and $version <= 4.1)
|
||||
{
|
||||
$table = str_replace('DEFAULT CHARSET=utf8', '', $table);
|
||||
}
|
||||
elseif(strpos($table, 'DROP') !== false and $this->post->clearDB != false)
|
||||
{
|
||||
$table = str_replace('--', '', $table);
|
||||
}
|
||||
$table = str_replace('`zt_', $this->config->db->name . '.`zt_', $table);
|
||||
$table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
if(!$this->dbh->query($table)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a comapny, set admin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function grantPriv()
|
||||
{
|
||||
if($this->post->password == '') die(js::error($this->lang->install->errorEmptyPassword));
|
||||
|
||||
/* Insert a company. */
|
||||
$company->name = $this->post->company;
|
||||
$company->pms = $this->post->pms;
|
||||
$company->admins = ",{$this->post->account},";
|
||||
$this->dao->insert(TABLE_COMPANY)->data($company)->autoCheck()->batchCheck('name, pms', 'notempty')->check('pms', 'unique')->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
/* Set admin. */
|
||||
$companyID = $this->dbh->lastInsertID();
|
||||
$admin->account = $this->post->account;
|
||||
$admin->realname = $this->post->account;
|
||||
$admin->password = md5($this->post->password);
|
||||
$admin->company = $companyID;
|
||||
$this->dao->insert(TABLE_USER)->data($admin)->autoCheck()->check('account', 'notempty')->exec();
|
||||
|
||||
/* Update the group and groupPriv table. */
|
||||
$this->dao->update(TABLE_GROUP)->set('company')->eq($companyID)->exec($autoCompany = false);
|
||||
$this->dao->update(TABLE_GROUPPRIV)->set('company')->eq($companyID)->exec($autoCompany = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file 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 install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class installModel extends model
|
||||
{
|
||||
/**
|
||||
* Check version of zentao.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkZenTaoVersion()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* get php version.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getPhpVersion()
|
||||
{
|
||||
return PHP_VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get latest release.
|
||||
*
|
||||
* @access public
|
||||
* @return string or bool
|
||||
*/
|
||||
public function getLatestRelease()
|
||||
{
|
||||
if(!function_exists('json_decode')) return false;
|
||||
$snoopy = $this->app->loadClass('snoopy');
|
||||
if(@$snoopy->fetchText('http://www.zentao.net/misc-getlatestrelease.json'))
|
||||
{
|
||||
$result = json_decode($snoopy->results);
|
||||
if(isset($result->release) and $this->config->version != $result->release->version)
|
||||
{
|
||||
return $result->release;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check php version.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPHP()
|
||||
{
|
||||
return $result = version_compare(PHP_VERSION, '5.2.0') >= 0 ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check PDO.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPDO()
|
||||
{
|
||||
return $result = extension_loaded('pdo') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check PDO::MySQL
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkPDOMySQL()
|
||||
{
|
||||
return $result = extension_loaded('pdo_mysql') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check json extension.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkJSON()
|
||||
{
|
||||
return $result = extension_loaded('json') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tempRoot info.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTmpRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getTmpRoot();
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check tmpRoot.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkTmpRoot()
|
||||
{
|
||||
$tmpRoot = $this->app->getTmpRoot();
|
||||
return $result = (is_dir($tmpRoot) and is_writable($tmpRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data root
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the data root.
|
||||
*
|
||||
* @access public
|
||||
* @return string ok|fail
|
||||
*/
|
||||
public function checkDataRoot()
|
||||
{
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
return $result = (is_dir($dataRoot) and is_writable($dataRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the php.ini info.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getIniInfo()
|
||||
{
|
||||
$iniInfo = '';
|
||||
ob_start();
|
||||
phpinfo(1);
|
||||
$lines = explode("\n", strip_tags(ob_get_contents()));
|
||||
ob_end_clean();
|
||||
foreach($lines as $line) if(strpos($line, 'ini') !== false) $iniInfo .= $line . "\n";
|
||||
return $iniInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get web root.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getWebRoot()
|
||||
{
|
||||
return rtrim(str_replace('\\', '/', pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME)), '/') . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check config ok or not.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$return->result = 'ok';
|
||||
|
||||
/* Connect to database. */
|
||||
$this->setDBParam();
|
||||
$this->dbh = $this->connectDB();
|
||||
if(!is_object($this->dbh))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorConnectDB . $this->dbh;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* Get mysql version. */
|
||||
$version = $this->getMysqlVersion();
|
||||
|
||||
/* If database no exits, try create it. */
|
||||
if(!$this->dbExists())
|
||||
{
|
||||
if(!$this->createDB($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateDB;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
elseif($this->post->clearDB == false)
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorDBExists;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* Create tables. */
|
||||
if(!$this->createTable($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateTable;
|
||||
return $return;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set database params.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setDBParam()
|
||||
{
|
||||
$this->config->db->host = $this->post->dbHost;
|
||||
$this->config->db->name = $this->post->dbName;
|
||||
$this->config->db->user = $this->post->dbUser;
|
||||
$this->config->db->password = $this->post->dbPassword;
|
||||
$this->config->db->port = $this->post->dbPort;
|
||||
$this->config->db->prefix = $this->post->dbPrefix;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to database.
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function connectDB()
|
||||
{
|
||||
$dsn = "mysql:host={$this->config->db->host}; port={$this->config->db->port}";
|
||||
try
|
||||
{
|
||||
$dbh = new PDO($dsn, $this->config->db->user, $this->config->db->password);
|
||||
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbh->exec("SET NAMES {$this->config->db->encoding}");
|
||||
return $dbh;
|
||||
}
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
return $exception->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check db exits or not.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->config->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mysql version.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getMysqlVersion()
|
||||
{
|
||||
$sql = "SELECT VERSION() AS version";
|
||||
$result = $this->dbh->query($sql)->fetch();
|
||||
return substr($result->version, 0, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create database.
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createDB($version)
|
||||
{
|
||||
$sql = "CREATE DATABASE `{$this->config->db->name}`";
|
||||
if($version > 4.1) $sql .= " DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
|
||||
return $this->dbh->query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create tables.
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createTable($version)
|
||||
{
|
||||
$dbFile = $this->app->getAppRoot() . 'db' . $this->app->getPathFix() . 'zentao.sql';
|
||||
$tables = explode(';', file_get_contents($dbFile));
|
||||
foreach($tables as $table)
|
||||
{
|
||||
$table = trim($table);
|
||||
if(empty($table)) continue;
|
||||
|
||||
if(strpos($table, 'CREATE') !== false and $version <= 4.1)
|
||||
{
|
||||
$table = str_replace('DEFAULT CHARSET=utf8', '', $table);
|
||||
}
|
||||
elseif(strpos($table, 'DROP') !== false and $this->post->clearDB != false)
|
||||
{
|
||||
$table = str_replace('--', '', $table);
|
||||
}
|
||||
$table = str_replace('`zt_', $this->config->db->name . '.`zt_', $table);
|
||||
$table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
if(!$this->dbh->query($table)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a comapny, set admin.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function grantPriv()
|
||||
{
|
||||
if($this->post->password == '') die(js::error($this->lang->install->errorEmptyPassword));
|
||||
|
||||
/* Insert a company. */
|
||||
$company->name = $this->post->company;
|
||||
$company->pms = $this->post->pms;
|
||||
$company->admins = ",{$this->post->account},";
|
||||
$this->dao->insert(TABLE_COMPANY)->data($company)->autoCheck()->batchCheck('name, pms', 'notempty')->check('pms', 'unique')->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
/* Set admin. */
|
||||
$companyID = $this->dbh->lastInsertID();
|
||||
$admin->account = $this->post->account;
|
||||
$admin->realname = $this->post->account;
|
||||
$admin->password = md5($this->post->password);
|
||||
$admin->company = $companyID;
|
||||
$this->dao->insert(TABLE_USER)->data($admin)->autoCheck()->check('account', 'notempty')->exec();
|
||||
|
||||
/* Update the group and groupPriv table. */
|
||||
$this->dao->update(TABLE_GROUP)->set('company')->eq($companyID)->exec($autoCompany = false);
|
||||
$this->dao->update(TABLE_GROUPPRIV)->set('company')->eq($companyID)->exec($autoCompany = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
<?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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->welcome;?></caption>
|
||||
<tr><td><?php echo nl2br(sprintf($lang->install->desc, $config->version));?></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if(isset($latestRelease) and (version_compare($latestRelease->version, $config->version) > 0)):?>
|
||||
<?php vprintf($lang->install->newReleased, $latestRelease);?>
|
||||
<h3 class='a-center'>
|
||||
<?php
|
||||
echo $lang->install->choice;
|
||||
echo html::a($latestRelease->url, $lang->install->seeLatestRelease, '_blank');
|
||||
echo html::a($this->createLink('install', 'step1'), $lang->install->keepInstalling);
|
||||
?>
|
||||
</h3>
|
||||
<?php else:?>
|
||||
<h3 class='a-center'><?php echo html::a($this->createLink('install', 'step1'), $lang->install->start);?></h3>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->welcome;?></caption>
|
||||
<tr><td><?php echo nl2br(sprintf($lang->install->desc, $config->version));?></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if(isset($latestRelease) and (version_compare($latestRelease->version, $config->version) > 0)):?>
|
||||
<?php vprintf($lang->install->newReleased, $latestRelease);?>
|
||||
<h3 class='a-center'>
|
||||
<?php
|
||||
echo $lang->install->choice;
|
||||
echo html::a($latestRelease->url, $lang->install->seeLatestRelease, '_blank');
|
||||
echo html::a($this->createLink('install', 'step1'), $lang->install->keepInstalling);
|
||||
?>
|
||||
</h3>
|
||||
<?php else:?>
|
||||
<h3 class='a-center'><?php echo html::a($this->createLink('install', 'step1'), $lang->install->start);?></h3>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step1 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<table align='center' class='table-6 a-center'>
|
||||
<caption><?php echo $lang->install->checking;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->install->checkItem;?></th>
|
||||
<th class='w-p25'><?php echo $lang->install->current?></th>
|
||||
<th class='w-p15'><?php echo $lang->install->result?></th>
|
||||
<th><?php echo $lang->install->action?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->phpVersion;?></th>
|
||||
<td><?php echo $phpVersion;?></td>
|
||||
<td class='<?php echo $phpResult;?>'><?php echo $lang->install->$phpResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($phpResult == 'fail') echo $lang->install->phpFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->pdo;?></th>
|
||||
<td><?php $pdoResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $pdoResult;?>'><?php echo $lang->install->$pdoResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($pdoResult == 'fail') echo $lang->install->pdoFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->pdoMySQL;?></th>
|
||||
<td><?php $pdoMySQLResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $pdoMySQLResult;?>'><?php echo $lang->install->$pdoMySQLResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($pdoMySQLResult == 'fail') echo $lang->install->pdoMySQLFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->json;?></th>
|
||||
<td><?php $jsonResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $jsonResult;?>'><?php echo $lang->install->$jsonResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->tmpRoot;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$tmpRootInfo['exists'] ? print($lang->install->exists) : print($lang->install->notExists);
|
||||
$tmpRootInfo['writable'] ? print($lang->install->writable) : print($lang->install->notWritable);
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo $tmpRootResult;?>'><?php echo $lang->install->$tmpRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$tmpRootInfo['exists']) printf($lang->install->mkdir, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
if(!$tmpRootInfo['writable']) printf($lang->install->chmod, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dataRoot;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$dataRootInfo['exists'] ? print($lang->install->exists) : print($lang->install->notExists);
|
||||
$dataRootInfo['writable'] ? print($lang->install->writable) : print($lang->install->notWritable);
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo $dataRootResult;?>'><?php echo $lang->install->$dataRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$dataRootInfo['exists']) printf($lang->install->mkdir, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
if(!$dataRootInfo['writable']) printf($lang->install->chmod, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4'>
|
||||
<?php
|
||||
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok')
|
||||
{
|
||||
echo html::a($this->createLink('install', 'step2'), $lang->install->next);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('install', 'step1'), $lang->install->reload);
|
||||
if($pdoResult == 'fail' or $pdoMySQLResult == 'fail')
|
||||
{
|
||||
echo '<p class="f-12px a-left">' . '<strong>' . $lang->install->phpINI . '</strong><br />' . nl2br($this->install->getIniInfo()) . '</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step1 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<table align='center' class='table-6 a-center'>
|
||||
<caption><?php echo $lang->install->checking;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->install->checkItem;?></th>
|
||||
<th class='w-p25'><?php echo $lang->install->current?></th>
|
||||
<th class='w-p15'><?php echo $lang->install->result?></th>
|
||||
<th><?php echo $lang->install->action?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->phpVersion;?></th>
|
||||
<td><?php echo $phpVersion;?></td>
|
||||
<td class='<?php echo $phpResult;?>'><?php echo $lang->install->$phpResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($phpResult == 'fail') echo $lang->install->phpFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->pdo;?></th>
|
||||
<td><?php $pdoResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $pdoResult;?>'><?php echo $lang->install->$pdoResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($pdoResult == 'fail') echo $lang->install->pdoFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->pdoMySQL;?></th>
|
||||
<td><?php $pdoMySQLResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $pdoMySQLResult;?>'><?php echo $lang->install->$pdoMySQLResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($pdoMySQLResult == 'fail') echo $lang->install->pdoMySQLFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->json;?></th>
|
||||
<td><?php $jsonResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
|
||||
<td class='<?php echo $jsonResult;?>'><?php echo $lang->install->$jsonResult;?></td>
|
||||
<td class='a-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->tmpRoot;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$tmpRootInfo['exists'] ? print($lang->install->exists) : print($lang->install->notExists);
|
||||
$tmpRootInfo['writable'] ? print($lang->install->writable) : print($lang->install->notWritable);
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo $tmpRootResult;?>'><?php echo $lang->install->$tmpRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$tmpRootInfo['exists']) printf($lang->install->mkdir, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
if(!$tmpRootInfo['writable']) printf($lang->install->chmod, $tmpRootInfo['path'], $tmpRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dataRoot;?></th>
|
||||
<td>
|
||||
<?php
|
||||
$dataRootInfo['exists'] ? print($lang->install->exists) : print($lang->install->notExists);
|
||||
$dataRootInfo['writable'] ? print($lang->install->writable) : print($lang->install->notWritable);
|
||||
?>
|
||||
</td>
|
||||
<td class='<?php echo $dataRootResult;?>'><?php echo $lang->install->$dataRootResult;?></td>
|
||||
<td class='a-left f-12px'>
|
||||
<?php
|
||||
if(!$dataRootInfo['exists']) printf($lang->install->mkdir, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
if(!$dataRootInfo['writable']) printf($lang->install->chmod, $dataRootInfo['path'], $dataRootInfo['path']);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4'>
|
||||
<?php
|
||||
if($phpResult == 'ok' and $pdoResult == 'ok' and $pdoMySQLResult == 'ok' and $tmpRootResult == 'ok' and $dataRootResult == 'ok')
|
||||
{
|
||||
echo html::a($this->createLink('install', 'step2'), $lang->install->next);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('install', 'step1'), $lang->install->reload);
|
||||
if($pdoResult == 'fail' or $pdoMySQLResult == 'fail')
|
||||
{
|
||||
echo '<p class="f-12px a-left">' . '<strong>' . $lang->install->phpINI . '</strong><br />' . nl2br($this->install->getIniInfo()) . '</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step2 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<form method='post' action='<?php echo $this->createLink('install', 'step3');?>'>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->setConfig;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->install->key;?></th>
|
||||
<th class='a-left'><?php echo $lang->install->value?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->webRoot;?></th>
|
||||
<td><?php echo html::input('webRoot', $webRoot, 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->requestType;?></th>
|
||||
<td><?php echo html::select('requestType', $lang->install->requestTypes, 'GET', 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->defaultLang;?></th>
|
||||
<td><?php echo html::select('defaultLang', $config->langs, $app->getClientLang(), 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbHost;?></th>
|
||||
<td><?php echo html::input('dbHost', 'localhost', 'class=text-3');?><?php echo $lang->install->dbHostNote;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPort;?></th>
|
||||
<td><?php echo html::input('dbPort', '3306', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbUser;?></th>
|
||||
<td><?php echo html::input('dbUser', 'root', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPassword;?></th>
|
||||
<td><?php echo html::password('dbPassword', '', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbName;?></th>
|
||||
<td><?php echo html::input('dbName', 'zentao', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPrefix;?></th>
|
||||
<td><?php echo html::input('dbPrefix', 'zt_', 'class=text-3') . html::checkBox('clearDB', $lang->install->clearDB);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step2 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<form method='post' action='<?php echo $this->createLink('install', 'step3');?>'>
|
||||
<table align='center' class='table-6'>
|
||||
<caption><?php echo $lang->install->setConfig;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->install->key;?></th>
|
||||
<th class='a-left'><?php echo $lang->install->value?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->webRoot;?></th>
|
||||
<td><?php echo html::input('webRoot', $webRoot, 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->requestType;?></th>
|
||||
<td><?php echo html::select('requestType', $lang->install->requestTypes, 'GET', 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->defaultLang;?></th>
|
||||
<td><?php echo html::select('defaultLang', $config->langs, $app->getClientLang(), 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbHost;?></th>
|
||||
<td><?php echo html::input('dbHost', 'localhost', 'class=text-3');?><?php echo $lang->install->dbHostNote;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPort;?></th>
|
||||
<td><?php echo html::input('dbPort', '3306', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbUser;?></th>
|
||||
<td><?php echo html::input('dbUser', 'root', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPassword;?></th>
|
||||
<td><?php echo html::password('dbPassword', '', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbName;?></th>
|
||||
<td><?php echo html::input('dbName', 'zentao', 'class=text-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPrefix;?></th>
|
||||
<td><?php echo html::input('dbPrefix', 'zt_', 'class=text-3') . html::checkBox('clearDB', $lang->install->clearDB);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step3 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php
|
||||
if(!isset($error))
|
||||
{
|
||||
$configContent = <<<EOT
|
||||
<?php
|
||||
\$config->installed = true;
|
||||
\$config->debug = false;
|
||||
\$config->requestType = '$requestType';
|
||||
\$config->db->host = '$dbHost';
|
||||
\$config->db->port = '$dbPort';
|
||||
\$config->db->name = '$dbName';
|
||||
\$config->db->user = '$dbUser';
|
||||
\$config->db->password = '$dbPassword';
|
||||
\$config->db->prefix = '$dbPrefix';
|
||||
\$config->webRoot = '$webRoot';
|
||||
\$config->default->domain = '$domain';
|
||||
\$config->default->lang = '$defaultLang';
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
<?php if(isset($error)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->error;?></caption>
|
||||
<tr><td><?php echo $error;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->saveConfig;?></caption>
|
||||
<tr>
|
||||
<td class='a-center'><?php echo html::textArea('config', $configContent, "rows='15' class='area-1 f-12px'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$configRoot = $this->app->getConfigRoot();
|
||||
$myConfigFile = $configRoot . 'my.php';
|
||||
if(is_writable($configRoot))
|
||||
{
|
||||
if(@file_put_contents($myConfigFile, $configContent))
|
||||
{
|
||||
printf($lang->install->saved2File, $myConfigFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($lang->install->save2File, $this->app->getConfigRoot() . 'my.php');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($lang->install->save2File, $this->app->getConfigRoot() . 'my.php');
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<div class='a-center'>" . html::a($this->createLink('install', 'step4'), $lang->install->next) . '</div>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step3 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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php
|
||||
if(!isset($error))
|
||||
{
|
||||
$configContent = <<<EOT
|
||||
<?php
|
||||
\$config->installed = true;
|
||||
\$config->debug = false;
|
||||
\$config->requestType = '$requestType';
|
||||
\$config->db->host = '$dbHost';
|
||||
\$config->db->port = '$dbPort';
|
||||
\$config->db->name = '$dbName';
|
||||
\$config->db->user = '$dbUser';
|
||||
\$config->db->password = '$dbPassword';
|
||||
\$config->db->prefix = '$dbPrefix';
|
||||
\$config->webRoot = '$webRoot';
|
||||
\$config->default->domain = '$domain';
|
||||
\$config->default->lang = '$defaultLang';
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
<?php if(isset($error)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->error;?></caption>
|
||||
<tr><td><?php echo $error;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->saveConfig;?></caption>
|
||||
<tr>
|
||||
<td class='a-center'><?php echo html::textArea('config', $configContent, "rows='15' class='area-1 f-12px'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$configRoot = $this->app->getConfigRoot();
|
||||
$myConfigFile = $configRoot . 'my.php';
|
||||
if(is_writable($configRoot))
|
||||
{
|
||||
if(@file_put_contents($myConfigFile, $configContent))
|
||||
{
|
||||
printf($lang->install->saved2File, $myConfigFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($lang->install->save2File, $this->app->getConfigRoot() . 'my.php');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($lang->install->save2File, $this->app->getConfigRoot() . 'my.php');
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<div class='a-center'>" . html::a($this->createLink('install', 'step4'), $lang->install->next) . '</div>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
<?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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<?php if(isset($error)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->error;?></caption>
|
||||
<tr><td><?php echo $error;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php elseif(isset($success)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->success;?></caption>
|
||||
<tr><td><?php echo $lang->install->afterSuccess;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->getPriv;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->company;?></th>
|
||||
<td><?php echo html::input('company');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->pms;?></th>
|
||||
<td><?php echo html::input('pms', $pmsDomain) . "<span class='f-12px'>{$lang->install->pmsNote}</span>";?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->account;?></th>
|
||||
<td><?php echo html::input('account');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->password;?></th>
|
||||
<td><?php echo html::input('password');?></td>
|
||||
</tr>
|
||||
<tr class='a-center'>
|
||||
<td colspan='2'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<?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$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
<?php if(isset($error)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->error;?></caption>
|
||||
<tr><td><?php echo $error;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php elseif(isset($success)):?>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->success;?></caption>
|
||||
<tr><td><?php echo $lang->install->afterSuccess;?></td></tr>
|
||||
<tr><td><?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?></td></tr>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-6' align='center'>
|
||||
<caption><?php echo $lang->install->getPriv;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->company;?></th>
|
||||
<td><?php echo html::input('company');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->pms;?></th>
|
||||
<td><?php echo html::input('pms', $pmsDomain) . "<span class='f-12px'>{$lang->install->pmsNote}</span>";?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->account;?></th>
|
||||
<td><?php echo html::input('account');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->install->password;?></th>
|
||||
<td><?php echo html::input('password');?></td>
|
||||
</tr>
|
||||
<tr class='a-center'>
|
||||
<td colspan='2'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user