* change the copyright, email and website.
This commit is contained in:
138
trunk/bin/ztcli
138
trunk/bin/ztcli
@@ -1,69 +1,69 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* The command router file of zentaopms.
|
||||
*
|
||||
* ZenTaoPMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoPMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoPMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright: 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoPMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
error_reporting(0);
|
||||
define('IN_SHELL', true);
|
||||
|
||||
/* <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
if($argc != 2)
|
||||
{
|
||||
die('Usage: ' . basename(__FILE__) . " <request>\n");
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
chdir(dirname(__FILE__));
|
||||
include '../framework/router.class.php';
|
||||
include '../framework/control.class.php';
|
||||
include '../framework/model.class.php';
|
||||
include '../framework/helper.class.php';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><C9B6>ڵı<DAB5><C4B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$request = parse_url(trim($argv[1]));
|
||||
$_SERVER['HTTP_HOST'] = $request['host'];
|
||||
$_SERVER['PATH_INFO'] = $request['path'];
|
||||
$_SERVER['REQUEST_URI'] = $request['query'];
|
||||
if(isset($request['query'])) parse_str($request['query'], $_GET);
|
||||
|
||||
/* ʵ<><CAB5><EFBFBD><EFBFBD>·<EFBFBD>ɶ<EFBFBD><C9B6><EFBFBD><F3A3ACB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>ݿ⡣*/
|
||||
$app = router::createApp('pms', dirname(dirname(__FILE__)));
|
||||
$config = $app->loadConfig('common');
|
||||
$app->setDebug();
|
||||
$dbh = $app->connectDB();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>*/
|
||||
$app->setTimezone();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ն<EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ԣ<EFBFBD><D4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD><D8B9>õ<EFBFBD>ģ<EFBFBD>顣*/
|
||||
$app->setClientLang('zh-cn');
|
||||
$lang = $app->loadLang('common');
|
||||
$common = $app->loadCommon();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>lib<69>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
$app->loadClass('front', $static = true);
|
||||
$app->loadClass('filter', $static = true);
|
||||
$app->setSuperVars();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3ACBC><EFBFBD>ģ<EFBFBD>顣*/
|
||||
$app->parseRequest();
|
||||
$app->loadModule();
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* The command router file of zentaopms.
|
||||
*
|
||||
* ZenTaoPMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoPMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoPMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright: 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoPMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
error_reporting(0);
|
||||
define('IN_SHELL', true);
|
||||
|
||||
/* <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
if($argc != 2)
|
||||
{
|
||||
die('Usage: ' . basename(__FILE__) . " <request>\n");
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
chdir(dirname(__FILE__));
|
||||
include '../framework/router.class.php';
|
||||
include '../framework/control.class.php';
|
||||
include '../framework/model.class.php';
|
||||
include '../framework/helper.class.php';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><C9B6>ڵı<DAB5><C4B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$request = parse_url(trim($argv[1]));
|
||||
$_SERVER['HTTP_HOST'] = $request['host'];
|
||||
$_SERVER['PATH_INFO'] = $request['path'];
|
||||
$_SERVER['REQUEST_URI'] = $request['query'];
|
||||
if(isset($request['query'])) parse_str($request['query'], $_GET);
|
||||
|
||||
/* ʵ<><CAB5><EFBFBD><EFBFBD>·<EFBFBD>ɶ<EFBFBD><C9B6><EFBFBD><F3A3ACB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>ݿ⡣*/
|
||||
$app = router::createApp('pms', dirname(dirname(__FILE__)));
|
||||
$config = $app->loadConfig('common');
|
||||
$app->setDebug();
|
||||
$dbh = $app->connectDB();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>*/
|
||||
$app->setTimezone();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ն<EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>ԣ<EFBFBD><D4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD><D8B9>õ<EFBFBD>ģ<EFBFBD>顣*/
|
||||
$app->setClientLang('zh-cn');
|
||||
$lang = $app->loadLang('common');
|
||||
$common = $app->loadCommon();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>lib<69>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
$app->loadClass('front', $static = true);
|
||||
$app->loadClass('filter', $static = true);
|
||||
$app->setSuperVars();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3ACBC><EFBFBD>ģ<EFBFBD>顣*/
|
||||
$app->parseRequest();
|
||||
$app->loadModule();
|
||||
|
||||
@@ -1,109 +1,109 @@
|
||||
<?php
|
||||
/**
|
||||
* The config file of ZenTaoMS
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->version = '1.0.stable'; // <20>汾<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
$config->encoding = 'UTF-8'; // <20><>վ<EFBFBD>ı<EFBFBD><C4B1>롣
|
||||
$config->cookiePath = '/'; // cookie<69><65><EFBFBD><EFBFBD>Ч·<D0A7><C2B7><EFBFBD><EFBFBD>
|
||||
$config->cookieLife = time() + 2592000; // cookie<69><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD>
|
||||
$config->timezone = 'Asia/Shanghai'; //ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> http://www.php.net/manual/en/timezones.php
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>á<EFBFBD>*/
|
||||
$config->requestType = 'PATH_INFO'; // <20><><EFBFBD>λ<EFBFBD>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ѡֵ<D1A1><D6B5>PATH_INFO|GET
|
||||
$config->pathType = 'clean'; // requestType=PATH_INFO: <20><><EFBFBD><EFBFBD>url<72>ĸ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ѡֵΪfull|clean<61><6E>full<6C><6C>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>clean<61><6E>ֻ<EFBFBD><D6BB>ȡֵ<C8A1><D6B5>
|
||||
$config->requestFix = '-'; // requestType=PATH_INFO: <20><><EFBFBD><EFBFBD>url<72>ķָ<C4B7><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡֵΪб<CEAA>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD>š<EFBFBD><C5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SEO<45><4F>
|
||||
$config->moduleVar = 'm'; // requestType=GET: ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->methodVar = 'f'; // requestType=GET: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->viewVar = 't'; // requestType=GET: ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
/* <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>⡣*/
|
||||
$config->views = ',html,json,csv,'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD>ͼ<EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->themes = 'default,blue'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
|
||||
/* ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
$config->langs['zh-cn'] = 'Chinese Simplified';
|
||||
|
||||
/* Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->default->view = 'html'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD>ͼ<EFBFBD><CDBC>ʽ<EFBFBD><CABD>
|
||||
$config->default->lang = 'zh-cn'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>ԡ<EFBFBD>
|
||||
$config->default->theme = 'default'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>⡣
|
||||
$config->default->module = 'index'; // Ĭ<>ϵ<EFBFBD>ģ<EFBFBD>顣<EFBFBD><E9A1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ָ<EFBFBD><D6B8>ģ<EFBFBD><C4A3>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>ģ<EFBFBD>顣
|
||||
$config->default->method = 'index'; // Ĭ<>ϵķ<CFB5><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ø÷<C3B8><C3B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
/* <20>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->file->dangers = 'php,jsp,py,rb,asp,'; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->file->maxSize = 1024 * 1024; // <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>λΪ<CEBB>ֽڡ<D6BD>
|
||||
|
||||
/* <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->db->persistant = false; // <20>Ƿ<EFBFBD><C7B7>־<F2BFAAB3><D6BE><EFBFBD><EFBFBD>ӡ<EFBFBD>
|
||||
$config->db->driver = 'mysql'; // pdo<64><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>Ŀǰ<C4BF><C7B0>ʱֻ֧<D6BB><D6A7>mysql<71><6C>
|
||||
$config->db->dao = true; // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>DAO<41><4F>
|
||||
$config->db->encoding = 'UTF8'; // <20><><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1>롣
|
||||
$config->db->strictMode = false; // <20>ر<EFBFBD>MySQL<51><4C><EFBFBD>ϸ<EFBFBD>ģʽ<C4A3><CABD>
|
||||
|
||||
/* ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$config->super2OBJ = true;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php';
|
||||
if(file_exists($myConfig)) include $myConfig;
|
||||
if(!isset($config->db->prefix)) $config->db->prefix = 'zt_';
|
||||
|
||||
/* <20><><EFBFBD>ݱ<EFBFBD><DDB1>Ķ<EFBFBD><C4B6>塣*/
|
||||
define('TABLE_COMPANY', $config->db->prefix . 'company');
|
||||
define('TABLE_DEPT', $config->db->prefix . 'dept');
|
||||
define('TABLE_CONFIG', $config->db->prefix . 'config');
|
||||
define('TABLE_USER', $config->db->prefix . 'user');
|
||||
define('TABLE_TODO', $config->db->prefix . 'todo');
|
||||
define('TABLE_GROUP', $config->db->prefix . 'group');
|
||||
define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv');
|
||||
define('TABLE_USERGROUP', $config->db->prefix . 'userGroup');
|
||||
//define('TABLE_USERQUERY', $config->db->prefix . 'userQuery');
|
||||
|
||||
define('TABLE_BUG', $config->db->prefix . 'bug');
|
||||
define('TABLE_CASE', $config->db->prefix . 'case');
|
||||
define('TABLE_CASESTEP', $config->db->prefix . 'caseStep');
|
||||
define('TABLE_TESTTASK', $config->db->prefix . 'testTask');
|
||||
define('TABLE_TESTRUN', $config->db->prefix . 'testRun');
|
||||
define('TABLE_TESTRESULT', $config->db->prefix . 'testResult');
|
||||
|
||||
define('TABLE_PRODUCT', $config->db->prefix . 'product');
|
||||
define('TABLE_STORY', $config->db->prefix . 'story');
|
||||
define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec');
|
||||
define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan');
|
||||
define('TABLE_RELEASE', $config->db->prefix . 'release');
|
||||
|
||||
define('TABLE_PROJECT', $config->db->prefix . 'project');
|
||||
define('TABLE_TASK', $config->db->prefix . 'task');
|
||||
define('TABLE_TEAM', $config->db->prefix . 'team');
|
||||
define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct');
|
||||
define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory');
|
||||
define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate');
|
||||
define('TABLE_EFFORT', $config->db->prefix . 'effort');
|
||||
define('TABLE_BURN', $config->db->prefix . 'burn');
|
||||
define('TABLE_BUILD', $config->db->prefix . 'build');
|
||||
|
||||
define('TABLE_MODULE', $config->db->prefix . 'module');
|
||||
define('TABLE_ACTION', $config->db->prefix . 'action');
|
||||
define('TABLE_FILE', $config->db->prefix . 'file');
|
||||
define('TABLE_HISTORY', $config->db->prefix . 'history');
|
||||
<?php
|
||||
/**
|
||||
* The config file of ZenTaoMS
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->version = '1.0.stable'; // <20>汾<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
$config->encoding = 'UTF-8'; // <20><>վ<EFBFBD>ı<EFBFBD><C4B1>롣
|
||||
$config->cookiePath = '/'; // cookie<69><65><EFBFBD><EFBFBD>Ч·<D0A7><C2B7><EFBFBD><EFBFBD>
|
||||
$config->cookieLife = time() + 2592000; // cookie<69><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD>
|
||||
$config->timezone = 'Asia/Shanghai'; //ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> http://www.php.net/manual/en/timezones.php
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>á<EFBFBD>*/
|
||||
$config->requestType = 'PATH_INFO'; // <20><><EFBFBD>λ<EFBFBD>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ѡֵ<D1A1><D6B5>PATH_INFO|GET
|
||||
$config->pathType = 'clean'; // requestType=PATH_INFO: <20><><EFBFBD><EFBFBD>url<72>ĸ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ѡֵΪfull|clean<61><6E>full<6C><6C>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>clean<61><6E>ֻ<EFBFBD><D6BB>ȡֵ<C8A1><D6B5>
|
||||
$config->requestFix = '-'; // requestType=PATH_INFO: <20><><EFBFBD><EFBFBD>url<72>ķָ<C4B7><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡֵΪб<CEAA>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD>š<EFBFBD><C5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SEO<45><4F>
|
||||
$config->moduleVar = 'm'; // requestType=GET: ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->methodVar = 'f'; // requestType=GET: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->viewVar = 't'; // requestType=GET: ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
/* <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>⡣*/
|
||||
$config->views = ',html,json,csv,'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD>ͼ<EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->themes = 'default,blue'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
|
||||
/* ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
$config->langs['zh-cn'] = 'Chinese Simplified';
|
||||
|
||||
/* Ĭ<>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->default->view = 'html'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD>ͼ<EFBFBD><CDBC>ʽ<EFBFBD><CABD>
|
||||
$config->default->lang = 'zh-cn'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>ԡ<EFBFBD>
|
||||
$config->default->theme = 'default'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>⡣
|
||||
$config->default->module = 'index'; // Ĭ<>ϵ<EFBFBD>ģ<EFBFBD>顣<EFBFBD><E9A1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ָ<EFBFBD><D6B8>ģ<EFBFBD><C4A3>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>ģ<EFBFBD>顣
|
||||
$config->default->method = 'index'; // Ĭ<>ϵķ<CFB5><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ø÷<C3B8><C3B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
/* <20>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->file->dangers = 'php,jsp,py,rb,asp,'; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->file->maxSize = 1024 * 1024; // <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>λΪ<CEBB>ֽڡ<D6BD>
|
||||
|
||||
/* <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>趨<EFBFBD><E8B6A8>*/
|
||||
$config->db->persistant = false; // <20>Ƿ<EFBFBD><C7B7>־<F2BFAAB3><D6BE><EFBFBD><EFBFBD>ӡ<EFBFBD>
|
||||
$config->db->driver = 'mysql'; // pdo<64><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>Ŀǰ<C4BF><C7B0>ʱֻ֧<D6BB><D6A7>mysql<71><6C>
|
||||
$config->db->dao = true; // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>DAO<41><4F>
|
||||
$config->db->encoding = 'UTF8'; // <20><><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1>롣
|
||||
$config->db->strictMode = false; // <20>ر<EFBFBD>MySQL<51><4C><EFBFBD>ϸ<EFBFBD>ģʽ<C4A3><CABD>
|
||||
|
||||
/* ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$config->super2OBJ = true;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php';
|
||||
if(file_exists($myConfig)) include $myConfig;
|
||||
if(!isset($config->db->prefix)) $config->db->prefix = 'zt_';
|
||||
|
||||
/* <20><><EFBFBD>ݱ<EFBFBD><DDB1>Ķ<EFBFBD><C4B6>塣*/
|
||||
define('TABLE_COMPANY', $config->db->prefix . 'company');
|
||||
define('TABLE_DEPT', $config->db->prefix . 'dept');
|
||||
define('TABLE_CONFIG', $config->db->prefix . 'config');
|
||||
define('TABLE_USER', $config->db->prefix . 'user');
|
||||
define('TABLE_TODO', $config->db->prefix . 'todo');
|
||||
define('TABLE_GROUP', $config->db->prefix . 'group');
|
||||
define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv');
|
||||
define('TABLE_USERGROUP', $config->db->prefix . 'userGroup');
|
||||
//define('TABLE_USERQUERY', $config->db->prefix . 'userQuery');
|
||||
|
||||
define('TABLE_BUG', $config->db->prefix . 'bug');
|
||||
define('TABLE_CASE', $config->db->prefix . 'case');
|
||||
define('TABLE_CASESTEP', $config->db->prefix . 'caseStep');
|
||||
define('TABLE_TESTTASK', $config->db->prefix . 'testTask');
|
||||
define('TABLE_TESTRUN', $config->db->prefix . 'testRun');
|
||||
define('TABLE_TESTRESULT', $config->db->prefix . 'testResult');
|
||||
|
||||
define('TABLE_PRODUCT', $config->db->prefix . 'product');
|
||||
define('TABLE_STORY', $config->db->prefix . 'story');
|
||||
define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec');
|
||||
define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan');
|
||||
define('TABLE_RELEASE', $config->db->prefix . 'release');
|
||||
|
||||
define('TABLE_PROJECT', $config->db->prefix . 'project');
|
||||
define('TABLE_TASK', $config->db->prefix . 'task');
|
||||
define('TABLE_TEAM', $config->db->prefix . 'team');
|
||||
define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct');
|
||||
define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory');
|
||||
define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate');
|
||||
define('TABLE_EFFORT', $config->db->prefix . 'effort');
|
||||
define('TABLE_BURN', $config->db->prefix . 'burn');
|
||||
define('TABLE_BUILD', $config->db->prefix . 'build');
|
||||
|
||||
define('TABLE_MODULE', $config->db->prefix . 'module');
|
||||
define('TABLE_ACTION', $config->db->prefix . 'action');
|
||||
define('TABLE_FILE', $config->db->prefix . 'file');
|
||||
define('TABLE_HISTORY', $config->db->prefix . 'history');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
一、什么是禅道项目管理软件
|
||||
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。官方网站:www.zentao.cn
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。官方网站:www.zentaoms.com
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class html
|
||||
{
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>checkbox<6F><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤attrib<69><62><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <wwccss@gmail.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::checkbox('checkbox', $options) . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'a') . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'a,b') . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'ab') . "\n";
|
||||
echo html::checkbox('checkbox', $options, '', 'style="color:red"') . "\n";
|
||||
var_dump(html::checkbox('checkbox', array()));
|
||||
<<<expect
|
||||
html_checkbox.expect
|
||||
expect
|
||||
?>
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>checkbox<6F><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤attrib<69><62><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <chunsheng@cnezsoft.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::checkbox('checkbox', $options) . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'a') . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'a,b') . "\n";
|
||||
echo html::checkbox('checkbox', $options, 'ab') . "\n";
|
||||
echo html::checkbox('checkbox', $options, '', 'style="color:red"') . "\n";
|
||||
var_dump(html::checkbox('checkbox', array()));
|
||||
<<<expect
|
||||
html_checkbox.expect
|
||||
expect
|
||||
?>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>radio<69><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>(û<><C3BB>һ<EFBFBD><D2BB>ѡ<EFBFBD>С<EFBFBD>)
|
||||
* 4. <20><>֤attrib<69><62><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <wwccss@gmail.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::radio('radio', $options);
|
||||
echo html::radio('radio', $options, 'a');
|
||||
echo html::radio('radio', $options, 'a,b');
|
||||
echo html::radio('radio', $options, '', 'style="color:red"');
|
||||
var_dump(html::radio('radio', array()));
|
||||
<<<expect
|
||||
html_radio.expect
|
||||
expect
|
||||
?>
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>radio<69><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>(û<><C3BB>һ<EFBFBD><D2BB>ѡ<EFBFBD>С<EFBFBD>)
|
||||
* 4. <20><>֤attrib<69><62><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <chunsheng@cnezsoft.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::radio('radio', $options);
|
||||
echo html::radio('radio', $options, 'a');
|
||||
echo html::radio('radio', $options, 'a,b');
|
||||
echo html::radio('radio', $options, '', 'style="color:red"');
|
||||
var_dump(html::radio('radio', array()));
|
||||
<<<expect
|
||||
html_radio.expect
|
||||
expect
|
||||
?>
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>select<63><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 7. <20><>֤attri<72>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 8. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <wwccss@gmail.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::select('select', $options);
|
||||
echo html::select('select[]', $options);
|
||||
echo html::select('select', $options, 'a');
|
||||
echo html::select('select', $options, 'a,c');
|
||||
echo html::select('select', $options, 'ab');
|
||||
echo html::select('select', $options, '', 'style="color:red"');
|
||||
var_dump(html::select('select', array()));
|
||||
<<<expect
|
||||
html_select.expect
|
||||
expect
|
||||
?>
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>select<63><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 7. <20><>֤attri<72>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 8. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <chunsheng@cnezsoft.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$options['a'] = 'texta';
|
||||
$options['b'] = 'textb';
|
||||
$options['c'] = 'textc';
|
||||
|
||||
echo html::select('select', $options);
|
||||
echo html::select('select[]', $options);
|
||||
echo html::select('select', $options, 'a');
|
||||
echo html::select('select', $options, 'a,c');
|
||||
echo html::select('select', $options, 'ab');
|
||||
echo html::select('select', $options, '', 'style="color:red"');
|
||||
var_dump(html::select('select', array()));
|
||||
<<<expect
|
||||
html_select.expect
|
||||
expect
|
||||
?>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>selectgroup<75><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 7. <20><>֤attri<72>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 8. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <wwccss@gmail.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$groups['group1']['a'] = 'texta';
|
||||
$groups['group1']['b'] = 'textb';
|
||||
$groups['group2']['c'] = 'textc';
|
||||
$groups['group2']['d'] = 'textd';
|
||||
|
||||
echo html::selectgroup('select', $groups);
|
||||
?>
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>html<6D><6C>selectgroup<75><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* 1. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 3. name<6D>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ɵ<EFBFBD>id<69>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 4. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 5. <20><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>selectedItems<6D>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 6. <20><>֤selectedItems<6D><73><EFBFBD><EFBFBD>options<6E><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ijһ<C4B3><D2BB>key<65><79><EFBFBD><EFBFBD>֤selected<65>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 7. <20><>֤attri<72>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ<EFBFBD><C8B7>
|
||||
* 8. <20><>֤optionsΪ<73>գ<EFBFBD><D5A3>Ƿ<C7B7>false<73><65>
|
||||
*
|
||||
* @author chunsheng.wang <chunsheng@cnezsoft.com>
|
||||
* @version $Id$
|
||||
*/
|
||||
include '../front.class.php';
|
||||
|
||||
$groups['group1']['a'] = 'texta';
|
||||
$groups['group1']['b'] = 'textb';
|
||||
$groups['group2']['c'] = 'textc';
|
||||
$groups['group2']['d'] = 'textd';
|
||||
|
||||
echo html::selectgroup('select', $groups);
|
||||
?>
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class action extends control
|
||||
{
|
||||
/* 已删除记录列表。*/
|
||||
public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* 登记session。*/
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri);
|
||||
$this->session->set('productPlanList', $uri);
|
||||
$this->session->set('releaseList', $uri);
|
||||
$this->session->set('storyList', $uri);
|
||||
$this->session->set('projectList', $uri);
|
||||
$this->session->set('taskList', $uri);
|
||||
$this->session->set('buildList', $uri);
|
||||
$this->session->set('bugList', $uri);
|
||||
$this->session->set('caseList', $uri);
|
||||
$this->session->set('testtaskList', $uri);
|
||||
|
||||
/* 设置标题和导航条。*/
|
||||
$this->view->header->title = $this->lang->action->trash;
|
||||
$this->view->position[] = $this->lang->action->trash;
|
||||
|
||||
/* 获取已删除记录。*/
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
$this->view->trashes = $this->action->getTrashes($orderBy, $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users['system'] = 'system';
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 还原某一个对象。*/
|
||||
public function undelete($actionID)
|
||||
{
|
||||
$this->action->undelete($actionID);
|
||||
die(js::locate(inlink('trash'), 'parent'));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class action extends control
|
||||
{
|
||||
/* 已删除记录列表。*/
|
||||
public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* 登记session。*/
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri);
|
||||
$this->session->set('productPlanList', $uri);
|
||||
$this->session->set('releaseList', $uri);
|
||||
$this->session->set('storyList', $uri);
|
||||
$this->session->set('projectList', $uri);
|
||||
$this->session->set('taskList', $uri);
|
||||
$this->session->set('buildList', $uri);
|
||||
$this->session->set('bugList', $uri);
|
||||
$this->session->set('caseList', $uri);
|
||||
$this->session->set('testtaskList', $uri);
|
||||
|
||||
/* 设置标题和导航条。*/
|
||||
$this->view->header->title = $this->lang->action->trash;
|
||||
$this->view->position[] = $this->lang->action->trash;
|
||||
|
||||
/* 获取已删除记录。*/
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
$this->view->trashes = $this->action->getTrashes($orderBy, $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users['system'] = 'system';
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 还原某一个对象。*/
|
||||
public function undelete($actionID)
|
||||
{
|
||||
$this->action->undelete($actionID);
|
||||
die(js::locate(inlink('trash'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The action module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 发表评论。';
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。';
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />';
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->story = '需求|story|view|storyID=%s';
|
||||
$lang->action->label->task = '任务|task|view|taskID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->testcase = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->space = ' ';
|
||||
<?php
|
||||
/**
|
||||
* The action module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 发表评论。';
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。';
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />';
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->story = '需求|story|view|storyID=%s';
|
||||
$lang->action->label->task = '任务|task|view|taskID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->testcase = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* The action module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->action->common = '系统日志';
|
||||
$lang->action->trash = '回收站';
|
||||
$lang->action->undelete = '还原';
|
||||
|
||||
$lang->action->objectType = '对象类型';
|
||||
$lang->action->objectID = '对象ID';
|
||||
$lang->action->objectName = '对象名称';
|
||||
$lang->action->actor = '操作者';
|
||||
$lang->action->date = '日期';
|
||||
|
||||
$lang->action->objectTypes['product'] = '产品';
|
||||
$lang->action->objectTypes['story'] = '需求';
|
||||
$lang->action->objectTypes['productplan'] = '产品计划';
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['testtask'] = '测试任务';
|
||||
$lang->action->objectTypes['user'] = '用户';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
$lang->action->desc->deleted = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->erased = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原。';
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 发表评论。';
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。';
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"';
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认需求变动,最新版本为<strong>#$extra</strong>';
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />';
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->deleted = '删除了';
|
||||
$lang->action->label->erased = '删除了';
|
||||
$lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->moved = '移动了';
|
||||
$lang->action->label->confirmed = '确认了需求,';
|
||||
$lang->action->label->linked2plan = '关联计划';
|
||||
$lang->action->label->unlinkedfromplan = '移除计划';
|
||||
$lang->action->label->linked2project = '关联项目';
|
||||
$lang->action->label->unlinkedfromproject = '移除项目';
|
||||
$lang->action->label->marked = '编辑了';
|
||||
$lang->action->label->login = '登录系统';
|
||||
$lang->action->label->logout = "退出登录";
|
||||
|
||||
/* 用来生成相应对象的链接。*/
|
||||
$lang->action->label->product = '产品|product|view|productID=%s';
|
||||
$lang->action->label->productplan = '计划|productplan|view|productID=%s';
|
||||
$lang->action->label->release = '发布|release|view|productID=%s';
|
||||
$lang->action->label->story = '需求|story|view|storyID=%s';
|
||||
$lang->action->label->project = '项目|project|view|projectID=%s';
|
||||
$lang->action->label->task = '任务|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->case = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s';
|
||||
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->user = '用户';
|
||||
|
||||
$lang->action->label->space = ' ';
|
||||
<?php
|
||||
/**
|
||||
* The action module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->action->common = '系统日志';
|
||||
$lang->action->trash = '回收站';
|
||||
$lang->action->undelete = '还原';
|
||||
|
||||
$lang->action->objectType = '对象类型';
|
||||
$lang->action->objectID = '对象ID';
|
||||
$lang->action->objectName = '对象名称';
|
||||
$lang->action->actor = '操作者';
|
||||
$lang->action->date = '日期';
|
||||
|
||||
$lang->action->objectTypes['product'] = '产品';
|
||||
$lang->action->objectTypes['story'] = '需求';
|
||||
$lang->action->objectTypes['productplan'] = '产品计划';
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['testtask'] = '测试任务';
|
||||
$lang->action->objectTypes['user'] = '用户';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。';
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
$lang->action->desc->deleted = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->erased = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原。';
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 发表评论。';
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。';
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"';
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认需求变动,最新版本为<strong>#$extra</strong>';
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />';
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->deleted = '删除了';
|
||||
$lang->action->label->erased = '删除了';
|
||||
$lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->moved = '移动了';
|
||||
$lang->action->label->confirmed = '确认了需求,';
|
||||
$lang->action->label->linked2plan = '关联计划';
|
||||
$lang->action->label->unlinkedfromplan = '移除计划';
|
||||
$lang->action->label->linked2project = '关联项目';
|
||||
$lang->action->label->unlinkedfromproject = '移除项目';
|
||||
$lang->action->label->marked = '编辑了';
|
||||
$lang->action->label->login = '登录系统';
|
||||
$lang->action->label->logout = "退出登录";
|
||||
|
||||
/* 用来生成相应对象的链接。*/
|
||||
$lang->action->label->product = '产品|product|view|productID=%s';
|
||||
$lang->action->label->productplan = '计划|productplan|view|productID=%s';
|
||||
$lang->action->label->release = '发布|release|view|productID=%s';
|
||||
$lang->action->label->story = '需求|story|view|storyID=%s';
|
||||
$lang->action->label->project = '项目|project|view|projectID=%s';
|
||||
$lang->action->label->task = '任务|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->case = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s';
|
||||
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->user = '用户';
|
||||
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
@@ -1,236 +1,236 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class actionModel extends model
|
||||
{
|
||||
const CAN_UNDELETED = 1; // 标记extra字段为可以还原。
|
||||
const BE_UNDELETED = 0; // 标记extra字段为已经还原。
|
||||
|
||||
/* 创建一条action动作。*/
|
||||
public function create($objectType, $objectID, $actionType, $comment = '', $extra = '')
|
||||
{
|
||||
$action->objectType = strtolower($objectType);
|
||||
$action->objectID = $objectID;
|
||||
$action->actor = $this->app->user->account;
|
||||
$action->action = strtolower($actionType);
|
||||
$action->date = helper::now();
|
||||
$action->comment = htmlspecialchars($comment);
|
||||
$action->extra = $extra;
|
||||
$this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec();
|
||||
return $this->dbh->lastInsertID();
|
||||
}
|
||||
|
||||
/* 返回某一个对象的所有action列表。*/
|
||||
public function getList($objectType, $objectID)
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq($objectType)
|
||||
->andWhere('objectID')->eq($objectID)
|
||||
->orderBy('id')->fetchAll('id');
|
||||
$histories = $this->getHistory(array_keys($actions));
|
||||
foreach($actions as $actionID => $action)
|
||||
{
|
||||
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
|
||||
$actions[$actionID] = $action;
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/* 获得action信息。*/
|
||||
public function getById($actionID)
|
||||
{
|
||||
return $this->dao->findById((int)$actionID)->from(TABLE_ACTION)->fetch();
|
||||
}
|
||||
|
||||
/* 获得所有的删除记录列表。*/
|
||||
public function getTrashes($orderBy, $pager)
|
||||
{
|
||||
$trashes = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('action')->eq('deleted')
|
||||
->andWhere('extra')->eq(self::CAN_UNDELETED)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
if(!$trashes) return array();
|
||||
|
||||
/* 将对象按照类型分开,然后查找其对应的名称。*/
|
||||
foreach($trashes as $object) $typeTrashes[$object->objectType][] = $object->objectID;
|
||||
foreach($typeTrashes as $objectType => $objectIds)
|
||||
{
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->action->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
}
|
||||
|
||||
/* 将name字段添加到trashes中。*/
|
||||
foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID];
|
||||
return $trashes;
|
||||
}
|
||||
|
||||
/* 返回某一个action所对应的字段修改记录。*/
|
||||
public function getHistory($actionID)
|
||||
{
|
||||
return $this->dao->select()->from(TABLE_HISTORY)->where('action')->in($actionID)->orderBy('id')->fetchGroup('action');
|
||||
}
|
||||
|
||||
/* 记录历史。*/
|
||||
public function logHistory($actionID, $changes)
|
||||
{
|
||||
foreach($changes as $change)
|
||||
{
|
||||
$change['action'] = $actionID;
|
||||
$this->dao->insert(TABLE_HISTORY)->data($change)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 打印action标题,显示在每一个对象的详情界面。*/
|
||||
public function printAction($action)
|
||||
{
|
||||
$objectType = $action->objectType;
|
||||
$actionType = strtolower($action->action);
|
||||
|
||||
/**
|
||||
* 判断使用哪一种描述。如果该模块有对应的描述,则取之,然后则取action模块中对应的方法的描述。
|
||||
* 如果还没有,则判断当前action是否有extra信息,如果有,则取action模块的extra描述,最后使用通用的描述。
|
||||
*/
|
||||
if(isset($this->lang->$objectType->action->$actionType))
|
||||
{
|
||||
$desc = $this->lang->$objectType->action->$actionType;
|
||||
}
|
||||
elseif(isset($this->lang->action->desc->$actionType))
|
||||
{
|
||||
$desc = $this->lang->action->desc->$actionType;
|
||||
}
|
||||
else
|
||||
{
|
||||
$desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common;
|
||||
}
|
||||
|
||||
/* 循环替换desc中对应的标签。*/
|
||||
foreach($action as $key => $value)
|
||||
{
|
||||
if($key == 'history') continue;
|
||||
|
||||
/* desc可能是数组,也有可能是一个字符串。*/
|
||||
if(is_array($desc))
|
||||
{
|
||||
if($key == 'extra') continue;
|
||||
$desc['main'] = str_replace('$' . $key, $value, $desc['main']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$desc = str_replace('$' . $key, $value, $desc);
|
||||
}
|
||||
}
|
||||
|
||||
/* 如果desc是数组,再处理extra变量。例子参考bug模块的语言设置。*/
|
||||
if(is_array($desc))
|
||||
{
|
||||
$extra = strtolower($action->extra);
|
||||
if(isset($desc['extra'][$extra]))
|
||||
{
|
||||
echo str_replace('$extra', $desc['extra'][$extra], $desc['main']);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo str_replace('$extra', $action->extra, $desc['main']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $desc;
|
||||
}
|
||||
}
|
||||
|
||||
/* 打印动态信息。*/
|
||||
public function getDynamic($objectType = 'all', $count = 30)
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->onCaseOf($objectType != 'all')->where('objectType')->eq($objectType)->endCase()
|
||||
->orderBy('id desc')->limit($count)->fetchAll();
|
||||
if(!$actions) return array();
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$actionType = strtolower($action->action);
|
||||
$objectType = strtolower($action->objectType);
|
||||
$action->date = date(DT_MONTHTIME2, strtotime($action->date));
|
||||
$action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action;
|
||||
$action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType;
|
||||
|
||||
/* 处理login和logout动作。*/
|
||||
if($actionType == 'login' or $actionType == 'logout')
|
||||
{
|
||||
$action->objectLink = '';
|
||||
$action->objectLabel = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
/* 其他的动作生成相应的链接。*/
|
||||
if(strpos($action->objectLabel, '|') !== false)
|
||||
{
|
||||
list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel);
|
||||
$action->objectLink = html::a(helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID)), '#' . $action->objectID);
|
||||
$action->objectLabel = $objectLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
$action->objectLink = '#' . $action->objectID;
|
||||
}
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/* 打印修改记录。*/
|
||||
public function printChanges($objectType, $histories)
|
||||
{
|
||||
if(empty($histories)) return;
|
||||
|
||||
/* 计算字段的最大长度,并将历史记录根据是否有diff分开,以保证含有diff的字段显示在最后面。*/
|
||||
$maxLength = 0;
|
||||
$historiesWithDiff = array();
|
||||
$historiesWithoutDiff = array();
|
||||
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$fieldName = $history->field;
|
||||
$history->fieldLabel = isset($this->lang->$objectType->$fieldName) ? $this->lang->$objectType->$fieldName : $fieldName;
|
||||
if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length;
|
||||
$history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history;
|
||||
}
|
||||
$histories = array_merge($historiesWithoutDiff, $historiesWithDiff);
|
||||
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space);
|
||||
if($history->diff != '')
|
||||
{
|
||||
printf($this->lang->action->desc->diff2, $history->fieldLabel, nl2br($history->diff));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($this->lang->action->desc->diff1, $history->fieldLabel, $history->old, $history->new);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class actionModel extends model
|
||||
{
|
||||
const CAN_UNDELETED = 1; // 标记extra字段为可以还原。
|
||||
const BE_UNDELETED = 0; // 标记extra字段为已经还原。
|
||||
|
||||
/* 创建一条action动作。*/
|
||||
public function create($objectType, $objectID, $actionType, $comment = '', $extra = '')
|
||||
{
|
||||
$action->objectType = strtolower($objectType);
|
||||
$action->objectID = $objectID;
|
||||
$action->actor = $this->app->user->account;
|
||||
$action->action = strtolower($actionType);
|
||||
$action->date = helper::now();
|
||||
$action->comment = htmlspecialchars($comment);
|
||||
$action->extra = $extra;
|
||||
$this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec();
|
||||
return $this->dbh->lastInsertID();
|
||||
}
|
||||
|
||||
/* 返回某一个对象的所有action列表。*/
|
||||
public function getList($objectType, $objectID)
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq($objectType)
|
||||
->andWhere('objectID')->eq($objectID)
|
||||
->orderBy('id')->fetchAll('id');
|
||||
$histories = $this->getHistory(array_keys($actions));
|
||||
foreach($actions as $actionID => $action)
|
||||
{
|
||||
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
|
||||
$actions[$actionID] = $action;
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/* 获得action信息。*/
|
||||
public function getById($actionID)
|
||||
{
|
||||
return $this->dao->findById((int)$actionID)->from(TABLE_ACTION)->fetch();
|
||||
}
|
||||
|
||||
/* 获得所有的删除记录列表。*/
|
||||
public function getTrashes($orderBy, $pager)
|
||||
{
|
||||
$trashes = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('action')->eq('deleted')
|
||||
->andWhere('extra')->eq(self::CAN_UNDELETED)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
if(!$trashes) return array();
|
||||
|
||||
/* 将对象按照类型分开,然后查找其对应的名称。*/
|
||||
foreach($trashes as $object) $typeTrashes[$object->objectType][] = $object->objectID;
|
||||
foreach($typeTrashes as $objectType => $objectIds)
|
||||
{
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->action->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
}
|
||||
|
||||
/* 将name字段添加到trashes中。*/
|
||||
foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID];
|
||||
return $trashes;
|
||||
}
|
||||
|
||||
/* 返回某一个action所对应的字段修改记录。*/
|
||||
public function getHistory($actionID)
|
||||
{
|
||||
return $this->dao->select()->from(TABLE_HISTORY)->where('action')->in($actionID)->orderBy('id')->fetchGroup('action');
|
||||
}
|
||||
|
||||
/* 记录历史。*/
|
||||
public function logHistory($actionID, $changes)
|
||||
{
|
||||
foreach($changes as $change)
|
||||
{
|
||||
$change['action'] = $actionID;
|
||||
$this->dao->insert(TABLE_HISTORY)->data($change)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 打印action标题,显示在每一个对象的详情界面。*/
|
||||
public function printAction($action)
|
||||
{
|
||||
$objectType = $action->objectType;
|
||||
$actionType = strtolower($action->action);
|
||||
|
||||
/**
|
||||
* 判断使用哪一种描述。如果该模块有对应的描述,则取之,然后则取action模块中对应的方法的描述。
|
||||
* 如果还没有,则判断当前action是否有extra信息,如果有,则取action模块的extra描述,最后使用通用的描述。
|
||||
*/
|
||||
if(isset($this->lang->$objectType->action->$actionType))
|
||||
{
|
||||
$desc = $this->lang->$objectType->action->$actionType;
|
||||
}
|
||||
elseif(isset($this->lang->action->desc->$actionType))
|
||||
{
|
||||
$desc = $this->lang->action->desc->$actionType;
|
||||
}
|
||||
else
|
||||
{
|
||||
$desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common;
|
||||
}
|
||||
|
||||
/* 循环替换desc中对应的标签。*/
|
||||
foreach($action as $key => $value)
|
||||
{
|
||||
if($key == 'history') continue;
|
||||
|
||||
/* desc可能是数组,也有可能是一个字符串。*/
|
||||
if(is_array($desc))
|
||||
{
|
||||
if($key == 'extra') continue;
|
||||
$desc['main'] = str_replace('$' . $key, $value, $desc['main']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$desc = str_replace('$' . $key, $value, $desc);
|
||||
}
|
||||
}
|
||||
|
||||
/* 如果desc是数组,再处理extra变量。例子参考bug模块的语言设置。*/
|
||||
if(is_array($desc))
|
||||
{
|
||||
$extra = strtolower($action->extra);
|
||||
if(isset($desc['extra'][$extra]))
|
||||
{
|
||||
echo str_replace('$extra', $desc['extra'][$extra], $desc['main']);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo str_replace('$extra', $action->extra, $desc['main']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $desc;
|
||||
}
|
||||
}
|
||||
|
||||
/* 打印动态信息。*/
|
||||
public function getDynamic($objectType = 'all', $count = 30)
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->onCaseOf($objectType != 'all')->where('objectType')->eq($objectType)->endCase()
|
||||
->orderBy('id desc')->limit($count)->fetchAll();
|
||||
if(!$actions) return array();
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$actionType = strtolower($action->action);
|
||||
$objectType = strtolower($action->objectType);
|
||||
$action->date = date(DT_MONTHTIME2, strtotime($action->date));
|
||||
$action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action;
|
||||
$action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType;
|
||||
|
||||
/* 处理login和logout动作。*/
|
||||
if($actionType == 'login' or $actionType == 'logout')
|
||||
{
|
||||
$action->objectLink = '';
|
||||
$action->objectLabel = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
/* 其他的动作生成相应的链接。*/
|
||||
if(strpos($action->objectLabel, '|') !== false)
|
||||
{
|
||||
list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel);
|
||||
$action->objectLink = html::a(helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID)), '#' . $action->objectID);
|
||||
$action->objectLabel = $objectLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
$action->objectLink = '#' . $action->objectID;
|
||||
}
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/* 打印修改记录。*/
|
||||
public function printChanges($objectType, $histories)
|
||||
{
|
||||
if(empty($histories)) return;
|
||||
|
||||
/* 计算字段的最大长度,并将历史记录根据是否有diff分开,以保证含有diff的字段显示在最后面。*/
|
||||
$maxLength = 0;
|
||||
$historiesWithDiff = array();
|
||||
$historiesWithoutDiff = array();
|
||||
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$fieldName = $history->field;
|
||||
$history->fieldLabel = isset($this->lang->$objectType->$fieldName) ? $this->lang->$objectType->$fieldName : $fieldName;
|
||||
if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length;
|
||||
$history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history;
|
||||
}
|
||||
$histories = array_merge($historiesWithoutDiff, $historiesWithDiff);
|
||||
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space);
|
||||
if($history->diff != '')
|
||||
{
|
||||
printf($this->lang->action->desc->diff2, $history->fieldLabel, nl2br($history->diff));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf($this->lang->action->desc->diff1, $history->fieldLabel, $history->old, $history->new);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* The trash view file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1 colored tablesorter'>
|
||||
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-80px'><?php common::printOrderLink('objectType', $orderBy, $vars, $lang->action->objectType);?></th>
|
||||
<th class='w-id'><?php common::printOrderLink('objectID', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th><?php echo $lang->action->objectName;?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('actor', $orderBy, $vars, $lang->action->actor);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->action->date);?></th>
|
||||
<th class='w-80px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($trashes as $action):?>
|
||||
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $lang->action->objectTypes[$action->objectType];?></td>
|
||||
<td><?php echo $action->objectID;?></td>
|
||||
<td class='a-left'><?php echo html::a($this->createLink($module, 'view', "id=$action->objectID"), $action->objectName);?></td>
|
||||
<td><?php echo $users[$action->actor];?></td>
|
||||
<td><?php echo $action->date;?></td>
|
||||
<td><?php common::printLink('action', 'undelete', "actionid=$action->id", $lang->action->undelete, 'hiddenwin');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='a-right'><?php $pager->show();?></div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The trash view file of action module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1 colored tablesorter'>
|
||||
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-80px'><?php common::printOrderLink('objectType', $orderBy, $vars, $lang->action->objectType);?></th>
|
||||
<th class='w-id'><?php common::printOrderLink('objectID', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th><?php echo $lang->action->objectName;?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('actor', $orderBy, $vars, $lang->action->actor);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('date', $orderBy, $vars, $lang->action->date);?></th>
|
||||
<th class='w-80px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($trashes as $action):?>
|
||||
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $lang->action->objectTypes[$action->objectType];?></td>
|
||||
<td><?php echo $action->objectID;?></td>
|
||||
<td class='a-left'><?php echo html::a($this->createLink($module, 'view', "id=$action->objectID"), $action->objectName);?></td>
|
||||
<td><?php echo $users[$action->actor];?></td>
|
||||
<td><?php echo $action->date;?></td>
|
||||
<td><?php common::printLink('action', 'undelete', "actionid=$action->id", $lang->action->undelete, 'hiddenwin');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='a-right'><?php $pager->show();?></div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class admin extends control
|
||||
{
|
||||
/* 首页。*/
|
||||
public function index($tab = 'index')
|
||||
{
|
||||
$this->locate($this->createLink('action', 'trash'));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class admin extends control
|
||||
{
|
||||
/* 首页。*/
|
||||
public function index($tab = 'index')
|
||||
{
|
||||
$this->locate($this->createLink('action', 'trash'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* The admin module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->admin->common = '后台管理';
|
||||
$lang->admin->index = '后台管理首页';
|
||||
$lang->admin->company = '公司管理';
|
||||
$lang->admin->user = '用户管理';
|
||||
$lang->admin->group = '分组管理';
|
||||
$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统';
|
||||
|
||||
$lang->admin->browseCompany = '浏览公司';
|
||||
$lang->admin->browseUser = '浏览用户';
|
||||
$lang->admin->browseGroup = '浏览分组';
|
||||
<?php
|
||||
/**
|
||||
* The admin module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->admin->common = '后台管理';
|
||||
$lang->admin->index = '后台管理首页';
|
||||
$lang->admin->company = '公司管理';
|
||||
$lang->admin->user = '用户管理';
|
||||
$lang->admin->group = '分组管理';
|
||||
$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统';
|
||||
|
||||
$lang->admin->browseCompany = '浏览公司';
|
||||
$lang->admin->browseUser = '浏览用户';
|
||||
$lang->admin->browseGroup = '浏览分组';
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* The admin module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->admin->common = '后台管理';
|
||||
$lang->admin->index = '后台管理首页';
|
||||
$lang->admin->company = '公司管理';
|
||||
$lang->admin->user = '用户管理';
|
||||
$lang->admin->group = '分组管理';
|
||||
$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统';
|
||||
|
||||
$lang->admin->browseCompany = '浏览公司';
|
||||
<?php
|
||||
/**
|
||||
* The admin module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->admin->common = '后台管理';
|
||||
$lang->admin->index = '后台管理首页';
|
||||
$lang->admin->company = '公司管理';
|
||||
$lang->admin->user = '用户管理';
|
||||
$lang->admin->group = '分组管理';
|
||||
$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统';
|
||||
|
||||
$lang->admin->browseCompany = '浏览公司';
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class adminModel extends model
|
||||
{
|
||||
/* 获得整个pms系统的统计信息。*/
|
||||
public function getStatOfPMS()
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS";
|
||||
$tables = $this->dbh->query($sql)->fetchALL();
|
||||
}
|
||||
|
||||
/* 获得某一个公司的统计信息。*/
|
||||
public function getStatOfCompany($companyID)
|
||||
{
|
||||
}
|
||||
|
||||
/* 获得系统的运行信息。*/
|
||||
public function getStatOfSys()
|
||||
{
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class adminModel extends model
|
||||
{
|
||||
/* 获得整个pms系统的统计信息。*/
|
||||
public function getStatOfPMS()
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS";
|
||||
$tables = $this->dbh->query($sql)->fetchALL();
|
||||
}
|
||||
|
||||
/* 获得某一个公司的统计信息。*/
|
||||
public function getStatOfCompany($companyID)
|
||||
{
|
||||
}
|
||||
|
||||
/* 获得系统的运行信息。*/
|
||||
public function getStatOfSys()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse company view file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-1'>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->company->id;?></th>
|
||||
<th><?php echo $lang->company->name;?></th>
|
||||
<th><?php echo $lang->company->phone;?></th>
|
||||
<th><?php echo $lang->company->fax;?></th>
|
||||
<th><?php echo $lang->company->address;?></th>
|
||||
<th><?php echo $lang->company->zipcode;?></th>
|
||||
<th><?php echo $lang->company->website;?></th>
|
||||
<th><?php echo $lang->company->backyard;?></th>
|
||||
<th><?php echo $lang->company->pms;?></th>
|
||||
<th><?php echo $lang->company->guest;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($companies as $company):?>
|
||||
<tr>
|
||||
<td class='a-center'><?php echo $company->id;?></td>
|
||||
<td><?php echo $company->name;?></td>
|
||||
<td><?php echo $company->phone;?></td>
|
||||
<td><?php echo $company->fax;?></td>
|
||||
<td><?php echo $company->address;?></td>
|
||||
<td><?php echo $company->zipcode;?></td>
|
||||
<td><?php echo html::a($company->website, $company->website, '_blank');?></td>
|
||||
<td><?php echo html::a($company->backyard,$company->backyard, '_blank');?></td>
|
||||
<td><?php echo html::a('http://' . $company->pms, $company->pms, '_blank');?></td>
|
||||
<td><?php echo $lang->company->guestList[(int)$company->guest];?></td>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?>
|
||||
<?php echo html::a($this->createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The browse company view file of admin module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-1'>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->company->id;?></th>
|
||||
<th><?php echo $lang->company->name;?></th>
|
||||
<th><?php echo $lang->company->phone;?></th>
|
||||
<th><?php echo $lang->company->fax;?></th>
|
||||
<th><?php echo $lang->company->address;?></th>
|
||||
<th><?php echo $lang->company->zipcode;?></th>
|
||||
<th><?php echo $lang->company->website;?></th>
|
||||
<th><?php echo $lang->company->backyard;?></th>
|
||||
<th><?php echo $lang->company->pms;?></th>
|
||||
<th><?php echo $lang->company->guest;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($companies as $company):?>
|
||||
<tr>
|
||||
<td class='a-center'><?php echo $company->id;?></td>
|
||||
<td><?php echo $company->name;?></td>
|
||||
<td><?php echo $company->phone;?></td>
|
||||
<td><?php echo $company->fax;?></td>
|
||||
<td><?php echo $company->address;?></td>
|
||||
<td><?php echo $company->zipcode;?></td>
|
||||
<td><?php echo html::a($company->website, $company->website, '_blank');?></td>
|
||||
<td><?php echo html::a($company->backyard,$company->backyard, '_blank');?></td>
|
||||
<td><?php echo html::a('http://' . $company->pms, $company->pms, '_blank');?></td>
|
||||
<td><?php echo $lang->company->guestList[(int)$company->guest];?></td>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?>
|
||||
<?php echo html::a($this->createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of api of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package api
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class api extends control
|
||||
{
|
||||
/* 获得sessionid。*/
|
||||
public function getSessionID()
|
||||
{
|
||||
$this->view->sessionName = session_name();
|
||||
$this->view->sessionID = session_id();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 获得某一个model某一个方法的结果。params的传递方式:param1=value1,param2=value2。*/
|
||||
public function getModel($moduleName, $methodName, $params = '')
|
||||
{
|
||||
parse_str(str_replace(',', '&', $params), $params);
|
||||
$module = $this->loadModel($moduleName);
|
||||
$result = call_user_func_array(array(&$module, $methodName), $params);
|
||||
if(dao::isError()) die(json_encode(dao::getError()));
|
||||
die(json_encode($result));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of api of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package api
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class api extends control
|
||||
{
|
||||
/* 获得sessionid。*/
|
||||
public function getSessionID()
|
||||
{
|
||||
$this->view->sessionName = session_name();
|
||||
$this->view->sessionID = session_id();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 获得某一个model某一个方法的结果。params的传递方式:param1=value1,param2=value2。*/
|
||||
public function getModel($moduleName, $methodName, $params = '')
|
||||
{
|
||||
parse_str(str_replace(',', '&', $params), $params);
|
||||
$module = $this->loadModel($moduleName);
|
||||
$result = call_user_func_array(array(&$module, $methodName), $params);
|
||||
if(dao::isError()) die(json_encode(dao::getError()));
|
||||
die(json_encode($result));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* The api module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package api
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->api->common = 'API接口';
|
||||
$lang->api->getModel = '超级model调用接口';
|
||||
<?php
|
||||
/**
|
||||
* The api module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package api
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->api->common = 'API接口';
|
||||
$lang->api->getModel = '超级model调用接口';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,169 +1,169 @@
|
||||
<?php
|
||||
/**
|
||||
* The bug module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->bug->common = '缺陷管理';
|
||||
$lang->bug->index = '首页';
|
||||
$lang->bug->create = '创建Bug';
|
||||
$lang->bug->edit = '编辑Bug';
|
||||
$lang->bug->browse = 'Bug列表';
|
||||
$lang->bug->view = 'Bug详情';
|
||||
$lang->bug->resolve = '解决Bug';
|
||||
$lang->bug->close = '关闭Bug';
|
||||
$lang->bug->activate = '激活Bug';
|
||||
$lang->bug->ajaxGetUserBugs = '接口:我的Bug';
|
||||
|
||||
$lang->bug->selectProduct = '请选择产品';
|
||||
$lang->bug->byModule = '按模块';
|
||||
$lang->bug->assignToMe = '指派给我';
|
||||
$lang->bug->openedByMe = '由我创建';
|
||||
$lang->bug->resolvedByMe = '由我解决';
|
||||
$lang->bug->assignToNull = '未指派';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->allBugs = '所有Bug';
|
||||
$lang->bug->moduleBugs = '按模块浏览';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
|
||||
$lang->bug->lblProductAndModule = '产品模块';
|
||||
$lang->bug->lblProjectAndTask = '项目任务';
|
||||
$lang->bug->lblStory = '相关需求';
|
||||
$lang->bug->lblTypeAndSeverity = '类型/严重程度';
|
||||
$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器';
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
$lang->bug->lblMailto = '抄送给';
|
||||
$lang->bug->lblLastEdited = '最后修改';
|
||||
$lang->bug->lblResolved = '由谁解决';
|
||||
|
||||
$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?';
|
||||
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
$lang->bug->legendMailto = '抄送给';
|
||||
$lang->bug->legendAttatch = '附件';
|
||||
$lang->bug->legendLinkBugs = '相关Bug';
|
||||
$lang->bug->legendPrjStoryTask= '项目/需求/任务';
|
||||
$lang->bug->legendCases = '相关用例';
|
||||
$lang->bug->legendSteps = '重现步骤';
|
||||
$lang->bug->legendAction = '操作';
|
||||
$lang->bug->legendHistory = '历史记录';
|
||||
$lang->bug->legendComment = '备注';
|
||||
$lang->bug->legendLife = 'BUG的一生';
|
||||
$lang->bug->legendMisc = '其相关他';
|
||||
|
||||
$lang->bug->buttonEdit = '编辑';
|
||||
$lang->bug->buttonActivate = '激活';
|
||||
$lang->bug->buttonResolve = '解决';
|
||||
$lang->bug->buttonClose = '关闭';
|
||||
$lang->bug->buttonToList = '返回';
|
||||
|
||||
$lang->bug->severityList[3] = 3;
|
||||
$lang->bug->severityList[1] = 1;
|
||||
$lang->bug->severityList[2] = 2;
|
||||
$lang->bug->severityList[4] = 4;
|
||||
|
||||
/* Define the OS list. */
|
||||
$lang->bug->osList['all'] = '全部';
|
||||
$lang->bug->osList['winxp'] = 'Windows XP';
|
||||
$lang->bug->osList['win7'] = 'Windows 7';
|
||||
$lang->bug->osList['vista'] = 'Windows Vista';
|
||||
$lang->bug->osList['win2000'] = 'Windows 2000';
|
||||
$lang->bug->osList['winnt'] = 'Windows NT';
|
||||
$lang->bug->osList['win98'] = 'Windows 98';
|
||||
$lang->bug->osList['linux'] = 'Linux';
|
||||
$lang->bug->osList['unix'] = 'Unix';
|
||||
$lang->bug->osList['others'] = '其他';
|
||||
|
||||
/* Define the OS list. */
|
||||
$lang->bug->browserList['all'] = '全部';
|
||||
$lang->bug->browserList['ie6'] = 'IE6';
|
||||
$lang->bug->browserList['ie7'] = 'IE7';
|
||||
$lang->bug->browserList['ie8'] = 'IE8';
|
||||
$lang->bug->browserList['firefox2'] = 'firefox2';
|
||||
$lang->bug->browserList['firefx3'] = 'firefox3';
|
||||
$lang->bug->browserList['opera9'] = 'opera9';
|
||||
$lang->bug->browserList['oprea10'] = 'opera10';
|
||||
$lang->bug->browserList['safari'] = 'safari';
|
||||
$lang->bug->browserList['chrome'] = 'chrome';
|
||||
$lang->bug->browserList['other'] = '其他';
|
||||
|
||||
/* Define the types. */
|
||||
$lang->bug->typeList[''] = '';
|
||||
$lang->bug->typeList['codeerror'] = '代码错误';
|
||||
$lang->bug->typeList['interface'] = '界面优化';
|
||||
$lang->bug->typeList['designchange'] = '设计变更';
|
||||
$lang->bug->typeList['Others'] = '其他';
|
||||
|
||||
$lang->bug->statusList[''] = '';
|
||||
$lang->bug->statusList['active'] = '激活';
|
||||
$lang->bug->statusList['resolved'] = '已解决';
|
||||
$lang->bug->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->bug->resolutionList[''] = '';
|
||||
$lang->bug->resolutionList['bydesign'] = '设计如此';
|
||||
$lang->bug->resolutionList['duplicate'] = '重复Bug';
|
||||
$lang->bug->resolutionList['external'] = '外部原因';
|
||||
$lang->bug->resolutionList['fixed'] = '已解决';
|
||||
$lang->bug->resolutionList['notrepro'] = '无法重现';
|
||||
$lang->bug->resolutionList['postponed'] = '延期处理';
|
||||
$lang->bug->resolutionList['willnotfix'] = "不予解决";
|
||||
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属产品';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->path = '模块路径';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->story = '相关需求';
|
||||
$lang->bug->storyVersion = '需求版本';
|
||||
$lang->bug->task = '相关任务';
|
||||
$lang->bug->title = 'Bug标题';
|
||||
$lang->bug->severity = '严重程度';
|
||||
$lang->bug->type = 'Bug类型';
|
||||
$lang->bug->os = '操作系统';
|
||||
$lang->bug->browser = '浏览器';
|
||||
$lang->bug->machine = '机器硬件';
|
||||
$lang->bug->found = '如何发现';
|
||||
$lang->bug->steps = '重现步骤';
|
||||
$lang->bug->status = 'Bug状态';
|
||||
$lang->bug->mailto = '抄送给';
|
||||
$lang->bug->openedBy = '由谁创建';
|
||||
$lang->bug->openedDate = '创建日期';
|
||||
$lang->bug->openedBuild = '影响版本';
|
||||
$lang->bug->assignedTo = '指派给';
|
||||
$lang->bug->assignedDate = '指派日期';
|
||||
$lang->bug->resolvedBy = '解决者';
|
||||
$lang->bug->resolution = '解决方案';
|
||||
$lang->bug->resolvedBuild = '解决版本';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复Bug';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
$lang->bug->case = '相关用例';
|
||||
$lang->bug->files = '附件';
|
||||
|
||||
$lang->bug->tblStep = "[步骤]\n";
|
||||
$lang->bug->tblResult = "[结果]\n";
|
||||
$lang->bug->tblExpect = "[期望]\n";
|
||||
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
<?php
|
||||
/**
|
||||
* The bug module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->bug->common = '缺陷管理';
|
||||
$lang->bug->index = '首页';
|
||||
$lang->bug->create = '创建Bug';
|
||||
$lang->bug->edit = '编辑Bug';
|
||||
$lang->bug->browse = 'Bug列表';
|
||||
$lang->bug->view = 'Bug详情';
|
||||
$lang->bug->resolve = '解决Bug';
|
||||
$lang->bug->close = '关闭Bug';
|
||||
$lang->bug->activate = '激活Bug';
|
||||
$lang->bug->ajaxGetUserBugs = '接口:我的Bug';
|
||||
|
||||
$lang->bug->selectProduct = '请选择产品';
|
||||
$lang->bug->byModule = '按模块';
|
||||
$lang->bug->assignToMe = '指派给我';
|
||||
$lang->bug->openedByMe = '由我创建';
|
||||
$lang->bug->resolvedByMe = '由我解决';
|
||||
$lang->bug->assignToNull = '未指派';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->allBugs = '所有Bug';
|
||||
$lang->bug->moduleBugs = '按模块浏览';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
|
||||
$lang->bug->lblProductAndModule = '产品模块';
|
||||
$lang->bug->lblProjectAndTask = '项目任务';
|
||||
$lang->bug->lblStory = '相关需求';
|
||||
$lang->bug->lblTypeAndSeverity = '类型/严重程度';
|
||||
$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器';
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
$lang->bug->lblMailto = '抄送给';
|
||||
$lang->bug->lblLastEdited = '最后修改';
|
||||
$lang->bug->lblResolved = '由谁解决';
|
||||
|
||||
$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?';
|
||||
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
$lang->bug->legendMailto = '抄送给';
|
||||
$lang->bug->legendAttatch = '附件';
|
||||
$lang->bug->legendLinkBugs = '相关Bug';
|
||||
$lang->bug->legendPrjStoryTask= '项目/需求/任务';
|
||||
$lang->bug->legendCases = '相关用例';
|
||||
$lang->bug->legendSteps = '重现步骤';
|
||||
$lang->bug->legendAction = '操作';
|
||||
$lang->bug->legendHistory = '历史记录';
|
||||
$lang->bug->legendComment = '备注';
|
||||
$lang->bug->legendLife = 'BUG的一生';
|
||||
$lang->bug->legendMisc = '其相关他';
|
||||
|
||||
$lang->bug->buttonEdit = '编辑';
|
||||
$lang->bug->buttonActivate = '激活';
|
||||
$lang->bug->buttonResolve = '解决';
|
||||
$lang->bug->buttonClose = '关闭';
|
||||
$lang->bug->buttonToList = '返回';
|
||||
|
||||
$lang->bug->severityList[3] = 3;
|
||||
$lang->bug->severityList[1] = 1;
|
||||
$lang->bug->severityList[2] = 2;
|
||||
$lang->bug->severityList[4] = 4;
|
||||
|
||||
/* Define the OS list. */
|
||||
$lang->bug->osList['all'] = '全部';
|
||||
$lang->bug->osList['winxp'] = 'Windows XP';
|
||||
$lang->bug->osList['win7'] = 'Windows 7';
|
||||
$lang->bug->osList['vista'] = 'Windows Vista';
|
||||
$lang->bug->osList['win2000'] = 'Windows 2000';
|
||||
$lang->bug->osList['winnt'] = 'Windows NT';
|
||||
$lang->bug->osList['win98'] = 'Windows 98';
|
||||
$lang->bug->osList['linux'] = 'Linux';
|
||||
$lang->bug->osList['unix'] = 'Unix';
|
||||
$lang->bug->osList['others'] = '其他';
|
||||
|
||||
/* Define the OS list. */
|
||||
$lang->bug->browserList['all'] = '全部';
|
||||
$lang->bug->browserList['ie6'] = 'IE6';
|
||||
$lang->bug->browserList['ie7'] = 'IE7';
|
||||
$lang->bug->browserList['ie8'] = 'IE8';
|
||||
$lang->bug->browserList['firefox2'] = 'firefox2';
|
||||
$lang->bug->browserList['firefx3'] = 'firefox3';
|
||||
$lang->bug->browserList['opera9'] = 'opera9';
|
||||
$lang->bug->browserList['oprea10'] = 'opera10';
|
||||
$lang->bug->browserList['safari'] = 'safari';
|
||||
$lang->bug->browserList['chrome'] = 'chrome';
|
||||
$lang->bug->browserList['other'] = '其他';
|
||||
|
||||
/* Define the types. */
|
||||
$lang->bug->typeList[''] = '';
|
||||
$lang->bug->typeList['codeerror'] = '代码错误';
|
||||
$lang->bug->typeList['interface'] = '界面优化';
|
||||
$lang->bug->typeList['designchange'] = '设计变更';
|
||||
$lang->bug->typeList['Others'] = '其他';
|
||||
|
||||
$lang->bug->statusList[''] = '';
|
||||
$lang->bug->statusList['active'] = '激活';
|
||||
$lang->bug->statusList['resolved'] = '已解决';
|
||||
$lang->bug->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->bug->resolutionList[''] = '';
|
||||
$lang->bug->resolutionList['bydesign'] = '设计如此';
|
||||
$lang->bug->resolutionList['duplicate'] = '重复Bug';
|
||||
$lang->bug->resolutionList['external'] = '外部原因';
|
||||
$lang->bug->resolutionList['fixed'] = '已解决';
|
||||
$lang->bug->resolutionList['notrepro'] = '无法重现';
|
||||
$lang->bug->resolutionList['postponed'] = '延期处理';
|
||||
$lang->bug->resolutionList['willnotfix'] = "不予解决";
|
||||
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属产品';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->path = '模块路径';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->story = '相关需求';
|
||||
$lang->bug->storyVersion = '需求版本';
|
||||
$lang->bug->task = '相关任务';
|
||||
$lang->bug->title = 'Bug标题';
|
||||
$lang->bug->severity = '严重程度';
|
||||
$lang->bug->type = 'Bug类型';
|
||||
$lang->bug->os = '操作系统';
|
||||
$lang->bug->browser = '浏览器';
|
||||
$lang->bug->machine = '机器硬件';
|
||||
$lang->bug->found = '如何发现';
|
||||
$lang->bug->steps = '重现步骤';
|
||||
$lang->bug->status = 'Bug状态';
|
||||
$lang->bug->mailto = '抄送给';
|
||||
$lang->bug->openedBy = '由谁创建';
|
||||
$lang->bug->openedDate = '创建日期';
|
||||
$lang->bug->openedBuild = '影响版本';
|
||||
$lang->bug->assignedTo = '指派给';
|
||||
$lang->bug->assignedDate = '指派日期';
|
||||
$lang->bug->resolvedBy = '解决者';
|
||||
$lang->bug->resolution = '解决方案';
|
||||
$lang->bug->resolvedBuild = '解决版本';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复Bug';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
$lang->bug->case = '相关用例';
|
||||
$lang->bug->files = '附件';
|
||||
|
||||
$lang->bug->tblStep = "[步骤]\n";
|
||||
$lang->bug->tblResult = "[结果]\n";
|
||||
$lang->bug->tblExpect = "[期望]\n";
|
||||
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
|
||||
@@ -1,271 +1,271 @@
|
||||
<?php
|
||||
/**
|
||||
* The bug module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
/* 字段列表。*/
|
||||
$lang->bug->common = '缺陷管理';
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属产品';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->path = '模块路径';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->story = '相关需求';
|
||||
$lang->bug->storyVersion = '需求版本';
|
||||
$lang->bug->task = '相关任务';
|
||||
$lang->bug->title = 'Bug标题';
|
||||
$lang->bug->severity = '严重程度';
|
||||
$lang->bug->severityAB = '级别';
|
||||
$lang->bug->pri = '优先级';
|
||||
$lang->bug->type = 'Bug类型';
|
||||
$lang->bug->os = '操作系统';
|
||||
$lang->bug->browser = '浏览器';
|
||||
$lang->bug->machine = '机器硬件';
|
||||
$lang->bug->found = '如何发现';
|
||||
$lang->bug->steps = '重现步骤';
|
||||
$lang->bug->status = 'Bug状态';
|
||||
$lang->bug->mailto = '抄送给';
|
||||
$lang->bug->openedBy = '由谁创建';
|
||||
$lang->bug->openedByAB = '创建';
|
||||
$lang->bug->openedDate = '创建日期';
|
||||
$lang->bug->openedBuild = '影响版本';
|
||||
$lang->bug->assignedTo = '指派给';
|
||||
$lang->bug->assignedDate = '指派日期';
|
||||
$lang->bug->resolvedBy = '解决者';
|
||||
$lang->bug->resolution = '解决方案';
|
||||
$lang->bug->resolutionAB = '方案';
|
||||
$lang->bug->resolvedBuild = '解决版本';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复Bug';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
$lang->bug->case = '相关用例';
|
||||
$lang->bug->files = '附件';
|
||||
$lang->bug->keywords = '关键词';
|
||||
|
||||
/* 方法列表。*/
|
||||
$lang->bug->index = '首页';
|
||||
$lang->bug->create = '创建Bug';
|
||||
$lang->bug->edit = '编辑Bug';
|
||||
$lang->bug->browse = 'Bug列表';
|
||||
$lang->bug->view = 'Bug详情';
|
||||
$lang->bug->resolve = '解决Bug';
|
||||
$lang->bug->close = '关闭Bug';
|
||||
$lang->bug->activate = '激活Bug';
|
||||
$lang->bug->reportChart = '报表统计';
|
||||
$lang->bug->delete = '删除Bug';
|
||||
$lang->bug->ajaxGetUserBugs = '接口:我的Bug';
|
||||
$lang->bug->confirmStoryChange = '确认需求变动';
|
||||
|
||||
/* 查询条件列表。*/
|
||||
$lang->bug->selectProduct = '请选择产品';
|
||||
$lang->bug->byModule = '按模块';
|
||||
$lang->bug->assignToMe = '指派给我';
|
||||
$lang->bug->openedByMe = '由我创建';
|
||||
$lang->bug->resolvedByMe = '由我解决';
|
||||
$lang->bug->assignToNull = '未指派';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->allBugs = '所有Bug';
|
||||
$lang->bug->moduleBugs = '按模块浏览';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
$lang->bug->needConfirm = '需求有变动的Bug';
|
||||
$lang->bug->allProduct = '所有产品';
|
||||
|
||||
/* 页面标签。*/
|
||||
$lang->bug->lblProductAndModule = '产品模块';
|
||||
$lang->bug->lblProjectAndTask = '项目任务';
|
||||
$lang->bug->lblStory = '相关需求';
|
||||
$lang->bug->lblTypeAndSeverity = '类型/严重程度';
|
||||
$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器';
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
$lang->bug->lblMailto = '抄送给';
|
||||
$lang->bug->lblLastEdited = '最后修改';
|
||||
$lang->bug->lblResolved = '由谁解决';
|
||||
|
||||
/* legend列表。*/
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
$lang->bug->legendMailto = '抄送给';
|
||||
$lang->bug->legendAttatch = '附件';
|
||||
$lang->bug->legendLinkBugs = '相关Bug';
|
||||
$lang->bug->legendPrjStoryTask= '项目/需求/任务';
|
||||
$lang->bug->legendCases = '相关用例';
|
||||
$lang->bug->legendSteps = '重现步骤';
|
||||
$lang->bug->legendAction = '操作';
|
||||
$lang->bug->legendHistory = '历史记录';
|
||||
$lang->bug->legendComment = '备注';
|
||||
$lang->bug->legendLife = 'BUG的一生';
|
||||
$lang->bug->legendMisc = '其相关他';
|
||||
|
||||
/* 功能按钮。*/
|
||||
$lang->bug->buttonEdit = '编辑';
|
||||
$lang->bug->buttonActivate = '激活';
|
||||
$lang->bug->buttonResolve = '解决';
|
||||
$lang->bug->buttonClose = '关闭';
|
||||
$lang->bug->buttonToList = '返回';
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?';
|
||||
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tblStep = "[步骤]\n";
|
||||
$lang->bug->tblResult = "[结果]\n";
|
||||
$lang->bug->tblExpect = "[期望]\n";
|
||||
|
||||
/* 各个字段取值列表。*/
|
||||
$lang->bug->severityList[3] = '3';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[4] = '4';
|
||||
|
||||
$lang->bug->priList[0] = '';
|
||||
$lang->bug->priList[3] = '3';
|
||||
$lang->bug->priList[1] = '1';
|
||||
$lang->bug->priList[2] = '2';
|
||||
$lang->bug->priList[4] = '4';
|
||||
|
||||
$lang->bug->osList[''] = '';
|
||||
$lang->bug->osList['all'] = '全部';
|
||||
$lang->bug->osList['windows'] = 'Windows';
|
||||
$lang->bug->osList['winxp'] = 'Windows XP';
|
||||
$lang->bug->osList['win7'] = 'Windows 7';
|
||||
$lang->bug->osList['vista'] = 'Windows Vista';
|
||||
$lang->bug->osList['win2000'] = 'Windows 2000';
|
||||
$lang->bug->osList['winnt'] = 'Windows NT';
|
||||
$lang->bug->osList['win98'] = 'Windows 98';
|
||||
$lang->bug->osList['linux'] = 'Linux';
|
||||
$lang->bug->osList['freebsd'] = 'FreeBSD';
|
||||
$lang->bug->osList['unix'] = 'Unix';
|
||||
$lang->bug->osList['others'] = '其他';
|
||||
|
||||
$lang->bug->browserList[''] = '';
|
||||
$lang->bug->browserList['all'] = '全部';
|
||||
$lang->bug->browserList['ie'] = 'IE系列';
|
||||
$lang->bug->browserList['ie6'] = 'IE6';
|
||||
$lang->bug->browserList['ie7'] = 'IE7';
|
||||
$lang->bug->browserList['ie8'] = 'IE8';
|
||||
$lang->bug->browserList['firefox'] = 'firefox系列';
|
||||
$lang->bug->browserList['firefox2'] = 'firefox2';
|
||||
$lang->bug->browserList['firefx3'] = 'firefox3';
|
||||
$lang->bug->browserList['opera'] = 'opera系列';
|
||||
$lang->bug->browserList['opera9'] = 'opera9';
|
||||
$lang->bug->browserList['oprea10'] = 'opera10';
|
||||
$lang->bug->browserList['safari'] = 'safari';
|
||||
$lang->bug->browserList['chrome'] = 'chrome';
|
||||
$lang->bug->browserList['other'] = '其他';
|
||||
|
||||
$lang->bug->typeList[''] = '';
|
||||
$lang->bug->typeList['codeerror'] = '代码错误';
|
||||
$lang->bug->typeList['interface'] = '界面优化';
|
||||
$lang->bug->typeList['designchange'] = '设计变更';
|
||||
$lang->bug->typeList['newfeature'] = '新增需求';
|
||||
$lang->bug->typeList['designdefect'] = '设计缺陷';
|
||||
$lang->bug->typeList['config'] = '配置相关';
|
||||
$lang->bug->typeList['install'] = '安装部署';
|
||||
$lang->bug->typeList['security'] = '安全相关';
|
||||
$lang->bug->typeList['performance'] = '性能问题';
|
||||
$lang->bug->typeList['standard'] = '标准规范';
|
||||
$lang->bug->typeList['automation'] = '测试脚本';
|
||||
$lang->bug->typeList['trackthings'] = '事务跟踪';
|
||||
$lang->bug->typeList['Others'] = '其他';
|
||||
|
||||
$lang->bug->statusList[''] = '';
|
||||
$lang->bug->statusList['active'] = '激活';
|
||||
$lang->bug->statusList['resolved'] = '已解决';
|
||||
$lang->bug->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->bug->resolutionList[''] = '';
|
||||
$lang->bug->resolutionList['bydesign'] = '设计如此';
|
||||
$lang->bug->resolutionList['duplicate'] = '重复Bug';
|
||||
$lang->bug->resolutionList['external'] = '外部原因';
|
||||
$lang->bug->resolutionList['fixed'] = '已解决';
|
||||
$lang->bug->resolutionList['notrepro'] = '无法重现';
|
||||
$lang->bug->resolutionList['postponed'] = '延期处理';
|
||||
$lang->bug->resolutionList['willnotfix'] = "不予解决";
|
||||
|
||||
/* 统计报表。*/
|
||||
$lang->bug->report->common = '统计报表';
|
||||
$lang->bug->report->select = '请选择报表类型';
|
||||
$lang->bug->report->create = '生成报表';
|
||||
|
||||
$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量';
|
||||
$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量';
|
||||
$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数';
|
||||
$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数';
|
||||
$lang->bug->report->charts['closedBugsPerDay'] = '每天关闭的Bug数';
|
||||
$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数';
|
||||
$lang->bug->report->charts['resolvedBugsPerUser']= '每人解决的Bug数';
|
||||
$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数';
|
||||
$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计';
|
||||
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计';
|
||||
$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计';
|
||||
$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计';
|
||||
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
|
||||
//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计';
|
||||
|
||||
$lang->bug->report->options->swf = 'pie2d';
|
||||
$lang->bug->report->options->width = 'auto';
|
||||
$lang->bug->report->options->height = 300;
|
||||
$lang->bug->report->options->graph->baseFontSize = 12;
|
||||
$lang->bug->report->options->graph->showNames = 1;
|
||||
$lang->bug->report->options->graph->formatNumber = 1;
|
||||
$lang->bug->report->options->graph->decimalPrecision = 0;
|
||||
$lang->bug->report->options->graph->animation = 0;
|
||||
$lang->bug->report->options->graph->rotateNames = 0;
|
||||
$lang->bug->report->options->graph->yAxisName = 'COUNT';
|
||||
$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。
|
||||
$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。
|
||||
|
||||
$lang->bug->report->bugsPerProject->graph->xAxisName = '项目';
|
||||
$lang->bug->report->bugsPerModule->graph->xAxisName = '模块';
|
||||
|
||||
$lang->bug->report->openedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->openedBugsPerDay->height = 400;
|
||||
$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->resolvedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->resolvedBugsPerDay->height = 400;
|
||||
$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->closedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->closedBugsPerDay->height = 400;
|
||||
$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户';
|
||||
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户';
|
||||
$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户';
|
||||
|
||||
$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度';
|
||||
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';
|
||||
$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态';
|
||||
$lang->bug->report->bugsPerType->graph->xAxisName = '类型';
|
||||
$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间';
|
||||
$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
|
||||
|
||||
/* 操作记录。*/
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
<?php
|
||||
/**
|
||||
* The bug module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
/* 字段列表。*/
|
||||
$lang->bug->common = '缺陷管理';
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属产品';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->path = '模块路径';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->story = '相关需求';
|
||||
$lang->bug->storyVersion = '需求版本';
|
||||
$lang->bug->task = '相关任务';
|
||||
$lang->bug->title = 'Bug标题';
|
||||
$lang->bug->severity = '严重程度';
|
||||
$lang->bug->severityAB = '级别';
|
||||
$lang->bug->pri = '优先级';
|
||||
$lang->bug->type = 'Bug类型';
|
||||
$lang->bug->os = '操作系统';
|
||||
$lang->bug->browser = '浏览器';
|
||||
$lang->bug->machine = '机器硬件';
|
||||
$lang->bug->found = '如何发现';
|
||||
$lang->bug->steps = '重现步骤';
|
||||
$lang->bug->status = 'Bug状态';
|
||||
$lang->bug->mailto = '抄送给';
|
||||
$lang->bug->openedBy = '由谁创建';
|
||||
$lang->bug->openedByAB = '创建';
|
||||
$lang->bug->openedDate = '创建日期';
|
||||
$lang->bug->openedBuild = '影响版本';
|
||||
$lang->bug->assignedTo = '指派给';
|
||||
$lang->bug->assignedDate = '指派日期';
|
||||
$lang->bug->resolvedBy = '解决者';
|
||||
$lang->bug->resolution = '解决方案';
|
||||
$lang->bug->resolutionAB = '方案';
|
||||
$lang->bug->resolvedBuild = '解决版本';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复Bug';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
$lang->bug->case = '相关用例';
|
||||
$lang->bug->files = '附件';
|
||||
$lang->bug->keywords = '关键词';
|
||||
|
||||
/* 方法列表。*/
|
||||
$lang->bug->index = '首页';
|
||||
$lang->bug->create = '创建Bug';
|
||||
$lang->bug->edit = '编辑Bug';
|
||||
$lang->bug->browse = 'Bug列表';
|
||||
$lang->bug->view = 'Bug详情';
|
||||
$lang->bug->resolve = '解决Bug';
|
||||
$lang->bug->close = '关闭Bug';
|
||||
$lang->bug->activate = '激活Bug';
|
||||
$lang->bug->reportChart = '报表统计';
|
||||
$lang->bug->delete = '删除Bug';
|
||||
$lang->bug->ajaxGetUserBugs = '接口:我的Bug';
|
||||
$lang->bug->confirmStoryChange = '确认需求变动';
|
||||
|
||||
/* 查询条件列表。*/
|
||||
$lang->bug->selectProduct = '请选择产品';
|
||||
$lang->bug->byModule = '按模块';
|
||||
$lang->bug->assignToMe = '指派给我';
|
||||
$lang->bug->openedByMe = '由我创建';
|
||||
$lang->bug->resolvedByMe = '由我解决';
|
||||
$lang->bug->assignToNull = '未指派';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->allBugs = '所有Bug';
|
||||
$lang->bug->moduleBugs = '按模块浏览';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
$lang->bug->needConfirm = '需求有变动的Bug';
|
||||
$lang->bug->allProduct = '所有产品';
|
||||
|
||||
/* 页面标签。*/
|
||||
$lang->bug->lblProductAndModule = '产品模块';
|
||||
$lang->bug->lblProjectAndTask = '项目任务';
|
||||
$lang->bug->lblStory = '相关需求';
|
||||
$lang->bug->lblTypeAndSeverity = '类型/严重程度';
|
||||
$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器';
|
||||
$lang->bug->lblAssignedTo = '当前指派';
|
||||
$lang->bug->lblMailto = '抄送给';
|
||||
$lang->bug->lblLastEdited = '最后修改';
|
||||
$lang->bug->lblResolved = '由谁解决';
|
||||
|
||||
/* legend列表。*/
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
$lang->bug->legendMailto = '抄送给';
|
||||
$lang->bug->legendAttatch = '附件';
|
||||
$lang->bug->legendLinkBugs = '相关Bug';
|
||||
$lang->bug->legendPrjStoryTask= '项目/需求/任务';
|
||||
$lang->bug->legendCases = '相关用例';
|
||||
$lang->bug->legendSteps = '重现步骤';
|
||||
$lang->bug->legendAction = '操作';
|
||||
$lang->bug->legendHistory = '历史记录';
|
||||
$lang->bug->legendComment = '备注';
|
||||
$lang->bug->legendLife = 'BUG的一生';
|
||||
$lang->bug->legendMisc = '其相关他';
|
||||
|
||||
/* 功能按钮。*/
|
||||
$lang->bug->buttonEdit = '编辑';
|
||||
$lang->bug->buttonActivate = '激活';
|
||||
$lang->bug->buttonResolve = '解决';
|
||||
$lang->bug->buttonClose = '关闭';
|
||||
$lang->bug->buttonToList = '返回';
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?';
|
||||
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tblStep = "[步骤]\n";
|
||||
$lang->bug->tblResult = "[结果]\n";
|
||||
$lang->bug->tblExpect = "[期望]\n";
|
||||
|
||||
/* 各个字段取值列表。*/
|
||||
$lang->bug->severityList[3] = '3';
|
||||
$lang->bug->severityList[1] = '1';
|
||||
$lang->bug->severityList[2] = '2';
|
||||
$lang->bug->severityList[4] = '4';
|
||||
|
||||
$lang->bug->priList[0] = '';
|
||||
$lang->bug->priList[3] = '3';
|
||||
$lang->bug->priList[1] = '1';
|
||||
$lang->bug->priList[2] = '2';
|
||||
$lang->bug->priList[4] = '4';
|
||||
|
||||
$lang->bug->osList[''] = '';
|
||||
$lang->bug->osList['all'] = '全部';
|
||||
$lang->bug->osList['windows'] = 'Windows';
|
||||
$lang->bug->osList['winxp'] = 'Windows XP';
|
||||
$lang->bug->osList['win7'] = 'Windows 7';
|
||||
$lang->bug->osList['vista'] = 'Windows Vista';
|
||||
$lang->bug->osList['win2000'] = 'Windows 2000';
|
||||
$lang->bug->osList['winnt'] = 'Windows NT';
|
||||
$lang->bug->osList['win98'] = 'Windows 98';
|
||||
$lang->bug->osList['linux'] = 'Linux';
|
||||
$lang->bug->osList['freebsd'] = 'FreeBSD';
|
||||
$lang->bug->osList['unix'] = 'Unix';
|
||||
$lang->bug->osList['others'] = '其他';
|
||||
|
||||
$lang->bug->browserList[''] = '';
|
||||
$lang->bug->browserList['all'] = '全部';
|
||||
$lang->bug->browserList['ie'] = 'IE系列';
|
||||
$lang->bug->browserList['ie6'] = 'IE6';
|
||||
$lang->bug->browserList['ie7'] = 'IE7';
|
||||
$lang->bug->browserList['ie8'] = 'IE8';
|
||||
$lang->bug->browserList['firefox'] = 'firefox系列';
|
||||
$lang->bug->browserList['firefox2'] = 'firefox2';
|
||||
$lang->bug->browserList['firefx3'] = 'firefox3';
|
||||
$lang->bug->browserList['opera'] = 'opera系列';
|
||||
$lang->bug->browserList['opera9'] = 'opera9';
|
||||
$lang->bug->browserList['oprea10'] = 'opera10';
|
||||
$lang->bug->browserList['safari'] = 'safari';
|
||||
$lang->bug->browserList['chrome'] = 'chrome';
|
||||
$lang->bug->browserList['other'] = '其他';
|
||||
|
||||
$lang->bug->typeList[''] = '';
|
||||
$lang->bug->typeList['codeerror'] = '代码错误';
|
||||
$lang->bug->typeList['interface'] = '界面优化';
|
||||
$lang->bug->typeList['designchange'] = '设计变更';
|
||||
$lang->bug->typeList['newfeature'] = '新增需求';
|
||||
$lang->bug->typeList['designdefect'] = '设计缺陷';
|
||||
$lang->bug->typeList['config'] = '配置相关';
|
||||
$lang->bug->typeList['install'] = '安装部署';
|
||||
$lang->bug->typeList['security'] = '安全相关';
|
||||
$lang->bug->typeList['performance'] = '性能问题';
|
||||
$lang->bug->typeList['standard'] = '标准规范';
|
||||
$lang->bug->typeList['automation'] = '测试脚本';
|
||||
$lang->bug->typeList['trackthings'] = '事务跟踪';
|
||||
$lang->bug->typeList['Others'] = '其他';
|
||||
|
||||
$lang->bug->statusList[''] = '';
|
||||
$lang->bug->statusList['active'] = '激活';
|
||||
$lang->bug->statusList['resolved'] = '已解决';
|
||||
$lang->bug->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->bug->resolutionList[''] = '';
|
||||
$lang->bug->resolutionList['bydesign'] = '设计如此';
|
||||
$lang->bug->resolutionList['duplicate'] = '重复Bug';
|
||||
$lang->bug->resolutionList['external'] = '外部原因';
|
||||
$lang->bug->resolutionList['fixed'] = '已解决';
|
||||
$lang->bug->resolutionList['notrepro'] = '无法重现';
|
||||
$lang->bug->resolutionList['postponed'] = '延期处理';
|
||||
$lang->bug->resolutionList['willnotfix'] = "不予解决";
|
||||
|
||||
/* 统计报表。*/
|
||||
$lang->bug->report->common = '统计报表';
|
||||
$lang->bug->report->select = '请选择报表类型';
|
||||
$lang->bug->report->create = '生成报表';
|
||||
|
||||
$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量';
|
||||
$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量';
|
||||
$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数';
|
||||
$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数';
|
||||
$lang->bug->report->charts['closedBugsPerDay'] = '每天关闭的Bug数';
|
||||
$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数';
|
||||
$lang->bug->report->charts['resolvedBugsPerUser']= '每人解决的Bug数';
|
||||
$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数';
|
||||
$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计';
|
||||
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计';
|
||||
$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计';
|
||||
$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计';
|
||||
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
|
||||
//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计';
|
||||
|
||||
$lang->bug->report->options->swf = 'pie2d';
|
||||
$lang->bug->report->options->width = 'auto';
|
||||
$lang->bug->report->options->height = 300;
|
||||
$lang->bug->report->options->graph->baseFontSize = 12;
|
||||
$lang->bug->report->options->graph->showNames = 1;
|
||||
$lang->bug->report->options->graph->formatNumber = 1;
|
||||
$lang->bug->report->options->graph->decimalPrecision = 0;
|
||||
$lang->bug->report->options->graph->animation = 0;
|
||||
$lang->bug->report->options->graph->rotateNames = 0;
|
||||
$lang->bug->report->options->graph->yAxisName = 'COUNT';
|
||||
$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。
|
||||
$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。
|
||||
|
||||
$lang->bug->report->bugsPerProject->graph->xAxisName = '项目';
|
||||
$lang->bug->report->bugsPerModule->graph->xAxisName = '模块';
|
||||
|
||||
$lang->bug->report->openedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->openedBugsPerDay->height = 400;
|
||||
$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->resolvedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->resolvedBugsPerDay->height = 400;
|
||||
$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->closedBugsPerDay->swf = 'column2d';
|
||||
$lang->bug->report->closedBugsPerDay->height = 400;
|
||||
$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期';
|
||||
$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1;
|
||||
|
||||
$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户';
|
||||
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户';
|
||||
$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户';
|
||||
|
||||
$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度';
|
||||
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';
|
||||
$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态';
|
||||
$lang->bug->report->bugsPerType->graph->xAxisName = '类型';
|
||||
$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间';
|
||||
$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
|
||||
|
||||
/* 操作记录。*/
|
||||
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong>。', 'extra' => $lang->bug->resolutionList);
|
||||
|
||||
@@ -1,434 +1,434 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class bugModel extends model
|
||||
{
|
||||
/* 设置菜单。*/
|
||||
public function setMenu($products, $productID)
|
||||
{
|
||||
$selectHtml = html::select('productID', $products, $productID, "onchange=\"switchProduct(this.value, 'bug', 'browse');\"");
|
||||
common::setMenuVars($this->lang->bug->menu, 'product', $selectHtml . $this->lang->arrow);
|
||||
common::setMenuVars($this->lang->bug->menu, 'bug', $productID);
|
||||
common::setMenuVars($this->lang->bug->menu, 'testcase', $productID);
|
||||
common::setMenuVars($this->lang->bug->menu, 'testtask', $productID);
|
||||
}
|
||||
|
||||
/* 创建一个Bug。*/
|
||||
public function create()
|
||||
{
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('openedBy', $this->app->user->account)
|
||||
->add('openedDate', $now)
|
||||
->setDefault('project,story,task', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->specialChars('title,steps,keyword')
|
||||
->cleanInt('product, module, severity')
|
||||
->join('openedBuild', ',')
|
||||
->remove('files, labels')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
$this->loadModel('file')->saveUpload('bug', $bugID);
|
||||
return $bugID;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 获得某一个产品,某一个模块下面的所有bug。*/
|
||||
public function getModuleBugs($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('product')->eq((int)$productID)
|
||||
->onCaseOf(!empty($moduleIds))->andWhere('module')->in($moduleIds)->endCase()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/* 获取一个bug的详细信息。*/
|
||||
public function getById($bugID)
|
||||
{
|
||||
$bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
|
||||
->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id')
|
||||
->where('t1.id')->eq((int)$bugID)->fetch();
|
||||
if(!$bug) return false;
|
||||
foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = '';
|
||||
if($bug->mailto)
|
||||
{
|
||||
$bug->mailto = ltrim(trim($bug->mailto), ','); // 去掉开始的,。
|
||||
$bug->mailto = str_replace(' ', '', $bug->mailto);
|
||||
$bug->mailto = rtrim($bug->mailto, ',') . ',';
|
||||
$bug->mailto = str_replace(',', ', ', $bug->mailto);
|
||||
}
|
||||
if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title');
|
||||
if($bug->case) $bug->caseTitle = $this->dao->findById($bug->case)->from(TABLE_CASE)->fields('title')->fetch('title');
|
||||
if($bug->linkBug) $bug->linkBugTitles = $this->dao->select('id,title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs();
|
||||
$bug->files = $this->loadModel('file')->getByObject('bug', $bugID);
|
||||
return $bug;
|
||||
}
|
||||
|
||||
/* 更新bug信息。*/
|
||||
public function update($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->cleanInt('product,module,severity,project,story,task')
|
||||
->specialChars('title,steps,keyword')
|
||||
->remove('comment,fiels,labels')
|
||||
->setDefault('project,module,project,story,task,duplicateBug', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account)
|
||||
->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now)
|
||||
->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account)
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed')
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now)
|
||||
->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved')
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed')
|
||||
->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy)
|
||||
->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now)
|
||||
->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active')
|
||||
->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
|
||||
->checkIF($bug->resolvedBy, 'resolution', 'notempty')
|
||||
->checkIF($bug->closedBy, 'resolution', 'notempty')
|
||||
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
|
||||
->where('id')->eq((int)$bugID)
|
||||
->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
|
||||
/* 解决Bug。*/
|
||||
public function resolve($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('resolvedBy', $this->app->user->account)
|
||||
->add('resolvedDate', $now)
|
||||
->add('status', 'resolved')
|
||||
->add('assignedDate', $now)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->setDefault('duplicateBug', 0)
|
||||
->setDefault('assignedTo', $oldBug->openedBy)
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->resolve->requiredFields, 'notempty')
|
||||
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
|
||||
->where('id')->eq((int)$bugID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* 激活Bug。*/
|
||||
public function activate($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->setDefault('assignedTo', $oldBug->resolvedBy)
|
||||
->add('assignedDate', $now)
|
||||
->add('resolution', '')
|
||||
->add('status', 'active')
|
||||
->add('resolvedDate', '0000-00-00')
|
||||
->add('resolvedBy', '')
|
||||
->add('resolvedBuild', '')
|
||||
->add('closedBy', '')
|
||||
->add('closedDate', '0000-00-00')
|
||||
->add('duplicateBug', 0)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->remove('comment,files,labels')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/* 关闭Bug。*/
|
||||
public function close($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('assignedTo', 'closed')
|
||||
->add('assignedDate', $now)
|
||||
->add('status', 'closed')
|
||||
->add('closedBy', $this->app->user->account)
|
||||
->add('closedDate', $now)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/* 从bug列表中提取所有出现过的账户。*/
|
||||
public function extractAccountsFromList($bugs)
|
||||
{
|
||||
$accounts = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy;
|
||||
if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo;
|
||||
if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy;
|
||||
if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy;
|
||||
if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy;
|
||||
}
|
||||
return array_unique($accounts);
|
||||
}
|
||||
|
||||
/* 从一条bug中提取所有出现过的账户。*/
|
||||
public function extractAccountsFromSingle($bug)
|
||||
{
|
||||
$accounts = array();
|
||||
if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy;
|
||||
if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo;
|
||||
if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy;
|
||||
if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy;
|
||||
if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy;
|
||||
return array_unique($accounts);
|
||||
}
|
||||
|
||||
/* 获得用户的Bug id=>title列表。*/
|
||||
public function getUserBugPairs($account)
|
||||
{
|
||||
$bugs = array();
|
||||
$stmt = $this->dao->select('t1.id, t1.title, t2.name as product')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product=t2.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->query();
|
||||
while($bug = $stmt->fetch())
|
||||
{
|
||||
$bug->title = $bug->product . ' / ' . $bug->title;
|
||||
$bugs[$bug->id] = $bug->title;
|
||||
}
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/* 获得某个项目的bug列表。*/
|
||||
public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/* 通过某一次测试结果获得bug的标题和步骤。*/
|
||||
public function getBugInfoFromResult($resultID)
|
||||
{
|
||||
$title = '';
|
||||
$bugSteps = '';
|
||||
|
||||
$result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch();
|
||||
$run = $this->loadModel('testtask')->getRunById($result->run);
|
||||
if($result and $result->caseResult == 'fail')
|
||||
{
|
||||
$title = $run->case->title;
|
||||
$caseSteps = $run->case->steps;
|
||||
$stepResults = unserialize($result->stepResults);
|
||||
$bugSteps = $this->lang->bug->tblStep;
|
||||
foreach($caseSteps as $key => $step)
|
||||
{
|
||||
$bugSteps .= ($key + 1) . '. ' .$step->desc . "\n";
|
||||
if($stepResults[$step->id]['result'] == 'fail')
|
||||
{
|
||||
$bugSteps .= $this->lang->bug->tblResult;
|
||||
$bugSteps .= $stepResults[$step->id]['real'] . "\n";
|
||||
$bugSteps .= $this->lang->bug->tblExpect;
|
||||
$bugSteps .= $step->expect;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story);
|
||||
}
|
||||
|
||||
/* 按项目统计bug数。*/
|
||||
public function getDataOfBugsPerProject()
|
||||
{
|
||||
$datas = $this->dao->select('project as name, count(project) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('project')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
foreach($datas as $projectID => $data) $data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined;
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按产品模块统计bug数。*/
|
||||
public function getDataOfBugsPerModule()
|
||||
{
|
||||
$datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('module')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$modules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in(array_keys($datas))->fetchPairs();
|
||||
foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/';
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug创建日期统计。*/
|
||||
public function getDataOfOpenedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(openedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('openedDate')->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug解决日期统计。*/
|
||||
public function getDataOfResolvedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(resolvedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)->groupBy('name')
|
||||
->having('name != 0000-00-00')
|
||||
->orderBy('resolvedDate')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug关闭日期统计。*/
|
||||
public function getDataOfClosedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(closedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)->groupBy('name')
|
||||
->having('name != 0000-00-00')
|
||||
->orderBy('closedDate')->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug创建者统计。*/
|
||||
public function getDataOfOpenedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('openedBy AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug解决者统计。*/
|
||||
public function getDataOfResolvedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('resolvedBy AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)->where($this->session->bugReportCondition)
|
||||
->andWhere('resolvedBy')->ne('')
|
||||
->groupBy('name')
|
||||
->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug关闭者统计。*/
|
||||
public function getDataOfClosedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('closedBy AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)
|
||||
->andWhere('closedBy')->ne('')
|
||||
->groupBy('name')
|
||||
->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug严重程度统计。*/
|
||||
public function getDataOfBugsPerSeverity()
|
||||
{
|
||||
$datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug解决方案统计。*/
|
||||
public function getDataOfBugsPerResolution()
|
||||
{
|
||||
$datas = $this->dao->select('resolution AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)
|
||||
->andWhere('resolution')->ne('')
|
||||
->groupBy('name')->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $resolution => $data) if(isset($this->lang->bug->resolutionList[$resolution])) $data->name = $this->lang->bug->resolutionList[$resolution];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug状态统计。*/
|
||||
public function getDataOfBugsPerStatus()
|
||||
{
|
||||
$datas = $this->dao->select('status AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $status => $data) if(isset($this->lang->bug->statusList[$status])) $data->name = $this->lang->bug->statusList[$status];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug类型统计。*/
|
||||
public function getDataOfBugsPerType()
|
||||
{
|
||||
$datas = $this->dao->select('type AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
|
||||
/* 合并公共的chart设置和当前chart的设置。*/
|
||||
public function mergeChartOption($chartType)
|
||||
{
|
||||
$chartOption = $this->lang->bug->report->$chartType;
|
||||
$commonOption = $this->lang->bug->report->options;
|
||||
|
||||
/* 设置图表的标题和展示方式。*/
|
||||
$chartOption->graph->caption = $this->lang->bug->report->charts[$chartType];
|
||||
if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf;
|
||||
if(!isset($chartOption->width)) $chartOption->width = $commonOption->width;
|
||||
if(!isset($chartOption->height)) $chartOption->height = $commonOption->height;
|
||||
|
||||
/* 合并配置。*/
|
||||
foreach($commonOption->graph as $key => $value) if(!isset($chartOption->graph->$key)) $chartOption->graph->$key = $value;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class bugModel extends model
|
||||
{
|
||||
/* 设置菜单。*/
|
||||
public function setMenu($products, $productID)
|
||||
{
|
||||
$selectHtml = html::select('productID', $products, $productID, "onchange=\"switchProduct(this.value, 'bug', 'browse');\"");
|
||||
common::setMenuVars($this->lang->bug->menu, 'product', $selectHtml . $this->lang->arrow);
|
||||
common::setMenuVars($this->lang->bug->menu, 'bug', $productID);
|
||||
common::setMenuVars($this->lang->bug->menu, 'testcase', $productID);
|
||||
common::setMenuVars($this->lang->bug->menu, 'testtask', $productID);
|
||||
}
|
||||
|
||||
/* 创建一个Bug。*/
|
||||
public function create()
|
||||
{
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('openedBy', $this->app->user->account)
|
||||
->add('openedDate', $now)
|
||||
->setDefault('project,story,task', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->specialChars('title,steps,keyword')
|
||||
->cleanInt('product, module, severity')
|
||||
->join('openedBuild', ',')
|
||||
->remove('files, labels')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
$this->loadModel('file')->saveUpload('bug', $bugID);
|
||||
return $bugID;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 获得某一个产品,某一个模块下面的所有bug。*/
|
||||
public function getModuleBugs($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('product')->eq((int)$productID)
|
||||
->onCaseOf(!empty($moduleIds))->andWhere('module')->in($moduleIds)->endCase()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/* 获取一个bug的详细信息。*/
|
||||
public function getById($bugID)
|
||||
{
|
||||
$bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id')
|
||||
->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id')
|
||||
->where('t1.id')->eq((int)$bugID)->fetch();
|
||||
if(!$bug) return false;
|
||||
foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = '';
|
||||
if($bug->mailto)
|
||||
{
|
||||
$bug->mailto = ltrim(trim($bug->mailto), ','); // 去掉开始的,。
|
||||
$bug->mailto = str_replace(' ', '', $bug->mailto);
|
||||
$bug->mailto = rtrim($bug->mailto, ',') . ',';
|
||||
$bug->mailto = str_replace(',', ', ', $bug->mailto);
|
||||
}
|
||||
if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title');
|
||||
if($bug->case) $bug->caseTitle = $this->dao->findById($bug->case)->from(TABLE_CASE)->fields('title')->fetch('title');
|
||||
if($bug->linkBug) $bug->linkBugTitles = $this->dao->select('id,title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs();
|
||||
$bug->files = $this->loadModel('file')->getByObject('bug', $bugID);
|
||||
return $bug;
|
||||
}
|
||||
|
||||
/* 更新bug信息。*/
|
||||
public function update($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->cleanInt('product,module,severity,project,story,task')
|
||||
->specialChars('title,steps,keyword')
|
||||
->remove('comment,fiels,labels')
|
||||
->setDefault('project,module,project,story,task,duplicateBug', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account)
|
||||
->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now)
|
||||
->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account)
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed')
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now)
|
||||
->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved')
|
||||
->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed')
|
||||
->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy)
|
||||
->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now)
|
||||
->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active')
|
||||
->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
|
||||
->checkIF($bug->resolvedBy, 'resolution', 'notempty')
|
||||
->checkIF($bug->closedBy, 'resolution', 'notempty')
|
||||
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
|
||||
->where('id')->eq((int)$bugID)
|
||||
->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
|
||||
/* 解决Bug。*/
|
||||
public function resolve($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('resolvedBy', $this->app->user->account)
|
||||
->add('resolvedDate', $now)
|
||||
->add('status', 'resolved')
|
||||
->add('assignedDate', $now)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->setDefault('duplicateBug', 0)
|
||||
->setDefault('assignedTo', $oldBug->openedBy)
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->resolve->requiredFields, 'notempty')
|
||||
->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty')
|
||||
->where('id')->eq((int)$bugID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* 激活Bug。*/
|
||||
public function activate($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->setDefault('assignedTo', $oldBug->resolvedBy)
|
||||
->add('assignedDate', $now)
|
||||
->add('resolution', '')
|
||||
->add('status', 'active')
|
||||
->add('resolvedDate', '0000-00-00')
|
||||
->add('resolvedBy', '')
|
||||
->add('resolvedBuild', '')
|
||||
->add('closedBy', '')
|
||||
->add('closedDate', '0000-00-00')
|
||||
->add('duplicateBug', 0)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->remove('comment,files,labels')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/* 关闭Bug。*/
|
||||
public function close($bugID)
|
||||
{
|
||||
$oldBug = $this->getById($bugID);
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->add('assignedTo', 'closed')
|
||||
->add('assignedDate', $now)
|
||||
->add('status', 'closed')
|
||||
->add('closedBy', $this->app->user->account)
|
||||
->add('closedDate', $now)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/* 从bug列表中提取所有出现过的账户。*/
|
||||
public function extractAccountsFromList($bugs)
|
||||
{
|
||||
$accounts = array();
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy;
|
||||
if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo;
|
||||
if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy;
|
||||
if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy;
|
||||
if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy;
|
||||
}
|
||||
return array_unique($accounts);
|
||||
}
|
||||
|
||||
/* 从一条bug中提取所有出现过的账户。*/
|
||||
public function extractAccountsFromSingle($bug)
|
||||
{
|
||||
$accounts = array();
|
||||
if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy;
|
||||
if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo;
|
||||
if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy;
|
||||
if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy;
|
||||
if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy;
|
||||
return array_unique($accounts);
|
||||
}
|
||||
|
||||
/* 获得用户的Bug id=>title列表。*/
|
||||
public function getUserBugPairs($account)
|
||||
{
|
||||
$bugs = array();
|
||||
$stmt = $this->dao->select('t1.id, t1.title, t2.name as product')
|
||||
->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product=t2.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->query();
|
||||
while($bug = $stmt->fetch())
|
||||
{
|
||||
$bug->title = $bug->product . ' / ' . $bug->title;
|
||||
$bugs[$bug->id] = $bug->title;
|
||||
}
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/* 获得某个项目的bug列表。*/
|
||||
public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/* 通过某一次测试结果获得bug的标题和步骤。*/
|
||||
public function getBugInfoFromResult($resultID)
|
||||
{
|
||||
$title = '';
|
||||
$bugSteps = '';
|
||||
|
||||
$result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch();
|
||||
$run = $this->loadModel('testtask')->getRunById($result->run);
|
||||
if($result and $result->caseResult == 'fail')
|
||||
{
|
||||
$title = $run->case->title;
|
||||
$caseSteps = $run->case->steps;
|
||||
$stepResults = unserialize($result->stepResults);
|
||||
$bugSteps = $this->lang->bug->tblStep;
|
||||
foreach($caseSteps as $key => $step)
|
||||
{
|
||||
$bugSteps .= ($key + 1) . '. ' .$step->desc . "\n";
|
||||
if($stepResults[$step->id]['result'] == 'fail')
|
||||
{
|
||||
$bugSteps .= $this->lang->bug->tblResult;
|
||||
$bugSteps .= $stepResults[$step->id]['real'] . "\n";
|
||||
$bugSteps .= $this->lang->bug->tblExpect;
|
||||
$bugSteps .= $step->expect;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story);
|
||||
}
|
||||
|
||||
/* 按项目统计bug数。*/
|
||||
public function getDataOfBugsPerProject()
|
||||
{
|
||||
$datas = $this->dao->select('project as name, count(project) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('project')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
foreach($datas as $projectID => $data) $data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined;
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按产品模块统计bug数。*/
|
||||
public function getDataOfBugsPerModule()
|
||||
{
|
||||
$datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('module')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$modules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in(array_keys($datas))->fetchPairs();
|
||||
foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/';
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug创建日期统计。*/
|
||||
public function getDataOfOpenedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(openedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('openedDate')->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug解决日期统计。*/
|
||||
public function getDataOfResolvedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(resolvedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)->groupBy('name')
|
||||
->having('name != 0000-00-00')
|
||||
->orderBy('resolvedDate')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug关闭日期统计。*/
|
||||
public function getDataOfClosedBugsPerDay()
|
||||
{
|
||||
return $this->dao->select('DATE_FORMAT(closedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)->groupBy('name')
|
||||
->having('name != 0000-00-00')
|
||||
->orderBy('closedDate')->fetchAll();
|
||||
}
|
||||
|
||||
/* 按bug创建者统计。*/
|
||||
public function getDataOfOpenedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('openedBy AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug解决者统计。*/
|
||||
public function getDataOfResolvedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('resolvedBy AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)->where($this->session->bugReportCondition)
|
||||
->andWhere('resolvedBy')->ne('')
|
||||
->groupBy('name')
|
||||
->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug关闭者统计。*/
|
||||
public function getDataOfClosedBugsPerUser()
|
||||
{
|
||||
$datas = $this->dao->select('closedBy AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)
|
||||
->andWhere('closedBy')->ne('')
|
||||
->groupBy('name')
|
||||
->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug严重程度统计。*/
|
||||
public function getDataOfBugsPerSeverity()
|
||||
{
|
||||
$datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug解决方案统计。*/
|
||||
public function getDataOfBugsPerResolution()
|
||||
{
|
||||
$datas = $this->dao->select('resolution AS name, COUNT(*) AS value')
|
||||
->from(TABLE_BUG)
|
||||
->where($this->session->bugReportCondition)
|
||||
->andWhere('resolution')->ne('')
|
||||
->groupBy('name')->orderBy('value DESC')
|
||||
->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $resolution => $data) if(isset($this->lang->bug->resolutionList[$resolution])) $data->name = $this->lang->bug->resolutionList[$resolution];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug状态统计。*/
|
||||
public function getDataOfBugsPerStatus()
|
||||
{
|
||||
$datas = $this->dao->select('status AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $status => $data) if(isset($this->lang->bug->statusList[$status])) $data->name = $this->lang->bug->statusList[$status];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/* 按bug类型统计。*/
|
||||
public function getDataOfBugsPerType()
|
||||
{
|
||||
$datas = $this->dao->select('type AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type];
|
||||
return $datas;
|
||||
}
|
||||
|
||||
|
||||
/* 合并公共的chart设置和当前chart的设置。*/
|
||||
public function mergeChartOption($chartType)
|
||||
{
|
||||
$chartOption = $this->lang->bug->report->$chartType;
|
||||
$commonOption = $this->lang->bug->report->options;
|
||||
|
||||
/* 设置图表的标题和展示方式。*/
|
||||
$chartOption->graph->caption = $this->lang->bug->report->charts[$chartType];
|
||||
if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf;
|
||||
if(!isset($chartOption->width)) $chartOption->width = $commonOption->width;
|
||||
if(!isset($chartOption->height)) $chartOption->height = $commonOption->height;
|
||||
|
||||
/* 合并配置。*/
|
||||
foreach($commonOption->graph as $key => $value) if(!isset($chartOption->graph->$key)) $chartOption->graph->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php include '../../common/view/table2csv.html.php';?>
|
||||
<script language='Javascript'>
|
||||
/* 通过模块浏览。*/
|
||||
function browseByModule(active)
|
||||
{
|
||||
$('#mainbox').addClass('yui-t1');
|
||||
$('#treebox').removeClass('hidden');
|
||||
$('#bymoduleTab').addClass('active');
|
||||
$('#querybox').addClass('hidden');
|
||||
$('#' + active + 'Tab').removeClass('active');
|
||||
}
|
||||
/* 搜索。*/
|
||||
function browseBySearch(active)
|
||||
{
|
||||
$('#mainbox').removeClass('yui-t1');
|
||||
$('#treebox').addClass('hidden');
|
||||
$('#querybox').removeClass('hidden');
|
||||
$('#bymoduleTab').removeClass('active');
|
||||
$('#' + active + 'Tab').removeClass('active');
|
||||
$('#bysearchTab').addClass('active');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class='yui-d0'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->bug->moduleBugs . "</a></span> ";
|
||||
echo "<span id='assigntomeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . "</span>";
|
||||
echo "<span id='openedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . "</span>";
|
||||
echo "<span id='resolvedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . "</span>";
|
||||
echo "<span id='assigntonullTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull¶m=0"), $lang->bug->assignToNull) . "</span>";
|
||||
echo "<span id='longlifebugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . "</span>";
|
||||
echo "<span id='postponedbugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . "</span>";
|
||||
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->bug->byQuery}</a></span> ";
|
||||
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
|
||||
echo "<span id='needconfirmTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . "</span>";
|
||||
?>
|
||||
</div>
|
||||
<div class='f-right'>
|
||||
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
|
||||
<?php common::printLink('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->bug->report->common); ?>
|
||||
<?php common::printLink('bug', 'create', "productID=$productID&extra=moduleID=$moduleID", $lang->bug->create); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'><?php echo $searchForm;?></div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0 <?php if($browseType == 'bymodule') echo 'yui-t1';?>' id='mainbox'>
|
||||
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
|
||||
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
|
||||
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
|
||||
<tr class='a-center'>
|
||||
<td class='linkbox'><?php echo html::a($bugLink, sprintf('%03d', $bug->id));?></td>
|
||||
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
|
||||
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($bugLink, $bug->title);?></td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
|
||||
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
|
||||
<td>
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
|
||||
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
|
||||
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $pager->show();?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-b <?php if($browseType != 'bymodule') echo 'hidden';?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script language='javascript'>
|
||||
$("#<?php echo $browseType;?>Tab").addClass('active');
|
||||
$("#module<?php echo $moduleID;?>").addClass('active');
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<?php include '../../common/view/table2csv.html.php';?>
|
||||
<script language='Javascript'>
|
||||
/* 通过模块浏览。*/
|
||||
function browseByModule(active)
|
||||
{
|
||||
$('#mainbox').addClass('yui-t1');
|
||||
$('#treebox').removeClass('hidden');
|
||||
$('#bymoduleTab').addClass('active');
|
||||
$('#querybox').addClass('hidden');
|
||||
$('#' + active + 'Tab').removeClass('active');
|
||||
}
|
||||
/* 搜索。*/
|
||||
function browseBySearch(active)
|
||||
{
|
||||
$('#mainbox').removeClass('yui-t1');
|
||||
$('#treebox').addClass('hidden');
|
||||
$('#querybox').removeClass('hidden');
|
||||
$('#bymoduleTab').removeClass('active');
|
||||
$('#' + active + 'Tab').removeClass('active');
|
||||
$('#bysearchTab').addClass('active');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class='yui-d0'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'>
|
||||
<?php
|
||||
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->bug->moduleBugs . "</a></span> ";
|
||||
echo "<span id='assigntomeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . "</span>";
|
||||
echo "<span id='openedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . "</span>";
|
||||
echo "<span id='resolvedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . "</span>";
|
||||
echo "<span id='assigntonullTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull¶m=0"), $lang->bug->assignToNull) . "</span>";
|
||||
echo "<span id='longlifebugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . "</span>";
|
||||
echo "<span id='postponedbugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . "</span>";
|
||||
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'>{$lang->bug->byQuery}</a></span> ";
|
||||
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
|
||||
echo "<span id='needconfirmTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . "</span>";
|
||||
?>
|
||||
</div>
|
||||
<div class='f-right'>
|
||||
<?php echo html::export2csv($lang->exportCSV, $lang->setFileName);?>
|
||||
<?php common::printLink('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->bug->report->common); ?>
|
||||
<?php common::printLink('bug', 'create', "productID=$productID&extra=moduleID=$moduleID", $lang->bug->create); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'><?php echo $searchForm;?></div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0 <?php if($browseType == 'bymodule') echo 'yui-t1';?>' id='mainbox'>
|
||||
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<?php $vars = "productID=$productID&browseType=$browseType¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<table class='table-1 fixed colored tablesorter datatable'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th class='w-p40'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
|
||||
<th class='w-50px'><?php echo $lang->actions;?></th>
|
||||
<?php else:?>
|
||||
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedBy);?></th>
|
||||
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
|
||||
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
|
||||
<tr class='a-center'>
|
||||
<td class='linkbox'><?php echo html::a($bugLink, sprintf('%03d', $bug->id));?></td>
|
||||
<td><?php echo $lang->bug->severityList[$bug->severity]?></td>
|
||||
<td><?php echo $lang->bug->priList[$bug->pri]?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($bugLink, $bug->title);?></td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
|
||||
<td><?php echo html::a(inlink('confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin')?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
|
||||
<td>
|
||||
<?php
|
||||
$params = "bugID=$bug->id";
|
||||
if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' ';
|
||||
if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' ';
|
||||
common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit);
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php $pager->show();?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-b <?php if($browseType != 'bymodule') echo 'hidden';?>' id='treebox'>
|
||||
<div class='box-title'><?php echo $productName;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $moduleTree;?>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script language='javascript'>
|
||||
$("#<?php echo $browseType;?>Tab").addClass('active');
|
||||
$("#module<?php echo $moduleID;?>").addClass('active');
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -1,192 +1,192 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<style>
|
||||
#project, #product {width:200px}
|
||||
#module, #task {width:400px}
|
||||
#severity, #browser {width:113px}
|
||||
#story{width:605px}
|
||||
</style>
|
||||
<script language='Javascript'>
|
||||
/* 当选择产品时,触发这个方法。*/
|
||||
function loadAll(productID)
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = '<select id="task"></select>'; // 将taskID内容复位。
|
||||
loadModuleMenu(productID); // 加载产品的模块列表。
|
||||
loadProductStories(productID); // 加载产品的需求列表。
|
||||
loadProductProjects(productID); // 加载项目列表。
|
||||
loadProductBuilds(productID); // 加载build列表。
|
||||
}
|
||||
|
||||
/* 加载模块列表。*/
|
||||
function loadModuleMenu(productID)
|
||||
{
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug');
|
||||
$('#moduleIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载产品的需求列表。*/
|
||||
function loadProductStories(productID)
|
||||
{
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
|
||||
$('#storyIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目列表。*/
|
||||
function loadProductProjects(productID)
|
||||
{
|
||||
link = createLink('product', 'ajaxGetProjects', 'productID=' + productID);
|
||||
$('#projectIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载产品build列表。*/
|
||||
function loadProductBuilds(productID)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild');
|
||||
$('#buildBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的任务列表和需求列表。*/
|
||||
function loadProjectRelated(projectID)
|
||||
{
|
||||
if(projectID)
|
||||
{
|
||||
loadProjectTasks(projectID);
|
||||
loadProjectStories(projectID);
|
||||
loadProjectBuilds(projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = '';
|
||||
loadProductStories($('#product').get(0).value);
|
||||
loadProductBuilds($('#product').get(0).value);
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载项目的任务列表。*/
|
||||
function loadProjectTasks(projectID)
|
||||
{
|
||||
link = createLink('task', 'ajaxGetProjectTasks', 'projectID=' + projectID);
|
||||
$('#taskIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的需求列表。*/
|
||||
function loadProjectStories(projectID)
|
||||
{
|
||||
productID = $('#product').get(0).value;
|
||||
link = createLink('story', 'ajaxGetProjectStories', 'projectID=' + projectID + '&productID=' + productID);
|
||||
$('#storyIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的build列表。*/
|
||||
function loadProjectBuilds(projectID)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&varName=openedBuild');
|
||||
$('#buildBox').load(link);
|
||||
}
|
||||
var userList = "<?php echo join(',', array_keys($users));?>".split(',');
|
||||
$(function() {
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblProductAndModule;?></th>
|
||||
<td>
|
||||
<?php echo html::select('product', $products, $productID, "onchange=loadAll(this.value); class='select-2'");?>
|
||||
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, 'class=select-3');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblProjectAndTask;?></th>
|
||||
<td>
|
||||
<span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, 'onchange=loadProjectRelated(this.value)');?></span>
|
||||
<span id='taskIdBox'><?php echo html::select('task', $tasks, $taskID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblStory;?></th>
|
||||
<td>
|
||||
<span id='storyIdBox'><?php echo html::select('story', $stories, $storyID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
|
||||
<td>
|
||||
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, 'size=4 multiple=multiple class=select-3');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblTypeAndSeverity;?></th>
|
||||
<td>
|
||||
<?php echo html::select('type', $lang->bug->typeList, 'codeerror', 'class=select-2');?>
|
||||
<?php echo html::select('severity', $lang->bug->severityList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblSystemBrowserAndHardware;?></nobr></th>
|
||||
<td>
|
||||
<?php echo html::select('os', $lang->bug->osList, '', 'class=select-2');?>
|
||||
<?php echo html::select('browser', $lang->bug->browserList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
|
||||
<td> <?php echo html::select('assignedTo', $users, '', 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblMailto;?></nobr></th>
|
||||
<td> <?php echo html::input('mailto', '', 'class=text-1');?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->title;?></th>
|
||||
<td><?php echo html::input('title', $title, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->steps;?></th>
|
||||
<td><?php echo html::textarea('steps', $steps, "class='area-1' rows='6'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->keywords;?></th>
|
||||
<td><?php echo html::input('keywords', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->files;?></th>
|
||||
<td><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<?php echo html::submitButton() . html::resetButton() . html::hidden('case', $caseID);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The create view of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/autocomplete.html.php';?>
|
||||
<style>
|
||||
#project, #product {width:200px}
|
||||
#module, #task {width:400px}
|
||||
#severity, #browser {width:113px}
|
||||
#story{width:605px}
|
||||
</style>
|
||||
<script language='Javascript'>
|
||||
/* 当选择产品时,触发这个方法。*/
|
||||
function loadAll(productID)
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = '<select id="task"></select>'; // 将taskID内容复位。
|
||||
loadModuleMenu(productID); // 加载产品的模块列表。
|
||||
loadProductStories(productID); // 加载产品的需求列表。
|
||||
loadProductProjects(productID); // 加载项目列表。
|
||||
loadProductBuilds(productID); // 加载build列表。
|
||||
}
|
||||
|
||||
/* 加载模块列表。*/
|
||||
function loadModuleMenu(productID)
|
||||
{
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug');
|
||||
$('#moduleIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载产品的需求列表。*/
|
||||
function loadProductStories(productID)
|
||||
{
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
|
||||
$('#storyIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目列表。*/
|
||||
function loadProductProjects(productID)
|
||||
{
|
||||
link = createLink('product', 'ajaxGetProjects', 'productID=' + productID);
|
||||
$('#projectIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载产品build列表。*/
|
||||
function loadProductBuilds(productID)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild');
|
||||
$('#buildBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的任务列表和需求列表。*/
|
||||
function loadProjectRelated(projectID)
|
||||
{
|
||||
if(projectID)
|
||||
{
|
||||
loadProjectTasks(projectID);
|
||||
loadProjectStories(projectID);
|
||||
loadProjectBuilds(projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#taskIdBox').get(0).innerHTML = '';
|
||||
loadProductStories($('#product').get(0).value);
|
||||
loadProductBuilds($('#product').get(0).value);
|
||||
}
|
||||
}
|
||||
|
||||
/* 加载项目的任务列表。*/
|
||||
function loadProjectTasks(projectID)
|
||||
{
|
||||
link = createLink('task', 'ajaxGetProjectTasks', 'projectID=' + projectID);
|
||||
$('#taskIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的需求列表。*/
|
||||
function loadProjectStories(projectID)
|
||||
{
|
||||
productID = $('#product').get(0).value;
|
||||
link = createLink('story', 'ajaxGetProjectStories', 'projectID=' + projectID + '&productID=' + productID);
|
||||
$('#storyIdBox').load(link);
|
||||
}
|
||||
|
||||
/* 加载项目的build列表。*/
|
||||
function loadProjectBuilds(projectID)
|
||||
{
|
||||
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&varName=openedBuild');
|
||||
$('#buildBox').load(link);
|
||||
}
|
||||
var userList = "<?php echo join(',', array_keys($users));?>".split(',');
|
||||
$(function() {
|
||||
$("#mailto").autocomplete(userList, { multiple: true, mustMatch: true});
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblProductAndModule;?></th>
|
||||
<td>
|
||||
<?php echo html::select('product', $products, $productID, "onchange=loadAll(this.value); class='select-2'");?>
|
||||
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, 'class=select-3');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblProjectAndTask;?></th>
|
||||
<td>
|
||||
<span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, 'onchange=loadProjectRelated(this.value)');?></span>
|
||||
<span id='taskIdBox'><?php echo html::select('task', $tasks, $taskID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblStory;?></th>
|
||||
<td>
|
||||
<span id='storyIdBox'><?php echo html::select('story', $stories, $storyID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->openedBuild;?></th>
|
||||
<td>
|
||||
<span id='buildBox'><?php echo html::select('openedBuild[]', $builds, $buildID, 'size=4 multiple=multiple class=select-3');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->lblTypeAndSeverity;?></th>
|
||||
<td>
|
||||
<?php echo html::select('type', $lang->bug->typeList, 'codeerror', 'class=select-2');?>
|
||||
<?php echo html::select('severity', $lang->bug->severityList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblSystemBrowserAndHardware;?></nobr></th>
|
||||
<td>
|
||||
<?php echo html::select('os', $lang->bug->osList, '', 'class=select-2');?>
|
||||
<?php echo html::select('browser', $lang->bug->browserList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
|
||||
<td> <?php echo html::select('assignedTo', $users, '', 'class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->lblMailto;?></nobr></th>
|
||||
<td> <?php echo html::input('mailto', '', 'class=text-1');?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->title;?></th>
|
||||
<td><?php echo html::input('title', $title, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->steps;?></th>
|
||||
<td><?php echo html::textarea('steps', $steps, "class='area-1' rows='6'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->keywords;?></th>
|
||||
<td><?php echo html::input('keywords', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->files;?></th>
|
||||
<td><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<?php echo html::submitButton() . html::resetButton() . html::hidden('case', $caseID);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
</div>
|
||||
<?php
|
||||
/**
|
||||
* The index view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,77 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* The report view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
span {display:block}
|
||||
</style>
|
||||
<div class='yui-d0'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'><?php echo $lang->bug->report->common;?></div>
|
||||
<div class='f-right'><?php common::printLink('bug', 'browse', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->goback); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0 yui-t1'>
|
||||
<div class='yui-b'>
|
||||
<div class='box-title'><?php echo $lang->bug->report->select;?></div>
|
||||
<div class='box-content'>
|
||||
<form method='post'>
|
||||
<?php echo html::checkBox('charts', $lang->bug->report->charts, $checkedCharts);?>
|
||||
<div class='a-center'><?php echo html::submitButton($lang->bug->report->create);?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->report->common;?></caption>
|
||||
<?php foreach($charts as $chartType => $chartContent):?>
|
||||
<tr valign='top'>
|
||||
<td><?php echo $chartContent;?></td>
|
||||
<td width='300'>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<th><?php echo $lang->report->item;?></th>
|
||||
<th><?php echo $lang->report->value;?></th>
|
||||
<th><?php echo $lang->report->percent;?></th>
|
||||
</tr>
|
||||
<?php foreach($datas[$chartType] as $key => $data):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $data->name;?></td>
|
||||
<td><?php echo $data->value;?></td>
|
||||
<td><?php echo ($data->percent * 100) . '%';?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $rendJS;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The report view file of bug module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
span {display:block}
|
||||
</style>
|
||||
<div class='yui-d0'>
|
||||
<div id='featurebar'>
|
||||
<div class='f-left'><?php echo $lang->bug->report->common;?></div>
|
||||
<div class='f-right'><?php common::printLink('bug', 'browse', "productID=$productID&browseType=$browseType&moduleID=$moduleID", $lang->goback); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0 yui-t1'>
|
||||
<div class='yui-b'>
|
||||
<div class='box-title'><?php echo $lang->bug->report->select;?></div>
|
||||
<div class='box-content'>
|
||||
<form method='post'>
|
||||
<?php echo html::checkBox('charts', $lang->bug->report->charts, $checkedCharts);?>
|
||||
<div class='a-center'><?php echo html::submitButton($lang->bug->report->create);?></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->report->common;?></caption>
|
||||
<?php foreach($charts as $chartType => $chartContent):?>
|
||||
<tr valign='top'>
|
||||
<td><?php echo $chartContent;?></td>
|
||||
<td width='300'>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<th><?php echo $lang->report->item;?></th>
|
||||
<th><?php echo $lang->report->value;?></th>
|
||||
<th><?php echo $lang->report->percent;?></th>
|
||||
</tr>
|
||||
<?php foreach($datas[$chartType] as $key => $data):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $data->name;?></td>
|
||||
<td><?php echo $data->value;?></td>
|
||||
<td><?php echo ($data->percent * 100) . '%';?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $rendJS;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<table width='98%' align='center'>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -1,122 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class build extends control
|
||||
{
|
||||
/* 添加build。*/
|
||||
public function create($projectID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$buildID = $this->build->create($projectID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('build', $buildID, 'opened');
|
||||
die(js::locate($this->createLink('project', 'build', "project=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 设置菜单。*/
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $projectID);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->create;
|
||||
$this->view->products = $this->project->getProducts($projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑build。*/
|
||||
public function edit($buildID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->build->update($buildID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('build', $buildID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "buildID=$buildID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 设置菜单。*/
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $build->project);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->edit;
|
||||
$this->view->position[] = $this->lang->build->edit;
|
||||
$this->view->products = $this->project->getProducts($build->project);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->view->build = $build;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 查看build。*/
|
||||
public function view($buildID)
|
||||
{
|
||||
/* 设置菜单。*/
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $build->project);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->view;
|
||||
$this->view->position[] = $this->lang->build->view;
|
||||
$this->view->products = $this->project->getProducts($build->project);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->view->build = $build;
|
||||
$this->view->actions = $this->loadModel('action')->getList('build', $buildID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除build。*/
|
||||
public function delete($buildID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$build = $this->build->getById($buildID);
|
||||
$this->build->delete(TABLE_BUILD, $buildID);
|
||||
die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* AJAX接口:获得产品的build列表。*/
|
||||
public function ajaxGetProductBuilds($productID, $varName, $build = '')
|
||||
{
|
||||
if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'size=4 class=select-3 multiple'));
|
||||
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'class=select-3'));
|
||||
}
|
||||
|
||||
/* AJAX接口:获得项目的build列表。*/
|
||||
public function ajaxGetProjectBuilds($projectID, $varName, $build = '')
|
||||
{
|
||||
if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'size=4 class=select-3 multiple'));
|
||||
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'class=select-3'));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class build extends control
|
||||
{
|
||||
/* 添加build。*/
|
||||
public function create($projectID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$buildID = $this->build->create($projectID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('build', $buildID, 'opened');
|
||||
die(js::locate($this->createLink('project', 'build', "project=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 设置菜单。*/
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $projectID);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->create;
|
||||
$this->view->products = $this->project->getProducts($projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑build。*/
|
||||
public function edit($buildID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->build->update($buildID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('build', $buildID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "buildID=$buildID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 设置菜单。*/
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $build->project);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->edit;
|
||||
$this->view->position[] = $this->lang->build->edit;
|
||||
$this->view->products = $this->project->getProducts($build->project);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->view->build = $build;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 查看build。*/
|
||||
public function view($buildID)
|
||||
{
|
||||
/* 设置菜单。*/
|
||||
$build = $this->build->getById((int)$buildID);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $build->project);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->header->title = $this->lang->build->view;
|
||||
$this->view->position[] = $this->lang->build->view;
|
||||
$this->view->products = $this->project->getProducts($build->project);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->view->build = $build;
|
||||
$this->view->actions = $this->loadModel('action')->getList('build', $buildID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除build。*/
|
||||
public function delete($buildID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$build = $this->build->getById($buildID);
|
||||
$this->build->delete(TABLE_BUILD, $buildID);
|
||||
die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* AJAX接口:获得产品的build列表。*/
|
||||
public function ajaxGetProductBuilds($productID, $varName, $build = '')
|
||||
{
|
||||
if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'size=4 class=select-3 multiple'));
|
||||
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'class=select-3'));
|
||||
}
|
||||
|
||||
/* AJAX接口:获得项目的build列表。*/
|
||||
public function ajaxGetProjectBuilds($projectID, $varName, $build = '')
|
||||
{
|
||||
if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'size=4 class=select-3 multiple'));
|
||||
if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'class=select-3'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The build module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->build->common = 'Build';
|
||||
$lang->build->create = "创建Build";
|
||||
$lang->build->edit = "编辑Build";
|
||||
$lang->build->delete = "删除Build";
|
||||
$lang->build->view = "Build详情";
|
||||
$lang->build->ajaxGetProductBuilds = '接口:产品Build列表';
|
||||
$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表';
|
||||
|
||||
$lang->build->confirmDelete = "您确认删除该build吗?";
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = '产品';
|
||||
$lang->build->project = '项目';
|
||||
$lang->build->name = '名称编号';
|
||||
$lang->build->date = 'Build日期';
|
||||
$lang->build->builder = '构建者';
|
||||
$lang->build->scmPath = '源代码地址';
|
||||
$lang->build->filePath = '存储地址';
|
||||
$lang->build->desc = '描述';
|
||||
<?php
|
||||
/**
|
||||
* The build module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->build->common = 'Build';
|
||||
$lang->build->create = "创建Build";
|
||||
$lang->build->edit = "编辑Build";
|
||||
$lang->build->delete = "删除Build";
|
||||
$lang->build->view = "Build详情";
|
||||
$lang->build->ajaxGetProductBuilds = '接口:产品Build列表';
|
||||
$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表';
|
||||
|
||||
$lang->build->confirmDelete = "您确认删除该build吗?";
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = '产品';
|
||||
$lang->build->project = '项目';
|
||||
$lang->build->name = '名称编号';
|
||||
$lang->build->date = 'Build日期';
|
||||
$lang->build->builder = '构建者';
|
||||
$lang->build->scmPath = '源代码地址';
|
||||
$lang->build->filePath = '存储地址';
|
||||
$lang->build->desc = '描述';
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The build module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->build->common = 'Build';
|
||||
$lang->build->create = "创建Build";
|
||||
$lang->build->edit = "编辑Build";
|
||||
$lang->build->delete = "删除Build";
|
||||
$lang->build->view = "Build详情";
|
||||
$lang->build->ajaxGetProductBuilds = '接口:产品Build列表';
|
||||
$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表';
|
||||
|
||||
$lang->build->confirmDelete = "您确认删除该build吗?";
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = '产品';
|
||||
$lang->build->project = '项目';
|
||||
$lang->build->name = '名称编号';
|
||||
$lang->build->date = 'Build日期';
|
||||
$lang->build->builder = '构建者';
|
||||
$lang->build->scmPath = '源代码地址';
|
||||
$lang->build->filePath = '存储地址';
|
||||
$lang->build->desc = '描述';
|
||||
<?php
|
||||
/**
|
||||
* The build module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->build->common = 'Build';
|
||||
$lang->build->create = "创建Build";
|
||||
$lang->build->edit = "编辑Build";
|
||||
$lang->build->delete = "删除Build";
|
||||
$lang->build->view = "Build详情";
|
||||
$lang->build->ajaxGetProductBuilds = '接口:产品Build列表';
|
||||
$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表';
|
||||
|
||||
$lang->build->confirmDelete = "您确认删除该build吗?";
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = '产品';
|
||||
$lang->build->project = '项目';
|
||||
$lang->build->name = '名称编号';
|
||||
$lang->build->date = 'Build日期';
|
||||
$lang->build->builder = '构建者';
|
||||
$lang->build->scmPath = '源代码地址';
|
||||
$lang->build->filePath = '存储地址';
|
||||
$lang->build->desc = '描述';
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class buildModel extends model
|
||||
{
|
||||
/* 获取build详细信息。*/
|
||||
public function getByID($buildID)
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName')
|
||||
->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.id')->eq((int)$buildID)
|
||||
->orderBy('t1.id DESC')
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/* 查找项目中的build列表。*/
|
||||
public function getProjectBuilds($projectID)
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName')
|
||||
->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.id DESC')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 查找项目中的build列表。params='noempty|notrunk' */
|
||||
public function getProjectBuildPairs($projectID, $params = '')
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
|
||||
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
|
||||
->where('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')->fetchPairs();
|
||||
if(!$builds) return $sysBuilds;
|
||||
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
return $sysBuilds + $builds;
|
||||
}
|
||||
|
||||
/* 查找产品中的build列表。params='noempty|notrunk' */
|
||||
public function getProductBuildPairs($productID, $params = '')
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
|
||||
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
|
||||
->where('product')->eq((int)$productID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')->fetchPairs();
|
||||
if(!$builds) return $sysBuilds;
|
||||
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
return $sysBuilds + $builds;
|
||||
}
|
||||
|
||||
/* 创建。*/
|
||||
public function create($projectID)
|
||||
{
|
||||
$build = fixer::input('post')
|
||||
->stripTags('name')
|
||||
->specialChars('desc')
|
||||
->add('project', (int)$projectID)
|
||||
->get();
|
||||
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError()) return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* 编辑。*/
|
||||
public function update($buildID)
|
||||
{
|
||||
$oldBuild = $this->getByID($buildID);
|
||||
$build = fixer::input('post')
|
||||
->stripTags('name')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$this->dao->update(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->edit->requiredFields, 'notempty')->where('id')->eq((int)$buildID)->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldBuild, $build);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class buildModel extends model
|
||||
{
|
||||
/* 获取build详细信息。*/
|
||||
public function getByID($buildID)
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName')
|
||||
->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.id')->eq((int)$buildID)
|
||||
->orderBy('t1.id DESC')
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/* 查找项目中的build列表。*/
|
||||
public function getProjectBuilds($projectID)
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName')
|
||||
->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.id DESC')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 查找项目中的build列表。params='noempty|notrunk' */
|
||||
public function getProjectBuildPairs($projectID, $params = '')
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
|
||||
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
|
||||
->where('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')->fetchPairs();
|
||||
if(!$builds) return $sysBuilds;
|
||||
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
return $sysBuilds + $builds;
|
||||
}
|
||||
|
||||
/* 查找产品中的build列表。params='noempty|notrunk' */
|
||||
public function getProductBuildPairs($productID, $params = '')
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
|
||||
$builds = $this->dao->select('id,name')->from(TABLE_BUILD)
|
||||
->where('product')->eq((int)$productID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')->fetchPairs();
|
||||
if(!$builds) return $sysBuilds;
|
||||
$releases = $this->dao->select('build,name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
return $sysBuilds + $builds;
|
||||
}
|
||||
|
||||
/* 创建。*/
|
||||
public function create($projectID)
|
||||
{
|
||||
$build = fixer::input('post')
|
||||
->stripTags('name')
|
||||
->specialChars('desc')
|
||||
->add('project', (int)$projectID)
|
||||
->get();
|
||||
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->exec();
|
||||
if(!dao::isError()) return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* 编辑。*/
|
||||
public function update($buildID)
|
||||
{
|
||||
$oldBuild = $this->getByID($buildID);
|
||||
$build = fixer::input('post')
|
||||
->stripTags('name')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$this->dao->update(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->edit->requiredFields, 'notempty')->where('id')->eq((int)$buildID)->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldBuild, $build);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo html::select('product', $products, '', "class='select-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo html::select('builder', $users, $app->user->account, 'class="select-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo html::input('date', helper::today(), "class='text-3 date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The create view of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo html::select('product', $products, '', "class='select-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo html::select('builder', $users, $app->user->account, 'class="select-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo html::input('date', helper::today(), "class='text-3 date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $build->product, "class='select-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo html::input('name', $build->name, "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo html::select('builder', $users, $app->user->account, 'class="select-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo html::input('date', $build->date, "class='text-3 date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', $build->scmPath, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', $build->filePath, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $build->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton() .html::hidden('project', $build->project);?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The edit view of build module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $build->product, "class='select-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo html::input('name', $build->name, "class='text-3'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo html::select('builder', $users, $app->user->account, 'class="select-3"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo html::input('date', $build->date, "class='text-3 date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php echo html::input('scmPath', $build->scmPath, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php echo html::input('filePath', $build->filePath, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $build->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton() .html::hidden('project', $build->project);?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* The view file of build module's view method of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->view;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo $build->productName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td class='<?php if($build->deleted) echo 'deleted';?>'><?php echo $build->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo $users[$build->builder];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo $build->date;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo nl2br($build->desc);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project");
|
||||
if(!$build->deleted)
|
||||
{
|
||||
common::printLink('build', 'edit', "buildID=$build->id", $lang->edit);
|
||||
common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The view file of build module's view method of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->build->view;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->product;?></th>
|
||||
<td><?php echo $build->productName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->name;?></th>
|
||||
<td class='<?php if($build->deleted) echo 'deleted';?>'><?php echo $build->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo $users[$build->builder];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->date;?></th>
|
||||
<td><?php echo $build->date;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->scmPath;?></th>
|
||||
<td><?php strpos($build->scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->filePath;?></th>
|
||||
<td><?php strpos($build->filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->build->desc;?></th>
|
||||
<td><?php echo nl2br($build->desc);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-center f-16px strong'>
|
||||
<?php
|
||||
$browseLink = $this->session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project");
|
||||
if(!$build->deleted)
|
||||
{
|
||||
common::printLink('build', 'edit', "buildID=$build->id", $lang->edit);
|
||||
common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,472 +1,472 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of common module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package common
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class common extends control
|
||||
{
|
||||
/**
|
||||
* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ự<EFBFBD><E1BBB0><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>˾ģ<CBBE>飬<EFBFBD><E9A3AC><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
session_start();
|
||||
$this->sendHeader();
|
||||
$this->loadModel('company');
|
||||
$this->setCompany();
|
||||
$this->setUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ե<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ȩ<EFBFBD>ޡ<EFBFBD><DEA1><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ȩ<EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>档
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkPriv()
|
||||
{
|
||||
$module = $this->app->getModuleName();
|
||||
$method = $this->app->getMethodName();
|
||||
if($module == 'user')
|
||||
{
|
||||
if($method == 'login' or $method == 'logout' or $method == 'deny') return true;
|
||||
}
|
||||
elseif($module == 'api' and $method == 'getsessionid')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
elseif($module == 'misc' and $method == 'about')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
if(!common::hasPriv($module, $method))
|
||||
{
|
||||
$vars = "module=$module&method=$method";
|
||||
if(isset($_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
$referer = helper::safe64Encode($_SERVER['HTTP_REFERER']);
|
||||
$vars .= "&referer=$referer";
|
||||
}
|
||||
$denyLink = $this->createLink('user', 'deny', $vars);
|
||||
|
||||
/* Fix the bug of IE: use js locate, can't get the referer. */
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
|
||||
{
|
||||
echo <<<EOT
|
||||
<a href='$denyLink' id='denylink' style='display:none'>deny</a>
|
||||
<script language='javascript'>document.getElementById('denylink').click();</script>
|
||||
EOT;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo js::locate($denyLink);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$referer = helper::safe64Encode($this->app->getURI(true));
|
||||
$this->locate($this->createLink('user', 'login', "referer=$referer&from=zentao"));
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>鵱ǰ<E9B5B1>û<EFBFBD><C3BB><EFBFBD>ijһ<C4B3><D2BB>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ijһ<C4B3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ȩ<EFBFBD><EFBFBD><DEB7>ʡ<EFBFBD>*/
|
||||
public static function hasPriv($module, $method)
|
||||
{
|
||||
global $app;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ǹ<EFBFBD><C7B9><EFBFBD>Ա<EFBFBD><D4B1>*/
|
||||
$account = ',' . $app->user->account . ',';
|
||||
if(strpos($app->company->admins, $account) !== false) return true;
|
||||
|
||||
/* <20>ǹ<EFBFBD><C7B9><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڡ<EFBFBD>*/
|
||||
$rights = $app->user->rights;
|
||||
if(isset($rights[strtolower($module)][strtolower($method)])) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public static function printTopBar()
|
||||
{
|
||||
global $lang, $app;
|
||||
|
||||
printf($lang->todayIs, date(DT_DATE3));
|
||||
if(isset($app->user)) echo $app->user->realname . ' ';
|
||||
if(isset($app->user) and $app->user->account != 'guest')
|
||||
{
|
||||
echo html::a(helper::createLink('my', 'index'), $lang->myControl);
|
||||
echo html::a(helper::createLink('user', 'logout'), $lang->logout);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a(helper::createLink('user', 'login'), $lang->login);
|
||||
}
|
||||
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about'");
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
public static function printMainmenu($moduleName)
|
||||
{
|
||||
global $app, $lang;
|
||||
$logo = $app->getWebRoot() . 'theme/default/images/main/logo.png';
|
||||
echo "<ul>\n";
|
||||
echo "<li style='padding:0; height:30px'><a href='http://www.zentao.cn' target='_blank'><img src='$logo' /></a></li>\n";
|
||||
|
||||
/* <20>趨<EFBFBD><E8B6A8>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>Ĭ<EEA1A3><C4AC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>IJ˵<C4B2><CBB5><EFBFBD><EFBFBD>飬<EFBFBD><E9A3AC>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5>*/
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
|
||||
/* ѭ<><D1AD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
foreach($lang->menu as $menuKey => $menu)
|
||||
{
|
||||
$active = $menuKey == $mainMenu ? 'class=active' : '';
|
||||
list($menuLabel, $module, $method) = explode('|', $menu);
|
||||
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
$link = helper::createLink($module, $method);
|
||||
echo "<li $active><nobr><a href='$link'>$menuLabel</a></nobr></li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$moduleName = $app->getModuleName();
|
||||
$methodName = $app->getMethodName();
|
||||
$searchObject = $moduleName;
|
||||
if($moduleName == 'product')
|
||||
{
|
||||
if($methodName == 'browse') $searchObject = 'story';
|
||||
}
|
||||
elseif($moduleName == 'project')
|
||||
{
|
||||
if(strpos('task|story|bug|build', $methodName) !== false) $searchObject = $methodName;
|
||||
}
|
||||
elseif($moduleName == 'my' or $moduleName == 'user')
|
||||
{
|
||||
$searchObject = $methodName;
|
||||
}
|
||||
|
||||
echo "<li id='searchbox'>";
|
||||
echo html::select('searchType', $lang->searchObjects, $searchObject);
|
||||
echo html::input('searchQuery', $lang->searchTips, "onclick=this.value='' onkeydown='if(event.keyCode==13) shortcut()' class='w-60px'");
|
||||
echo html::submitButton($lang->go, 'onclick="shortcut()"');
|
||||
echo "</li>";
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
/* <20><>ӡģ<D3A1><C4A3><EFBFBD>IJ˵<C4B2><CBB5><EFBFBD>*/
|
||||
public static function printModuleMenu($moduleName)
|
||||
{
|
||||
global $lang, $app;
|
||||
|
||||
/* û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>*/
|
||||
if(!isset($lang->$moduleName->menu)) {echo "<ul></ul>"; return;}
|
||||
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ǰ<EFBFBD><C7B0>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$submenus = $lang->$moduleName->menu;
|
||||
$currentModule = $app->getModuleName();
|
||||
$currentMethod = $app->getMethodName();
|
||||
|
||||
/* <20>˵<EFBFBD><CBB5><EFBFBD>ʼ<EFBFBD><CABC>*/
|
||||
echo "<ul>\n";
|
||||
|
||||
/* ѭ<><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿһ<C3BF><D2BB><EFBFBD>˵<EFBFBD><CBB5>*/
|
||||
foreach($submenus as $submenu)
|
||||
{
|
||||
/* <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
$link = $submenu;
|
||||
$subModule = '';
|
||||
$alias = '';
|
||||
$float = '';
|
||||
$active = '';
|
||||
$target = '';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>õģ<C3B5><C4A3><EFBFBD><F2B8B2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
if(is_array($submenu)) extract($submenu);
|
||||
|
||||
/* <20><>ӡ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
if(strpos($link, '|') === false)
|
||||
{
|
||||
echo "<li>$link</li>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = explode('|', $link);
|
||||
list($label, $module, $method) = $link;
|
||||
$vars = isset($link[3]) ? $link[3] : '';
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
global $app;
|
||||
|
||||
/* <20>ж<EFBFBD><D0B6>Ƿ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><C3BC>*/
|
||||
if($currentModule == $subModule) $active = 'active';
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos($alias, $currentMethod) !== false)) $active = 'active';
|
||||
|
||||
echo "<li class='$float $active'>" . html::a(helper::createLink($module, $method, $vars), $label, $target) . "</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public static function printBreadMenu($moduleName, $position)
|
||||
{
|
||||
global $lang;
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->index);
|
||||
echo html::a(helper::createLink($module, $method), $lang->zentaoMS) . $lang->arrow;
|
||||
if($moduleName != 'index')
|
||||
{
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->$mainMenu);
|
||||
echo html::a(helper::createLink($module, $method), $menuLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->index->common;
|
||||
}
|
||||
if(empty($position)) return;
|
||||
echo $lang->arrow;
|
||||
foreach($position as $key => $link)
|
||||
{
|
||||
echo $link;
|
||||
if(isset($position[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function setMenuVars($menu, $key, $params)
|
||||
{
|
||||
if(is_array($params))
|
||||
{
|
||||
if(is_array($menu->$key))
|
||||
{
|
||||
$menu->$key = (object)$menu->$key;
|
||||
$menu->$key->link = vsprintf($menu->$key->link, $params);
|
||||
$menu->$key = (array)$menu->$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu->$key = vsprintf($menu->$key, $params);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_array($menu->$key))
|
||||
{
|
||||
$menu->$key = (object)$menu->$key;
|
||||
$menu->$key->link = sprintf($menu->$key->link, $params);
|
||||
$menu->$key = (array)$menu->$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu->$key = sprintf($menu->$key, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>orderby<62><79><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD> */
|
||||
public static function printOrderLink($fieldName, $orderBy, $vars, $label, $module = '', $method = '')
|
||||
{
|
||||
global $lang, $app;
|
||||
if(empty($module)) $module= $app->getModuleName();
|
||||
if(empty($method)) $method= $app->getMethodName();
|
||||
if(strpos($orderBy, $fieldName) !== false)
|
||||
{
|
||||
if(stripos($orderBy, 'desc') !== false)
|
||||
{
|
||||
$orderBy = str_ireplace('desc', 'asc', $orderBy);
|
||||
$className = 'headerSortUp';
|
||||
}
|
||||
elseif(stripos($orderBy, 'asc') !== false)
|
||||
{
|
||||
$orderBy = str_ireplace('asc', 'desc', $orderBy);
|
||||
$className = 'headerSortDown';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$orderBy = $fieldName . '_' . 'asc';
|
||||
$className = 'header';
|
||||
}
|
||||
$link = helper::createLink($module, $method, sprintf($vars, $orderBy));
|
||||
echo "<div class='$className'>" . html::a($link, $label) . '</div>';
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>*/
|
||||
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '')
|
||||
{
|
||||
if(!common::hasPriv($module, $method)) return false;
|
||||
echo html::a(helper::createLink($module, $method, $vars), $label, $target, $misc);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵĹ<CAB5>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* <20><><EFBFBD>ȳ<EFBFBD><C8B3><EFBFBD><D4B0>յ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD>Ĺ<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7>鵽<EFBFBD><E9B5BD><EFBFBD>ٰ<EFBFBD><D9B0><EFBFBD>Ĭ<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2>ҡ<EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7>鵽<EFBFBD><E9B5BD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>ΪĬ<CEAA>ϵĹ<CFB5>˾<EFBFBD><CBBE>
|
||||
* <20><>ȡ<EFBFBD><C8A1>˾<EFBFBD><CBBE>Ϣ֮<CFA2><EFBFBD><F3A3ACBD><EFBFBD>д<EFBFBD>뵽$_SESSION<4F>С<EFBFBD>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
private function setCompany()
|
||||
{
|
||||
if(isset($_SESSION['company']) and $_SESSION['company']->pms == $_SERVER['HTTP_HOST'])
|
||||
{
|
||||
$this->app->company = $_SESSION['company'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$company = $this->company->getByDomain();
|
||||
if(!$company and isset($this->config->default->domain)) $company = $this->company->getByDomain($this->config->default->domain);
|
||||
if(!$company) $company = $this->company->getFirst();
|
||||
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $_SERVER['HTTP_HOST']), __FILE__, __LINE__, $exit = true);
|
||||
$_SESSION['company'] = $company;
|
||||
$this->app->company = $company;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5>û<EFBFBD><C3BB><EFBFBD>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
private function setUser()
|
||||
{
|
||||
if(isset($_SESSION['user']))
|
||||
{
|
||||
$this->app->user = $_SESSION['user'];
|
||||
}
|
||||
elseif($this->app->company->guest)
|
||||
{
|
||||
$user = new stdClass();
|
||||
$user->id = 0;
|
||||
$user->account = 'guest';
|
||||
$user->realname = 'guest';
|
||||
$user->rights = $this->loadModel('user')->authorize('guest');
|
||||
$_SESSION['user'] = $user;
|
||||
$this->app->user = $_SESSION['user'];
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD>Ʒid<69><64>session<6F>Ự<EFBFBD>С<EFBFBD>*/
|
||||
public static function saveProductState($productID, $defaultProductID)
|
||||
{
|
||||
global $app;
|
||||
if($productID > 0) $app->session->set('product', (int)$productID);
|
||||
if($productID == 0 and $app->session->product == '') $app->session->set('product', $defaultProductID);
|
||||
return $app->session->product;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀid<69><64>session<6F>Ự<EFBFBD>С<EFBFBD>*/
|
||||
public static function saveProjectState($projectID, $projects)
|
||||
{
|
||||
global $app;
|
||||
if($projectID > 0) $app->session->set('project', (int)$projectID);
|
||||
if($projectID == 0 and $app->session->project == '') $app->session->set('project', $projects[0]);
|
||||
if(!in_array($app->session->project, $projects)) $app->session->set('project', $projects[0]);
|
||||
return $app->session->project;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>header<65><72>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function sendHeader()
|
||||
{
|
||||
header("Content-Type: text/html; Language={$this->config->encoding}");
|
||||
header("Cache-control: private");
|
||||
}
|
||||
|
||||
/* <20>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>صIJ<D8B5>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<DEB8>¼<EFBFBD><C2BC>*/
|
||||
public static function createChanges($old, $new)
|
||||
{
|
||||
global $config;
|
||||
$changes = array();
|
||||
$magicQuote = get_magic_quotes_gpc();
|
||||
foreach($new as $key => $value)
|
||||
{
|
||||
if(strtolower($key) == 'lastediteddate') continue;
|
||||
if(strtolower($key) == 'lasteditedby') continue;
|
||||
if(strtolower($key) == 'assigneddate') continue;
|
||||
|
||||
if($magicQuote) $value = stripslashes($value);
|
||||
if($value != $old->$key)
|
||||
{
|
||||
$diff = '';
|
||||
if(substr_count($value, "\n") > 1 or substr_count($old->$key, "\n") > 1 or strpos('name,title,desc,spec,steps', strtolower($key)) !== false) $diff = self::diff($old->$key, $value);
|
||||
$changes[] = array('field' => $key, 'old' => $old->$key, 'new' => $value, 'diff' => $diff);
|
||||
}
|
||||
}
|
||||
return $changes;
|
||||
}
|
||||
|
||||
/* <20>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>IJ<EFBFBD>ͬ<EFBFBD><CDAC>ժ<EFBFBD><D5AA>PHPQAT<41>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD><D4BF>ܡ<EFBFBD>*/
|
||||
public static function diff($text1, $text2)
|
||||
{
|
||||
$w = explode("\n", trim($text1));
|
||||
$o = explode("\n", trim($text2));
|
||||
$w1 = array_diff_assoc($w,$o);
|
||||
$o1 = array_diff_assoc($o,$w);
|
||||
$w2 = array();
|
||||
$o2 = array();
|
||||
foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1) . "<del>" . trim($val) . "</del>";
|
||||
foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1) . "<ins>" . trim($val) . "</ins>";
|
||||
$diff = array_merge($w2, $o2);
|
||||
ksort($diff);
|
||||
return implode("\n", $diff);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳURL<52><4C>ַ<EFBFBD><D6B7>*/
|
||||
public function getSysURL()
|
||||
{
|
||||
global $config;
|
||||
$httpType = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? 'https' : 'http';
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
return "$httpType://$httpHost";
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳĬ<CDB3>ϵ<EFBFBD><CFB5><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>*/
|
||||
public function getDefaultCss()
|
||||
{
|
||||
global $app;
|
||||
$pathFix = $app->getPathFix();
|
||||
$cssFile = $app->getAppRoot() . "www{$pathFix}theme{$pathFix}default{$pathFix}style.css";
|
||||
$cssContent = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','', file_get_contents($cssFile));
|
||||
$cssContent = str_replace(array(" {", "} ", ' ', "\r\n", "\r", "\n", "\t"), array("{", '}', ' ', ''), $cssContent);
|
||||
return $cssContent;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of common module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package common
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class common extends control
|
||||
{
|
||||
/**
|
||||
* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ự<EFBFBD><E1BBB0><EFBFBD><EFBFBD><EFBFBD>ع<EFBFBD>˾ģ<CBBE>飬<EFBFBD><E9A3AC><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
session_start();
|
||||
$this->sendHeader();
|
||||
$this->loadModel('company');
|
||||
$this->setCompany();
|
||||
$this->setUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ե<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ȩ<EFBFBD>ޡ<EFBFBD><DEA1><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Ȩ<EFBFBD>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>档
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function checkPriv()
|
||||
{
|
||||
$module = $this->app->getModuleName();
|
||||
$method = $this->app->getMethodName();
|
||||
if($module == 'user')
|
||||
{
|
||||
if($method == 'login' or $method == 'logout' or $method == 'deny') return true;
|
||||
}
|
||||
elseif($module == 'api' and $method == 'getsessionid')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
elseif($module == 'misc' and $method == 'about')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
if(!common::hasPriv($module, $method))
|
||||
{
|
||||
$vars = "module=$module&method=$method";
|
||||
if(isset($_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
$referer = helper::safe64Encode($_SERVER['HTTP_REFERER']);
|
||||
$vars .= "&referer=$referer";
|
||||
}
|
||||
$denyLink = $this->createLink('user', 'deny', $vars);
|
||||
|
||||
/* Fix the bug of IE: use js locate, can't get the referer. */
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
|
||||
{
|
||||
echo <<<EOT
|
||||
<a href='$denyLink' id='denylink' style='display:none'>deny</a>
|
||||
<script language='javascript'>document.getElementById('denylink').click();</script>
|
||||
EOT;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo js::locate($denyLink);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$referer = helper::safe64Encode($this->app->getURI(true));
|
||||
$this->locate($this->createLink('user', 'login', "referer=$referer&from=zentao"));
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>鵱ǰ<E9B5B1>û<EFBFBD><C3BB><EFBFBD>ijһ<C4B3><D2BB>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ijһ<C4B3><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ȩ<EFBFBD><EFBFBD><DEB7>ʡ<EFBFBD>*/
|
||||
public static function hasPriv($module, $method)
|
||||
{
|
||||
global $app;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>ǹ<EFBFBD><C7B9><EFBFBD>Ա<EFBFBD><D4B1>*/
|
||||
$account = ',' . $app->user->account . ',';
|
||||
if(strpos($app->company->admins, $account) !== false) return true;
|
||||
|
||||
/* <20>ǹ<EFBFBD><C7B9><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڡ<EFBFBD>*/
|
||||
$rights = $app->user->rights;
|
||||
if(isset($rights[strtolower($module)][strtolower($method)])) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public static function printTopBar()
|
||||
{
|
||||
global $lang, $app;
|
||||
|
||||
printf($lang->todayIs, date(DT_DATE3));
|
||||
if(isset($app->user)) echo $app->user->realname . ' ';
|
||||
if(isset($app->user) and $app->user->account != 'guest')
|
||||
{
|
||||
echo html::a(helper::createLink('my', 'index'), $lang->myControl);
|
||||
echo html::a(helper::createLink('user', 'logout'), $lang->logout);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a(helper::createLink('user', 'login'), $lang->login);
|
||||
}
|
||||
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about'");
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
public static function printMainmenu($moduleName)
|
||||
{
|
||||
global $app, $lang;
|
||||
$logo = $app->getWebRoot() . 'theme/default/images/main/logo.png';
|
||||
echo "<ul>\n";
|
||||
echo "<li style='padding:0; height:30px'><a href='http://www.zentaoms.com' target='_blank'><img src='$logo' /></a></li>\n";
|
||||
|
||||
/* <20>趨<EFBFBD><E8B6A8>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>Ĭ<EEA1A3><C4AC><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>IJ˵<C4B2><CBB5><EFBFBD><EFBFBD>飬<EFBFBD><E9A3AC>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>˵<EFBFBD><CBB5>*/
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
|
||||
/* ѭ<><D1AD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
foreach($lang->menu as $menuKey => $menu)
|
||||
{
|
||||
$active = $menuKey == $mainMenu ? 'class=active' : '';
|
||||
list($menuLabel, $module, $method) = explode('|', $menu);
|
||||
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
$link = helper::createLink($module, $method);
|
||||
echo "<li $active><nobr><a href='$link'>$menuLabel</a></nobr></li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$moduleName = $app->getModuleName();
|
||||
$methodName = $app->getMethodName();
|
||||
$searchObject = $moduleName;
|
||||
if($moduleName == 'product')
|
||||
{
|
||||
if($methodName == 'browse') $searchObject = 'story';
|
||||
}
|
||||
elseif($moduleName == 'project')
|
||||
{
|
||||
if(strpos('task|story|bug|build', $methodName) !== false) $searchObject = $methodName;
|
||||
}
|
||||
elseif($moduleName == 'my' or $moduleName == 'user')
|
||||
{
|
||||
$searchObject = $methodName;
|
||||
}
|
||||
|
||||
echo "<li id='searchbox'>";
|
||||
echo html::select('searchType', $lang->searchObjects, $searchObject);
|
||||
echo html::input('searchQuery', $lang->searchTips, "onclick=this.value='' onkeydown='if(event.keyCode==13) shortcut()' class='w-60px'");
|
||||
echo html::submitButton($lang->go, 'onclick="shortcut()"');
|
||||
echo "</li>";
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
/* <20><>ӡģ<D3A1><C4A3><EFBFBD>IJ˵<C4B2><CBB5><EFBFBD>*/
|
||||
public static function printModuleMenu($moduleName)
|
||||
{
|
||||
global $lang, $app;
|
||||
|
||||
/* û<><C3BB><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>*/
|
||||
if(!isset($lang->$moduleName->menu)) {echo "<ul></ul>"; return;}
|
||||
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ǰ<EFBFBD><C7B0>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$submenus = $lang->$moduleName->menu;
|
||||
$currentModule = $app->getModuleName();
|
||||
$currentMethod = $app->getMethodName();
|
||||
|
||||
/* <20>˵<EFBFBD><CBB5><EFBFBD>ʼ<EFBFBD><CABC>*/
|
||||
echo "<ul>\n";
|
||||
|
||||
/* ѭ<><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿһ<C3BF><D2BB><EFBFBD>˵<EFBFBD><CBB5>*/
|
||||
foreach($submenus as $submenu)
|
||||
{
|
||||
/* <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
$link = $submenu;
|
||||
$subModule = '';
|
||||
$alias = '';
|
||||
$float = '';
|
||||
$active = '';
|
||||
$target = '';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ò˵<C3B2><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>õģ<C3B5><C4A3><EFBFBD><F2B8B2B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>*/
|
||||
if(is_array($submenu)) extract($submenu);
|
||||
|
||||
/* <20><>ӡ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD>*/
|
||||
if(strpos($link, '|') === false)
|
||||
{
|
||||
echo "<li>$link</li>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = explode('|', $link);
|
||||
list($label, $module, $method) = $link;
|
||||
$vars = isset($link[3]) ? $link[3] : '';
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
global $app;
|
||||
|
||||
/* <20>ж<EFBFBD><D0B6>Ƿ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><C3BC>*/
|
||||
if($currentModule == $subModule) $active = 'active';
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos($alias, $currentMethod) !== false)) $active = 'active';
|
||||
|
||||
echo "<li class='$float $active'>" . html::a(helper::createLink($module, $method, $vars), $label, $target) . "</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public static function printBreadMenu($moduleName, $position)
|
||||
{
|
||||
global $lang;
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->index);
|
||||
echo html::a(helper::createLink($module, $method), $lang->zentaoMS) . $lang->arrow;
|
||||
if($moduleName != 'index')
|
||||
{
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->$mainMenu);
|
||||
echo html::a(helper::createLink($module, $method), $menuLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->index->common;
|
||||
}
|
||||
if(empty($position)) return;
|
||||
echo $lang->arrow;
|
||||
foreach($position as $key => $link)
|
||||
{
|
||||
echo $link;
|
||||
if(isset($position[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function setMenuVars($menu, $key, $params)
|
||||
{
|
||||
if(is_array($params))
|
||||
{
|
||||
if(is_array($menu->$key))
|
||||
{
|
||||
$menu->$key = (object)$menu->$key;
|
||||
$menu->$key->link = vsprintf($menu->$key->link, $params);
|
||||
$menu->$key = (array)$menu->$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu->$key = vsprintf($menu->$key, $params);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(is_array($menu->$key))
|
||||
{
|
||||
$menu->$key = (object)$menu->$key;
|
||||
$menu->$key->link = sprintf($menu->$key->link, $params);
|
||||
$menu->$key = (array)$menu->$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$menu->$key = sprintf($menu->$key, $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD>orderby<62><79><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD> */
|
||||
public static function printOrderLink($fieldName, $orderBy, $vars, $label, $module = '', $method = '')
|
||||
{
|
||||
global $lang, $app;
|
||||
if(empty($module)) $module= $app->getModuleName();
|
||||
if(empty($method)) $method= $app->getMethodName();
|
||||
if(strpos($orderBy, $fieldName) !== false)
|
||||
{
|
||||
if(stripos($orderBy, 'desc') !== false)
|
||||
{
|
||||
$orderBy = str_ireplace('desc', 'asc', $orderBy);
|
||||
$className = 'headerSortUp';
|
||||
}
|
||||
elseif(stripos($orderBy, 'asc') !== false)
|
||||
{
|
||||
$orderBy = str_ireplace('asc', 'desc', $orderBy);
|
||||
$className = 'headerSortDown';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$orderBy = $fieldName . '_' . 'asc';
|
||||
$className = 'header';
|
||||
}
|
||||
$link = helper::createLink($module, $method, sprintf($vars, $orderBy));
|
||||
echo "<div class='$className'>" . html::a($link, $label) . '</div>';
|
||||
}
|
||||
|
||||
/* <20><>ӡ<EFBFBD><D3A1><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8>*/
|
||||
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '')
|
||||
{
|
||||
if(!common::hasPriv($module, $method)) return false;
|
||||
echo html::a(helper::createLink($module, $method, $vars), $label, $target, $misc);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵĹ<CAB5>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* <20><><EFBFBD>ȳ<EFBFBD><C8B3><EFBFBD><D4B0>յ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD>Ĺ<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7>鵽<EFBFBD><E9B5BD><EFBFBD>ٰ<EFBFBD><D9B0><EFBFBD>Ĭ<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2>ҡ<EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7>鵽<EFBFBD><E9B5BD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>ΪĬ<CEAA>ϵĹ<CFB5>˾<EFBFBD><CBBE>
|
||||
* <20><>ȡ<EFBFBD><C8A1>˾<EFBFBD><CBBE>Ϣ֮<CFA2><EFBFBD><F3A3ACBD><EFBFBD>д<EFBFBD>뵽$_SESSION<4F>С<EFBFBD>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
private function setCompany()
|
||||
{
|
||||
if(isset($_SESSION['company']) and $_SESSION['company']->pms == $_SERVER['HTTP_HOST'])
|
||||
{
|
||||
$this->app->company = $_SESSION['company'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$company = $this->company->getByDomain();
|
||||
if(!$company and isset($this->config->default->domain)) $company = $this->company->getByDomain($this->config->default->domain);
|
||||
if(!$company) $company = $this->company->getFirst();
|
||||
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $_SERVER['HTTP_HOST']), __FILE__, __LINE__, $exit = true);
|
||||
$_SESSION['company'] = $company;
|
||||
$this->app->company = $company;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>ʵ<EFBFBD><CAB5>û<EFBFBD><C3BB><EFBFBD>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
private function setUser()
|
||||
{
|
||||
if(isset($_SESSION['user']))
|
||||
{
|
||||
$this->app->user = $_SESSION['user'];
|
||||
}
|
||||
elseif($this->app->company->guest)
|
||||
{
|
||||
$user = new stdClass();
|
||||
$user->id = 0;
|
||||
$user->account = 'guest';
|
||||
$user->realname = 'guest';
|
||||
$user->rights = $this->loadModel('user')->authorize('guest');
|
||||
$_SESSION['user'] = $user;
|
||||
$this->app->user = $_SESSION['user'];
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD>Ʒid<69><64>session<6F>Ự<EFBFBD>С<EFBFBD>*/
|
||||
public static function saveProductState($productID, $defaultProductID)
|
||||
{
|
||||
global $app;
|
||||
if($productID > 0) $app->session->set('product', (int)$productID);
|
||||
if($productID == 0 and $app->session->product == '') $app->session->set('product', $defaultProductID);
|
||||
return $app->session->product;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀid<69><64>session<6F>Ự<EFBFBD>С<EFBFBD>*/
|
||||
public static function saveProjectState($projectID, $projects)
|
||||
{
|
||||
global $app;
|
||||
if($projectID > 0) $app->session->set('project', (int)$projectID);
|
||||
if($projectID == 0 and $app->session->project == '') $app->session->set('project', $projects[0]);
|
||||
if(!in_array($app->session->project, $projects)) $app->session->set('project', $projects[0]);
|
||||
return $app->session->project;
|
||||
}
|
||||
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>header<65><72>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function sendHeader()
|
||||
{
|
||||
header("Content-Type: text/html; Language={$this->config->encoding}");
|
||||
header("Cache-control: private");
|
||||
}
|
||||
|
||||
/* <20>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>صIJ<D8B5>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<DEB8>¼<EFBFBD><C2BC>*/
|
||||
public static function createChanges($old, $new)
|
||||
{
|
||||
global $config;
|
||||
$changes = array();
|
||||
$magicQuote = get_magic_quotes_gpc();
|
||||
foreach($new as $key => $value)
|
||||
{
|
||||
if(strtolower($key) == 'lastediteddate') continue;
|
||||
if(strtolower($key) == 'lasteditedby') continue;
|
||||
if(strtolower($key) == 'assigneddate') continue;
|
||||
|
||||
if($magicQuote) $value = stripslashes($value);
|
||||
if($value != $old->$key)
|
||||
{
|
||||
$diff = '';
|
||||
if(substr_count($value, "\n") > 1 or substr_count($old->$key, "\n") > 1 or strpos('name,title,desc,spec,steps', strtolower($key)) !== false) $diff = self::diff($old->$key, $value);
|
||||
$changes[] = array('field' => $key, 'old' => $old->$key, 'new' => $value, 'diff' => $diff);
|
||||
}
|
||||
}
|
||||
return $changes;
|
||||
}
|
||||
|
||||
/* <20>Ƚ<EFBFBD><C8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>IJ<EFBFBD>ͬ<EFBFBD><CDAC>ժ<EFBFBD><D5AA>PHPQAT<41>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD><D4BF>ܡ<EFBFBD>*/
|
||||
public static function diff($text1, $text2)
|
||||
{
|
||||
$w = explode("\n", trim($text1));
|
||||
$o = explode("\n", trim($text2));
|
||||
$w1 = array_diff_assoc($w,$o);
|
||||
$o1 = array_diff_assoc($o,$w);
|
||||
$w2 = array();
|
||||
$o2 = array();
|
||||
foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1) . "<del>" . trim($val) . "</del>";
|
||||
foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1) . "<ins>" . trim($val) . "</ins>";
|
||||
$diff = array_merge($w2, $o2);
|
||||
ksort($diff);
|
||||
return implode("\n", $diff);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳURL<52><4C>ַ<EFBFBD><D6B7>*/
|
||||
public function getSysURL()
|
||||
{
|
||||
global $config;
|
||||
$httpType = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? 'https' : 'http';
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
return "$httpType://$httpHost";
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ϵͳĬ<CDB3>ϵ<EFBFBD><CFB5><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>*/
|
||||
public function getDefaultCss()
|
||||
{
|
||||
global $app;
|
||||
$pathFix = $app->getPathFix();
|
||||
$cssFile = $app->getAppRoot() . "www{$pathFix}theme{$pathFix}default{$pathFix}style.css";
|
||||
$cssContent = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','', file_get_contents($cssFile));
|
||||
$cssContent = str_replace(array(" {", "} ", ' ', "\r\n", "\r", "\n", "\t"), array("{", '}', ' ', ''), $cssContent);
|
||||
return $cssContent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,191 +1,191 @@
|
||||
<?php
|
||||
/**
|
||||
* The common simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->zentaoMS = '禅道管理';
|
||||
$lang->logout = '退出系统';
|
||||
$lang->login = '登录';
|
||||
$lang->currentPos = '当前位置:';
|
||||
$lang->arrow = ' » ';
|
||||
$lang->colon = '::';
|
||||
$lang->reset = '重填';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->activate = '激活';
|
||||
$lang->delete = '删除';
|
||||
$lang->save = '保存';
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '备注';
|
||||
$lang->history = '历史记录';
|
||||
$lang->welcome = "欢迎使用%s{$lang->colon}{$lang->zentaoMS}";
|
||||
$lang->zentaoSite = "官方网站";
|
||||
$lang->myControl = "我的地盘";
|
||||
$lang->sponser = "<a href='http://www.pujia.com' target='_blank'>普加赞助</a>";
|
||||
$lang->at = ' 于 ';
|
||||
$lang->feature = '未来';
|
||||
$lang->year = '年';
|
||||
$lang->downArrow = '↓';
|
||||
$lang->goback = '返回';
|
||||
$lang->selectAll = '全选';
|
||||
$lang->attatch = '附件';
|
||||
$lang->reverse = '(切换顺序)';
|
||||
$lang->addFiles = '上传了附件 ';
|
||||
|
||||
/* 主导航菜单。*/
|
||||
$lang->menu->index = '首页|index|index';
|
||||
$lang->menu->my = '我的地盘|my|index';
|
||||
$lang->menu->product = '产品视图|product|index';
|
||||
$lang->menu->project = '项目视图|project|index';
|
||||
$lang->menu->qa = 'QA视图|qa|index';
|
||||
$lang->menu->company = '组织视图|company|index';
|
||||
$lang->menu->admin = '后台管理|admin|index';
|
||||
|
||||
/* 首页菜单设置。*/
|
||||
$lang->index->menu->product = '浏览产品|product|browse';
|
||||
$lang->index->menu->project = '浏览项目|project|browse';
|
||||
|
||||
/* 我的地盘菜单设置。*/
|
||||
$lang->my->menu->account = '%s' . $lang->arrow;
|
||||
$lang->my->menu->todo = array('link' => '我的TODO|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = '我的任务|my|task|';
|
||||
$lang->my->menu->project = '我的项目|my|project|';
|
||||
$lang->my->menu->story = '我的需求|my|story|';
|
||||
$lang->my->menu->bug = '我的Bug|my|bug|';
|
||||
$lang->my->menu->profile = array('link' => '我的档案|my|profile|', 'alias' => 'editprofile');
|
||||
$lang->todo->menu = $lang->my->menu;
|
||||
|
||||
/* 产品视图设置。*/
|
||||
$lang->product->menu->list = '%s';
|
||||
$lang->product->menu->story = array('link' => '需求列表|product|browse|productID=%s', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => '计划列表|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release= array('link' => '发布列表|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap= '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->edit = '编辑产品|product|edit|productID=%s';
|
||||
$lang->product->menu->delete = array('link' => '删除产品|product|delete|productID=%s', 'target' => 'hiddenwin');
|
||||
$lang->product->menu->module = '维护模块|tree|browse|productID=%s&view=product';
|
||||
$lang->product->menu->create = array('link' => '新增产品|product|create', 'float' => 'right');
|
||||
$lang->story->menu = $lang->product->menu;
|
||||
$lang->productplan->menu = $lang->product->menu;
|
||||
$lang->release->menu = $lang->product->menu;
|
||||
|
||||
/* 项目视图菜单设置。*/
|
||||
$lang->project->menu->list = '%s';
|
||||
$lang->project->menu->task = array('link' => '任务列表|project|task|projectID=%s', 'subModule' => 'task');
|
||||
$lang->project->menu->story = array('link' => '需求列表|project|story|projectID=%s', 'alias' => 'linkstory');
|
||||
$lang->project->menu->bug = 'Bug列表|project|bug|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build列表|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->burn = '燃烧图|project|burn|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队成员|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->line = $lang->colon;
|
||||
$lang->project->menu->view = '基本信息|project|view|projectID=%s';
|
||||
$lang->project->menu->edit = '编辑项目|project|edit|projectID=%s';
|
||||
$lang->project->menu->delete = array('link' => '删除项目|project|delete|projectID=%s', 'target' => 'hiddenwin');
|
||||
$lang->project->menu->product= '关联产品|project|manageproducts|projectID=%s';
|
||||
|
||||
$lang->project->menu->create = array('link' => '新增项目|project|create', 'float' => 'right');
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->bug->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testcase->menu->product = '%s';
|
||||
$lang->testcase->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testtask->menu->product = '%s';
|
||||
$lang->testtask->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
|
||||
/* 组织结构视图菜单设置。*/
|
||||
$lang->company->menu->browseUser = array('link' => '用户列表|company|browse', 'subModule' => 'user');
|
||||
$lang->company->menu->dept = array('link' => '部门维护|dept|browse', 'subModule' => 'dept');
|
||||
$lang->company->menu->browseGroup = array('link' => '权限分组|group|browse', 'subModule' => 'group');
|
||||
$lang->company->menu->addGroup = array('link' => '添加分组|group|create', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '添加用户|user|create|company=%s&dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
$lang->group->menu = $lang->company->menu;
|
||||
|
||||
/* 用户信息菜单设置。*/
|
||||
$lang->user->menu->account = '%s' . $lang->arrow;
|
||||
$lang->user->menu->todo = array('link' => 'TODO列表|user|todo|account=%s', 'subModule' => 'todo');
|
||||
$lang->user->menu->task = '任务列表|user|task|account=%s';
|
||||
$lang->user->menu->project = '项目列表|user|project|account=%s';
|
||||
$lang->user->menu->bug = 'Bug列表|user|bug|account=%s';
|
||||
$lang->user->menu->profile = array('link' => '用户信息|user|profile|account=%s', 'alias' => 'edit');
|
||||
$lang->user->menu->browse = array('link' => '用户管理|company|browse|', 'float' => 'right');
|
||||
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin->menu->browseCompany = array('link' => '公司管理|admin|browsecompany', 'subModule' => 'company');
|
||||
$lang->admin->menu->convert = array('link' => '从其他系统导入|convert|index', 'subModule' => 'convert');
|
||||
$lang->admin->menu->createCompany = array('link' => '新增公司|company|create', 'float' => 'right');
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
|
||||
/*菜单设置:分组设置。*/
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->productplan = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->build = 'project';
|
||||
$lang->menugroup->company = 'admin';
|
||||
$lang->menugroup->convert = 'admin';
|
||||
$lang->menugroup->upgrade = 'admin';
|
||||
$lang->menugroup->user = 'company';
|
||||
$lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
|
||||
/* 错误提示信息。*/
|
||||
$lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。";
|
||||
$lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且不小于『%s』。");
|
||||
$lang->error->reg = "『%s』不符合格式,应当为:『%s』。";
|
||||
$lang->error->unique = "『%s』已经有『%s』这条记录了。";
|
||||
$lang->error->notempty = "『%s』不能为空。";
|
||||
$lang->error->int = array("『%s』应当是数字。", "『%s』应当介于『%s-%s』之间。");
|
||||
$lang->error->float = "『%s』应当是数字,可以是小数。";
|
||||
$lang->error->email = "『%s』应当为合法的EMAIL。";
|
||||
$lang->error->date = "『%s』应当为合法的日期。";
|
||||
$lang->error->account = "『%s』应当为合法的用户名。";
|
||||
$lang->error->passwordsame = "两次密码应当相等。";
|
||||
$lang->error->passwordrule = "密码应该符合规则。";
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共<strong>%s</strong>条记录,每页 <strong>%s</strong>条,页面:<strong>%s/%s</strong> ";
|
||||
$lang->pager->first = "首页";
|
||||
$lang->pager->pre = "上页";
|
||||
$lang->pager->next = "下页";
|
||||
$lang->pager->last = "末页";
|
||||
$lang->pager->locate = "GO!";
|
||||
<?php
|
||||
/**
|
||||
* The common simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->zentaoMS = '禅道管理';
|
||||
$lang->logout = '退出系统';
|
||||
$lang->login = '登录';
|
||||
$lang->currentPos = '当前位置:';
|
||||
$lang->arrow = ' » ';
|
||||
$lang->colon = '::';
|
||||
$lang->reset = '重填';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->activate = '激活';
|
||||
$lang->delete = '删除';
|
||||
$lang->save = '保存';
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '备注';
|
||||
$lang->history = '历史记录';
|
||||
$lang->welcome = "欢迎使用%s{$lang->colon}{$lang->zentaoMS}";
|
||||
$lang->zentaoSite = "官方网站";
|
||||
$lang->myControl = "我的地盘";
|
||||
$lang->sponser = "<a href='http://www.pujia.com' target='_blank'>普加赞助</a>";
|
||||
$lang->at = ' 于 ';
|
||||
$lang->feature = '未来';
|
||||
$lang->year = '年';
|
||||
$lang->downArrow = '↓';
|
||||
$lang->goback = '返回';
|
||||
$lang->selectAll = '全选';
|
||||
$lang->attatch = '附件';
|
||||
$lang->reverse = '(切换顺序)';
|
||||
$lang->addFiles = '上传了附件 ';
|
||||
|
||||
/* 主导航菜单。*/
|
||||
$lang->menu->index = '首页|index|index';
|
||||
$lang->menu->my = '我的地盘|my|index';
|
||||
$lang->menu->product = '产品视图|product|index';
|
||||
$lang->menu->project = '项目视图|project|index';
|
||||
$lang->menu->qa = 'QA视图|qa|index';
|
||||
$lang->menu->company = '组织视图|company|index';
|
||||
$lang->menu->admin = '后台管理|admin|index';
|
||||
|
||||
/* 首页菜单设置。*/
|
||||
$lang->index->menu->product = '浏览产品|product|browse';
|
||||
$lang->index->menu->project = '浏览项目|project|browse';
|
||||
|
||||
/* 我的地盘菜单设置。*/
|
||||
$lang->my->menu->account = '%s' . $lang->arrow;
|
||||
$lang->my->menu->todo = array('link' => '我的TODO|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = '我的任务|my|task|';
|
||||
$lang->my->menu->project = '我的项目|my|project|';
|
||||
$lang->my->menu->story = '我的需求|my|story|';
|
||||
$lang->my->menu->bug = '我的Bug|my|bug|';
|
||||
$lang->my->menu->profile = array('link' => '我的档案|my|profile|', 'alias' => 'editprofile');
|
||||
$lang->todo->menu = $lang->my->menu;
|
||||
|
||||
/* 产品视图设置。*/
|
||||
$lang->product->menu->list = '%s';
|
||||
$lang->product->menu->story = array('link' => '需求列表|product|browse|productID=%s', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => '计划列表|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release= array('link' => '发布列表|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap= '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->edit = '编辑产品|product|edit|productID=%s';
|
||||
$lang->product->menu->delete = array('link' => '删除产品|product|delete|productID=%s', 'target' => 'hiddenwin');
|
||||
$lang->product->menu->module = '维护模块|tree|browse|productID=%s&view=product';
|
||||
$lang->product->menu->create = array('link' => '新增产品|product|create', 'float' => 'right');
|
||||
$lang->story->menu = $lang->product->menu;
|
||||
$lang->productplan->menu = $lang->product->menu;
|
||||
$lang->release->menu = $lang->product->menu;
|
||||
|
||||
/* 项目视图菜单设置。*/
|
||||
$lang->project->menu->list = '%s';
|
||||
$lang->project->menu->task = array('link' => '任务列表|project|task|projectID=%s', 'subModule' => 'task');
|
||||
$lang->project->menu->story = array('link' => '需求列表|project|story|projectID=%s', 'alias' => 'linkstory');
|
||||
$lang->project->menu->bug = 'Bug列表|project|bug|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build列表|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->burn = '燃烧图|project|burn|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队成员|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->line = $lang->colon;
|
||||
$lang->project->menu->view = '基本信息|project|view|projectID=%s';
|
||||
$lang->project->menu->edit = '编辑项目|project|edit|projectID=%s';
|
||||
$lang->project->menu->delete = array('link' => '删除项目|project|delete|projectID=%s', 'target' => 'hiddenwin');
|
||||
$lang->project->menu->product= '关联产品|project|manageproducts|projectID=%s';
|
||||
|
||||
$lang->project->menu->create = array('link' => '新增项目|project|create', 'float' => 'right');
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->bug->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testcase->menu->product = '%s';
|
||||
$lang->testcase->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testtask->menu->product = '%s';
|
||||
$lang->testtask->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,active');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
|
||||
/* 组织结构视图菜单设置。*/
|
||||
$lang->company->menu->browseUser = array('link' => '用户列表|company|browse', 'subModule' => 'user');
|
||||
$lang->company->menu->dept = array('link' => '部门维护|dept|browse', 'subModule' => 'dept');
|
||||
$lang->company->menu->browseGroup = array('link' => '权限分组|group|browse', 'subModule' => 'group');
|
||||
$lang->company->menu->addGroup = array('link' => '添加分组|group|create', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '添加用户|user|create|company=%s&dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
$lang->group->menu = $lang->company->menu;
|
||||
|
||||
/* 用户信息菜单设置。*/
|
||||
$lang->user->menu->account = '%s' . $lang->arrow;
|
||||
$lang->user->menu->todo = array('link' => 'TODO列表|user|todo|account=%s', 'subModule' => 'todo');
|
||||
$lang->user->menu->task = '任务列表|user|task|account=%s';
|
||||
$lang->user->menu->project = '项目列表|user|project|account=%s';
|
||||
$lang->user->menu->bug = 'Bug列表|user|bug|account=%s';
|
||||
$lang->user->menu->profile = array('link' => '用户信息|user|profile|account=%s', 'alias' => 'edit');
|
||||
$lang->user->menu->browse = array('link' => '用户管理|company|browse|', 'float' => 'right');
|
||||
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin->menu->browseCompany = array('link' => '公司管理|admin|browsecompany', 'subModule' => 'company');
|
||||
$lang->admin->menu->convert = array('link' => '从其他系统导入|convert|index', 'subModule' => 'convert');
|
||||
$lang->admin->menu->createCompany = array('link' => '新增公司|company|create', 'float' => 'right');
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
|
||||
/*菜单设置:分组设置。*/
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->productplan = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->build = 'project';
|
||||
$lang->menugroup->company = 'admin';
|
||||
$lang->menugroup->convert = 'admin';
|
||||
$lang->menugroup->upgrade = 'admin';
|
||||
$lang->menugroup->user = 'company';
|
||||
$lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
|
||||
/* 错误提示信息。*/
|
||||
$lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。";
|
||||
$lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且不小于『%s』。");
|
||||
$lang->error->reg = "『%s』不符合格式,应当为:『%s』。";
|
||||
$lang->error->unique = "『%s』已经有『%s』这条记录了。";
|
||||
$lang->error->notempty = "『%s』不能为空。";
|
||||
$lang->error->int = array("『%s』应当是数字。", "『%s』应当介于『%s-%s』之间。");
|
||||
$lang->error->float = "『%s』应当是数字,可以是小数。";
|
||||
$lang->error->email = "『%s』应当为合法的EMAIL。";
|
||||
$lang->error->date = "『%s』应当为合法的日期。";
|
||||
$lang->error->account = "『%s』应当为合法的用户名。";
|
||||
$lang->error->passwordsame = "两次密码应当相等。";
|
||||
$lang->error->passwordrule = "密码应该符合规则。";
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共<strong>%s</strong>条记录,每页 <strong>%s</strong>条,页面:<strong>%s/%s</strong> ";
|
||||
$lang->pager->first = "首页";
|
||||
$lang->pager->pre = "上页";
|
||||
$lang->pager->next = "下页";
|
||||
$lang->pager->last = "末页";
|
||||
$lang->pager->locate = "GO!";
|
||||
|
||||
@@ -1,253 +1,253 @@
|
||||
<?php
|
||||
/**
|
||||
* The common simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->arrow = ' » ';
|
||||
$lang->colon = '::';
|
||||
$lang->at = ' 于 ';
|
||||
$lang->downArrow = '↓';
|
||||
|
||||
$lang->zentaoMS = '禅道管理';
|
||||
$lang->welcome = "欢迎使用『%s』{$lang->colon} {$lang->zentaoMS}";
|
||||
$lang->myControl = "我的地盘";
|
||||
$lang->currentPos = '当前位置:';
|
||||
$lang->logout = '退出系统';
|
||||
$lang->login = '登录';
|
||||
$lang->aboutZenTao = '关于禅道';
|
||||
$lang->todayIs = '今天是%s,';
|
||||
|
||||
$lang->reset = '重填';
|
||||
$lang->edit = '编辑';
|
||||
$lang->copy = '复制';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->link = '关联';
|
||||
$lang->unlink = '移除';
|
||||
$lang->import = '导入';
|
||||
$lang->exportCSV = '导出csv';
|
||||
$lang->setFileName = '请输入文件名:';
|
||||
$lang->activate = '激活';
|
||||
$lang->save = '保存';
|
||||
$lang->confirm = '确认';
|
||||
$lang->preview = '预览';
|
||||
$lang->goback = '返回';
|
||||
$lang->showHelp = '显示帮助';
|
||||
$lang->go = 'GO!';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '备注';
|
||||
$lang->history = '历史记录';
|
||||
$lang->attatch = '附件';
|
||||
$lang->reverse = '(切换顺序)';
|
||||
$lang->addFiles = '上传了附件 ';
|
||||
$lang->files = '附件 ';
|
||||
|
||||
$lang->selectAll = '全选';
|
||||
$lang->notFound = '抱歉,您访问的对象并不存在!';
|
||||
$lang->showAll = '++ 全部显示 ++';
|
||||
$lang->hideClosed = '-- 隐藏已结束 --';
|
||||
|
||||
$lang->feature = '未来';
|
||||
$lang->year = '年';
|
||||
$lang->workingHour = '工时';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = '状态';
|
||||
$lang->openedByAB = '创建';
|
||||
$lang->assignedToAB = '指派';
|
||||
$lang->typeAB = '类型';
|
||||
|
||||
/* 主导航菜单。*/
|
||||
$lang->menu->index = '首页|index|index';
|
||||
$lang->menu->my = '我的地盘|my|index';
|
||||
$lang->menu->product = '产品视图|product|index';
|
||||
$lang->menu->project = '项目视图|project|index';
|
||||
$lang->menu->qa = 'QA视图|qa|index';
|
||||
$lang->menu->company = '组织视图|company|index';
|
||||
$lang->menu->admin = '后台管理|admin|index';
|
||||
|
||||
/* 查询条中可以选择的对象列表。*/
|
||||
$lang->searchObjects['bug'] = 'B:Bug';
|
||||
$lang->searchObjects['story'] = 'S:需求';
|
||||
$lang->searchObjects['task'] = 'T:任务';
|
||||
$lang->searchObjects['testcase'] = 'C:用例';
|
||||
$lang->searchObjects['project'] = 'P:项目';
|
||||
$lang->searchObjects['product'] = 'P:产品';
|
||||
$lang->searchObjects['user'] = 'U:用户';
|
||||
$lang->searchObjects['build'] = 'B:Build';
|
||||
$lang->searchObjects['release'] = 'R:发布';
|
||||
$lang->searchObjects['productplan'] = 'P:产品计划';
|
||||
$lang->searchObjects['testtask'] = 'T:测试任务';
|
||||
$lang->searchTips = '输入编号';
|
||||
|
||||
/* 首页菜单设置。*/
|
||||
$lang->index->menu->product = '浏览产品|product|browse';
|
||||
$lang->index->menu->project = '浏览项目|project|browse';
|
||||
|
||||
/* 我的地盘菜单设置。*/
|
||||
$lang->my->menu->account = '%s' . $lang->arrow;
|
||||
$lang->my->menu->todo = array('link' => '我的TODO|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = '我的任务|my|task|';
|
||||
$lang->my->menu->bug = '我的Bug|my|bug|';
|
||||
$lang->my->menu->story = '我的需求|my|story|';
|
||||
$lang->my->menu->project = '我的项目|my|project|';
|
||||
$lang->my->menu->profile = array('link' => '我的档案|my|profile|', 'alias' => 'editprofile');
|
||||
$lang->todo->menu = $lang->my->menu;
|
||||
|
||||
/* 产品视图设置。*/
|
||||
$lang->product->menu->list = '%s';
|
||||
$lang->product->menu->story = array('link' => '需求列表|product|browse|productID=%s', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => '计划列表|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release= array('link' => '发布列表|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap= '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->view = '基本信息|product|view|productID=%s';
|
||||
$lang->product->menu->edit = '编辑产品|product|edit|productID=%s';
|
||||
$lang->product->menu->module = '维护模块|tree|browse|productID=%s&view=product';
|
||||
$lang->product->menu->delete = array('link' => '删除产品|product|delete|productID=%s', 'target' => 'hiddenwin');
|
||||
$lang->product->menu->create = array('link' => '新增产品|product|create', 'float' => 'right');
|
||||
$lang->story->menu = $lang->product->menu;
|
||||
$lang->productplan->menu = $lang->product->menu;
|
||||
$lang->release->menu = $lang->product->menu;
|
||||
|
||||
/* 项目视图菜单设置。*/
|
||||
$lang->project->menu->list = '%s';
|
||||
$lang->project->menu->task = array('link' => '任务列表|project|task|projectID=%s', 'subModule' => 'task', 'alias' => 'grouptask,importtask');
|
||||
$lang->project->menu->story = array('link' => '需求列表|project|story|projectID=%s');
|
||||
$lang->project->menu->bug = 'Bug列表|project|bug|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build列表|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->burn = '燃尽图|project|burn|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队成员|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->product = '关联产品|project|manageproducts|projectID=%s';
|
||||
$lang->project->menu->linkstory = array('link' => '关联需求|project|linkstory|projectID=%s');
|
||||
$lang->project->menu->view = '基本信息|project|view|projectID=%s';
|
||||
$lang->project->menu->edit = '编辑项目|project|edit|projectID=%s';
|
||||
$lang->project->menu->delete = array('link' => '删除项目|project|delete|projectID=%s', 'target' => 'hiddenwin');
|
||||
|
||||
$lang->project->menu->create = array('link' => '新增项目|project|create', 'float' => 'right');
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->bug->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testcase->menu->product = '%s';
|
||||
$lang->testcase->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testtask->menu->product = '%s';
|
||||
$lang->testtask->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases');
|
||||
|
||||
/* 组织结构视图菜单设置。*/
|
||||
$lang->company->menu->name = '%s' . $lang->arrow;
|
||||
$lang->company->menu->browseUser = array('link' => '用户列表|company|browse', 'subModule' => 'user');
|
||||
$lang->company->menu->dept = array('link' => '部门维护|dept|browse', 'subModule' => 'dept');
|
||||
$lang->company->menu->browseGroup = array('link' => '权限分组|group|browse', 'subModule' => 'group');
|
||||
$lang->company->menu->edit = array('link' => '公司管理|company|edit');
|
||||
$lang->company->menu->addGroup = array('link' => '添加分组|group|create', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '添加用户|user|create|dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
$lang->group->menu = $lang->company->menu;
|
||||
|
||||
/* 用户信息菜单设置。*/
|
||||
$lang->user->menu->account = '%s' . $lang->arrow;
|
||||
$lang->user->menu->todo = array('link' => 'TODO列表|user|todo|account=%s', 'subModule' => 'todo');
|
||||
$lang->user->menu->task = '任务列表|user|task|account=%s';
|
||||
$lang->user->menu->bug = 'Bug列表|user|bug|account=%s';
|
||||
$lang->user->menu->project = '项目列表|user|project|account=%s';
|
||||
$lang->user->menu->profile = array('link' => '用户信息|user|profile|account=%s', 'alias' => 'edit');
|
||||
$lang->user->menu->browse = array('link' => '用户管理|company|browse|', 'float' => 'right');
|
||||
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
|
||||
$lang->admin->menu->convert = array('link' => '从其他系统导入|convert|index', 'subModule' => 'convert');
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
$lang->action->menu = $lang->admin->menu;
|
||||
|
||||
/*菜单设置:分组设置。*/
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->productplan = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->build = 'project';
|
||||
$lang->menugroup->convert = 'admin';
|
||||
$lang->menugroup->upgrade = 'admin';
|
||||
$lang->menugroup->user = 'company';
|
||||
$lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
$lang->menugroup->action = 'admin';
|
||||
|
||||
/* 错误提示信息。*/
|
||||
$lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。";
|
||||
$lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且不小于『%s』。");
|
||||
$lang->error->reg = "『%s』不符合格式,应当为:『%s』。";
|
||||
$lang->error->unique = "『%s』已经有『%s』这条记录了。";
|
||||
$lang->error->notempty = "『%s』不能为空。";
|
||||
$lang->error->equal = "『%s』必须为『%s』。";
|
||||
$lang->error->int = array("『%s』应当是数字。", "『%s』应当介于『%s-%s』之间。");
|
||||
$lang->error->float = "『%s』应当是数字,可以是小数。";
|
||||
$lang->error->email = "『%s』应当为合法的EMAIL。";
|
||||
$lang->error->date = "『%s』应当为合法的日期。";
|
||||
$lang->error->account = "『%s』应当为合法的用户名。";
|
||||
$lang->error->passwordsame = "两次密码应当相等。";
|
||||
$lang->error->passwordrule = "密码应该符合规则,长度至少为六位。";
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共<strong>%s</strong>条记录,每页 <strong>%s</strong>条,页面:<strong>%s/%s</strong> ";
|
||||
$lang->pager->first = "首页";
|
||||
$lang->pager->pre = "上页";
|
||||
$lang->pager->next = "下页";
|
||||
$lang->pager->last = "末页";
|
||||
$lang->pager->locate = "GO!";
|
||||
|
||||
$lang->zentaoSite = "官方网站";
|
||||
$lang->sponser = "<a href='http://www.pujia.com' target='_blank'>普加赞助</a>";
|
||||
$lang->zentaoKeywords = "开源项目管理软件,项目管理,项目管理软件,pmp,pms,php框架,国产php框架,scrum工具,scrum管理工具,scrum管理软件,敏捷项目管理,禅道";
|
||||
$lang->zentaoDESC = "禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件(工具、系统),同时也是一款scrum管理工具。
|
||||
它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。禅道项目管理软件使用PHP + MySQL开发,
|
||||
基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。禅道在手,项目无忧!";
|
||||
|
||||
/* 时间格式设置。*/
|
||||
define('DT_DATETIME1', 'Y-m-d H:i:s');
|
||||
define('DT_DATETIME2', 'y-m-d H:i');
|
||||
define('DT_MONTHTIME1', 'n/d H:i');
|
||||
define('DT_MONTHTIME2', 'n月d日 H:i');
|
||||
define('DT_DATE1', 'Y-m-d');
|
||||
define('DT_DATE2', 'Ymd');
|
||||
define('DT_DATE3', 'Y年m月d日');
|
||||
define('DT_TIME1', 'H:i:s');
|
||||
define('DT_TIME2', 'H:i');
|
||||
<?php
|
||||
/**
|
||||
* The common simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->arrow = ' » ';
|
||||
$lang->colon = '::';
|
||||
$lang->at = ' 于 ';
|
||||
$lang->downArrow = '↓';
|
||||
|
||||
$lang->zentaoMS = '禅道管理';
|
||||
$lang->welcome = "欢迎使用『%s』{$lang->colon} {$lang->zentaoMS}";
|
||||
$lang->myControl = "我的地盘";
|
||||
$lang->currentPos = '当前位置:';
|
||||
$lang->logout = '退出系统';
|
||||
$lang->login = '登录';
|
||||
$lang->aboutZenTao = '关于禅道';
|
||||
$lang->todayIs = '今天是%s,';
|
||||
|
||||
$lang->reset = '重填';
|
||||
$lang->edit = '编辑';
|
||||
$lang->copy = '复制';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->link = '关联';
|
||||
$lang->unlink = '移除';
|
||||
$lang->import = '导入';
|
||||
$lang->exportCSV = '导出csv';
|
||||
$lang->setFileName = '请输入文件名:';
|
||||
$lang->activate = '激活';
|
||||
$lang->save = '保存';
|
||||
$lang->confirm = '确认';
|
||||
$lang->preview = '预览';
|
||||
$lang->goback = '返回';
|
||||
$lang->showHelp = '显示帮助';
|
||||
$lang->go = 'GO!';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '备注';
|
||||
$lang->history = '历史记录';
|
||||
$lang->attatch = '附件';
|
||||
$lang->reverse = '(切换顺序)';
|
||||
$lang->addFiles = '上传了附件 ';
|
||||
$lang->files = '附件 ';
|
||||
|
||||
$lang->selectAll = '全选';
|
||||
$lang->notFound = '抱歉,您访问的对象并不存在!';
|
||||
$lang->showAll = '++ 全部显示 ++';
|
||||
$lang->hideClosed = '-- 隐藏已结束 --';
|
||||
|
||||
$lang->feature = '未来';
|
||||
$lang->year = '年';
|
||||
$lang->workingHour = '工时';
|
||||
|
||||
$lang->idAB = 'ID';
|
||||
$lang->priAB = 'P';
|
||||
$lang->statusAB = '状态';
|
||||
$lang->openedByAB = '创建';
|
||||
$lang->assignedToAB = '指派';
|
||||
$lang->typeAB = '类型';
|
||||
|
||||
/* 主导航菜单。*/
|
||||
$lang->menu->index = '首页|index|index';
|
||||
$lang->menu->my = '我的地盘|my|index';
|
||||
$lang->menu->product = '产品视图|product|index';
|
||||
$lang->menu->project = '项目视图|project|index';
|
||||
$lang->menu->qa = 'QA视图|qa|index';
|
||||
$lang->menu->company = '组织视图|company|index';
|
||||
$lang->menu->admin = '后台管理|admin|index';
|
||||
|
||||
/* 查询条中可以选择的对象列表。*/
|
||||
$lang->searchObjects['bug'] = 'B:Bug';
|
||||
$lang->searchObjects['story'] = 'S:需求';
|
||||
$lang->searchObjects['task'] = 'T:任务';
|
||||
$lang->searchObjects['testcase'] = 'C:用例';
|
||||
$lang->searchObjects['project'] = 'P:项目';
|
||||
$lang->searchObjects['product'] = 'P:产品';
|
||||
$lang->searchObjects['user'] = 'U:用户';
|
||||
$lang->searchObjects['build'] = 'B:Build';
|
||||
$lang->searchObjects['release'] = 'R:发布';
|
||||
$lang->searchObjects['productplan'] = 'P:产品计划';
|
||||
$lang->searchObjects['testtask'] = 'T:测试任务';
|
||||
$lang->searchTips = '输入编号';
|
||||
|
||||
/* 首页菜单设置。*/
|
||||
$lang->index->menu->product = '浏览产品|product|browse';
|
||||
$lang->index->menu->project = '浏览项目|project|browse';
|
||||
|
||||
/* 我的地盘菜单设置。*/
|
||||
$lang->my->menu->account = '%s' . $lang->arrow;
|
||||
$lang->my->menu->todo = array('link' => '我的TODO|my|todo|', 'subModule' => 'todo');
|
||||
$lang->my->menu->task = '我的任务|my|task|';
|
||||
$lang->my->menu->bug = '我的Bug|my|bug|';
|
||||
$lang->my->menu->story = '我的需求|my|story|';
|
||||
$lang->my->menu->project = '我的项目|my|project|';
|
||||
$lang->my->menu->profile = array('link' => '我的档案|my|profile|', 'alias' => 'editprofile');
|
||||
$lang->todo->menu = $lang->my->menu;
|
||||
|
||||
/* 产品视图设置。*/
|
||||
$lang->product->menu->list = '%s';
|
||||
$lang->product->menu->story = array('link' => '需求列表|product|browse|productID=%s', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => '计划列表|productplan|browse|productID=%s', 'subModule' => 'productplan');
|
||||
$lang->product->menu->release= array('link' => '发布列表|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap= '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->view = '基本信息|product|view|productID=%s';
|
||||
$lang->product->menu->edit = '编辑产品|product|edit|productID=%s';
|
||||
$lang->product->menu->module = '维护模块|tree|browse|productID=%s&view=product';
|
||||
$lang->product->menu->delete = array('link' => '删除产品|product|delete|productID=%s', 'target' => 'hiddenwin');
|
||||
$lang->product->menu->create = array('link' => '新增产品|product|create', 'float' => 'right');
|
||||
$lang->story->menu = $lang->product->menu;
|
||||
$lang->productplan->menu = $lang->product->menu;
|
||||
$lang->release->menu = $lang->product->menu;
|
||||
|
||||
/* 项目视图菜单设置。*/
|
||||
$lang->project->menu->list = '%s';
|
||||
$lang->project->menu->task = array('link' => '任务列表|project|task|projectID=%s', 'subModule' => 'task', 'alias' => 'grouptask,importtask');
|
||||
$lang->project->menu->story = array('link' => '需求列表|project|story|projectID=%s');
|
||||
$lang->project->menu->bug = 'Bug列表|project|bug|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build列表|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->burn = '燃尽图|project|burn|projectID=%s';
|
||||
$lang->project->menu->team = array('link' => '团队成员|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->product = '关联产品|project|manageproducts|projectID=%s';
|
||||
$lang->project->menu->linkstory = array('link' => '关联需求|project|linkstory|projectID=%s');
|
||||
$lang->project->menu->view = '基本信息|project|view|projectID=%s';
|
||||
$lang->project->menu->edit = '编辑项目|project|edit|projectID=%s';
|
||||
$lang->project->menu->delete = array('link' => '删除项目|project|delete|projectID=%s', 'target' => 'hiddenwin');
|
||||
|
||||
$lang->project->menu->create = array('link' => '新增项目|project|create', 'float' => 'right');
|
||||
$lang->task->menu = $lang->project->menu;
|
||||
$lang->build->menu = $lang->project->menu;
|
||||
|
||||
/* QA视图菜单设置。*/
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s', 'alias' => 'view,create,edit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->bug->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testcase->menu->product = '%s';
|
||||
$lang->testcase->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s', 'alias' => 'view,create,edit', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s');
|
||||
|
||||
$lang->testtask->menu->product = '%s';
|
||||
$lang->testtask->menu->bug = array('link' => '缺陷管理|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例管理|testcase|browse|productID=%s');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试任务|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases');
|
||||
|
||||
/* 组织结构视图菜单设置。*/
|
||||
$lang->company->menu->name = '%s' . $lang->arrow;
|
||||
$lang->company->menu->browseUser = array('link' => '用户列表|company|browse', 'subModule' => 'user');
|
||||
$lang->company->menu->dept = array('link' => '部门维护|dept|browse', 'subModule' => 'dept');
|
||||
$lang->company->menu->browseGroup = array('link' => '权限分组|group|browse', 'subModule' => 'group');
|
||||
$lang->company->menu->edit = array('link' => '公司管理|company|edit');
|
||||
$lang->company->menu->addGroup = array('link' => '添加分组|group|create', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '添加用户|user|create|dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->dept->menu = $lang->company->menu;
|
||||
$lang->group->menu = $lang->company->menu;
|
||||
|
||||
/* 用户信息菜单设置。*/
|
||||
$lang->user->menu->account = '%s' . $lang->arrow;
|
||||
$lang->user->menu->todo = array('link' => 'TODO列表|user|todo|account=%s', 'subModule' => 'todo');
|
||||
$lang->user->menu->task = '任务列表|user|task|account=%s';
|
||||
$lang->user->menu->bug = 'Bug列表|user|bug|account=%s';
|
||||
$lang->user->menu->project = '项目列表|user|project|account=%s';
|
||||
$lang->user->menu->profile = array('link' => '用户信息|user|profile|account=%s', 'alias' => 'edit');
|
||||
$lang->user->menu->browse = array('link' => '用户管理|company|browse|', 'float' => 'right');
|
||||
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
|
||||
$lang->admin->menu->convert = array('link' => '从其他系统导入|convert|index', 'subModule' => 'convert');
|
||||
$lang->convert->menu = $lang->admin->menu;
|
||||
$lang->upgrade->menu = $lang->admin->menu;
|
||||
$lang->action->menu = $lang->admin->menu;
|
||||
|
||||
/*菜单设置:分组设置。*/
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->productplan = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->build = 'project';
|
||||
$lang->menugroup->convert = 'admin';
|
||||
$lang->menugroup->upgrade = 'admin';
|
||||
$lang->menugroup->user = 'company';
|
||||
$lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
$lang->menugroup->action = 'admin';
|
||||
|
||||
/* 错误提示信息。*/
|
||||
$lang->error->companyNotFound = "您访问的域名 %s 没有对应的公司。";
|
||||
$lang->error->length = array("『%s』长度错误,应当为『%s』", "『%s』长度应当不超过『%s』,且不小于『%s』。");
|
||||
$lang->error->reg = "『%s』不符合格式,应当为:『%s』。";
|
||||
$lang->error->unique = "『%s』已经有『%s』这条记录了。";
|
||||
$lang->error->notempty = "『%s』不能为空。";
|
||||
$lang->error->equal = "『%s』必须为『%s』。";
|
||||
$lang->error->int = array("『%s』应当是数字。", "『%s』应当介于『%s-%s』之间。");
|
||||
$lang->error->float = "『%s』应当是数字,可以是小数。";
|
||||
$lang->error->email = "『%s』应当为合法的EMAIL。";
|
||||
$lang->error->date = "『%s』应当为合法的日期。";
|
||||
$lang->error->account = "『%s』应当为合法的用户名。";
|
||||
$lang->error->passwordsame = "两次密码应当相等。";
|
||||
$lang->error->passwordrule = "密码应该符合规则,长度至少为六位。";
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共<strong>%s</strong>条记录,每页 <strong>%s</strong>条,页面:<strong>%s/%s</strong> ";
|
||||
$lang->pager->first = "首页";
|
||||
$lang->pager->pre = "上页";
|
||||
$lang->pager->next = "下页";
|
||||
$lang->pager->last = "末页";
|
||||
$lang->pager->locate = "GO!";
|
||||
|
||||
$lang->zentaoSite = "官方网站";
|
||||
$lang->sponser = "<a href='http://www.pujia.com' target='_blank'>普加赞助</a>";
|
||||
$lang->zentaoKeywords = "开源项目管理软件,项目管理,项目管理软件,pmp,pms,php框架,国产php框架,scrum工具,scrum管理工具,scrum管理软件,敏捷项目管理,禅道";
|
||||
$lang->zentaoDESC = "禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件(工具、系统),同时也是一款scrum管理工具。
|
||||
它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。禅道项目管理软件使用PHP + MySQL开发,
|
||||
基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。禅道在手,项目无忧!";
|
||||
|
||||
/* 时间格式设置。*/
|
||||
define('DT_DATETIME1', 'Y-m-d H:i:s');
|
||||
define('DT_DATETIME2', 'y-m-d H:i');
|
||||
define('DT_MONTHTIME1', 'n/d H:i');
|
||||
define('DT_MONTHTIME2', 'n月d日 H:i');
|
||||
define('DT_DATE1', 'Y-m-d');
|
||||
define('DT_DATE2', 'Ymd');
|
||||
define('DT_DATE3', 'Y年m月d日');
|
||||
define('DT_TIME1', 'H:i:s');
|
||||
define('DT_TIME2', 'H:i');
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<p style='margin-bottom:30px'></p>
|
||||
<div class='yui-d0' id='hiddenbar'>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' class='<?php $config->debug ? print("debugwin") : print('hiddenwin')?>'></iframe>
|
||||
</div>
|
||||
<div id='footer' class='yui-d0 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-g first' id='crumbs'><?php common::printBreadMenu($this->moduleName, isset($position) ? $position : ''); ?></div>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-u first'> </div>
|
||||
<div class='yui-u a-right'>
|
||||
<span id='poweredby'>powered by <a href='http://www.zentao.cn' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<p style='margin-bottom:30px'></p>
|
||||
<div class='yui-d0' id='hiddenbar'>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' class='<?php $config->debug ? print("debugwin") : print('hiddenwin')?>'></iframe>
|
||||
</div>
|
||||
<div id='footer' class='yui-d0 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-g first' id='crumbs'><?php common::printBreadMenu($this->moduleName, isset($position) ? $position : ''); ?></div>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-u first'> </div>
|
||||
<div class='yui-u a-right'>
|
||||
<span id='poweredby'>powered by <a href='http://www.zentaoms.com' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class company extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('dept');
|
||||
$this->app->loadLang('user');
|
||||
$this->company->setMenu();
|
||||
}
|
||||
|
||||
/* 公司首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink('company', 'browse'));
|
||||
}
|
||||
|
||||
/* 浏览某一个公司。*/
|
||||
public function browse($deptID = 0)
|
||||
{
|
||||
$this->lang->set('menugroup.company', 'company');
|
||||
$childDeptIds = $this->dept->getAllChildID($deptID);
|
||||
|
||||
$this->company->setMenu($deptID);
|
||||
|
||||
$header['title'] = $this->lang->company->index . $this->lang->colon . $this->lang->dept->common;
|
||||
$position[] = $this->lang->dept->common;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('users', $this->dept->getUsers($childDeptIds));
|
||||
$this->assign('deptTree', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createMemberLink')));
|
||||
$this->assign('parentDepts', $this->dept->getParents($deptID));
|
||||
$this->assign('deptID', $deptID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 新增一个公司。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('admin', 'browsecompany'), 'parent'));
|
||||
}
|
||||
|
||||
$this->lang->set('menugroup.company', 'admin');
|
||||
$this->lang->company->menu = $this->lang->admin->menu;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->company->create;
|
||||
$position[] = html::a($this->createLink('admin', 'browsecompany'), $this->lang->admin->company);
|
||||
$position[] = $this->lang->company->create;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个公司。*/
|
||||
public function edit()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->update();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::alert($this->lang->company->successSaved));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $this->lang->company->edit;
|
||||
$position[] = $this->lang->company->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('company', $this->company->getById($this->app->company->id));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除公司。*/
|
||||
public function delete($companyID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->company->confirmDelete, $this->createLink('company', 'delete', "companyID=$companyID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->company->delete($companyID);
|
||||
echo js::locate($this->createLink('admin', 'browseCompany'), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class company extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('dept');
|
||||
$this->app->loadLang('user');
|
||||
$this->company->setMenu();
|
||||
}
|
||||
|
||||
/* 公司首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink('company', 'browse'));
|
||||
}
|
||||
|
||||
/* 浏览某一个公司。*/
|
||||
public function browse($deptID = 0)
|
||||
{
|
||||
$this->lang->set('menugroup.company', 'company');
|
||||
$childDeptIds = $this->dept->getAllChildID($deptID);
|
||||
|
||||
$this->company->setMenu($deptID);
|
||||
|
||||
$header['title'] = $this->lang->company->index . $this->lang->colon . $this->lang->dept->common;
|
||||
$position[] = $this->lang->dept->common;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('users', $this->dept->getUsers($childDeptIds));
|
||||
$this->assign('deptTree', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createMemberLink')));
|
||||
$this->assign('parentDepts', $this->dept->getParents($deptID));
|
||||
$this->assign('deptID', $deptID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 新增一个公司。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('admin', 'browsecompany'), 'parent'));
|
||||
}
|
||||
|
||||
$this->lang->set('menugroup.company', 'admin');
|
||||
$this->lang->company->menu = $this->lang->admin->menu;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->company->create;
|
||||
$position[] = html::a($this->createLink('admin', 'browsecompany'), $this->lang->admin->company);
|
||||
$position[] = $this->lang->company->create;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个公司。*/
|
||||
public function edit()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->update();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::alert($this->lang->company->successSaved));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $this->lang->company->edit;
|
||||
$position[] = $this->lang->company->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('company', $this->company->getById($this->app->company->id));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除公司。*/
|
||||
public function delete($companyID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->company->confirmDelete, $this->createLink('company', 'delete', "companyID=$companyID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->company->delete($companyID);
|
||||
echo js::locate($this->createLink('admin', 'browseCompany'), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* The company module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->company->common = '组织视图';
|
||||
$lang->company->index = "组织视图首页";
|
||||
$lang->company->create = "新增公司";
|
||||
$lang->company->edit = "编辑公司";
|
||||
$lang->company->read = "公司信息";
|
||||
$lang->company->update = "更新公司";
|
||||
$lang->company->delete = "删除公司";
|
||||
$lang->company->browse = "用户列表";
|
||||
$lang->company->depts = "部门列表";
|
||||
$lang->company->orgView = '组织视图';
|
||||
|
||||
$lang->company->confirmDelete = "您确定删除该公司吗?";
|
||||
|
||||
$lang->company->id = '编号';
|
||||
$lang->company->name = '公司名称';
|
||||
$lang->company->phone = '联系电话';
|
||||
$lang->company->fax = '传真';
|
||||
$lang->company->address = '通讯地址';
|
||||
$lang->company->zipcode = '邮政编码';
|
||||
$lang->company->website = '公司网站';
|
||||
$lang->company->backyard = '内网网址';
|
||||
$lang->company->pms = 'PMS网站';
|
||||
$lang->company->guest = '匿名登录';
|
||||
|
||||
$lang->company->guestList[0] = '不允许';
|
||||
$lang->company->guestList[1] = '允许';
|
||||
<?php
|
||||
/**
|
||||
* The company module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->company->common = '组织视图';
|
||||
$lang->company->index = "组织视图首页";
|
||||
$lang->company->create = "新增公司";
|
||||
$lang->company->edit = "编辑公司";
|
||||
$lang->company->read = "公司信息";
|
||||
$lang->company->update = "更新公司";
|
||||
$lang->company->delete = "删除公司";
|
||||
$lang->company->browse = "用户列表";
|
||||
$lang->company->depts = "部门列表";
|
||||
$lang->company->orgView = '组织视图';
|
||||
|
||||
$lang->company->confirmDelete = "您确定删除该公司吗?";
|
||||
|
||||
$lang->company->id = '编号';
|
||||
$lang->company->name = '公司名称';
|
||||
$lang->company->phone = '联系电话';
|
||||
$lang->company->fax = '传真';
|
||||
$lang->company->address = '通讯地址';
|
||||
$lang->company->zipcode = '邮政编码';
|
||||
$lang->company->website = '公司网站';
|
||||
$lang->company->backyard = '内网网址';
|
||||
$lang->company->pms = 'PMS网站';
|
||||
$lang->company->guest = '匿名登录';
|
||||
|
||||
$lang->company->guestList[0] = '不允许';
|
||||
$lang->company->guestList[1] = '允许';
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* The company module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->company->common = '组织视图';
|
||||
$lang->company->index = "组织视图首页";
|
||||
$lang->company->create = "新增公司";
|
||||
$lang->company->edit = "编辑公司";
|
||||
$lang->company->read = "公司信息";
|
||||
$lang->company->update = "更新公司";
|
||||
$lang->company->delete = "删除公司";
|
||||
$lang->company->browse = "用户列表";
|
||||
$lang->company->depts = "部门列表";
|
||||
$lang->company->orgView = '组织视图';
|
||||
|
||||
$lang->company->confirmDelete = "您确定删除该公司吗?";
|
||||
$lang->company->successSaved = "成功保存";
|
||||
|
||||
$lang->company->id = '编号';
|
||||
$lang->company->name = '公司名称';
|
||||
$lang->company->phone = '联系电话';
|
||||
$lang->company->fax = '传真';
|
||||
$lang->company->address = '通讯地址';
|
||||
$lang->company->zipcode = '邮政编码';
|
||||
$lang->company->website = '公司网站';
|
||||
$lang->company->backyard = '公司内网';
|
||||
$lang->company->pms = 'PMS网站';
|
||||
$lang->company->guest = '匿名登录';
|
||||
|
||||
$lang->company->guestList[0] = '不允许';
|
||||
$lang->company->guestList[1] = '允许';
|
||||
<?php
|
||||
/**
|
||||
* The company module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->company->common = '组织视图';
|
||||
$lang->company->index = "组织视图首页";
|
||||
$lang->company->create = "新增公司";
|
||||
$lang->company->edit = "编辑公司";
|
||||
$lang->company->read = "公司信息";
|
||||
$lang->company->update = "更新公司";
|
||||
$lang->company->delete = "删除公司";
|
||||
$lang->company->browse = "用户列表";
|
||||
$lang->company->depts = "部门列表";
|
||||
$lang->company->orgView = '组织视图';
|
||||
|
||||
$lang->company->confirmDelete = "您确定删除该公司吗?";
|
||||
$lang->company->successSaved = "成功保存";
|
||||
|
||||
$lang->company->id = '编号';
|
||||
$lang->company->name = '公司名称';
|
||||
$lang->company->phone = '联系电话';
|
||||
$lang->company->fax = '传真';
|
||||
$lang->company->address = '通讯地址';
|
||||
$lang->company->zipcode = '邮政编码';
|
||||
$lang->company->website = '公司网站';
|
||||
$lang->company->backyard = '公司内网';
|
||||
$lang->company->pms = 'PMS网站';
|
||||
$lang->company->guest = '匿名登录';
|
||||
|
||||
$lang->company->guestList[0] = '不允许';
|
||||
$lang->company->guestList[1] = '允许';
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class companyModel extends model
|
||||
{
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>*/
|
||||
public function setMenu($dept = 0)
|
||||
{
|
||||
common::setMenuVars($this->lang->company->menu, 'name', array($this->app->company->name));
|
||||
common::setMenuVars($this->lang->company->menu, 'addUser', array($dept));
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ù<EFBFBD>˾<EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_COMPANY)->fetchAll();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>õ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function getFirst()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҹ<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @param string $domain <20><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>ȡHTTP_HOST<53><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByDomain($domain = '')
|
||||
{
|
||||
if(empty($domain)) $domain = $_SERVER['HTTP_HOST'];
|
||||
return $this->dao->findByPMS($domain)->from(TABLE_COMPANY)->fetch();
|
||||
}
|
||||
|
||||
/* ͨ<><CDA8>id<69><64>ȡ<EFBFBD><C8A1>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
public function getByID($companyID = '')
|
||||
{
|
||||
return $this->dao->findById((int)$companyID)->from(TABLE_COMPANY)->fetch();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function create()
|
||||
{
|
||||
$company = fixer::input('post')->get();
|
||||
$this->dao->insert(TABLE_COMPANY)
|
||||
->data($company)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->company->create->requiredFields, 'notempty')
|
||||
->batchCheck('name,pms', 'unique')
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
public function update()
|
||||
{
|
||||
$company = fixer::input('post')->get();
|
||||
$companyID = $this->app->company->id;
|
||||
$this->dao->update(TABLE_COMPANY)
|
||||
->data($company)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->company->edit->requiredFields, 'notempty')
|
||||
->batchCheck('name,pms', 'unique', "id != '$companyID'")
|
||||
->where('id')->eq($companyID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* ɾ<><C9BE>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function delete($companyID)
|
||||
{
|
||||
return $this->dao->delete()->from(TABLE_COMPANY)->where('id')->eq((int)$companyID)->limit(1)->exec();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class companyModel extends model
|
||||
{
|
||||
/* <20><><EFBFBD>ò˵<C3B2><CBB5><EFBFBD>*/
|
||||
public function setMenu($dept = 0)
|
||||
{
|
||||
common::setMenuVars($this->lang->company->menu, 'name', array($this->app->company->name));
|
||||
common::setMenuVars($this->lang->company->menu, 'addUser', array($dept));
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ù<EFBFBD>˾<EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_COMPANY)->fetchAll();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>õ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function getFirst()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҹ<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
*
|
||||
* @param string $domain <20><><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>ȡHTTP_HOST<53><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByDomain($domain = '')
|
||||
{
|
||||
if(empty($domain)) $domain = $_SERVER['HTTP_HOST'];
|
||||
return $this->dao->findByPMS($domain)->from(TABLE_COMPANY)->fetch();
|
||||
}
|
||||
|
||||
/* ͨ<><CDA8>id<69><64>ȡ<EFBFBD><C8A1>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
public function getByID($companyID = '')
|
||||
{
|
||||
return $this->dao->findById((int)$companyID)->from(TABLE_COMPANY)->fetch();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function create()
|
||||
{
|
||||
$company = fixer::input('post')->get();
|
||||
$this->dao->insert(TABLE_COMPANY)
|
||||
->data($company)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->company->create->requiredFields, 'notempty')
|
||||
->batchCheck('name,pms', 'unique')
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
public function update()
|
||||
{
|
||||
$company = fixer::input('post')->get();
|
||||
$companyID = $this->app->company->id;
|
||||
$this->dao->update(TABLE_COMPANY)
|
||||
->data($company)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->company->edit->requiredFields, 'notempty')
|
||||
->batchCheck('name,pms', 'unique', "id != '$companyID'")
|
||||
->where('id')->eq($companyID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* ɾ<><C9BE>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
public function delete($companyID)
|
||||
{
|
||||
return $this->dao->delete()->from(TABLE_COMPANY)->where('id')->eq((int)$companyID)->limit(1)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of product dept of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/treeview.html.php';
|
||||
include '../../common/view/tablesorter.html.php';
|
||||
?>
|
||||
<div class="yui-d0 yui-t1">
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->user->realname;?></th>
|
||||
<th><?php echo $lang->user->account;?></th>
|
||||
<th><?php echo $lang->user->nickname;?></th>
|
||||
<th><?php echo $lang->user->email;?></th>
|
||||
<th><?php echo $lang->user->gendar;?></th>
|
||||
<th><?php echo $lang->user->phone;?></th>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<th><?php echo $lang->user->visits;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $user->id;?></td>
|
||||
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname)) echo $user->realname;?></td>
|
||||
<td><?php echo $user->account;?></td>
|
||||
<td><?php echo $user->nickname;?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td><?php if(isset($lang->user->gendarList->{$user->gendar})) echo $lang->user->gendarList->{$user->gendar};?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
<td><?php echo $user->join;?></td>
|
||||
<td><?php echo $user->visits;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('user', 'edit', "userID=$user->id&from=company", $lang->edit);
|
||||
common::printLink('user', 'delete', "userID=$user->id", $lang->delete, "hiddenwin");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-b">
|
||||
<div class='box-title'><?php echo $lang->dept->common;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $deptTree;?>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
common::printLink('user', 'create', "dept=$deptID&from=company", $lang->user->create);echo '<br />';
|
||||
common::printLink('company', 'browse', '', $lang->user->allUsers); echo '<br />';
|
||||
common::printLink('dept', 'browse', '', $lang->dept->manage);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script lanugage='Javascript'>$('#dept<?php echo $deptID;?>').addClass('active');</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of product dept of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/treeview.html.php';
|
||||
include '../../common/view/tablesorter.html.php';
|
||||
?>
|
||||
<div class="yui-d0 yui-t1">
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->user->realname;?></th>
|
||||
<th><?php echo $lang->user->account;?></th>
|
||||
<th><?php echo $lang->user->nickname;?></th>
|
||||
<th><?php echo $lang->user->email;?></th>
|
||||
<th><?php echo $lang->user->gendar;?></th>
|
||||
<th><?php echo $lang->user->phone;?></th>
|
||||
<th><?php echo $lang->user->join;?></th>
|
||||
<th><?php echo $lang->user->visits;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $user->id;?></td>
|
||||
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname)) echo $user->realname;?></td>
|
||||
<td><?php echo $user->account;?></td>
|
||||
<td><?php echo $user->nickname;?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td><?php if(isset($lang->user->gendarList->{$user->gendar})) echo $lang->user->gendarList->{$user->gendar};?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
<td><?php echo $user->join;?></td>
|
||||
<td><?php echo $user->visits;?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('user', 'edit', "userID=$user->id&from=company", $lang->edit);
|
||||
common::printLink('user', 'delete', "userID=$user->id", $lang->delete, "hiddenwin");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-b">
|
||||
<div class='box-title'><?php echo $lang->dept->common;?></div>
|
||||
<div class='box-content'>
|
||||
<?php echo $deptTree;?>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
common::printLink('user', 'create', "dept=$deptID&from=company", $lang->user->create);echo '<br />';
|
||||
common::printLink('company', 'browse', '', $lang->user->allUsers); echo '<br />';
|
||||
common::printLink('dept', 'browse', '', $lang->dept->manage);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script lanugage='Javascript'>$('#dept<?php echo $deptID;?>').addClass('active');</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->company->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><?php echo html::input('phone', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><?php echo html::input('fax', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><?php echo html::input('address', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><?php echo html::input('zipcode', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><?php echo html::input('website', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><?php echo html::input('backyard', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><?php echo html::input('pms', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><?php echo html::radio('guest', $lang->company->guestList);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The create view of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->company->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><?php echo html::input('phone', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><?php echo html::input('fax', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><?php echo html::input('address', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><?php echo html::input('zipcode', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><?php echo html::input('website', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><?php echo html::input('backyard', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><?php echo html::input('pms', '', "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><?php echo html::radio('guest', $lang->company->guestList);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->company->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><?php echo html::input('name', $company->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><?php echo html::input('phone', $company->phone, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><?php echo html::input('fax', $company->fax, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><?php echo html::input('address', $company->address, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><?php echo html::input('zipcode', $company->zipcode, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><?php echo html::input('website', $company->website, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><?php echo html::input('backyard', $company->backyard, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><?php echo html::input('pms', $company->pms, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><?php echo html::radio('guest', $lang->company->guestList, $company->guest);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The edit view of company module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package company
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->company->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><?php echo html::input('name', $company->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><?php echo html::input('phone', $company->phone, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><?php echo html::input('fax', $company->fax, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><?php echo html::input('address', $company->address, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><?php echo html::input('zipcode', $company->zipcode, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><?php echo html::input('website', $company->website, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><?php echo html::input('backyard', $company->backyard, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><?php echo html::input('pms', $company->pms, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><?php echo html::radio('guest', $lang->company->guestList, $company->guest);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,124 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of convert currentModule of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class convert extends control
|
||||
{
|
||||
/* 安装程序首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->convert->saveState();
|
||||
$this->view->header->title = $this->lang->convert->common;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 选择系统。*/
|
||||
public function selectSource()
|
||||
{
|
||||
$this->view->header->title = $this->lang->convert->common . $this->lang->colon;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 转换参数设置。*/
|
||||
public function setConfig()
|
||||
{
|
||||
if(!$this->post->source)
|
||||
{
|
||||
echo js::alert($this->lang->convert->mustSelectSource);
|
||||
die(js::locate('back'));
|
||||
}
|
||||
list($sourceName, $version) = explode('_', $this->post->source);
|
||||
$setFunc = "set$sourceName";
|
||||
$this->view->header->title = $this->lang->convert->setting;
|
||||
$this->view->source = $sourceName;
|
||||
$this->view->version = $version;
|
||||
$this->view->setting = $this->fetch('convert', $setFunc, "version=$version");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* BugFree的设置界面。*/
|
||||
public function setBugFree($version)
|
||||
{
|
||||
$this->view->source = 'BugFree';
|
||||
$this->view->version = $version;
|
||||
$this->view->tablePrefix = $version > 1 ? 'bf_' : '';
|
||||
$this->view->dbName = $version > 1 ? 'bugfree2' : 'BugFree';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 检查配置。*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$checkFunc = 'check' . $this->post->source;
|
||||
$this->view->header->title = $this->lang->convert->checkConfig;
|
||||
$this->view->source = $this->post->source;
|
||||
$this->view->checkResult = $this->fetch('convert', $checkFunc, "version={$this->post->version}");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 检查BugFree的设置。*/
|
||||
public function checkBugFree($version)
|
||||
{
|
||||
helper::import('./converter/bugfree.php');
|
||||
$converter = new bugfreeConvertModel();
|
||||
|
||||
/* 分别检查数据库、表和安装路径。*/
|
||||
$checkInfo['db'] = $converter->connectDB();
|
||||
//if(is_object($checkInfo['db'])) $checkInfo['table'] = $converter->checkTables();
|
||||
$checkInfo['path'] = $converter->checkPath();
|
||||
|
||||
/* 计算检查结果。*/
|
||||
$result = 'pass';
|
||||
if(!is_object($checkInfo['db']) or !$checkInfo['path']) $result = 'fail';
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->version = $version;
|
||||
$this->view->source = 'bugfree';
|
||||
$this->view->result = $result;
|
||||
$this->view->checkInfo = $checkInfo;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 执行转换。*/
|
||||
public function execute()
|
||||
{
|
||||
$convertFunc = 'convert' . $this->post->source;
|
||||
$this->view->header->title = $this->lang->convert->execute;
|
||||
$this->view->source = $this->post->source;
|
||||
$this->view->version = $this->post->version;
|
||||
$this->view->executeResult = $this->fetch('convert', $convertFunc, "version={$this->post->version}");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 转换BugFree。*/
|
||||
public function convertBugFree($version)
|
||||
{
|
||||
helper::import('./converter/bugfree.php');
|
||||
helper::import("./converter/bugfree$version.php");
|
||||
$className = "bugfree{$version}ConvertModel";
|
||||
$converter = new $className();
|
||||
$this->view->version = $version;
|
||||
$this->view->result = $converter->execute($version);
|
||||
$this->view->info = bugfreeConvertModel::$info;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of convert currentModule of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class convert extends control
|
||||
{
|
||||
/* 安装程序首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->convert->saveState();
|
||||
$this->view->header->title = $this->lang->convert->common;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 选择系统。*/
|
||||
public function selectSource()
|
||||
{
|
||||
$this->view->header->title = $this->lang->convert->common . $this->lang->colon;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 转换参数设置。*/
|
||||
public function setConfig()
|
||||
{
|
||||
if(!$this->post->source)
|
||||
{
|
||||
echo js::alert($this->lang->convert->mustSelectSource);
|
||||
die(js::locate('back'));
|
||||
}
|
||||
list($sourceName, $version) = explode('_', $this->post->source);
|
||||
$setFunc = "set$sourceName";
|
||||
$this->view->header->title = $this->lang->convert->setting;
|
||||
$this->view->source = $sourceName;
|
||||
$this->view->version = $version;
|
||||
$this->view->setting = $this->fetch('convert', $setFunc, "version=$version");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* BugFree的设置界面。*/
|
||||
public function setBugFree($version)
|
||||
{
|
||||
$this->view->source = 'BugFree';
|
||||
$this->view->version = $version;
|
||||
$this->view->tablePrefix = $version > 1 ? 'bf_' : '';
|
||||
$this->view->dbName = $version > 1 ? 'bugfree2' : 'BugFree';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 检查配置。*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$checkFunc = 'check' . $this->post->source;
|
||||
$this->view->header->title = $this->lang->convert->checkConfig;
|
||||
$this->view->source = $this->post->source;
|
||||
$this->view->checkResult = $this->fetch('convert', $checkFunc, "version={$this->post->version}");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 检查BugFree的设置。*/
|
||||
public function checkBugFree($version)
|
||||
{
|
||||
helper::import('./converter/bugfree.php');
|
||||
$converter = new bugfreeConvertModel();
|
||||
|
||||
/* 分别检查数据库、表和安装路径。*/
|
||||
$checkInfo['db'] = $converter->connectDB();
|
||||
//if(is_object($checkInfo['db'])) $checkInfo['table'] = $converter->checkTables();
|
||||
$checkInfo['path'] = $converter->checkPath();
|
||||
|
||||
/* 计算检查结果。*/
|
||||
$result = 'pass';
|
||||
if(!is_object($checkInfo['db']) or !$checkInfo['path']) $result = 'fail';
|
||||
|
||||
/* 赋值。*/
|
||||
$this->view->version = $version;
|
||||
$this->view->source = 'bugfree';
|
||||
$this->view->result = $result;
|
||||
$this->view->checkInfo = $checkInfo;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 执行转换。*/
|
||||
public function execute()
|
||||
{
|
||||
$convertFunc = 'convert' . $this->post->source;
|
||||
$this->view->header->title = $this->lang->convert->execute;
|
||||
$this->view->source = $this->post->source;
|
||||
$this->view->version = $this->post->version;
|
||||
$this->view->executeResult = $this->fetch('convert', $convertFunc, "version={$this->post->version}");
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 转换BugFree。*/
|
||||
public function convertBugFree($version)
|
||||
{
|
||||
helper::import('./converter/bugfree.php');
|
||||
helper::import("./converter/bugfree$version.php");
|
||||
$className = "bugfree{$version}ConvertModel";
|
||||
$converter = new $className();
|
||||
$this->view->version = $version;
|
||||
$this->view->result = $converter->execute($version);
|
||||
$this->view->info = bugfreeConvertModel::$info;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* The baisc model file of bugfree convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class bugfreeConvertModel extends convertModel
|
||||
{
|
||||
public $map = array();
|
||||
public $filePath = '';
|
||||
static public $info = array();
|
||||
|
||||
/* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>ݿ⡣*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::connectDB();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>Tables<65><73>*/
|
||||
public function checkTables()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>鰲װ·<D7B0><C2B7><EFBFBD><EFBFBD>*/
|
||||
public function checkPath()
|
||||
{
|
||||
$this->setPath();
|
||||
return file_exists($this->filePath);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>*/
|
||||
public function setPath()
|
||||
{
|
||||
$this->filePath = realpath($this->post->installPath) . $this->app->getPathFix() . 'BugFile' . $this->app->getPathFix();
|
||||
}
|
||||
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute($version)
|
||||
{
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
public function clear()
|
||||
{
|
||||
foreach($this->session->state as $table => $maxID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->delete()->from($table)->where('id')->gt($maxID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The baisc model file of bugfree convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class bugfreeConvertModel extends convertModel
|
||||
{
|
||||
public $map = array();
|
||||
public $filePath = '';
|
||||
static public $info = array();
|
||||
|
||||
/* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>ݿ⡣*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::connectDB();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>Tables<65><73>*/
|
||||
public function checkTables()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>鰲װ·<D7B0><C2B7><EFBFBD><EFBFBD>*/
|
||||
public function checkPath()
|
||||
{
|
||||
$this->setPath();
|
||||
return file_exists($this->filePath);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>*/
|
||||
public function setPath()
|
||||
{
|
||||
$this->filePath = realpath($this->post->installPath) . $this->app->getPathFix() . 'BugFile' . $this->app->getPathFix();
|
||||
}
|
||||
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute($version)
|
||||
{
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
public function clear()
|
||||
{
|
||||
foreach($this->session->state as $table => $maxID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->delete()->from($table)->where('id')->gt($maxID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,289 +1,289 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of bugfree version 1 convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class bugfree1ConvertModel extends bugfreeConvertModel
|
||||
{
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute()
|
||||
{
|
||||
$this->clear();
|
||||
$this->convertGroup();
|
||||
$result['users'] = $this->convertUser();
|
||||
$result['projects'] = $this->convertProject();
|
||||
$result['modules'] = $this->convertModule();
|
||||
$result['bugs'] = $this->convertBug();
|
||||
$result['actions'] = $this->convertAction();
|
||||
$result['files'] = $this->convertFile();
|
||||
$this->loadModel('tree')->fixModulePath();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>顣*/
|
||||
public function convertGroup()
|
||||
{
|
||||
$groups = $this->dao->dbh($this->sourceDBH)
|
||||
->select("groupID AS id, groupName AS name, groupUser AS users")
|
||||
->from('BugGroup')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($groups as $groupID => $group)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ֳ<EFBFBD><D6B3><EFBFBD><EFBFBD>顣*/
|
||||
$groupUsers = explode(',', $group->users);
|
||||
unset($group->id);
|
||||
unset($group->users);
|
||||
|
||||
/* <20><><EFBFBD>뵽group<75><70><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_GROUP)->data($group)->exec();
|
||||
$zentaoGroupID = $this->dao->lastInsertId();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>group<75>Ķ<EFBFBD>Ӧ<EFBFBD><D3A6>ϵ<EFBFBD><CFB5>*/
|
||||
foreach($groupUsers as $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USERGROUP)->set('`group`')->eq($zentaoGroupID)->set('account')->eq($account)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
public function convertUser()
|
||||
{
|
||||
/* <20><>ѯ<EFBFBD><D1AF>ǰϵͳ<CFB5>д<EFBFBD><D0B4>ڵ<EFBFBD><DAB5>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
$activeUsers = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("username AS account, userpassword AS password, realname, email")
|
||||
->from('BugUser')
|
||||
->orderBy('userID ASC')
|
||||
->fetchAll('account', $autoCompany = false);
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
$allUsers = $this->dao->select("distinct(username) AS account")->from('BugHistory')->fetchPairs('', '', $autoCompany = false);
|
||||
|
||||
/* <20>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>ߡ<EFBFBD>*/
|
||||
foreach($allUsers as $key => $account)
|
||||
{
|
||||
if(isset($activeUsers[$account]))
|
||||
{
|
||||
$allUsers[$key] = $activeUsers[$account];
|
||||
}
|
||||
else
|
||||
{
|
||||
$allUsers[$key] = array('account' => $account, 'realname' => $account, 'deleted' => '1');
|
||||
}
|
||||
}
|
||||
foreach($activeUsers as $account => $user) if(!isset($allUsers[$account])) $allUsers[$account] = $user;
|
||||
|
||||
/* <20><><EFBFBD>뵽zentao<61><6F><EFBFBD>ݿ<EFBFBD><DDBF>С<EFBFBD>*/
|
||||
$convertCount = 0;
|
||||
foreach($allUsers as $account => $user)
|
||||
{
|
||||
if(!$this->dao->dbh($this->dbh)->findByAccount($account)->from(TABLE_USER)->fetch('account'))
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USER)->data($user)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$info['users'][] = sprintf($this->lang->convert->errorUserExists, $account);
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ĿΪ<C4BF><CEAA>Ʒ<EFBFBD><C6B7>*/
|
||||
public function convertProject()
|
||||
{
|
||||
$projects = $this->dao->dbh($this->sourceDBH)->select("projectID AS id, projectName AS name")->from('BugProject')->fetchAll('id', $autoCompany = false);
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
unset($project->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCT)->data($project)->exec();
|
||||
$this->map['product'][$projectID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($projects);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ΪBug<75><67>ͼģ<CDBC>顣*/
|
||||
public function convertModule()
|
||||
{
|
||||
$this->map['module'][0] = 0;
|
||||
$modules = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select(
|
||||
'moduleID AS id,
|
||||
projectID AS product,
|
||||
moduleName AS name,
|
||||
moduleGrade AS grade,
|
||||
parentID AS parent,
|
||||
"bug" AS view')
|
||||
->from('BugModule')
|
||||
->orderBy('id ASC')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($modules as $moduleID => $module)
|
||||
{
|
||||
$module->product = $this->map['product'][$module->product];
|
||||
unset($module->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$this->map['module'][$moduleID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>parent<6E><74>*/
|
||||
foreach($modules as $oldModuleID => $module)
|
||||
{
|
||||
$newModuleID = $this->map['module'][$oldModuleID];
|
||||
$newParentID = $this->map['module'][$module->parent];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_MODULE)->set('parent')->eq($newParentID)->where('id')->eq($newModuleID)->exec();
|
||||
}
|
||||
return count($modules);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>Bug<75><67>*/
|
||||
public function convertBug()
|
||||
{
|
||||
$bugs = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
bugID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
bugTitle AS title,
|
||||
bugSeverity AS severity,
|
||||
bugType AS type,
|
||||
bugOS AS os,
|
||||
bugStatus AS status,
|
||||
mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
assignedTo, assignedDate,
|
||||
resolvedBy, resolution, resolvedBuild, resolvedDate,
|
||||
closedBy, closedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
linkID as duplicateBug
|
||||
')
|
||||
->from('BugInfo')
|
||||
->orderBy('bugID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>Bug<75><67><EFBFBD>ݡ<EFBFBD>*/
|
||||
$bugID = (int)$bugID;
|
||||
unset($bug->id);
|
||||
if($bug->assignedTo == 'Closed') $bug->assignedTo = 'closed';
|
||||
$bug->type = strtolower($bug->type);
|
||||
$bug->os = strtolower($bug->os);
|
||||
$bug->browser = 'all';
|
||||
$bug->resolution = str_replace(' ','', strtolower($bug->resolution));
|
||||
$bug->product = $this->map['product'][$bug->product];
|
||||
$bug->module = $this->map['module'][$bug->module];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_BUG)->data($bug)->exec();
|
||||
$this->map['bug'][$bugID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>duplicateBug<75><67> */
|
||||
foreach($this->map['bug'] as $oldBugID => $newBugID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('duplicateBug')->eq($newBugID)->where('duplicateBug')->eq($oldBugID)->exec();
|
||||
}
|
||||
return count($bugs);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7>¼<EFBFBD><C2BC>*/
|
||||
public function convertAction()
|
||||
{
|
||||
$actions = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("
|
||||
'bug' AS objectType,
|
||||
bugID AS objectID,
|
||||
userName AS actor,
|
||||
action,
|
||||
fullInfo AS comment,
|
||||
actionDate AS date")
|
||||
->from('BugHistory')
|
||||
->orderBy('bugID, historyID')
|
||||
->fetchGroup('objectID', '', $autoCompany = false);
|
||||
$convertCount = 0;
|
||||
foreach($actions as $bugID => $bugActions)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>bugID<49><44>*/
|
||||
$bugID = (int)$bugID;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>action<6F><6E>*/
|
||||
foreach($bugActions as $key => $action)
|
||||
{
|
||||
$action->objectID = $zentaoBugID;
|
||||
if($key == 0)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('steps')->eq($action->comment)->where('id')->eq($zentaoBugID)->exec();
|
||||
$action->comment = '';
|
||||
}
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_ACTION)->data($action)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertFile()
|
||||
{
|
||||
$this->setPath();
|
||||
$files = $this->dao->dbh($this->sourceDBH)
|
||||
->select("
|
||||
fileName AS pathname,
|
||||
fileTitle AS title,
|
||||
fileType AS extension,
|
||||
fileSize AS size,
|
||||
'bug' AS objectType,
|
||||
bugID AS objectID,
|
||||
addUser AS addedBy,
|
||||
addDate AS addedDate
|
||||
")
|
||||
->from('BugFile')
|
||||
->orderBy('fileID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($files as $file)
|
||||
{
|
||||
$file->objectID = $this->map['bug'][(int)$file->objectID];
|
||||
if(strpos($file->size, 'KB')) $file->size = (int)(str_replace('KB', '', $file->size) * 1024);
|
||||
if(strpos($file->size, 'MB')) $file->size = (int)(str_replace('MB', '', $file->size) * 1024 * 1024);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_FILE)->data($file)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$soureFile = $this->filePath . $file->pathname;
|
||||
if(!file_exists($soureFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorFileNotExits, $soureFile);
|
||||
continue;
|
||||
}
|
||||
$targetFile = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
$targetPath = dirname($targetFile);
|
||||
if(!is_dir($targetPath)) mkdir($targetPath, 0777, true);
|
||||
if(!copy($soureFile, $targetFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorCopyFailed, $targetFile);
|
||||
}
|
||||
}
|
||||
return count($files);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of bugfree version 1 convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class bugfree1ConvertModel extends bugfreeConvertModel
|
||||
{
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute()
|
||||
{
|
||||
$this->clear();
|
||||
$this->convertGroup();
|
||||
$result['users'] = $this->convertUser();
|
||||
$result['projects'] = $this->convertProject();
|
||||
$result['modules'] = $this->convertModule();
|
||||
$result['bugs'] = $this->convertBug();
|
||||
$result['actions'] = $this->convertAction();
|
||||
$result['files'] = $this->convertFile();
|
||||
$this->loadModel('tree')->fixModulePath();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>顣*/
|
||||
public function convertGroup()
|
||||
{
|
||||
$groups = $this->dao->dbh($this->sourceDBH)
|
||||
->select("groupID AS id, groupName AS name, groupUser AS users")
|
||||
->from('BugGroup')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($groups as $groupID => $group)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ֳ<EFBFBD><D6B3><EFBFBD><EFBFBD>顣*/
|
||||
$groupUsers = explode(',', $group->users);
|
||||
unset($group->id);
|
||||
unset($group->users);
|
||||
|
||||
/* <20><><EFBFBD>뵽group<75><70><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_GROUP)->data($group)->exec();
|
||||
$zentaoGroupID = $this->dao->lastInsertId();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>group<75>Ķ<EFBFBD>Ӧ<EFBFBD><D3A6>ϵ<EFBFBD><CFB5>*/
|
||||
foreach($groupUsers as $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USERGROUP)->set('`group`')->eq($zentaoGroupID)->set('account')->eq($account)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
public function convertUser()
|
||||
{
|
||||
/* <20><>ѯ<EFBFBD><D1AF>ǰϵͳ<CFB5>д<EFBFBD><D0B4>ڵ<EFBFBD><DAB5>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
$activeUsers = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("username AS account, userpassword AS password, realname, email")
|
||||
->from('BugUser')
|
||||
->orderBy('userID ASC')
|
||||
->fetchAll('account', $autoCompany = false);
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
$allUsers = $this->dao->select("distinct(username) AS account")->from('BugHistory')->fetchPairs('', '', $autoCompany = false);
|
||||
|
||||
/* <20>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>ߡ<EFBFBD>*/
|
||||
foreach($allUsers as $key => $account)
|
||||
{
|
||||
if(isset($activeUsers[$account]))
|
||||
{
|
||||
$allUsers[$key] = $activeUsers[$account];
|
||||
}
|
||||
else
|
||||
{
|
||||
$allUsers[$key] = array('account' => $account, 'realname' => $account, 'deleted' => '1');
|
||||
}
|
||||
}
|
||||
foreach($activeUsers as $account => $user) if(!isset($allUsers[$account])) $allUsers[$account] = $user;
|
||||
|
||||
/* <20><><EFBFBD>뵽zentao<61><6F><EFBFBD>ݿ<EFBFBD><DDBF>С<EFBFBD>*/
|
||||
$convertCount = 0;
|
||||
foreach($allUsers as $account => $user)
|
||||
{
|
||||
if(!$this->dao->dbh($this->dbh)->findByAccount($account)->from(TABLE_USER)->fetch('account'))
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USER)->data($user)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$info['users'][] = sprintf($this->lang->convert->errorUserExists, $account);
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ĿΪ<C4BF><CEAA>Ʒ<EFBFBD><C6B7>*/
|
||||
public function convertProject()
|
||||
{
|
||||
$projects = $this->dao->dbh($this->sourceDBH)->select("projectID AS id, projectName AS name")->from('BugProject')->fetchAll('id', $autoCompany = false);
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
unset($project->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCT)->data($project)->exec();
|
||||
$this->map['product'][$projectID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($projects);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ΪBug<75><67>ͼģ<CDBC>顣*/
|
||||
public function convertModule()
|
||||
{
|
||||
$this->map['module'][0] = 0;
|
||||
$modules = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select(
|
||||
'moduleID AS id,
|
||||
projectID AS product,
|
||||
moduleName AS name,
|
||||
moduleGrade AS grade,
|
||||
parentID AS parent,
|
||||
"bug" AS view')
|
||||
->from('BugModule')
|
||||
->orderBy('id ASC')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($modules as $moduleID => $module)
|
||||
{
|
||||
$module->product = $this->map['product'][$module->product];
|
||||
unset($module->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$this->map['module'][$moduleID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>parent<6E><74>*/
|
||||
foreach($modules as $oldModuleID => $module)
|
||||
{
|
||||
$newModuleID = $this->map['module'][$oldModuleID];
|
||||
$newParentID = $this->map['module'][$module->parent];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_MODULE)->set('parent')->eq($newParentID)->where('id')->eq($newModuleID)->exec();
|
||||
}
|
||||
return count($modules);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>Bug<75><67>*/
|
||||
public function convertBug()
|
||||
{
|
||||
$bugs = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
bugID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
bugTitle AS title,
|
||||
bugSeverity AS severity,
|
||||
bugType AS type,
|
||||
bugOS AS os,
|
||||
bugStatus AS status,
|
||||
mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
assignedTo, assignedDate,
|
||||
resolvedBy, resolution, resolvedBuild, resolvedDate,
|
||||
closedBy, closedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
linkID as duplicateBug
|
||||
')
|
||||
->from('BugInfo')
|
||||
->orderBy('bugID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>Bug<75><67><EFBFBD>ݡ<EFBFBD>*/
|
||||
$bugID = (int)$bugID;
|
||||
unset($bug->id);
|
||||
if($bug->assignedTo == 'Closed') $bug->assignedTo = 'closed';
|
||||
$bug->type = strtolower($bug->type);
|
||||
$bug->os = strtolower($bug->os);
|
||||
$bug->browser = 'all';
|
||||
$bug->resolution = str_replace(' ','', strtolower($bug->resolution));
|
||||
$bug->product = $this->map['product'][$bug->product];
|
||||
$bug->module = $this->map['module'][$bug->module];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_BUG)->data($bug)->exec();
|
||||
$this->map['bug'][$bugID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>duplicateBug<75><67> */
|
||||
foreach($this->map['bug'] as $oldBugID => $newBugID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('duplicateBug')->eq($newBugID)->where('duplicateBug')->eq($oldBugID)->exec();
|
||||
}
|
||||
return count($bugs);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7>¼<EFBFBD><C2BC>*/
|
||||
public function convertAction()
|
||||
{
|
||||
$actions = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("
|
||||
'bug' AS objectType,
|
||||
bugID AS objectID,
|
||||
userName AS actor,
|
||||
action,
|
||||
fullInfo AS comment,
|
||||
actionDate AS date")
|
||||
->from('BugHistory')
|
||||
->orderBy('bugID, historyID')
|
||||
->fetchGroup('objectID', '', $autoCompany = false);
|
||||
$convertCount = 0;
|
||||
foreach($actions as $bugID => $bugActions)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>֮<EFBFBD><D6AE><EFBFBD><EFBFBD>bugID<49><44>*/
|
||||
$bugID = (int)$bugID;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>action<6F><6E>*/
|
||||
foreach($bugActions as $key => $action)
|
||||
{
|
||||
$action->objectID = $zentaoBugID;
|
||||
if($key == 0)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('steps')->eq($action->comment)->where('id')->eq($zentaoBugID)->exec();
|
||||
$action->comment = '';
|
||||
}
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_ACTION)->data($action)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertFile()
|
||||
{
|
||||
$this->setPath();
|
||||
$files = $this->dao->dbh($this->sourceDBH)
|
||||
->select("
|
||||
fileName AS pathname,
|
||||
fileTitle AS title,
|
||||
fileType AS extension,
|
||||
fileSize AS size,
|
||||
'bug' AS objectType,
|
||||
bugID AS objectID,
|
||||
addUser AS addedBy,
|
||||
addDate AS addedDate
|
||||
")
|
||||
->from('BugFile')
|
||||
->orderBy('fileID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($files as $file)
|
||||
{
|
||||
$file->objectID = $this->map['bug'][(int)$file->objectID];
|
||||
if(strpos($file->size, 'KB')) $file->size = (int)(str_replace('KB', '', $file->size) * 1024);
|
||||
if(strpos($file->size, 'MB')) $file->size = (int)(str_replace('MB', '', $file->size) * 1024 * 1024);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_FILE)->data($file)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$soureFile = $this->filePath . $file->pathname;
|
||||
if(!file_exists($soureFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorFileNotExits, $soureFile);
|
||||
continue;
|
||||
}
|
||||
$targetFile = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
$targetPath = dirname($targetFile);
|
||||
if(!is_dir($targetPath)) mkdir($targetPath, 0777, true);
|
||||
if(!copy($soureFile, $targetFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorCopyFailed, $targetFile);
|
||||
}
|
||||
}
|
||||
return count($files);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,458 +1,458 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of bugfree2 convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class bugfree2ConvertModel extends bugfreeConvertModel
|
||||
{
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute()
|
||||
{
|
||||
$this->clear();
|
||||
$this->setTable();
|
||||
$this->convertGroup();
|
||||
$result['users'] = $this->convertUser();
|
||||
$result['projects'] = $this->convertProject();
|
||||
$result['modules'] = $this->convertModule();
|
||||
$result['bugs'] = $this->convertBug();
|
||||
$result['cases'] = $this->convertCase();
|
||||
$result['results'] = $this->convertResult();
|
||||
$result['actions'] = $this->convertAction();
|
||||
$result['files'] = $this->convertFile();
|
||||
$this->loadModel('tree')->fixModulePath();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function setTable()
|
||||
{
|
||||
$dbPrefix = $this->post->dbPrefix;
|
||||
define('BUGFREE_TABLE_USER', $dbPrefix . 'TestUser');
|
||||
define('BUGFREE_TABLE_PROJECT', $dbPrefix . 'TestProject');
|
||||
define('BUGFREE_TABLE_MODULE', $dbPrefix . 'TestModule');
|
||||
define('BUGFREE_TABLE_BUGINFO', $dbPrefix . 'BugInfo');
|
||||
define('BUGFREE_TABLE_CASEINFO', $dbPrefix . 'CaseInfo');
|
||||
define('BUGFREE_TABLE_RESULTINFO', $dbPrefix . 'ResultInfo');
|
||||
define('BUGFREE_TABLE_ACTION', $dbPrefix . 'TestAction');
|
||||
define('BUGFREE_TABLE_FILE', $dbPrefix . 'TestFile');
|
||||
define('BUGFREE_TABLE_HISTORY', $dbPrefix . 'TestHistory');
|
||||
define('BUGFREE_TABLE_GROUP', $dbPrefix . 'TestGroup');
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
public function convertUser()
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5>û<EFBFBD><C3BB>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
$users = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("username AS account, userpassword AS password, realname, email, isDroped AS deleted")
|
||||
->from(BUGFREE_TABLE_USER)
|
||||
->orderBy('userID ASC')
|
||||
->fetchAll('account', $autoCompany = false);
|
||||
|
||||
/* <20><><EFBFBD>뵽zentao<61><6F><EFBFBD>ݿ<EFBFBD><DDBF>С<EFBFBD>*/
|
||||
$convertCount = 0;
|
||||
foreach($users as $account => $user)
|
||||
{
|
||||
if(!$this->dao->dbh($this->dbh)->findByAccount($account)->from(TABLE_USER)->fetch('account'))
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USER)->data($user)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$info['users'][] = sprintf($this->lang->convert->errorUserExists, $account);
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>顣*/
|
||||
public function convertGroup()
|
||||
{
|
||||
$groups = $this->dao->dbh($this->sourceDBH)
|
||||
->select("groupID AS id, groupName AS name, groupUser AS users")
|
||||
->from(BUGFREE_TABLE_GROUP)
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($groups as $groupID => $group)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>group<75><70><EFBFBD>ݡ<EFBFBD>*/
|
||||
if($group->name == '[All Users]') continue;
|
||||
$groupUsers = explode(',', $group->users);
|
||||
unset($group->id);
|
||||
unset($group->users);
|
||||
|
||||
/* <20><><EFBFBD>뵽group<75><70><EFBFBD><EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_GROUP)->data($group)->exec();
|
||||
$zentaoGroupID = $this->dao->lastInsertId();
|
||||
|
||||
/* <20><><EFBFBD>뵽userGroup<75><70><EFBFBD><EFBFBD>*/
|
||||
foreach($groupUsers as $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USERGROUP)
|
||||
->set('`group`')->eq($zentaoGroupID)
|
||||
->set('account')->eq($account)
|
||||
->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ĿΪ<C4BF><CEAA>Ʒ<EFBFBD><C6B7>*/
|
||||
public function convertProject()
|
||||
{
|
||||
$projects = $this->dao->dbh($this->sourceDBH)
|
||||
->select("projectID AS id, projectName AS name, isDroped AS deleted")
|
||||
->from(BUGFREE_TABLE_PROJECT)
|
||||
->fetchAll('id', $autoComapny = false);
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
unset($project->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCT)->data($project)->exec();
|
||||
$this->map['product'][$projectID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($projects);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ΪBug<75><67>ͼģ<CDBC>顣*/
|
||||
public function convertModule()
|
||||
{
|
||||
$this->map['module'][0] = 0;
|
||||
$modules = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select(
|
||||
'moduleID AS id,
|
||||
moduleType as view,
|
||||
projectID AS product,
|
||||
moduleName AS name,
|
||||
moduleGrade AS grade,
|
||||
parentID AS parent,
|
||||
displayOrder AS `order`')
|
||||
->from(BUGFREE_TABLE_MODULE)
|
||||
->orderBy('id ASC')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($modules as $moduleID => $module)
|
||||
{
|
||||
$module->product = $this->map['product'][$module->product];
|
||||
$module->view = strtolower($module->view);
|
||||
unset($module->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$this->map['module'][$moduleID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>parent<6E><74>*/
|
||||
foreach($modules as $oldModuleID => $module)
|
||||
{
|
||||
$newModuleID = $this->map['module'][$oldModuleID];
|
||||
$newParentID = $this->map['module'][$module->parent];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_MODULE)->set('parent')->eq($newParentID)->where('id')->eq($newModuleID)->exec();
|
||||
}
|
||||
return count($modules);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>Bug<75><67>*/
|
||||
public function convertBug()
|
||||
{
|
||||
$bugs = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
bugID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
bugTitle AS title,
|
||||
bugSeverity AS severity,
|
||||
bugPriority AS pri,
|
||||
bugType AS type,
|
||||
bugOS AS os,
|
||||
bugBrowser AS browser,
|
||||
bugMachine AS hardware,
|
||||
howFound AS found,
|
||||
reproSteps AS steps,
|
||||
bugStatus AS status,
|
||||
linkID AS linkBug,
|
||||
duplicateID AS duplicateBug,
|
||||
caseID AS `case`,
|
||||
1 AS caseVersion,
|
||||
resultID AS result,
|
||||
mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
assignedTo, assignedDate,
|
||||
resolvedBy, resolution, resolvedBuild, resolvedDate,
|
||||
closedBy, closedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
bugKeyword AS keywords
|
||||
')
|
||||
->from(BUGFREE_TABLE_BUGINFO)
|
||||
->where('isDroped')->eq(0)
|
||||
->orderBy('bugID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>Bug<75><67><EFBFBD>ݡ<EFBFBD>*/
|
||||
$bugID = (int)$bugID;
|
||||
unset($bug->id);
|
||||
|
||||
if($bug->assignedTo == 'Closed') $bug->assignedTo = 'closed';
|
||||
if($bug->assignedTo == 'Active') $bug->assignedTo = '';
|
||||
|
||||
$bug->type = strtolower($bug->type);
|
||||
$bug->found = strtolower($bug->found);
|
||||
$bug->status = strtolower($bug->status);
|
||||
$bug->os = strtolower($bug->os);
|
||||
$bug->browser= strtolower($bug->browser);
|
||||
|
||||
if($bug->os == 'winvista') $bug->os = 'vista';
|
||||
if($bug->browser == 'firefox3.0') $bug->browser = 'firefox3';
|
||||
if($bug->browser == 'firefox2.0') $bug->browser = 'firefox2';
|
||||
if($bug->openedBuild == 'N/A') $bug->openedBuild = '';
|
||||
if(!$bug->case) $bug->caseVersion = 0;
|
||||
|
||||
$bug->resolution = str_replace(' ', '', strtolower($bug->resolution));
|
||||
$bug->product = $this->map['product'][$bug->product];
|
||||
$bug->module = $this->map['module'][$bug->module];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_BUG)->data($bug)->exec();
|
||||
$this->map['bug'][$bugID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>duplicateBug<75><67> */
|
||||
foreach($this->map['bug'] as $oldBugID => $newBugID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('duplicateBug')->eq($newBugID)->where('duplicateBug')->eq($oldBugID)->exec();
|
||||
}
|
||||
return count($bugs);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>case<73><65>*/
|
||||
public function convertCase()
|
||||
{
|
||||
$cases = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
caseID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
caseTitle AS title,
|
||||
caseSteps AS step,
|
||||
casePriority AS pri,
|
||||
caseType AS type,
|
||||
caseStatus AS status,
|
||||
caseMethod AS howRun,
|
||||
casePlan AS stage,
|
||||
openedBy, openedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
scriptedBy, scriptedDate, scriptStatus, scriptLocation,
|
||||
linkID AS linkCase,
|
||||
casekeyword AS keywords,
|
||||
1 AS version,
|
||||
bugID
|
||||
')
|
||||
->from(BUGFREE_TABLE_CASEINFO)
|
||||
->where('isDroped')->eq(0)
|
||||
->orderBy('caseID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($cases as $caseID => $case)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>case<73><65><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
$caseID = (int)$caseID;
|
||||
$step = $case->step;
|
||||
$bugs = explode(',', $case->bugID);
|
||||
unset($case->id);
|
||||
unset($case->step);
|
||||
unset($case->bugID);
|
||||
|
||||
$case->type = strtolower($case->type);
|
||||
$case->status = strtolower($case->status);
|
||||
$case->howRun = strtolower($case->howRun);
|
||||
$case->stage = strtolower($case->stage);
|
||||
|
||||
if($case->type == 'configuration') $case->type = 'config';
|
||||
if($case->type == 'setup') $case->type = 'install';
|
||||
if($case->type == 'functional') $case->type = 'feature';
|
||||
if($case->status == 'active') $case->status = 'normal';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>ģ<EFBFBD><C4A3><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>е<EFBFBD>id<69><64>*/
|
||||
$case->product = $this->map['product'][$case->product];
|
||||
$case->module = $this->map['module'][$case->module];
|
||||
|
||||
/* <20><><EFBFBD>뵽case<73><65><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_CASE)->data($case)->exec();
|
||||
$zentaoCaseID = $this->dao->lastInsertID();
|
||||
$this->map['case'][$caseID] = $zentaoCaseID;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$caseStep->case = $zentaoCaseID;
|
||||
$caseStep->version = 1;
|
||||
$caseStep->desc = $step;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_CASESTEP)->data($caseStep)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>bug<75><67>*/
|
||||
foreach($bugs as $bugID)
|
||||
{
|
||||
if(!isset($this->map['bug'][$bugID])) continue;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('`case`')->eq($zentaoCaseID)->where('id')->eq($zentaoBugID)->limit(1)->exec();
|
||||
}
|
||||
}
|
||||
return count($cases);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertResult()
|
||||
{
|
||||
$results = $this->dao->dbh($this->sourceDBH)
|
||||
->select('
|
||||
resultID AS id,
|
||||
caseID AS `case`,
|
||||
resultValue AS caseResult,
|
||||
1 AS version,
|
||||
openedDate as date,
|
||||
bugID
|
||||
')
|
||||
->from(BUGFREE_TABLE_RESULTINFO)
|
||||
->orderBy('id')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($results as $resultID => $result)
|
||||
{
|
||||
unset($result->id);
|
||||
|
||||
/* <20><>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>bug<75><67>Ϣ<EFBFBD><CFA2>*/
|
||||
$bugID = (int)$result->bugID;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
unset($result->bugID);
|
||||
|
||||
/* <20><><EFBFBD>뵽testResult<6C><74><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_TESTRESULT)->data($result)->exec();
|
||||
$zentaoResultID = $this->dao->lastInsertId();
|
||||
$this->map['result'][$resultID] = $zentaoResultID;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>bug<75><67><EFBFBD>е<EFBFBD>result<6C>ֶΡ<D6B6>*/
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('result')->eq($zentaoResultID)->where('id')->eq($zentaoBugID)->limit(1)->exec();
|
||||
}
|
||||
return count($results);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7>¼<EFBFBD><C2BC>*/
|
||||
public function convertAction()
|
||||
{
|
||||
$actions = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("actionID AS id,
|
||||
actionTarget AS objectType,
|
||||
idValue AS objectID,
|
||||
actionUser AS actor,
|
||||
actionType AS action,
|
||||
actionDate AS date,
|
||||
actionNote AS comment
|
||||
")
|
||||
->from(BUGFREE_TABLE_ACTION)
|
||||
->where('actionTarget' != 'Result')
|
||||
->orderBy('actionID')
|
||||
->fetchAll('id', $autoComapny = false);
|
||||
|
||||
foreach($actions as $actionID => $action)
|
||||
{
|
||||
$actionID = (int)$action->id;
|
||||
unset($action->id);
|
||||
$action->objectType = strtolower($action->objectType);
|
||||
$action->action = strtolower($action->action);
|
||||
$action->objectID = $this->map[$action->objectType][$action->objectID];
|
||||
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_ACTION)->data($action)->exec();
|
||||
$this->map['action'][$actionID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($actions);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD>ļ<DEB8>¼<EFBFBD><C2BC>*/
|
||||
public function convertHistory()
|
||||
{
|
||||
$histories = $this->dao->dbh($this->sourceDBH)
|
||||
->select('actioID, actionField AS field, oldValue AS old, newValue AS new')
|
||||
->from(BUGFREE_TABLE_HISTORY)
|
||||
->orderBy('historyID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$history->actionID = $this->map['action'][$history->actionID];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_HISTORY)->data($history)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertFile()
|
||||
{
|
||||
$this->setPath();
|
||||
$files = $this->dao->dbh($this->sourceDBH)
|
||||
->select("
|
||||
actionID,
|
||||
fileName AS pathname,
|
||||
fileTitle AS title,
|
||||
fileType AS extension,
|
||||
fileSize AS size
|
||||
")
|
||||
->from(BUGFREE_TABLE_FILE)
|
||||
->orderBy('fileID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($files as $file)
|
||||
{
|
||||
/* <20><><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD><D3A6>action<6F><6E>Ϣ<EFBFBD><CFA2><EFBFBD>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶΡ<D6B6>*/
|
||||
$zentaoActionID = $this->map['action'][$file->actionID];
|
||||
$zentaoAction = $this->dao->dbh($this->dbh)->findById($zentaoActionID)->from(TABLE_ACTION)->fetch();
|
||||
$file->objectType = $zentaoAction->objectType;
|
||||
$file->objectID = $zentaoAction->objectID;
|
||||
$file->addedBy = $zentaoAction->actor;
|
||||
$file->addedDate = $zentaoAction->date;
|
||||
unset($file->actionID);
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1>*/
|
||||
if(strpos($file->size, 'KB')) $file->size = (int)(str_replace('KB', '', $file->size) * 1024);
|
||||
if(strpos($file->size, 'MB')) $file->size = (int)(str_replace('MB', '', $file->size) * 1024 * 1024);
|
||||
|
||||
/* <20><><EFBFBD>뵽<EFBFBD><EBB5BD><EFBFBD>ݿ⡣*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_FILE)->data($file)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$soureFile = $this->filePath . $file->pathname;
|
||||
if(!file_exists($soureFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorFileNotExits, $soureFile);
|
||||
continue;
|
||||
}
|
||||
$targetFile = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
$targetPath = dirname($targetFile);
|
||||
if(!is_dir($targetPath)) mkdir($targetPath, 0777, true);
|
||||
if(!copy($soureFile, $targetFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorCopyFailed, $targetFile);
|
||||
}
|
||||
}
|
||||
return count($files);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
public function clear()
|
||||
{
|
||||
foreach($this->session->state as $table => $maxID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->delete()->from($table)->where('id')->gt($maxID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of bugfree2 convert of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class bugfree2ConvertModel extends bugfreeConvertModel
|
||||
{
|
||||
/* ִ<><D6B4>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>*/
|
||||
public function execute()
|
||||
{
|
||||
$this->clear();
|
||||
$this->setTable();
|
||||
$this->convertGroup();
|
||||
$result['users'] = $this->convertUser();
|
||||
$result['projects'] = $this->convertProject();
|
||||
$result['modules'] = $this->convertModule();
|
||||
$result['bugs'] = $this->convertBug();
|
||||
$result['cases'] = $this->convertCase();
|
||||
$result['results'] = $this->convertResult();
|
||||
$result['actions'] = $this->convertAction();
|
||||
$result['files'] = $this->convertFile();
|
||||
$this->loadModel('tree')->fixModulePath();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function setTable()
|
||||
{
|
||||
$dbPrefix = $this->post->dbPrefix;
|
||||
define('BUGFREE_TABLE_USER', $dbPrefix . 'TestUser');
|
||||
define('BUGFREE_TABLE_PROJECT', $dbPrefix . 'TestProject');
|
||||
define('BUGFREE_TABLE_MODULE', $dbPrefix . 'TestModule');
|
||||
define('BUGFREE_TABLE_BUGINFO', $dbPrefix . 'BugInfo');
|
||||
define('BUGFREE_TABLE_CASEINFO', $dbPrefix . 'CaseInfo');
|
||||
define('BUGFREE_TABLE_RESULTINFO', $dbPrefix . 'ResultInfo');
|
||||
define('BUGFREE_TABLE_ACTION', $dbPrefix . 'TestAction');
|
||||
define('BUGFREE_TABLE_FILE', $dbPrefix . 'TestFile');
|
||||
define('BUGFREE_TABLE_HISTORY', $dbPrefix . 'TestHistory');
|
||||
define('BUGFREE_TABLE_GROUP', $dbPrefix . 'TestGroup');
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD>*/
|
||||
public function convertUser()
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5>û<EFBFBD><C3BB>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
$users = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("username AS account, userpassword AS password, realname, email, isDroped AS deleted")
|
||||
->from(BUGFREE_TABLE_USER)
|
||||
->orderBy('userID ASC')
|
||||
->fetchAll('account', $autoCompany = false);
|
||||
|
||||
/* <20><><EFBFBD>뵽zentao<61><6F><EFBFBD>ݿ<EFBFBD><DDBF>С<EFBFBD>*/
|
||||
$convertCount = 0;
|
||||
foreach($users as $account => $user)
|
||||
{
|
||||
if(!$this->dao->dbh($this->dbh)->findByAccount($account)->from(TABLE_USER)->fetch('account'))
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USER)->data($user)->exec();
|
||||
$convertCount ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$info['users'][] = sprintf($this->lang->convert->errorUserExists, $account);
|
||||
}
|
||||
}
|
||||
return $convertCount;
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>顣*/
|
||||
public function convertGroup()
|
||||
{
|
||||
$groups = $this->dao->dbh($this->sourceDBH)
|
||||
->select("groupID AS id, groupName AS name, groupUser AS users")
|
||||
->from(BUGFREE_TABLE_GROUP)
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($groups as $groupID => $group)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>group<75><70><EFBFBD>ݡ<EFBFBD>*/
|
||||
if($group->name == '[All Users]') continue;
|
||||
$groupUsers = explode(',', $group->users);
|
||||
unset($group->id);
|
||||
unset($group->users);
|
||||
|
||||
/* <20><><EFBFBD>뵽group<75><70><EFBFBD><EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_GROUP)->data($group)->exec();
|
||||
$zentaoGroupID = $this->dao->lastInsertId();
|
||||
|
||||
/* <20><><EFBFBD>뵽userGroup<75><70><EFBFBD><EFBFBD>*/
|
||||
foreach($groupUsers as $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_USERGROUP)
|
||||
->set('`group`')->eq($zentaoGroupID)
|
||||
->set('account')->eq($account)
|
||||
->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ĿΪ<C4BF><CEAA>Ʒ<EFBFBD><C6B7>*/
|
||||
public function convertProject()
|
||||
{
|
||||
$projects = $this->dao->dbh($this->sourceDBH)
|
||||
->select("projectID AS id, projectName AS name, isDroped AS deleted")
|
||||
->from(BUGFREE_TABLE_PROJECT)
|
||||
->fetchAll('id', $autoComapny = false);
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
unset($project->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_PRODUCT)->data($project)->exec();
|
||||
$this->map['product'][$projectID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($projects);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>ΪBug<75><67>ͼģ<CDBC>顣*/
|
||||
public function convertModule()
|
||||
{
|
||||
$this->map['module'][0] = 0;
|
||||
$modules = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select(
|
||||
'moduleID AS id,
|
||||
moduleType as view,
|
||||
projectID AS product,
|
||||
moduleName AS name,
|
||||
moduleGrade AS grade,
|
||||
parentID AS parent,
|
||||
displayOrder AS `order`')
|
||||
->from(BUGFREE_TABLE_MODULE)
|
||||
->orderBy('id ASC')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($modules as $moduleID => $module)
|
||||
{
|
||||
$module->product = $this->map['product'][$module->product];
|
||||
$module->view = strtolower($module->view);
|
||||
unset($module->id);
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$this->map['module'][$moduleID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>parent<6E><74>*/
|
||||
foreach($modules as $oldModuleID => $module)
|
||||
{
|
||||
$newModuleID = $this->map['module'][$oldModuleID];
|
||||
$newParentID = $this->map['module'][$module->parent];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_MODULE)->set('parent')->eq($newParentID)->where('id')->eq($newModuleID)->exec();
|
||||
}
|
||||
return count($modules);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>Bug<75><67>*/
|
||||
public function convertBug()
|
||||
{
|
||||
$bugs = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
bugID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
bugTitle AS title,
|
||||
bugSeverity AS severity,
|
||||
bugPriority AS pri,
|
||||
bugType AS type,
|
||||
bugOS AS os,
|
||||
bugBrowser AS browser,
|
||||
bugMachine AS hardware,
|
||||
howFound AS found,
|
||||
reproSteps AS steps,
|
||||
bugStatus AS status,
|
||||
linkID AS linkBug,
|
||||
duplicateID AS duplicateBug,
|
||||
caseID AS `case`,
|
||||
1 AS caseVersion,
|
||||
resultID AS result,
|
||||
mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
assignedTo, assignedDate,
|
||||
resolvedBy, resolution, resolvedBuild, resolvedDate,
|
||||
closedBy, closedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
bugKeyword AS keywords
|
||||
')
|
||||
->from(BUGFREE_TABLE_BUGINFO)
|
||||
->where('isDroped')->eq(0)
|
||||
->orderBy('bugID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($bugs as $bugID => $bug)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>Bug<75><67><EFBFBD>ݡ<EFBFBD>*/
|
||||
$bugID = (int)$bugID;
|
||||
unset($bug->id);
|
||||
|
||||
if($bug->assignedTo == 'Closed') $bug->assignedTo = 'closed';
|
||||
if($bug->assignedTo == 'Active') $bug->assignedTo = '';
|
||||
|
||||
$bug->type = strtolower($bug->type);
|
||||
$bug->found = strtolower($bug->found);
|
||||
$bug->status = strtolower($bug->status);
|
||||
$bug->os = strtolower($bug->os);
|
||||
$bug->browser= strtolower($bug->browser);
|
||||
|
||||
if($bug->os == 'winvista') $bug->os = 'vista';
|
||||
if($bug->browser == 'firefox3.0') $bug->browser = 'firefox3';
|
||||
if($bug->browser == 'firefox2.0') $bug->browser = 'firefox2';
|
||||
if($bug->openedBuild == 'N/A') $bug->openedBuild = '';
|
||||
if(!$bug->case) $bug->caseVersion = 0;
|
||||
|
||||
$bug->resolution = str_replace(' ', '', strtolower($bug->resolution));
|
||||
$bug->product = $this->map['product'][$bug->product];
|
||||
$bug->module = $this->map['module'][$bug->module];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_BUG)->data($bug)->exec();
|
||||
$this->map['bug'][$bugID] = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>duplicateBug<75><67> */
|
||||
foreach($this->map['bug'] as $oldBugID => $newBugID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('duplicateBug')->eq($newBugID)->where('duplicateBug')->eq($oldBugID)->exec();
|
||||
}
|
||||
return count($bugs);
|
||||
}
|
||||
|
||||
/* ת<><D7AA>case<73><65>*/
|
||||
public function convertCase()
|
||||
{
|
||||
$cases = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select('
|
||||
caseID AS id,
|
||||
projectID AS product,
|
||||
moduleID AS module,
|
||||
caseTitle AS title,
|
||||
caseSteps AS step,
|
||||
casePriority AS pri,
|
||||
caseType AS type,
|
||||
caseStatus AS status,
|
||||
caseMethod AS howRun,
|
||||
casePlan AS stage,
|
||||
openedBy, openedDate,
|
||||
lastEditedBy, lastEditedDate,
|
||||
scriptedBy, scriptedDate, scriptStatus, scriptLocation,
|
||||
linkID AS linkCase,
|
||||
casekeyword AS keywords,
|
||||
1 AS version,
|
||||
bugID
|
||||
')
|
||||
->from(BUGFREE_TABLE_CASEINFO)
|
||||
->where('isDroped')->eq(0)
|
||||
->orderBy('caseID')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($cases as $caseID => $case)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>case<73><65><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
$caseID = (int)$caseID;
|
||||
$step = $case->step;
|
||||
$bugs = explode(',', $case->bugID);
|
||||
unset($case->id);
|
||||
unset($case->step);
|
||||
unset($case->bugID);
|
||||
|
||||
$case->type = strtolower($case->type);
|
||||
$case->status = strtolower($case->status);
|
||||
$case->howRun = strtolower($case->howRun);
|
||||
$case->stage = strtolower($case->stage);
|
||||
|
||||
if($case->type == 'configuration') $case->type = 'config';
|
||||
if($case->type == 'setup') $case->type = 'install';
|
||||
if($case->type == 'functional') $case->type = 'feature';
|
||||
if($case->status == 'active') $case->status = 'normal';
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>ģ<EFBFBD><C4A3><EFBFBD>滻<EFBFBD><E6BBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5>е<EFBFBD>id<69><64>*/
|
||||
$case->product = $this->map['product'][$case->product];
|
||||
$case->module = $this->map['module'][$case->module];
|
||||
|
||||
/* <20><><EFBFBD>뵽case<73><65><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_CASE)->data($case)->exec();
|
||||
$zentaoCaseID = $this->dao->lastInsertID();
|
||||
$this->map['case'][$caseID] = $zentaoCaseID;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
$caseStep->case = $zentaoCaseID;
|
||||
$caseStep->version = 1;
|
||||
$caseStep->desc = $step;
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_CASESTEP)->data($caseStep)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>bug<75><67>*/
|
||||
foreach($bugs as $bugID)
|
||||
{
|
||||
if(!isset($this->map['bug'][$bugID])) continue;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('`case`')->eq($zentaoCaseID)->where('id')->eq($zentaoBugID)->limit(1)->exec();
|
||||
}
|
||||
}
|
||||
return count($cases);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertResult()
|
||||
{
|
||||
$results = $this->dao->dbh($this->sourceDBH)
|
||||
->select('
|
||||
resultID AS id,
|
||||
caseID AS `case`,
|
||||
resultValue AS caseResult,
|
||||
1 AS version,
|
||||
openedDate as date,
|
||||
bugID
|
||||
')
|
||||
->from(BUGFREE_TABLE_RESULTINFO)
|
||||
->orderBy('id')
|
||||
->fetchAll('id', $autoCompany = false);
|
||||
foreach($results as $resultID => $result)
|
||||
{
|
||||
unset($result->id);
|
||||
|
||||
/* <20><>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>bug<75><67>Ϣ<EFBFBD><CFA2>*/
|
||||
$bugID = (int)$result->bugID;
|
||||
$zentaoBugID = $this->map['bug'][$bugID];
|
||||
unset($result->bugID);
|
||||
|
||||
/* <20><><EFBFBD>뵽testResult<6C><74><EFBFBD>С<EFBFBD>*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_TESTRESULT)->data($result)->exec();
|
||||
$zentaoResultID = $this->dao->lastInsertId();
|
||||
$this->map['result'][$resultID] = $zentaoResultID;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>bug<75><67><EFBFBD>е<EFBFBD>result<6C>ֶΡ<D6B6>*/
|
||||
$this->dao->dbh($this->dbh)->update(TABLE_BUG)->set('result')->eq($zentaoResultID)->where('id')->eq($zentaoBugID)->limit(1)->exec();
|
||||
}
|
||||
return count($results);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD><CAB7>¼<EFBFBD><C2BC>*/
|
||||
public function convertAction()
|
||||
{
|
||||
$actions = $this->dao
|
||||
->dbh($this->sourceDBH)
|
||||
->select("actionID AS id,
|
||||
actionTarget AS objectType,
|
||||
idValue AS objectID,
|
||||
actionUser AS actor,
|
||||
actionType AS action,
|
||||
actionDate AS date,
|
||||
actionNote AS comment
|
||||
")
|
||||
->from(BUGFREE_TABLE_ACTION)
|
||||
->where('actionTarget' != 'Result')
|
||||
->orderBy('actionID')
|
||||
->fetchAll('id', $autoComapny = false);
|
||||
|
||||
foreach($actions as $actionID => $action)
|
||||
{
|
||||
$actionID = (int)$action->id;
|
||||
unset($action->id);
|
||||
$action->objectType = strtolower($action->objectType);
|
||||
$action->action = strtolower($action->action);
|
||||
$action->objectID = $this->map[$action->objectType][$action->objectID];
|
||||
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_ACTION)->data($action)->exec();
|
||||
$this->map['action'][$actionID] = $this->dao->lastInsertID();
|
||||
}
|
||||
return count($actions);
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD>ʷ<EFBFBD>ļ<DEB8>¼<EFBFBD><C2BC>*/
|
||||
public function convertHistory()
|
||||
{
|
||||
$histories = $this->dao->dbh($this->sourceDBH)
|
||||
->select('actioID, actionField AS field, oldValue AS old, newValue AS new')
|
||||
->from(BUGFREE_TABLE_HISTORY)
|
||||
->orderBy('historyID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($histories as $history)
|
||||
{
|
||||
$history->actionID = $this->map['action'][$history->actionID];
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_HISTORY)->data($history)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
public function convertFile()
|
||||
{
|
||||
$this->setPath();
|
||||
$files = $this->dao->dbh($this->sourceDBH)
|
||||
->select("
|
||||
actionID,
|
||||
fileName AS pathname,
|
||||
fileTitle AS title,
|
||||
fileType AS extension,
|
||||
fileSize AS size
|
||||
")
|
||||
->from(BUGFREE_TABLE_FILE)
|
||||
->orderBy('fileID')
|
||||
->fetchAll('', $autoCompany = false);
|
||||
foreach($files as $file)
|
||||
{
|
||||
/* <20><><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD><D3A6>action<6F><6E>Ϣ<EFBFBD><CFA2><EFBFBD>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶΡ<D6B6>*/
|
||||
$zentaoActionID = $this->map['action'][$file->actionID];
|
||||
$zentaoAction = $this->dao->dbh($this->dbh)->findById($zentaoActionID)->from(TABLE_ACTION)->fetch();
|
||||
$file->objectType = $zentaoAction->objectType;
|
||||
$file->objectID = $zentaoAction->objectID;
|
||||
$file->addedBy = $zentaoAction->actor;
|
||||
$file->addedDate = $zentaoAction->date;
|
||||
unset($file->actionID);
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1>*/
|
||||
if(strpos($file->size, 'KB')) $file->size = (int)(str_replace('KB', '', $file->size) * 1024);
|
||||
if(strpos($file->size, 'MB')) $file->size = (int)(str_replace('MB', '', $file->size) * 1024 * 1024);
|
||||
|
||||
/* <20><><EFBFBD>뵽<EFBFBD><EBB5BD><EFBFBD>ݿ⡣*/
|
||||
$this->dao->dbh($this->dbh)->insert(TABLE_FILE)->data($file)->exec();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>*/
|
||||
$soureFile = $this->filePath . $file->pathname;
|
||||
if(!file_exists($soureFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorFileNotExits, $soureFile);
|
||||
continue;
|
||||
}
|
||||
$targetFile = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
$targetPath = dirname($targetFile);
|
||||
if(!is_dir($targetPath)) mkdir($targetPath, 0777, true);
|
||||
if(!copy($soureFile, $targetFile))
|
||||
{
|
||||
self::$info['files'][] = sprintf($this->lang->convert->errorCopyFailed, $targetFile);
|
||||
}
|
||||
}
|
||||
return count($files);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
public function clear()
|
||||
{
|
||||
foreach($this->session->state as $table => $maxID)
|
||||
{
|
||||
$this->dao->dbh($this->dbh)->delete()->from($table)->where('id')->gt($maxID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,77 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* The convert module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->convert->common = '从其他系统导入';
|
||||
$lang->convert->next = '下一步';
|
||||
$lang->convert->pre = '返回';
|
||||
$lang->convert->reload = '刷新';
|
||||
$lang->convert->error = '错误 ';
|
||||
|
||||
$lang->convert->start = '开始转换';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>欢迎使用系统转换向导,本程序会帮助您将其他系统的数据转换到禅道项目管理系统中。</p>
|
||||
<strong>转换存在一定的风险,转换之前,我们强烈建议您备份数据库及相应的数据文件,并保证转换的时候,没有其他人进行操作。</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->selectSource = '选择来源系统及版本';
|
||||
$lang->convert->source = '来源系统';
|
||||
$lang->convert->version = '版本';
|
||||
$lang->convert->mustSelectSource = "必须选择一个来源。";
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x');
|
||||
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
|
||||
$lang->convert->ok = '检查通过(√)';
|
||||
$lang->convert->fail = '检查失败(×)';
|
||||
|
||||
$lang->convert->settingDB = '设置数据库';
|
||||
$lang->convert->dbHost = '数据库服务器';
|
||||
$lang->convert->dbPort = '服务器端口';
|
||||
$lang->convert->dbUser = '数据库用户名';
|
||||
$lang->convert->dbPassword = '数据库密码';
|
||||
$lang->convert->dbName = '%s使用的库';
|
||||
$lang->convert->dbPrefix = '%s表前缀';
|
||||
$lang->convert->installPath= '%s安装的根目录';
|
||||
|
||||
$lang->convert->checkDB = '数据库';
|
||||
$lang->convert->checkTable = '表';
|
||||
$lang->convert->checkPath = '安装路径';
|
||||
|
||||
$lang->convert->execute = '执行转换';
|
||||
$lang->convert->item = '转换项';
|
||||
$lang->convert->count = '转换数量';
|
||||
$lang->convert->info = '转换信息';
|
||||
|
||||
$lang->convert->bugfree->users = '用户';
|
||||
$lang->convert->bugfree->projects = '项目';
|
||||
$lang->convert->bugfree->modules = '模块';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->actions = '历史记录';
|
||||
$lang->convert->bugfree->files = '附件';
|
||||
|
||||
$lang->convert->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->convert->errorFileNotExits = '文件 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用户 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '文件 %s 拷贝失败';
|
||||
<?php
|
||||
/**
|
||||
* The convert module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->convert->common = '从其他系统导入';
|
||||
$lang->convert->next = '下一步';
|
||||
$lang->convert->pre = '返回';
|
||||
$lang->convert->reload = '刷新';
|
||||
$lang->convert->error = '错误 ';
|
||||
|
||||
$lang->convert->start = '开始转换';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>欢迎使用系统转换向导,本程序会帮助您将其他系统的数据转换到禅道项目管理系统中。</p>
|
||||
<strong>转换存在一定的风险,转换之前,我们强烈建议您备份数据库及相应的数据文件,并保证转换的时候,没有其他人进行操作。</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->selectSource = '选择来源系统及版本';
|
||||
$lang->convert->source = '来源系统';
|
||||
$lang->convert->version = '版本';
|
||||
$lang->convert->mustSelectSource = "必须选择一个来源。";
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x');
|
||||
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
|
||||
$lang->convert->ok = '检查通过(√)';
|
||||
$lang->convert->fail = '检查失败(×)';
|
||||
|
||||
$lang->convert->settingDB = '设置数据库';
|
||||
$lang->convert->dbHost = '数据库服务器';
|
||||
$lang->convert->dbPort = '服务器端口';
|
||||
$lang->convert->dbUser = '数据库用户名';
|
||||
$lang->convert->dbPassword = '数据库密码';
|
||||
$lang->convert->dbName = '%s使用的库';
|
||||
$lang->convert->dbPrefix = '%s表前缀';
|
||||
$lang->convert->installPath= '%s安装的根目录';
|
||||
|
||||
$lang->convert->checkDB = '数据库';
|
||||
$lang->convert->checkTable = '表';
|
||||
$lang->convert->checkPath = '安装路径';
|
||||
|
||||
$lang->convert->execute = '执行转换';
|
||||
$lang->convert->item = '转换项';
|
||||
$lang->convert->count = '转换数量';
|
||||
$lang->convert->info = '转换信息';
|
||||
|
||||
$lang->convert->bugfree->users = '用户';
|
||||
$lang->convert->bugfree->projects = '项目';
|
||||
$lang->convert->bugfree->modules = '模块';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->actions = '历史记录';
|
||||
$lang->convert->bugfree->files = '附件';
|
||||
|
||||
$lang->convert->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->convert->errorFileNotExits = '文件 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用户 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '文件 %s 拷贝失败';
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The convert module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->convert->common = '从其他系统导入';
|
||||
$lang->convert->next = '下一步';
|
||||
$lang->convert->pre = '返回';
|
||||
$lang->convert->reload = '刷新';
|
||||
$lang->convert->error = '错误 ';
|
||||
|
||||
$lang->convert->start = '开始转换';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>欢迎使用系统转换向导,本程序会帮助您将其他系统的数据转换到禅道项目管理系统中。</p>
|
||||
<strong>转换存在一定的风险,转换之前,我们强烈建议您备份数据库及相应的数据文件,并保证转换的时候,没有其他人进行操作。</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->selectSource = '选择来源系统及版本';
|
||||
$lang->convert->source = '来源系统';
|
||||
$lang->convert->version = '版本';
|
||||
$lang->convert->mustSelectSource = "必须选择一个来源。";
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
|
||||
$lang->convert->ok = '检查通过(√)';
|
||||
$lang->convert->fail = '检查失败(×)';
|
||||
|
||||
$lang->convert->settingDB = '设置数据库';
|
||||
$lang->convert->dbHost = '数据库服务器';
|
||||
$lang->convert->dbPort = '服务器端口';
|
||||
$lang->convert->dbUser = '数据库用户名';
|
||||
$lang->convert->dbPassword = '数据库密码';
|
||||
$lang->convert->dbName = '%s使用的库';
|
||||
$lang->convert->dbPrefix = '%s表前缀';
|
||||
$lang->convert->installPath= '%s安装的根目录';
|
||||
|
||||
$lang->convert->checkDB = '数据库';
|
||||
$lang->convert->checkTable = '表';
|
||||
$lang->convert->checkPath = '安装路径';
|
||||
|
||||
$lang->convert->execute = '执行转换';
|
||||
$lang->convert->item = '转换项';
|
||||
$lang->convert->count = '转换数量';
|
||||
$lang->convert->info = '转换信息';
|
||||
|
||||
$lang->convert->bugfree->users = '用户';
|
||||
$lang->convert->bugfree->projects = '项目';
|
||||
$lang->convert->bugfree->modules = '模块';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->cases = '测试用例';
|
||||
$lang->convert->bugfree->results = '测试结果';
|
||||
$lang->convert->bugfree->actions = '历史记录';
|
||||
$lang->convert->bugfree->files = '附件';
|
||||
|
||||
$lang->convert->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->convert->errorFileNotExits = '文件 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用户 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '文件 %s 拷贝失败';
|
||||
<?php
|
||||
/**
|
||||
* The convert module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->convert->common = '从其他系统导入';
|
||||
$lang->convert->next = '下一步';
|
||||
$lang->convert->pre = '返回';
|
||||
$lang->convert->reload = '刷新';
|
||||
$lang->convert->error = '错误 ';
|
||||
|
||||
$lang->convert->start = '开始转换';
|
||||
$lang->convert->desc = <<<EOT
|
||||
<p>欢迎使用系统转换向导,本程序会帮助您将其他系统的数据转换到禅道项目管理系统中。</p>
|
||||
<strong>转换存在一定的风险,转换之前,我们强烈建议您备份数据库及相应的数据文件,并保证转换的时候,没有其他人进行操作。</strong>
|
||||
EOT;
|
||||
|
||||
$lang->convert->selectSource = '选择来源系统及版本';
|
||||
$lang->convert->source = '来源系统';
|
||||
$lang->convert->version = '版本';
|
||||
$lang->convert->mustSelectSource = "必须选择一个来源。";
|
||||
|
||||
$lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x');
|
||||
|
||||
$lang->convert->setting = '设置';
|
||||
$lang->convert->checkConfig = '检查配置';
|
||||
|
||||
$lang->convert->ok = '检查通过(√)';
|
||||
$lang->convert->fail = '检查失败(×)';
|
||||
|
||||
$lang->convert->settingDB = '设置数据库';
|
||||
$lang->convert->dbHost = '数据库服务器';
|
||||
$lang->convert->dbPort = '服务器端口';
|
||||
$lang->convert->dbUser = '数据库用户名';
|
||||
$lang->convert->dbPassword = '数据库密码';
|
||||
$lang->convert->dbName = '%s使用的库';
|
||||
$lang->convert->dbPrefix = '%s表前缀';
|
||||
$lang->convert->installPath= '%s安装的根目录';
|
||||
|
||||
$lang->convert->checkDB = '数据库';
|
||||
$lang->convert->checkTable = '表';
|
||||
$lang->convert->checkPath = '安装路径';
|
||||
|
||||
$lang->convert->execute = '执行转换';
|
||||
$lang->convert->item = '转换项';
|
||||
$lang->convert->count = '转换数量';
|
||||
$lang->convert->info = '转换信息';
|
||||
|
||||
$lang->convert->bugfree->users = '用户';
|
||||
$lang->convert->bugfree->projects = '项目';
|
||||
$lang->convert->bugfree->modules = '模块';
|
||||
$lang->convert->bugfree->bugs = 'Bug';
|
||||
$lang->convert->bugfree->cases = '测试用例';
|
||||
$lang->convert->bugfree->results = '测试结果';
|
||||
$lang->convert->bugfree->actions = '历史记录';
|
||||
$lang->convert->bugfree->files = '附件';
|
||||
|
||||
$lang->convert->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->convert->errorFileNotExits = '文件 %s 不存在';
|
||||
$lang->convert->errorUserExists = '用户 %s 已存在';
|
||||
$lang->convert->errorCopyFailed = '文件 %s 拷贝失败';
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class convertModel extends model
|
||||
{
|
||||
/* 连接到数据库。*/
|
||||
public function connectDB()
|
||||
{
|
||||
$dsn = "mysql:host={$this->post->dbHost}; port={$this->post->dbPort};dbname={$this->post->dbName}";
|
||||
try
|
||||
{
|
||||
$dbh = new PDO($dsn, $this->post->dbUser, $this->post->dbPassword);
|
||||
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbh->exec("SET NAMES UTF8");
|
||||
$this->sourceDBH = $dbh;
|
||||
return $dbh;
|
||||
}
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
return $exception->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/* 判断数据库是否存在。*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->post->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* 记录当前数据库中的每个表最大id。*/
|
||||
public function saveState()
|
||||
{
|
||||
/* 获得用户级别的常量定义列表。*/
|
||||
$constants = get_defined_constants(true);
|
||||
$userConstants = $constants['user'];
|
||||
|
||||
/* 去掉不需要保存状态的表。*/
|
||||
unset($userConstants['TABLE_BURN']);
|
||||
unset($userConstants['TABLE_GROUPPRIV']);
|
||||
unset($userConstants['TABLE_PROJECTPRODUCT']);
|
||||
unset($userConstants['TABLE_PROJECTSTORY']);
|
||||
unset($userConstants['TABLE_STORYSPEC']);
|
||||
unset($userConstants['TABLE_TEAM']);
|
||||
unset($userConstants['TABLE_USERGROUP']);
|
||||
|
||||
/* 查找每个表的id字段的最大值。*/
|
||||
foreach($userConstants as $key => $value)
|
||||
{
|
||||
if(strpos($key, 'TABLE') === false) continue;
|
||||
if($key == 'TABLE_COMPANY') continue;
|
||||
$state[$value] = (int)$this->dao->select('MAX(id) AS id')->from($value)->fetch('id');
|
||||
}
|
||||
$this->session->set('state', $state);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class convertModel extends model
|
||||
{
|
||||
/* 连接到数据库。*/
|
||||
public function connectDB()
|
||||
{
|
||||
$dsn = "mysql:host={$this->post->dbHost}; port={$this->post->dbPort};dbname={$this->post->dbName}";
|
||||
try
|
||||
{
|
||||
$dbh = new PDO($dsn, $this->post->dbUser, $this->post->dbPassword);
|
||||
$dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$dbh->exec("SET NAMES UTF8");
|
||||
$this->sourceDBH = $dbh;
|
||||
return $dbh;
|
||||
}
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
return $exception->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/* 判断数据库是否存在。*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->post->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* 记录当前数据库中的每个表最大id。*/
|
||||
public function saveState()
|
||||
{
|
||||
/* 获得用户级别的常量定义列表。*/
|
||||
$constants = get_defined_constants(true);
|
||||
$userConstants = $constants['user'];
|
||||
|
||||
/* 去掉不需要保存状态的表。*/
|
||||
unset($userConstants['TABLE_BURN']);
|
||||
unset($userConstants['TABLE_GROUPPRIV']);
|
||||
unset($userConstants['TABLE_PROJECTPRODUCT']);
|
||||
unset($userConstants['TABLE_PROJECTSTORY']);
|
||||
unset($userConstants['TABLE_STORYSPEC']);
|
||||
unset($userConstants['TABLE_TEAM']);
|
||||
unset($userConstants['TABLE_USERGROUP']);
|
||||
|
||||
/* 查找每个表的id字段的最大值。*/
|
||||
foreach($userConstants as $key => $value)
|
||||
{
|
||||
if(strpos($key, 'TABLE') === false) continue;
|
||||
if($key == 'TABLE_COMPANY') continue;
|
||||
$state[$value] = (int)$this->dao->select('MAX(id) AS id')->from($value)->fetch('id');
|
||||
}
|
||||
$this->session->set('state', $state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of check config method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('execute');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->checkConfig . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $checkResult;?>
|
||||
</table>
|
||||
<?php
|
||||
echo html::hidden('dbHost', $this->post->dbHost);
|
||||
echo html::hidden('dbPort', $this->post->dbPort);
|
||||
echo html::hidden('dbUser', $this->post->dbUser);
|
||||
echo html::hidden('dbPassword', $this->post->dbPassword);
|
||||
echo html::hidden('dbName', $this->post->dbName);
|
||||
echo html::hidden('dbPrefix', $this->post->dbPrefix);
|
||||
echo html::hidden('installPath',$this->post->installPath);
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of check config method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('execute');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->checkConfig . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $checkResult;?>
|
||||
</table>
|
||||
<?php
|
||||
echo html::hidden('dbHost', $this->post->dbHost);
|
||||
echo html::hidden('dbPort', $this->post->dbPort);
|
||||
echo html::hidden('dbUser', $this->post->dbUser);
|
||||
echo html::hidden('dbPassword', $this->post->dbPassword);
|
||||
echo html::hidden('dbName', $this->post->dbName);
|
||||
echo html::hidden('dbPrefix', $this->post->dbPrefix);
|
||||
echo html::hidden('installPath',$this->post->installPath);
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of execute method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='f-14px'>
|
||||
<caption><?php echo $lang->convert->execute . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $executeResult;?>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of execute method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='f-14px'>
|
||||
<caption><?php echo $lang->convert->execute . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $executeResult;?>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->convert->common;?></caption>
|
||||
<tr><td><?php echo nl2br($lang->convert->desc);?></td></tr>
|
||||
<tr><td><h3 class='a-center'><?php echo html::a($this->createLink('convert', 'selectsource'), $lang->convert->start);?></h3></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-5'>
|
||||
<caption><?php echo $lang->convert->common;?></caption>
|
||||
<tr><td><?php echo nl2br($lang->convert->desc);?></td></tr>
|
||||
<tr><td><h3 class='a-center'><?php echo html::a($this->createLink('convert', 'selectsource'), $lang->convert->start);?></h3></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of select source method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('setConfig');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->selectSource;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->convert->source;?></th>
|
||||
<th><?php echo $lang->convert->version;?></th>
|
||||
</tr>
|
||||
<?php foreach($lang->convert->sourceList as $name => $versions):?>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $name;?></th>
|
||||
<td><?php echo html::radio('source', $versions);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of select source method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('setConfig');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->selectSource;?></caption>
|
||||
<tr>
|
||||
<th class='w-p20'><?php echo $lang->convert->source;?></th>
|
||||
<th><?php echo $lang->convert->version;?></th>
|
||||
</tr>
|
||||
<?php foreach($lang->convert->sourceList as $name => $versions):?>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $name;?></th>
|
||||
<td><?php echo html::radio('source', $versions);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of setconfig method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('checkconfig');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->setting . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $setting;?>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo html::hidden('source', $source) . html::hidden('version', $version);?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of setconfig method of convert module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package convert
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' action='<?php echo inlink('checkconfig');?>'>
|
||||
<table align='center' class='table-5 f-14px'>
|
||||
<caption><?php echo $lang->convert->setting . $lang->colon . strtoupper($source);?></caption>
|
||||
<?php echo $setting;?>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo html::hidden('source', $source) . html::hidden('version', $version);?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of dept module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class dept extends control
|
||||
{
|
||||
const NEW_CHILD_COUNT = 5;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('company')->setMenu();
|
||||
}
|
||||
|
||||
/* 部门列表。*/
|
||||
public function browse($deptID = 0)
|
||||
{
|
||||
$header['title'] = $this->lang->dept->manage . $this->lang->colon . $this->app->company->name;
|
||||
$position[] = $this->lang->dept->manage;
|
||||
|
||||
$parentDepts = $this->dept->getParents($deptID);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('deptID', $deptID);
|
||||
$this->assign('depts', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptmodel', 'createManageLink')));
|
||||
$this->assign('parentDepts',$parentDepts);
|
||||
$this->assign('sons', $this->dept->getSons($deptID));
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑部门。*/
|
||||
public function edit($moduleID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
if($this->product->update($_POST)) die(js::locate($this->createLink($this->moduleName, 'index', "product=$_POST[id]"), 'parent'));
|
||||
}
|
||||
|
||||
$product = $this->product->getByID($productID);
|
||||
$header['title'] = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('product', $product);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 更新排序。*/
|
||||
public function updateOrder()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dept->updateOrder($_POST['orders']);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 维护下级部门。*/
|
||||
public function manageChild()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dept->manageChild($_POST['parentDeptID'], $_POST['depts']);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 删除某一个部门。*/
|
||||
public function delete($deptID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID=$deptID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->dept->delete($deptID);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of dept module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class dept extends control
|
||||
{
|
||||
const NEW_CHILD_COUNT = 5;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('company')->setMenu();
|
||||
}
|
||||
|
||||
/* 部门列表。*/
|
||||
public function browse($deptID = 0)
|
||||
{
|
||||
$header['title'] = $this->lang->dept->manage . $this->lang->colon . $this->app->company->name;
|
||||
$position[] = $this->lang->dept->manage;
|
||||
|
||||
$parentDepts = $this->dept->getParents($deptID);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('deptID', $deptID);
|
||||
$this->assign('depts', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptmodel', 'createManageLink')));
|
||||
$this->assign('parentDepts',$parentDepts);
|
||||
$this->assign('sons', $this->dept->getSons($deptID));
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑部门。*/
|
||||
public function edit($moduleID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
if($this->product->update($_POST)) die(js::locate($this->createLink($this->moduleName, 'index', "product=$_POST[id]"), 'parent'));
|
||||
}
|
||||
|
||||
$product = $this->product->getByID($productID);
|
||||
$header['title'] = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('product', $product);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 更新排序。*/
|
||||
public function updateOrder()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dept->updateOrder($_POST['orders']);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 维护下级部门。*/
|
||||
public function manageChild()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dept->manageChild($_POST['parentDeptID'], $_POST['depts']);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 删除某一个部门。*/
|
||||
public function delete($deptID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID=$deptID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->dept->delete($deptID);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The dept module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->dept->common = '部门结构';
|
||||
$lang->dept->add = "添加";
|
||||
$lang->dept->addChild = "添加下级部门";
|
||||
$lang->dept->manageChild = "下级部门";
|
||||
$lang->dept->delete = "删除部门";
|
||||
$lang->dept->browse = "部门列表";
|
||||
$lang->dept->manage = "维护部门结构";
|
||||
$lang->dept->updateOrder = "更新排序";
|
||||
$lang->dept->users = "成员列表";
|
||||
|
||||
$lang->dept->saveButton = " 保存 (S) ";
|
||||
$lang->dept->confirmDelete = " 您确定删除该部门吗?";
|
||||
<?php
|
||||
/**
|
||||
* The dept module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->dept->common = '部门结构';
|
||||
$lang->dept->add = "添加";
|
||||
$lang->dept->addChild = "添加下级部门";
|
||||
$lang->dept->manageChild = "下级部门";
|
||||
$lang->dept->delete = "删除部门";
|
||||
$lang->dept->browse = "部门列表";
|
||||
$lang->dept->manage = "维护部门结构";
|
||||
$lang->dept->updateOrder = "更新排序";
|
||||
$lang->dept->users = "成员列表";
|
||||
|
||||
$lang->dept->saveButton = " 保存 (S) ";
|
||||
$lang->dept->confirmDelete = " 您确定删除该部门吗?";
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The dept module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->dept->common = '部门结构';
|
||||
$lang->dept->add = "添加";
|
||||
$lang->dept->addChild = "添加下级部门";
|
||||
$lang->dept->manageChild = "下级部门";
|
||||
$lang->dept->delete = "删除部门";
|
||||
$lang->dept->browse = "部门维护";
|
||||
$lang->dept->manage = "维护部门结构";
|
||||
$lang->dept->updateOrder = "更新排序";
|
||||
$lang->dept->users = "成员列表";
|
||||
|
||||
$lang->dept->saveButton = " 保存 (S) ";
|
||||
$lang->dept->confirmDelete = " 您确定删除该部门吗?";
|
||||
<?php
|
||||
/**
|
||||
* The dept module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->dept->common = '部门结构';
|
||||
$lang->dept->add = "添加";
|
||||
$lang->dept->addChild = "添加下级部门";
|
||||
$lang->dept->manageChild = "下级部门";
|
||||
$lang->dept->delete = "删除部门";
|
||||
$lang->dept->browse = "部门维护";
|
||||
$lang->dept->manage = "维护部门结构";
|
||||
$lang->dept->updateOrder = "更新排序";
|
||||
$lang->dept->users = "成员列表";
|
||||
|
||||
$lang->dept->saveButton = " 保存 (S) ";
|
||||
$lang->dept->confirmDelete = " 您确定删除该部门吗?";
|
||||
|
||||
@@ -1,234 +1,234 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of dept dept of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@gmail.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class deptModel extends model
|
||||
{
|
||||
/* 通过部门id获取部门信息。*/
|
||||
public function getByID($deptID)
|
||||
{
|
||||
return $this->dao->findById($deptID)->from(TABLE_DEPT)->fetch();
|
||||
}
|
||||
|
||||
/* 生成查询的sql语句。*/
|
||||
private function buildMenuQuery($rootDeptID)
|
||||
{
|
||||
$rootDept = $this->getByID($rootDeptID);
|
||||
if(!$rootDept) $rootDept->path = '';
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)
|
||||
->onCaseOf($rootDeptID > 0)->where('path')->like($rootDept->path . '%')->endCase()
|
||||
->orderBy('grade desc, `order`')
|
||||
->get();
|
||||
}
|
||||
|
||||
/* 获取部门的下类列表,用于生成select控件。*/
|
||||
public function getOptionMenu($rootDeptID = 0)
|
||||
{
|
||||
$deptMenu = array();
|
||||
$stmt = $this->dbh->query($this->buildMenuQuery($rootDeptID));
|
||||
$depts = array();
|
||||
while($dept = $stmt->fetch()) $depts[$dept->id] = $dept;
|
||||
|
||||
foreach($depts as $dept)
|
||||
{
|
||||
$parentDepts = explode(',', $dept->path);
|
||||
$deptName = '/';
|
||||
foreach($parentDepts as $parentDeptID)
|
||||
{
|
||||
if(empty($parentDeptID)) continue;
|
||||
$deptName .= $depts[$parentDeptID]->name . '/';
|
||||
}
|
||||
$deptName = rtrim($deptName, '/');
|
||||
$deptName .= "|$dept->id\n";
|
||||
|
||||
if(isset($deptMenu[$dept->id]) and !empty($deptMenu[$dept->id]))
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= $deptName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = $deptName;;
|
||||
}
|
||||
$deptMenu[$dept->parent] .= $deptMenu[$dept->id];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]) and !empty($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= $deptName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = $deptName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$topMenu = @array_pop($deptMenu);
|
||||
$topMenu = explode("\n", trim($topMenu));
|
||||
$lastMenu[] = '/';
|
||||
foreach($topMenu as $menu)
|
||||
{
|
||||
if(!strpos($menu, '|')) continue;
|
||||
list($label, $deptID) = explode('|', $menu);
|
||||
$lastMenu[$deptID] = $label;
|
||||
}
|
||||
return $lastMenu;
|
||||
}
|
||||
|
||||
/* 获取树状的部门列表。*/
|
||||
public function getTreeMenu($rootDeptID = 0, $userFunc)
|
||||
{
|
||||
$deptMenu = array();
|
||||
$stmt = $this->dbh->query($this->buildMenuQuery($rootDeptID));
|
||||
while($dept = $stmt->fetch())
|
||||
{
|
||||
$linkHtml = call_user_func($userFunc, $dept);
|
||||
|
||||
if(isset($deptMenu[$dept->id]) and !empty($deptMenu[$dept->id]))
|
||||
{
|
||||
if(!isset($deptMenu[$dept->parent])) $deptMenu[$dept->parent] = '';
|
||||
$deptMenu[$dept->parent] .= "<li>$linkHtml";
|
||||
$deptMenu[$dept->parent] .= "<ul>".$deptMenu[$dept->id]."</ul>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]) and !empty($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= "<li>$linkHtml\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = "<li>$linkHtml\n";
|
||||
}
|
||||
}
|
||||
$deptMenu[$dept->parent] .= "</li>\n";
|
||||
}
|
||||
|
||||
$lastMenu = "<ul id='tree'>" . @array_pop($deptMenu) . "</ul>\n";
|
||||
return $lastMenu;
|
||||
}
|
||||
|
||||
/* 生成编辑链接。*/
|
||||
public function createManageLink($dept)
|
||||
{
|
||||
$linkHtml = $dept->name;
|
||||
$linkHtml .= ' ' . html::a(helper::createLink('dept', 'browse', "deptid={$dept->id}"), $this->lang->dept->manageChild);
|
||||
$linkHtml .= ' ' . html::a(helper::createLink('dept', 'delete', "deptid={$dept->id}"), $this->lang->dept->delete, 'hiddenwin');
|
||||
$linkHtml .= ' ' . html::input("orders[$dept->id]", $dept->order, 'style="width:30px;text-align:center"');
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
/* 生成用户链接。*/
|
||||
public function createMemberLink($dept)
|
||||
{
|
||||
$linkHtml = html::a(helper::createLink('company', 'browse', "dept={$dept->id}"), $dept->name, '_self', "id='dept{$dept->id}'");
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
/* 获得某一个部门的直接下级部门。*/
|
||||
public function getSons($deptID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)->where('parent')->eq($deptID)->orderBy('`order`')->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得一个部门的id列表。*/
|
||||
public function getAllChildId($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$dept = $this->getById($deptID);
|
||||
$childs = $this->dao->select('id')->from(TABLE_DEPT)->where('path')->like($dept->path . '%')->fetchPairs();
|
||||
return array_keys($childs);
|
||||
}
|
||||
|
||||
/* 获得一个部门的所有上级部门。*/
|
||||
public function getParents($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$path = $this->dao->select('path')->from(TABLE_DEPT)->where('id')->eq($deptID)->fetch('path');
|
||||
$path = substr($path, 1, -1);
|
||||
if(empty($path)) return array();
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)->where('id')->in($path)->orderBy('grade')->fetchAll();
|
||||
}
|
||||
|
||||
/* 更新排序信息。*/
|
||||
public function updateOrder($orders)
|
||||
{
|
||||
foreach($orders as $deptID => $order) $this->dao->update(TABLE_DEPT)->set('`order`')->eq($order)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
|
||||
/* 更新某一个部门的子部门。*/
|
||||
public function manageChild($parentDeptID, $childs)
|
||||
{
|
||||
$parentDept = $this->getByID($parentDeptID);
|
||||
if($parentDept)
|
||||
{
|
||||
$grade = $parentDept->grade + 1;
|
||||
$parentPath = $parentDept->path;
|
||||
}
|
||||
else
|
||||
{
|
||||
$grade = 1;
|
||||
$parentPath = ',';
|
||||
}
|
||||
|
||||
foreach($childs as $deptID => $deptName)
|
||||
{
|
||||
if(empty($deptName)) continue;
|
||||
if(is_numeric($deptID))
|
||||
{
|
||||
$dept->name = $deptName;
|
||||
$dept->parent = $parentDeptID;
|
||||
$dept->grade = $grade;
|
||||
$this->dao->insert(TABLE_DEPT)->data($dept)->exec();
|
||||
$deptID = $this->dao->lastInsertID();
|
||||
$childPath = $parentPath . "$deptID,";
|
||||
$this->dao->update(TABLE_DEPT)->set('path')->eq($childPath)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptID = str_replace('id', '', $deptID);
|
||||
$this->dao->update(TABLE_DEPT)->set('name')->eq($deptName)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 获得某一个部门的成员列表。*/
|
||||
public function getUsers($deptID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_USER)
|
||||
->where('deleted')->eq(0)
|
||||
->onCaseOf($deptID)->andWhere('dept')->in($deptID)->endCase()
|
||||
->orderBy('id')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 删除一个部门。Todo: 需要修改下级目录的权限,还有对应的需求列表。*/
|
||||
public function delete($deptID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_DEPT)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of dept dept of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class deptModel extends model
|
||||
{
|
||||
/* 通过部门id获取部门信息。*/
|
||||
public function getByID($deptID)
|
||||
{
|
||||
return $this->dao->findById($deptID)->from(TABLE_DEPT)->fetch();
|
||||
}
|
||||
|
||||
/* 生成查询的sql语句。*/
|
||||
private function buildMenuQuery($rootDeptID)
|
||||
{
|
||||
$rootDept = $this->getByID($rootDeptID);
|
||||
if(!$rootDept) $rootDept->path = '';
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)
|
||||
->onCaseOf($rootDeptID > 0)->where('path')->like($rootDept->path . '%')->endCase()
|
||||
->orderBy('grade desc, `order`')
|
||||
->get();
|
||||
}
|
||||
|
||||
/* 获取部门的下类列表,用于生成select控件。*/
|
||||
public function getOptionMenu($rootDeptID = 0)
|
||||
{
|
||||
$deptMenu = array();
|
||||
$stmt = $this->dbh->query($this->buildMenuQuery($rootDeptID));
|
||||
$depts = array();
|
||||
while($dept = $stmt->fetch()) $depts[$dept->id] = $dept;
|
||||
|
||||
foreach($depts as $dept)
|
||||
{
|
||||
$parentDepts = explode(',', $dept->path);
|
||||
$deptName = '/';
|
||||
foreach($parentDepts as $parentDeptID)
|
||||
{
|
||||
if(empty($parentDeptID)) continue;
|
||||
$deptName .= $depts[$parentDeptID]->name . '/';
|
||||
}
|
||||
$deptName = rtrim($deptName, '/');
|
||||
$deptName .= "|$dept->id\n";
|
||||
|
||||
if(isset($deptMenu[$dept->id]) and !empty($deptMenu[$dept->id]))
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= $deptName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = $deptName;;
|
||||
}
|
||||
$deptMenu[$dept->parent] .= $deptMenu[$dept->id];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]) and !empty($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= $deptName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = $deptName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$topMenu = @array_pop($deptMenu);
|
||||
$topMenu = explode("\n", trim($topMenu));
|
||||
$lastMenu[] = '/';
|
||||
foreach($topMenu as $menu)
|
||||
{
|
||||
if(!strpos($menu, '|')) continue;
|
||||
list($label, $deptID) = explode('|', $menu);
|
||||
$lastMenu[$deptID] = $label;
|
||||
}
|
||||
return $lastMenu;
|
||||
}
|
||||
|
||||
/* 获取树状的部门列表。*/
|
||||
public function getTreeMenu($rootDeptID = 0, $userFunc)
|
||||
{
|
||||
$deptMenu = array();
|
||||
$stmt = $this->dbh->query($this->buildMenuQuery($rootDeptID));
|
||||
while($dept = $stmt->fetch())
|
||||
{
|
||||
$linkHtml = call_user_func($userFunc, $dept);
|
||||
|
||||
if(isset($deptMenu[$dept->id]) and !empty($deptMenu[$dept->id]))
|
||||
{
|
||||
if(!isset($deptMenu[$dept->parent])) $deptMenu[$dept->parent] = '';
|
||||
$deptMenu[$dept->parent] .= "<li>$linkHtml";
|
||||
$deptMenu[$dept->parent] .= "<ul>".$deptMenu[$dept->id]."</ul>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($deptMenu[$dept->parent]) and !empty($deptMenu[$dept->parent]))
|
||||
{
|
||||
$deptMenu[$dept->parent] .= "<li>$linkHtml\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptMenu[$dept->parent] = "<li>$linkHtml\n";
|
||||
}
|
||||
}
|
||||
$deptMenu[$dept->parent] .= "</li>\n";
|
||||
}
|
||||
|
||||
$lastMenu = "<ul id='tree'>" . @array_pop($deptMenu) . "</ul>\n";
|
||||
return $lastMenu;
|
||||
}
|
||||
|
||||
/* 生成编辑链接。*/
|
||||
public function createManageLink($dept)
|
||||
{
|
||||
$linkHtml = $dept->name;
|
||||
$linkHtml .= ' ' . html::a(helper::createLink('dept', 'browse', "deptid={$dept->id}"), $this->lang->dept->manageChild);
|
||||
$linkHtml .= ' ' . html::a(helper::createLink('dept', 'delete', "deptid={$dept->id}"), $this->lang->dept->delete, 'hiddenwin');
|
||||
$linkHtml .= ' ' . html::input("orders[$dept->id]", $dept->order, 'style="width:30px;text-align:center"');
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
/* 生成用户链接。*/
|
||||
public function createMemberLink($dept)
|
||||
{
|
||||
$linkHtml = html::a(helper::createLink('company', 'browse', "dept={$dept->id}"), $dept->name, '_self', "id='dept{$dept->id}'");
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
/* 获得某一个部门的直接下级部门。*/
|
||||
public function getSons($deptID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)->where('parent')->eq($deptID)->orderBy('`order`')->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得一个部门的id列表。*/
|
||||
public function getAllChildId($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$dept = $this->getById($deptID);
|
||||
$childs = $this->dao->select('id')->from(TABLE_DEPT)->where('path')->like($dept->path . '%')->fetchPairs();
|
||||
return array_keys($childs);
|
||||
}
|
||||
|
||||
/* 获得一个部门的所有上级部门。*/
|
||||
public function getParents($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$path = $this->dao->select('path')->from(TABLE_DEPT)->where('id')->eq($deptID)->fetch('path');
|
||||
$path = substr($path, 1, -1);
|
||||
if(empty($path)) return array();
|
||||
return $this->dao->select('*')->from(TABLE_DEPT)->where('id')->in($path)->orderBy('grade')->fetchAll();
|
||||
}
|
||||
|
||||
/* 更新排序信息。*/
|
||||
public function updateOrder($orders)
|
||||
{
|
||||
foreach($orders as $deptID => $order) $this->dao->update(TABLE_DEPT)->set('`order`')->eq($order)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
|
||||
/* 更新某一个部门的子部门。*/
|
||||
public function manageChild($parentDeptID, $childs)
|
||||
{
|
||||
$parentDept = $this->getByID($parentDeptID);
|
||||
if($parentDept)
|
||||
{
|
||||
$grade = $parentDept->grade + 1;
|
||||
$parentPath = $parentDept->path;
|
||||
}
|
||||
else
|
||||
{
|
||||
$grade = 1;
|
||||
$parentPath = ',';
|
||||
}
|
||||
|
||||
foreach($childs as $deptID => $deptName)
|
||||
{
|
||||
if(empty($deptName)) continue;
|
||||
if(is_numeric($deptID))
|
||||
{
|
||||
$dept->name = $deptName;
|
||||
$dept->parent = $parentDeptID;
|
||||
$dept->grade = $grade;
|
||||
$this->dao->insert(TABLE_DEPT)->data($dept)->exec();
|
||||
$deptID = $this->dao->lastInsertID();
|
||||
$childPath = $parentPath . "$deptID,";
|
||||
$this->dao->update(TABLE_DEPT)->set('path')->eq($childPath)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptID = str_replace('id', '', $deptID);
|
||||
$this->dao->update(TABLE_DEPT)->set('name')->eq($deptName)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 获得某一个部门的成员列表。*/
|
||||
public function getUsers($deptID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_USER)
|
||||
->where('deleted')->eq(0)
|
||||
->onCaseOf($deptID)->andWhere('dept')->in($deptID)->endCase()
|
||||
->orderBy('id')
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/* 删除一个部门。Todo: 需要修改下级目录的权限,还有对应的需求列表。*/
|
||||
public function delete($deptID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_DEPT)->where('id')->eq($deptID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of dept module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>'>
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->dept->manageChild;?></caption>
|
||||
<tr>
|
||||
<td width='10%'>
|
||||
<nobr>
|
||||
<?php
|
||||
echo html::a($this->createLink('dept', 'browse'), $this->app->company->name);
|
||||
echo $lang->arrow;
|
||||
foreach($parentDepts as $dept)
|
||||
{
|
||||
echo html::a($this->createLink('dept', 'browse', "deptID=$dept->id"), $dept->name);
|
||||
echo $lang->arrow;
|
||||
}
|
||||
?>
|
||||
</nobr>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($sons as $sonDept) echo html::input("depts[id$sonDept->id]", $sonDept->name) . '<br />';
|
||||
for($i = 0; $i < DEPT::NEW_CHILD_COUNT ; $i ++) echo html::input("depts[]") . '<br />';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='a-center' colspan='2'>
|
||||
<?php echo html::submitButton() . html::resetButton();?>
|
||||
<input type='hidden' value='<?php echo $deptID;?>' name='parentDeptID' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-b">
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'updateOrder');?>'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $header->title;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $depts;?></div>
|
||||
<div class='a-center'><?php echo html::submitButton($lang->dept->updateOrder);?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of dept module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package dept
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/treeview.html.php';?>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'manageChild');?>'>
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->dept->manageChild;?></caption>
|
||||
<tr>
|
||||
<td width='10%'>
|
||||
<nobr>
|
||||
<?php
|
||||
echo html::a($this->createLink('dept', 'browse'), $this->app->company->name);
|
||||
echo $lang->arrow;
|
||||
foreach($parentDepts as $dept)
|
||||
{
|
||||
echo html::a($this->createLink('dept', 'browse', "deptID=$dept->id"), $dept->name);
|
||||
echo $lang->arrow;
|
||||
}
|
||||
?>
|
||||
</nobr>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($sons as $sonDept) echo html::input("depts[id$sonDept->id]", $sonDept->name) . '<br />';
|
||||
for($i = 0; $i < DEPT::NEW_CHILD_COUNT ; $i ++) echo html::input("depts[]") . '<br />';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='a-center' colspan='2'>
|
||||
<?php echo html::submitButton() . html::resetButton();?>
|
||||
<input type='hidden' value='<?php echo $deptID;?>' name='parentDeptID' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-b">
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('dept', 'updateOrder');?>'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $header->title;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $depts;?></div>
|
||||
<div class='a-center'><?php echo html::submitButton($lang->dept->updateOrder);?></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of product module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->product->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->name;?></th>
|
||||
<td class='a-left'><input type='text' name='name' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->code;?></th>
|
||||
<td class='a-left'><input type='text' name='code' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->desc;?></th>
|
||||
<td class='a-left'><textarea name='desc' style='width:100%' rows='5'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<input type='submit' value='<?php echo $lang->product->saveButton;?>' accesskey='S' />
|
||||
<input type='reset' value='<?php echo $lang->reset;?>' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The create view of product module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->product->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->name;?></th>
|
||||
<td class='a-left'><input type='text' name='name' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->code;?></th>
|
||||
<td class='a-left'><input type='text' name='code' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->desc;?></th>
|
||||
<td class='a-left'><textarea name='desc' style='width:100%' rows='5'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<input type='submit' value='<?php echo $lang->product->saveButton;?>' accesskey='S' />
|
||||
<input type='reset' value='<?php echo $lang->reset;?>' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of product module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->product->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->name;?></th>
|
||||
<td class='a-left'><input type='text' name='name' value='<?php echo $product->name;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->code;?></th>
|
||||
<td class='a-left'><input type='text' name='code' value='<?php echo $product->code;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->desc;?></th>
|
||||
<td class='a-left'><textarea name='desc' style='width:100%' rows='5'><?php echo $product->desc;?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<input type='submit' value='<?php echo $lang->product->saveButton;?>' accesskey='S' />
|
||||
<input type='reset' value='<?php echo $lang->reset;?>' />
|
||||
<input type='hidden' value='<?php echo $product->id;?>' name='id' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The edit view of product module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package product
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->product->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->name;?></th>
|
||||
<td class='a-left'><input type='text' name='name' value='<?php echo $product->name;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->code;?></th>
|
||||
<td class='a-left'><input type='text' name='code' value='<?php echo $product->code;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->product->desc;?></th>
|
||||
<td class='a-left'><textarea name='desc' style='width:100%' rows='5'><?php echo $product->desc;?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<input type='submit' value='<?php echo $lang->product->saveButton;?>' accesskey='S' />
|
||||
<input type='reset' value='<?php echo $lang->reset;?>' />
|
||||
<input type='hidden' value='<?php echo $product->id;?>' name='id' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of file module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class file extends control
|
||||
{
|
||||
/* 生成文件上传的表单。*/
|
||||
public function buildForm($fileCount = 2)
|
||||
{
|
||||
$this->view->fileCount = $fileCount;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 下载一个文件。*/
|
||||
public function download($fileID)
|
||||
{
|
||||
$file = $this->file->getById($fileID);
|
||||
if(file_exists($file->realPath))$this->locate($file->webPath);
|
||||
$this->app->error("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
}
|
||||
|
||||
/* 导出csv格式的文件。*/
|
||||
public function export2csv($agent)
|
||||
{
|
||||
$fileName = $this->post->fileName;
|
||||
if(strpos($fileName, '.csv') === false) $fileName .= '.csv';
|
||||
if($agent == 'ie') $fileName = urlencode($fileName);
|
||||
header('Content-type: application/csv');
|
||||
header("Content-Disposition: attachment; filename=$fileName");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
echo chr(0xEF) . chr(0xBB) . chr(0xBF);
|
||||
echo stripslashes($this->post->csvData);
|
||||
die();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of file module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class file extends control
|
||||
{
|
||||
/* 生成文件上传的表单。*/
|
||||
public function buildForm($fileCount = 2)
|
||||
{
|
||||
$this->view->fileCount = $fileCount;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 下载一个文件。*/
|
||||
public function download($fileID)
|
||||
{
|
||||
$file = $this->file->getById($fileID);
|
||||
if(file_exists($file->realPath))$this->locate($file->webPath);
|
||||
$this->app->error("The file you visit $fileID not found.", __FILE__, __LINE__, true);
|
||||
}
|
||||
|
||||
/* 导出csv格式的文件。*/
|
||||
public function export2csv($agent)
|
||||
{
|
||||
$fileName = $this->post->fileName;
|
||||
if(strpos($fileName, '.csv') === false) $fileName .= '.csv';
|
||||
if($agent == 'ie') $fileName = urlencode($fileName);
|
||||
header('Content-type: application/csv');
|
||||
header("Content-Disposition: attachment; filename=$fileName");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
echo chr(0xEF) . chr(0xBB) . chr(0xBF);
|
||||
echo stripslashes($this->post->csvData);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* The file module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->file->common = '附件';
|
||||
$lang->file->label = '标题:';
|
||||
<?php
|
||||
/**
|
||||
* The file module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->file->common = '附件';
|
||||
$lang->file->label = '标题:';
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The file module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->file->common = '附件';
|
||||
$lang->file->download = '下载附件';
|
||||
$lang->file->export2CSV = '导出CSV';
|
||||
$lang->file->label = '标题:';
|
||||
<?php
|
||||
/**
|
||||
* The file module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->file->common = '附件';
|
||||
$lang->file->download = '下载附件';
|
||||
$lang->file->export2CSV = '导出CSV';
|
||||
$lang->file->label = '标题:';
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of file module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class fileModel extends model
|
||||
{
|
||||
public $savePath = '';
|
||||
public $webPath = '';
|
||||
public $now = 0;
|
||||
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->now = time();
|
||||
$this->setSavePath();
|
||||
$this->setWebPath();
|
||||
}
|
||||
|
||||
/* 通过对象类型获取文件列表。*/
|
||||
public function getByObject($objectType, $objectID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_FILE)->where('objectType')->eq($objectType)->andWhere('objectID')->eq((int)$objectID)->orderBy('id')->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得某一个文件的信息。*/
|
||||
public function getById($fileID)
|
||||
{
|
||||
$file = $this->dao->findById($fileID)->from(TABLE_FILE)->fetch();
|
||||
$file->webPath = $this->webPath . $file->pathname;
|
||||
$file->realPath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
return $file;
|
||||
}
|
||||
|
||||
/* 保存上传的文件。*/
|
||||
public function saveUpload($objectType = '', $objectID = '', $extra = '')
|
||||
{
|
||||
$fileTitles = array();
|
||||
$now = helper::today();
|
||||
$files = $this->getUpload();
|
||||
|
||||
foreach($files as $id => $file)
|
||||
{
|
||||
move_uploaded_file($file['tmpname'], $this->savePath . $file['pathname']);
|
||||
$file['objectType'] = $objectType;
|
||||
$file['objectID'] = $objectID;
|
||||
$file['addedBy'] = $this->app->user->account;
|
||||
$file['addedDate'] = $now;
|
||||
$file['extra'] = $extra;
|
||||
unset($file['tmpname']);
|
||||
$this->dao->insert(TABLE_FILE)->data($file)->exec();
|
||||
$fileTitles[$this->dao->lastInsertId()] = $file['title'];
|
||||
}
|
||||
return $fileTitles;
|
||||
}
|
||||
|
||||
/* 获得文件数量。*/
|
||||
public function getCount()
|
||||
{
|
||||
return count($this->getUpload());
|
||||
}
|
||||
|
||||
/* 获取上传的文件信息。*/
|
||||
private function getUpload($htmlTagName = 'files')
|
||||
{
|
||||
$files = array();
|
||||
if(!isset($_FILES[$htmlTagName])) return $files;
|
||||
|
||||
/* 表单定义中的变量名是数组。*/
|
||||
if(is_array($_FILES[$htmlTagName]['name']))
|
||||
{
|
||||
extract($_FILES[$htmlTagName]);
|
||||
foreach($name as $id => $filename)
|
||||
{
|
||||
if(empty($filename)) continue;
|
||||
$file['extension'] = $this->getExtension($filename);
|
||||
$file['pathname'] = $this->setPathName($id, $file['extension']);
|
||||
$file['title'] = !empty($_POST['labels'][$id]) ? htmlspecialchars($_POST['labels'][$id]) : str_replace('.' . $file['extension'], '', $filename);
|
||||
$file['size'] = $size[$id];
|
||||
$file['tmpname'] = $tmp_name[$id];
|
||||
$files[] = $file;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(empty($_FILES[$htmlTagName]['name'])) return $files;
|
||||
extract($_FILES[$htmlTagName]);
|
||||
$file['extension'] = $this->getExtension($name);
|
||||
$file['pathname'] = $this->setPathName(0, $file['extension']);
|
||||
$file['title'] = !empty($_POST['labels'][0]) ? htmlspecialchars($_POST['labels'][0]) : pathinfo($filename, PATHINFO_FILENAME);
|
||||
$file['size'] = $size;
|
||||
$file['tmpname'] = $tmp_name;
|
||||
return array($file);
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
/* 获取文件扩展名。*/
|
||||
private function getExtension($filename)
|
||||
{
|
||||
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
if(empty($extension)) return 'txt';
|
||||
if(strpos($this->config->file->dangers, $extension) !== false) return 'txt';
|
||||
return $extension;
|
||||
}
|
||||
|
||||
/* 设置要存储的文件名。*/
|
||||
private function setPathName($fileID, $extension)
|
||||
{
|
||||
$sessionID = session_id();
|
||||
$randString = substr($sessionID, mt_rand(0, strlen($sessionID) - 5), 3);
|
||||
return date('Ym/dHis', $this->now) . $fileID . mt_rand(0, 10000) . $randString . '.' . $extension;
|
||||
}
|
||||
|
||||
/* 设置存储路径。*/
|
||||
private function setSavePath()
|
||||
{
|
||||
$savePath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . date('Ym/', $this->now);
|
||||
if(!file_exists($savePath)) mkdir($savePath, 0777, true);
|
||||
$this->savePath = dirname($savePath) . '/';
|
||||
}
|
||||
|
||||
/* 设置web访问路径。*/
|
||||
private function setWebPath()
|
||||
{
|
||||
$this->webPath = $this->app->getWebRoot() . "data/upload/{$this->app->company->id}/";
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of file module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package file
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class fileModel extends model
|
||||
{
|
||||
public $savePath = '';
|
||||
public $webPath = '';
|
||||
public $now = 0;
|
||||
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->now = time();
|
||||
$this->setSavePath();
|
||||
$this->setWebPath();
|
||||
}
|
||||
|
||||
/* 通过对象类型获取文件列表。*/
|
||||
public function getByObject($objectType, $objectID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_FILE)->where('objectType')->eq($objectType)->andWhere('objectID')->eq((int)$objectID)->orderBy('id')->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得某一个文件的信息。*/
|
||||
public function getById($fileID)
|
||||
{
|
||||
$file = $this->dao->findById($fileID)->from(TABLE_FILE)->fetch();
|
||||
$file->webPath = $this->webPath . $file->pathname;
|
||||
$file->realPath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . $file->pathname;
|
||||
return $file;
|
||||
}
|
||||
|
||||
/* 保存上传的文件。*/
|
||||
public function saveUpload($objectType = '', $objectID = '', $extra = '')
|
||||
{
|
||||
$fileTitles = array();
|
||||
$now = helper::today();
|
||||
$files = $this->getUpload();
|
||||
|
||||
foreach($files as $id => $file)
|
||||
{
|
||||
move_uploaded_file($file['tmpname'], $this->savePath . $file['pathname']);
|
||||
$file['objectType'] = $objectType;
|
||||
$file['objectID'] = $objectID;
|
||||
$file['addedBy'] = $this->app->user->account;
|
||||
$file['addedDate'] = $now;
|
||||
$file['extra'] = $extra;
|
||||
unset($file['tmpname']);
|
||||
$this->dao->insert(TABLE_FILE)->data($file)->exec();
|
||||
$fileTitles[$this->dao->lastInsertId()] = $file['title'];
|
||||
}
|
||||
return $fileTitles;
|
||||
}
|
||||
|
||||
/* 获得文件数量。*/
|
||||
public function getCount()
|
||||
{
|
||||
return count($this->getUpload());
|
||||
}
|
||||
|
||||
/* 获取上传的文件信息。*/
|
||||
private function getUpload($htmlTagName = 'files')
|
||||
{
|
||||
$files = array();
|
||||
if(!isset($_FILES[$htmlTagName])) return $files;
|
||||
|
||||
/* 表单定义中的变量名是数组。*/
|
||||
if(is_array($_FILES[$htmlTagName]['name']))
|
||||
{
|
||||
extract($_FILES[$htmlTagName]);
|
||||
foreach($name as $id => $filename)
|
||||
{
|
||||
if(empty($filename)) continue;
|
||||
$file['extension'] = $this->getExtension($filename);
|
||||
$file['pathname'] = $this->setPathName($id, $file['extension']);
|
||||
$file['title'] = !empty($_POST['labels'][$id]) ? htmlspecialchars($_POST['labels'][$id]) : str_replace('.' . $file['extension'], '', $filename);
|
||||
$file['size'] = $size[$id];
|
||||
$file['tmpname'] = $tmp_name[$id];
|
||||
$files[] = $file;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(empty($_FILES[$htmlTagName]['name'])) return $files;
|
||||
extract($_FILES[$htmlTagName]);
|
||||
$file['extension'] = $this->getExtension($name);
|
||||
$file['pathname'] = $this->setPathName(0, $file['extension']);
|
||||
$file['title'] = !empty($_POST['labels'][0]) ? htmlspecialchars($_POST['labels'][0]) : pathinfo($filename, PATHINFO_FILENAME);
|
||||
$file['size'] = $size;
|
||||
$file['tmpname'] = $tmp_name;
|
||||
return array($file);
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
/* 获取文件扩展名。*/
|
||||
private function getExtension($filename)
|
||||
{
|
||||
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
if(empty($extension)) return 'txt';
|
||||
if(strpos($this->config->file->dangers, $extension) !== false) return 'txt';
|
||||
return $extension;
|
||||
}
|
||||
|
||||
/* 设置要存储的文件名。*/
|
||||
private function setPathName($fileID, $extension)
|
||||
{
|
||||
$sessionID = session_id();
|
||||
$randString = substr($sessionID, mt_rand(0, strlen($sessionID) - 5), 3);
|
||||
return date('Ym/dHis', $this->now) . $fileID . mt_rand(0, 10000) . $randString . '.' . $extension;
|
||||
}
|
||||
|
||||
/* 设置存储路径。*/
|
||||
private function setSavePath()
|
||||
{
|
||||
$savePath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . date('Ym/', $this->now);
|
||||
if(!file_exists($savePath)) mkdir($savePath, 0777, true);
|
||||
$this->savePath = dirname($savePath) . '/';
|
||||
}
|
||||
|
||||
/* 设置web访问路径。*/
|
||||
private function setWebPath()
|
||||
{
|
||||
$this->webPath = $this->app->getWebRoot() . "data/upload/{$this->app->company->id}/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,165 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class group extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('company')->setMenu();
|
||||
$this->loadModel('user');
|
||||
}
|
||||
|
||||
/* 分组列表。*/
|
||||
public function browse($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->browse;
|
||||
$position[] = $this->lang->group->browse;
|
||||
|
||||
$groups = $this->group->getList($companyID);
|
||||
$groupUsers = array();
|
||||
foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('groups', $groups);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 创建一个用户组。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->create;
|
||||
$this->view->position[] = $this->lang->group->create;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个用户组。*/
|
||||
public function edit($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->update($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
|
||||
$position[] = $this->lang->group->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $this->group->getById($groupID));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 复制一个用户组。*/
|
||||
public function copy($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->copy($groupID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->copy;
|
||||
$this->view->position[] = $this->lang->group->copy;
|
||||
$this->view->group = $this->group->getById($groupID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
/* 维护权限。*/
|
||||
public function managePriv($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updatePriv($groupID);
|
||||
die(js::alert($this->lang->group->successSaved));
|
||||
}
|
||||
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupPrivs = $this->group->getPrivs($groupID);
|
||||
|
||||
$this->view->header->title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
$this->view->position[] = $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->groupPrivs = $groupPrivs;
|
||||
|
||||
/* 加载每一个模块的语言文件。*/
|
||||
foreach($this->lang->resource as $moduleName => $action) $this->app->loadLang($moduleName);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 维护用户。*/
|
||||
public function manageMember($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updateUser($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
$groupUsers = join(',', array_keys($groupUsers));
|
||||
$allUsers = $this->user->getPairs('noclosed|noempty|noletter');
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
$position[] = $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $group);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
$this->assign('allUsers', $allUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除一个分组。*/
|
||||
public function delete($groupID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID=$groupID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->group->delete($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class group extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('company')->setMenu();
|
||||
$this->loadModel('user');
|
||||
}
|
||||
|
||||
/* 分组列表。*/
|
||||
public function browse($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->browse;
|
||||
$position[] = $this->lang->group->browse;
|
||||
|
||||
$groups = $this->group->getList($companyID);
|
||||
$groupUsers = array();
|
||||
foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('groups', $groups);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 创建一个用户组。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->create;
|
||||
$this->view->position[] = $this->lang->group->create;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个用户组。*/
|
||||
public function edit($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->update($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
|
||||
$position[] = $this->lang->group->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $this->group->getById($groupID));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 复制一个用户组。*/
|
||||
public function copy($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->copy($groupID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->header->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->copy;
|
||||
$this->view->position[] = $this->lang->group->copy;
|
||||
$this->view->group = $this->group->getById($groupID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
/* 维护权限。*/
|
||||
public function managePriv($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updatePriv($groupID);
|
||||
die(js::alert($this->lang->group->successSaved));
|
||||
}
|
||||
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupPrivs = $this->group->getPrivs($groupID);
|
||||
|
||||
$this->view->header->title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
$this->view->position[] = $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->groupPrivs = $groupPrivs;
|
||||
|
||||
/* 加载每一个模块的语言文件。*/
|
||||
foreach($this->lang->resource as $moduleName => $action) $this->app->loadLang($moduleName);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 维护用户。*/
|
||||
public function manageMember($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updateUser($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
$groupUsers = join(',', array_keys($groupUsers));
|
||||
$allUsers = $this->user->getPairs('noclosed|noempty|noletter');
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
$position[] = $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $group);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
$this->assign('allUsers', $allUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除一个分组。*/
|
||||
public function delete($groupID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID=$groupID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->group->delete($groupID);
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,202 +1,202 @@
|
||||
<?php
|
||||
/**
|
||||
* The group module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->group->common = '权限分组';
|
||||
$lang->group->browse = '浏览分组';
|
||||
$lang->group->create = '新增分组';
|
||||
$lang->group->edit = '编辑分组';
|
||||
$lang->group->delete = '删除分组';
|
||||
$lang->group->managePriv = '权限维护';
|
||||
$lang->group->manageMember = '成员维护';
|
||||
$lang->group->linkMember = '关联用户';
|
||||
$lang->group->unlinkMember = '移除用户';
|
||||
$lang->group->confirmDelete= '您确定删除该用户分组吗?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
|
||||
$lang->group->id = '编号';
|
||||
$lang->group->name = '分组名称';
|
||||
$lang->group->desc = '分组描述';
|
||||
$lang->group->users = '用户列表';
|
||||
$lang->group->module = '模块';
|
||||
$lang->group->method = '方法';
|
||||
$lang->group->priv = '权限';
|
||||
$lang->group->checkall = '全选';
|
||||
|
||||
/* 所有resource列表。*/
|
||||
$lang->resource->index->index = 'index';
|
||||
$lang->resource->index->ping = 'ping';
|
||||
|
||||
$lang->resource->my->index = 'index';
|
||||
$lang->resource->my->todo = 'todo';
|
||||
$lang->resource->my->task = 'task';
|
||||
$lang->resource->my->story = 'story';
|
||||
$lang->resource->my->bug = 'bug';
|
||||
$lang->resource->my->project = 'project';
|
||||
$lang->resource->my->profile = 'profile';
|
||||
$lang->resource->my->editProfile = 'editProfile';
|
||||
|
||||
$lang->resource->todo->create = 'create';
|
||||
$lang->resource->todo->edit = 'edit';
|
||||
$lang->resource->todo->view = 'view';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->mark = 'mark';
|
||||
$lang->resource->todo->import2Today = 'import2Today';
|
||||
|
||||
$lang->resource->product->index = 'index';
|
||||
$lang->resource->product->browse = 'browse';
|
||||
$lang->resource->product->create = 'create';
|
||||
$lang->resource->product->edit = 'edit';
|
||||
$lang->resource->product->delete = 'delete';
|
||||
$lang->resource->product->roadmap= 'roadmap';
|
||||
$lang->resource->product->ajaxGetProjects = 'ajaxGetProjects';
|
||||
$lang->resource->product->ajaxGetPlans = 'ajaxGetPlans';
|
||||
|
||||
$lang->resource->story->create = 'create';
|
||||
$lang->resource->story->edit = 'edit';
|
||||
$lang->resource->story->delete = 'delete';
|
||||
$lang->resource->story->view = 'view';
|
||||
$lang->resource->story->change = 'change';
|
||||
$lang->resource->story->review = 'review';
|
||||
$lang->resource->story->close = 'close';
|
||||
$lang->resource->story->activate= 'activate';
|
||||
$lang->resource->story->tasks = 'tasks';
|
||||
$lang->resource->story->ajaxGetProjectStories = 'ajaxGetProjectStories';
|
||||
$lang->resource->story->ajaxGetProductStories = 'ajaxGetProductStories';
|
||||
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
|
||||
$lang->resource->release->browse = 'browse';
|
||||
$lang->resource->release->create = 'create';
|
||||
$lang->resource->release->edit = 'edit';
|
||||
$lang->resource->release->delete = 'delete';
|
||||
$lang->resource->release->view = 'view';
|
||||
|
||||
$lang->resource->project->index = 'index';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->browse = 'browse';
|
||||
$lang->resource->project->create = 'create';
|
||||
$lang->resource->project->edit = 'edit';
|
||||
$lang->resource->project->delete = 'delete';
|
||||
$lang->resource->project->task = 'task';
|
||||
$lang->resource->project->story = 'story';
|
||||
$lang->resource->project->build = 'build';
|
||||
$lang->resource->project->bug = 'bug';
|
||||
$lang->resource->project->burn = 'burn';
|
||||
$lang->resource->project->burnData = 'burnData';
|
||||
$lang->resource->project->team = 'team';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
$lang->resource->project->manageChilds = 'manageChilds';
|
||||
$lang->resource->project->manageMembers = 'manageMembers';
|
||||
$lang->resource->project->unlinkMember = 'unlinkMember';
|
||||
$lang->resource->project->linkStory = 'linkStory';
|
||||
$lang->resource->project->unlinkStory = 'unlinkStory';
|
||||
|
||||
$lang->resource->task->create = 'create';
|
||||
$lang->resource->task->edit = 'edit';
|
||||
$lang->resource->task->delete = 'delete';
|
||||
$lang->resource->task->view = 'view';
|
||||
$lang->resource->task->ajaxGetUserTasks = 'ajaxGetUserTasks';
|
||||
$lang->resource->task->ajaxGetProjectTasks = 'ajaxGetProjectTasks';
|
||||
|
||||
$lang->resource->build->create = 'create';
|
||||
$lang->resource->build->edit = 'edit';
|
||||
$lang->resource->build->delete = 'delete';
|
||||
$lang->resource->build->view = 'view';
|
||||
$lang->resource->build->ajaxGetProductBuilds = 'ajaxGetProductBuilds';
|
||||
$lang->resource->build->ajaxGetProjectBuilds = 'ajaxGetProjectBuilds';
|
||||
|
||||
$lang->resource->qa->index = 'index';
|
||||
|
||||
$lang->resource->bug->index = 'index';
|
||||
$lang->resource->bug->browse = 'browse';
|
||||
$lang->resource->bug->create = 'create';
|
||||
$lang->resource->bug->view = 'view';
|
||||
$lang->resource->bug->edit = 'edit';
|
||||
$lang->resource->bug->resolve = 'resolve';
|
||||
$lang->resource->bug->activate= 'activate';
|
||||
$lang->resource->bug->close = 'close';
|
||||
$lang->resource->bug->ajaxGetUserBugs = 'ajaxGetUserBugs';
|
||||
|
||||
$lang->resource->testcase->index = 'index';
|
||||
$lang->resource->testcase->browse = 'browse';
|
||||
$lang->resource->testcase->create = 'create';
|
||||
$lang->resource->testcase->view = 'view';
|
||||
$lang->resource->testcase->edit = 'edit';
|
||||
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'unlinkCase';
|
||||
$lang->resource->testtask->runcase = 'runCase';
|
||||
$lang->resource->testtask->results = 'results';
|
||||
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
$lang->resource->company->create = 'create';
|
||||
$lang->resource->company->edit = 'edit';
|
||||
$lang->resource->company->delete = 'delete';
|
||||
|
||||
$lang->resource->dept->browse = 'browse';
|
||||
$lang->resource->dept->updateOrder = 'updateOrder';
|
||||
$lang->resource->dept->manageChild = 'manageChild';
|
||||
$lang->resource->dept->delete = 'delete';
|
||||
|
||||
$lang->resource->group->browse = 'browse';
|
||||
$lang->resource->group->create = 'create';
|
||||
$lang->resource->group->edit = 'edit';
|
||||
$lang->resource->group->delete = 'delete';
|
||||
$lang->resource->group->managePriv = 'managePriv';
|
||||
$lang->resource->group->manageMember = 'manageMember';
|
||||
|
||||
$lang->resource->user->create = 'create';
|
||||
$lang->resource->user->view = 'view';
|
||||
$lang->resource->user->edit = 'edit';
|
||||
$lang->resource->user->delete = 'delete';
|
||||
$lang->resource->user->todo = 'todo';
|
||||
$lang->resource->user->task = 'task';
|
||||
$lang->resource->user->bug = 'bug';
|
||||
$lang->resource->user->project= 'project';
|
||||
$lang->resource->user->profile= 'profile';
|
||||
|
||||
$lang->resource->tree->browse = 'browse';
|
||||
$lang->resource->tree->updateOrder = 'updateOrder';
|
||||
$lang->resource->tree->manageChild = 'manageChild';
|
||||
$lang->resource->tree->delete = 'delete';
|
||||
$lang->resource->tree->ajaxGetOptionMenu = 'ajaxGetOptionMenu';
|
||||
|
||||
$lang->resource->search->buildForm = 'buildForm';
|
||||
$lang->resource->search->buildQuery = 'buildQuery';
|
||||
|
||||
$lang->resource->admin->index = 'index';
|
||||
$lang->resource->admin->browseCompany = 'browseCompany';
|
||||
<?php
|
||||
/**
|
||||
* The group module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->group->common = '权限分组';
|
||||
$lang->group->browse = '浏览分组';
|
||||
$lang->group->create = '新增分组';
|
||||
$lang->group->edit = '编辑分组';
|
||||
$lang->group->delete = '删除分组';
|
||||
$lang->group->managePriv = '权限维护';
|
||||
$lang->group->manageMember = '成员维护';
|
||||
$lang->group->linkMember = '关联用户';
|
||||
$lang->group->unlinkMember = '移除用户';
|
||||
$lang->group->confirmDelete= '您确定删除该用户分组吗?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
|
||||
$lang->group->id = '编号';
|
||||
$lang->group->name = '分组名称';
|
||||
$lang->group->desc = '分组描述';
|
||||
$lang->group->users = '用户列表';
|
||||
$lang->group->module = '模块';
|
||||
$lang->group->method = '方法';
|
||||
$lang->group->priv = '权限';
|
||||
$lang->group->checkall = '全选';
|
||||
|
||||
/* 所有resource列表。*/
|
||||
$lang->resource->index->index = 'index';
|
||||
$lang->resource->index->ping = 'ping';
|
||||
|
||||
$lang->resource->my->index = 'index';
|
||||
$lang->resource->my->todo = 'todo';
|
||||
$lang->resource->my->task = 'task';
|
||||
$lang->resource->my->story = 'story';
|
||||
$lang->resource->my->bug = 'bug';
|
||||
$lang->resource->my->project = 'project';
|
||||
$lang->resource->my->profile = 'profile';
|
||||
$lang->resource->my->editProfile = 'editProfile';
|
||||
|
||||
$lang->resource->todo->create = 'create';
|
||||
$lang->resource->todo->edit = 'edit';
|
||||
$lang->resource->todo->view = 'view';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->mark = 'mark';
|
||||
$lang->resource->todo->import2Today = 'import2Today';
|
||||
|
||||
$lang->resource->product->index = 'index';
|
||||
$lang->resource->product->browse = 'browse';
|
||||
$lang->resource->product->create = 'create';
|
||||
$lang->resource->product->edit = 'edit';
|
||||
$lang->resource->product->delete = 'delete';
|
||||
$lang->resource->product->roadmap= 'roadmap';
|
||||
$lang->resource->product->ajaxGetProjects = 'ajaxGetProjects';
|
||||
$lang->resource->product->ajaxGetPlans = 'ajaxGetPlans';
|
||||
|
||||
$lang->resource->story->create = 'create';
|
||||
$lang->resource->story->edit = 'edit';
|
||||
$lang->resource->story->delete = 'delete';
|
||||
$lang->resource->story->view = 'view';
|
||||
$lang->resource->story->change = 'change';
|
||||
$lang->resource->story->review = 'review';
|
||||
$lang->resource->story->close = 'close';
|
||||
$lang->resource->story->activate= 'activate';
|
||||
$lang->resource->story->tasks = 'tasks';
|
||||
$lang->resource->story->ajaxGetProjectStories = 'ajaxGetProjectStories';
|
||||
$lang->resource->story->ajaxGetProductStories = 'ajaxGetProductStories';
|
||||
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
|
||||
$lang->resource->release->browse = 'browse';
|
||||
$lang->resource->release->create = 'create';
|
||||
$lang->resource->release->edit = 'edit';
|
||||
$lang->resource->release->delete = 'delete';
|
||||
$lang->resource->release->view = 'view';
|
||||
|
||||
$lang->resource->project->index = 'index';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->browse = 'browse';
|
||||
$lang->resource->project->create = 'create';
|
||||
$lang->resource->project->edit = 'edit';
|
||||
$lang->resource->project->delete = 'delete';
|
||||
$lang->resource->project->task = 'task';
|
||||
$lang->resource->project->story = 'story';
|
||||
$lang->resource->project->build = 'build';
|
||||
$lang->resource->project->bug = 'bug';
|
||||
$lang->resource->project->burn = 'burn';
|
||||
$lang->resource->project->burnData = 'burnData';
|
||||
$lang->resource->project->team = 'team';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
$lang->resource->project->manageChilds = 'manageChilds';
|
||||
$lang->resource->project->manageMembers = 'manageMembers';
|
||||
$lang->resource->project->unlinkMember = 'unlinkMember';
|
||||
$lang->resource->project->linkStory = 'linkStory';
|
||||
$lang->resource->project->unlinkStory = 'unlinkStory';
|
||||
|
||||
$lang->resource->task->create = 'create';
|
||||
$lang->resource->task->edit = 'edit';
|
||||
$lang->resource->task->delete = 'delete';
|
||||
$lang->resource->task->view = 'view';
|
||||
$lang->resource->task->ajaxGetUserTasks = 'ajaxGetUserTasks';
|
||||
$lang->resource->task->ajaxGetProjectTasks = 'ajaxGetProjectTasks';
|
||||
|
||||
$lang->resource->build->create = 'create';
|
||||
$lang->resource->build->edit = 'edit';
|
||||
$lang->resource->build->delete = 'delete';
|
||||
$lang->resource->build->view = 'view';
|
||||
$lang->resource->build->ajaxGetProductBuilds = 'ajaxGetProductBuilds';
|
||||
$lang->resource->build->ajaxGetProjectBuilds = 'ajaxGetProjectBuilds';
|
||||
|
||||
$lang->resource->qa->index = 'index';
|
||||
|
||||
$lang->resource->bug->index = 'index';
|
||||
$lang->resource->bug->browse = 'browse';
|
||||
$lang->resource->bug->create = 'create';
|
||||
$lang->resource->bug->view = 'view';
|
||||
$lang->resource->bug->edit = 'edit';
|
||||
$lang->resource->bug->resolve = 'resolve';
|
||||
$lang->resource->bug->activate= 'activate';
|
||||
$lang->resource->bug->close = 'close';
|
||||
$lang->resource->bug->ajaxGetUserBugs = 'ajaxGetUserBugs';
|
||||
|
||||
$lang->resource->testcase->index = 'index';
|
||||
$lang->resource->testcase->browse = 'browse';
|
||||
$lang->resource->testcase->create = 'create';
|
||||
$lang->resource->testcase->view = 'view';
|
||||
$lang->resource->testcase->edit = 'edit';
|
||||
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'unlinkCase';
|
||||
$lang->resource->testtask->runcase = 'runCase';
|
||||
$lang->resource->testtask->results = 'results';
|
||||
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
$lang->resource->company->create = 'create';
|
||||
$lang->resource->company->edit = 'edit';
|
||||
$lang->resource->company->delete = 'delete';
|
||||
|
||||
$lang->resource->dept->browse = 'browse';
|
||||
$lang->resource->dept->updateOrder = 'updateOrder';
|
||||
$lang->resource->dept->manageChild = 'manageChild';
|
||||
$lang->resource->dept->delete = 'delete';
|
||||
|
||||
$lang->resource->group->browse = 'browse';
|
||||
$lang->resource->group->create = 'create';
|
||||
$lang->resource->group->edit = 'edit';
|
||||
$lang->resource->group->delete = 'delete';
|
||||
$lang->resource->group->managePriv = 'managePriv';
|
||||
$lang->resource->group->manageMember = 'manageMember';
|
||||
|
||||
$lang->resource->user->create = 'create';
|
||||
$lang->resource->user->view = 'view';
|
||||
$lang->resource->user->edit = 'edit';
|
||||
$lang->resource->user->delete = 'delete';
|
||||
$lang->resource->user->todo = 'todo';
|
||||
$lang->resource->user->task = 'task';
|
||||
$lang->resource->user->bug = 'bug';
|
||||
$lang->resource->user->project= 'project';
|
||||
$lang->resource->user->profile= 'profile';
|
||||
|
||||
$lang->resource->tree->browse = 'browse';
|
||||
$lang->resource->tree->updateOrder = 'updateOrder';
|
||||
$lang->resource->tree->manageChild = 'manageChild';
|
||||
$lang->resource->tree->delete = 'delete';
|
||||
$lang->resource->tree->ajaxGetOptionMenu = 'ajaxGetOptionMenu';
|
||||
|
||||
$lang->resource->search->buildForm = 'buildForm';
|
||||
$lang->resource->search->buildQuery = 'buildQuery';
|
||||
|
||||
$lang->resource->admin->index = 'index';
|
||||
$lang->resource->admin->browseCompany = 'browseCompany';
|
||||
|
||||
@@ -1,245 +1,245 @@
|
||||
<?php
|
||||
/**
|
||||
* The group module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->group->common = '权限分组';
|
||||
$lang->group->browse = '浏览分组';
|
||||
$lang->group->create = '新增分组';
|
||||
$lang->group->edit = '编辑分组';
|
||||
$lang->group->copy = '复制分组';
|
||||
$lang->group->delete = '删除分组';
|
||||
$lang->group->managePriv = '权限维护';
|
||||
$lang->group->manageMember = '成员维护';
|
||||
$lang->group->linkMember = '关联用户';
|
||||
$lang->group->unlinkMember = '移除用户';
|
||||
$lang->group->confirmDelete= '您确定删除该用户分组吗?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
|
||||
$lang->group->id = '编号';
|
||||
$lang->group->name = '分组名称';
|
||||
$lang->group->desc = '分组描述';
|
||||
$lang->group->users = '用户列表';
|
||||
$lang->group->module = '模块';
|
||||
$lang->group->method = '方法';
|
||||
$lang->group->priv = '权限';
|
||||
$lang->group->checkall = '全选';
|
||||
$lang->group->option = '选项';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = '复制权限';
|
||||
$lang->group->copyOptions['copyUser'] = '复制用户';
|
||||
|
||||
//---------------------------- 所有resource列表-------------------------*/
|
||||
|
||||
/* 首页。*/
|
||||
$lang->resource->index->index = 'index';
|
||||
|
||||
/* 我的地盘。*/
|
||||
$lang->resource->my->index = 'index';
|
||||
$lang->resource->my->todo = 'todo';
|
||||
$lang->resource->my->task = 'task';
|
||||
$lang->resource->my->bug = 'bug';
|
||||
$lang->resource->my->story = 'story';
|
||||
$lang->resource->my->project = 'project';
|
||||
$lang->resource->my->profile = 'profile';
|
||||
$lang->resource->my->editProfile = 'editProfile';
|
||||
|
||||
/* todo。*/
|
||||
$lang->resource->todo->create = 'create';
|
||||
$lang->resource->todo->edit = 'edit';
|
||||
$lang->resource->todo->view = 'view';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->mark = 'mark';
|
||||
$lang->resource->todo->import2Today = 'import2Today';
|
||||
|
||||
/* 产品视图。*/
|
||||
$lang->resource->product->index = 'index';
|
||||
$lang->resource->product->browse = 'browse';
|
||||
$lang->resource->product->create = 'create';
|
||||
$lang->resource->product->view = 'view';
|
||||
$lang->resource->product->edit = 'edit';
|
||||
$lang->resource->product->delete = 'delete';
|
||||
$lang->resource->product->roadmap= 'roadmap';
|
||||
$lang->resource->product->ajaxGetProjects = 'ajaxGetProjects';
|
||||
$lang->resource->product->ajaxGetPlans = 'ajaxGetPlans';
|
||||
|
||||
/* 需求。*/
|
||||
$lang->resource->story->create = 'create';
|
||||
$lang->resource->story->edit = 'edit';
|
||||
$lang->resource->story->delete = 'delete';
|
||||
$lang->resource->story->view = 'view';
|
||||
$lang->resource->story->change = 'lblChange';
|
||||
$lang->resource->story->review = 'lblReview';
|
||||
$lang->resource->story->close = 'lblClose';
|
||||
$lang->resource->story->activate= 'lblActivate';
|
||||
$lang->resource->story->tasks = 'tasks';
|
||||
$lang->resource->story->ajaxGetProjectStories = 'ajaxGetProjectStories';
|
||||
$lang->resource->story->ajaxGetProductStories = 'ajaxGetProductStories';
|
||||
|
||||
/* 产品计划。*/
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
|
||||
/* 发布。*/
|
||||
$lang->resource->release->browse = 'browse';
|
||||
$lang->resource->release->create = 'create';
|
||||
$lang->resource->release->edit = 'edit';
|
||||
$lang->resource->release->delete = 'delete';
|
||||
$lang->resource->release->view = 'view';
|
||||
|
||||
/* 项目视图。*/
|
||||
$lang->resource->project->index = 'index';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->browse = 'browse';
|
||||
$lang->resource->project->create = 'create';
|
||||
$lang->resource->project->edit = 'edit';
|
||||
$lang->resource->project->delete = 'delete';
|
||||
$lang->resource->project->task = 'task';
|
||||
$lang->resource->project->grouptask = 'groupTask';
|
||||
$lang->resource->project->importtask = 'importTask';
|
||||
$lang->resource->project->story = 'story';
|
||||
$lang->resource->project->build = 'build';
|
||||
$lang->resource->project->bug = 'bug';
|
||||
$lang->resource->project->burn = 'burn';
|
||||
$lang->resource->project->burnData = 'burnData';
|
||||
$lang->resource->project->team = 'team';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
//$lang->resource->project->manageChilds = 'manageChilds';
|
||||
$lang->resource->project->manageMembers = 'manageMembers';
|
||||
$lang->resource->project->unlinkMember = 'unlinkMember';
|
||||
$lang->resource->project->linkStory = 'linkStory';
|
||||
$lang->resource->project->unlinkStory = 'unlinkStory';
|
||||
|
||||
/* 任务。*/
|
||||
$lang->resource->task->create = 'create';
|
||||
$lang->resource->task->edit = 'edit';
|
||||
$lang->resource->task->delete = 'delete';
|
||||
$lang->resource->task->view = 'view';
|
||||
$lang->resource->task->confirmStoryChange = 'confirmStoryChange';
|
||||
$lang->resource->task->ajaxGetUserTasks = 'ajaxGetUserTasks';
|
||||
$lang->resource->task->ajaxGetProjectTasks = 'ajaxGetProjectTasks';
|
||||
|
||||
/* build。*/
|
||||
$lang->resource->build->create = 'create';
|
||||
$lang->resource->build->edit = 'edit';
|
||||
$lang->resource->build->delete = 'delete';
|
||||
$lang->resource->build->view = 'view';
|
||||
$lang->resource->build->ajaxGetProductBuilds = 'ajaxGetProductBuilds';
|
||||
$lang->resource->build->ajaxGetProjectBuilds = 'ajaxGetProjectBuilds';
|
||||
|
||||
/* QA视图。*/
|
||||
$lang->resource->qa->index = 'index';
|
||||
|
||||
/* Bug。*/
|
||||
$lang->resource->bug->index = 'index';
|
||||
$lang->resource->bug->browse = 'browse';
|
||||
$lang->resource->bug->create = 'create';
|
||||
$lang->resource->bug->view = 'view';
|
||||
$lang->resource->bug->edit = 'edit';
|
||||
$lang->resource->bug->resolve = 'resolve';
|
||||
$lang->resource->bug->activate = 'activate';
|
||||
$lang->resource->bug->close = 'close';
|
||||
$lang->resource->bug->report = 'reportChart';
|
||||
$lang->resource->bug->confirmStoryChange = 'confirmStoryChange';
|
||||
$lang->resource->bug->delete = 'delete';
|
||||
$lang->resource->bug->ajaxGetUserBugs = 'ajaxGetUserBugs';
|
||||
|
||||
/* 测试用例。*/
|
||||
$lang->resource->testcase->index = 'index';
|
||||
$lang->resource->testcase->browse = 'browse';
|
||||
$lang->resource->testcase->create = 'create';
|
||||
$lang->resource->testcase->view = 'view';
|
||||
$lang->resource->testcase->edit = 'edit';
|
||||
$lang->resource->testcase->delete = 'delete';
|
||||
$lang->resource->testcase->confirmStoryChange = 'confirmStoryChange';
|
||||
|
||||
/* 测试任务。*/
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->cases = 'lblCases';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
|
||||
/* 组织视图。*/
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
$lang->resource->company->edit = 'edit';
|
||||
|
||||
/* 部门。*/
|
||||
$lang->resource->dept->browse = 'browse';
|
||||
$lang->resource->dept->updateOrder = 'updateOrder';
|
||||
$lang->resource->dept->manageChild = 'manageChild';
|
||||
$lang->resource->dept->delete = 'delete';
|
||||
|
||||
/* 分组。*/
|
||||
$lang->resource->group->browse = 'browse';
|
||||
$lang->resource->group->create = 'create';
|
||||
$lang->resource->group->edit = 'edit';
|
||||
$lang->resource->group->copy = 'copy';
|
||||
$lang->resource->group->delete = 'delete';
|
||||
$lang->resource->group->managePriv = 'managePriv';
|
||||
$lang->resource->group->manageMember = 'manageMember';
|
||||
|
||||
/* 用户。*/
|
||||
$lang->resource->user->create = 'create';
|
||||
$lang->resource->user->view = 'view';
|
||||
$lang->resource->user->edit = 'edit';
|
||||
$lang->resource->user->delete = 'delete';
|
||||
$lang->resource->user->todo = 'todo';
|
||||
$lang->resource->user->task = 'task';
|
||||
$lang->resource->user->bug = 'bug';
|
||||
$lang->resource->user->project= 'project';
|
||||
$lang->resource->user->profile= 'profile';
|
||||
|
||||
/* 模块维护。*/
|
||||
$lang->resource->tree->browse = 'browse';
|
||||
$lang->resource->tree->updateOrder = 'updateOrder';
|
||||
$lang->resource->tree->manageChild = 'manageChild';
|
||||
$lang->resource->tree->edit = 'edit';
|
||||
$lang->resource->tree->delete = 'delete';
|
||||
$lang->resource->tree->ajaxGetOptionMenu = 'ajaxGetOptionMenu';
|
||||
|
||||
/* 搜索*/
|
||||
$lang->resource->search->buildForm = 'buildForm';
|
||||
$lang->resource->search->buildQuery = 'buildQuery';
|
||||
|
||||
/* 后台管理。*/
|
||||
$lang->resource->admin->index = 'index';
|
||||
|
||||
/* 其他的一些杂项。*/
|
||||
$lang->resource->api->getModel = 'getModel';
|
||||
$lang->resource->file->download = 'download';
|
||||
$lang->resource->file->export2CSV = 'export2CSV';
|
||||
$lang->resource->misc->ping = 'ping';
|
||||
$lang->resource->action->trash = 'trash';
|
||||
$lang->resource->action->undelete = 'undelete';
|
||||
<?php
|
||||
/**
|
||||
* The group module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->group->common = '权限分组';
|
||||
$lang->group->browse = '浏览分组';
|
||||
$lang->group->create = '新增分组';
|
||||
$lang->group->edit = '编辑分组';
|
||||
$lang->group->copy = '复制分组';
|
||||
$lang->group->delete = '删除分组';
|
||||
$lang->group->managePriv = '权限维护';
|
||||
$lang->group->manageMember = '成员维护';
|
||||
$lang->group->linkMember = '关联用户';
|
||||
$lang->group->unlinkMember = '移除用户';
|
||||
$lang->group->confirmDelete= '您确定删除该用户分组吗?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
|
||||
$lang->group->id = '编号';
|
||||
$lang->group->name = '分组名称';
|
||||
$lang->group->desc = '分组描述';
|
||||
$lang->group->users = '用户列表';
|
||||
$lang->group->module = '模块';
|
||||
$lang->group->method = '方法';
|
||||
$lang->group->priv = '权限';
|
||||
$lang->group->checkall = '全选';
|
||||
$lang->group->option = '选项';
|
||||
|
||||
$lang->group->copyOptions['copyPriv'] = '复制权限';
|
||||
$lang->group->copyOptions['copyUser'] = '复制用户';
|
||||
|
||||
//---------------------------- 所有resource列表-------------------------*/
|
||||
|
||||
/* 首页。*/
|
||||
$lang->resource->index->index = 'index';
|
||||
|
||||
/* 我的地盘。*/
|
||||
$lang->resource->my->index = 'index';
|
||||
$lang->resource->my->todo = 'todo';
|
||||
$lang->resource->my->task = 'task';
|
||||
$lang->resource->my->bug = 'bug';
|
||||
$lang->resource->my->story = 'story';
|
||||
$lang->resource->my->project = 'project';
|
||||
$lang->resource->my->profile = 'profile';
|
||||
$lang->resource->my->editProfile = 'editProfile';
|
||||
|
||||
/* todo。*/
|
||||
$lang->resource->todo->create = 'create';
|
||||
$lang->resource->todo->edit = 'edit';
|
||||
$lang->resource->todo->view = 'view';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->mark = 'mark';
|
||||
$lang->resource->todo->import2Today = 'import2Today';
|
||||
|
||||
/* 产品视图。*/
|
||||
$lang->resource->product->index = 'index';
|
||||
$lang->resource->product->browse = 'browse';
|
||||
$lang->resource->product->create = 'create';
|
||||
$lang->resource->product->view = 'view';
|
||||
$lang->resource->product->edit = 'edit';
|
||||
$lang->resource->product->delete = 'delete';
|
||||
$lang->resource->product->roadmap= 'roadmap';
|
||||
$lang->resource->product->ajaxGetProjects = 'ajaxGetProjects';
|
||||
$lang->resource->product->ajaxGetPlans = 'ajaxGetPlans';
|
||||
|
||||
/* 需求。*/
|
||||
$lang->resource->story->create = 'create';
|
||||
$lang->resource->story->edit = 'edit';
|
||||
$lang->resource->story->delete = 'delete';
|
||||
$lang->resource->story->view = 'view';
|
||||
$lang->resource->story->change = 'lblChange';
|
||||
$lang->resource->story->review = 'lblReview';
|
||||
$lang->resource->story->close = 'lblClose';
|
||||
$lang->resource->story->activate= 'lblActivate';
|
||||
$lang->resource->story->tasks = 'tasks';
|
||||
$lang->resource->story->ajaxGetProjectStories = 'ajaxGetProjectStories';
|
||||
$lang->resource->story->ajaxGetProductStories = 'ajaxGetProductStories';
|
||||
|
||||
/* 产品计划。*/
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
|
||||
/* 发布。*/
|
||||
$lang->resource->release->browse = 'browse';
|
||||
$lang->resource->release->create = 'create';
|
||||
$lang->resource->release->edit = 'edit';
|
||||
$lang->resource->release->delete = 'delete';
|
||||
$lang->resource->release->view = 'view';
|
||||
|
||||
/* 项目视图。*/
|
||||
$lang->resource->project->index = 'index';
|
||||
$lang->resource->project->view = 'view';
|
||||
$lang->resource->project->browse = 'browse';
|
||||
$lang->resource->project->create = 'create';
|
||||
$lang->resource->project->edit = 'edit';
|
||||
$lang->resource->project->delete = 'delete';
|
||||
$lang->resource->project->task = 'task';
|
||||
$lang->resource->project->grouptask = 'groupTask';
|
||||
$lang->resource->project->importtask = 'importTask';
|
||||
$lang->resource->project->story = 'story';
|
||||
$lang->resource->project->build = 'build';
|
||||
$lang->resource->project->bug = 'bug';
|
||||
$lang->resource->project->burn = 'burn';
|
||||
$lang->resource->project->burnData = 'burnData';
|
||||
$lang->resource->project->team = 'team';
|
||||
$lang->resource->project->manageProducts = 'manageProducts';
|
||||
//$lang->resource->project->manageChilds = 'manageChilds';
|
||||
$lang->resource->project->manageMembers = 'manageMembers';
|
||||
$lang->resource->project->unlinkMember = 'unlinkMember';
|
||||
$lang->resource->project->linkStory = 'linkStory';
|
||||
$lang->resource->project->unlinkStory = 'unlinkStory';
|
||||
|
||||
/* 任务。*/
|
||||
$lang->resource->task->create = 'create';
|
||||
$lang->resource->task->edit = 'edit';
|
||||
$lang->resource->task->delete = 'delete';
|
||||
$lang->resource->task->view = 'view';
|
||||
$lang->resource->task->confirmStoryChange = 'confirmStoryChange';
|
||||
$lang->resource->task->ajaxGetUserTasks = 'ajaxGetUserTasks';
|
||||
$lang->resource->task->ajaxGetProjectTasks = 'ajaxGetProjectTasks';
|
||||
|
||||
/* build。*/
|
||||
$lang->resource->build->create = 'create';
|
||||
$lang->resource->build->edit = 'edit';
|
||||
$lang->resource->build->delete = 'delete';
|
||||
$lang->resource->build->view = 'view';
|
||||
$lang->resource->build->ajaxGetProductBuilds = 'ajaxGetProductBuilds';
|
||||
$lang->resource->build->ajaxGetProjectBuilds = 'ajaxGetProjectBuilds';
|
||||
|
||||
/* QA视图。*/
|
||||
$lang->resource->qa->index = 'index';
|
||||
|
||||
/* Bug。*/
|
||||
$lang->resource->bug->index = 'index';
|
||||
$lang->resource->bug->browse = 'browse';
|
||||
$lang->resource->bug->create = 'create';
|
||||
$lang->resource->bug->view = 'view';
|
||||
$lang->resource->bug->edit = 'edit';
|
||||
$lang->resource->bug->resolve = 'resolve';
|
||||
$lang->resource->bug->activate = 'activate';
|
||||
$lang->resource->bug->close = 'close';
|
||||
$lang->resource->bug->report = 'reportChart';
|
||||
$lang->resource->bug->confirmStoryChange = 'confirmStoryChange';
|
||||
$lang->resource->bug->delete = 'delete';
|
||||
$lang->resource->bug->ajaxGetUserBugs = 'ajaxGetUserBugs';
|
||||
|
||||
/* 测试用例。*/
|
||||
$lang->resource->testcase->index = 'index';
|
||||
$lang->resource->testcase->browse = 'browse';
|
||||
$lang->resource->testcase->create = 'create';
|
||||
$lang->resource->testcase->view = 'view';
|
||||
$lang->resource->testcase->edit = 'edit';
|
||||
$lang->resource->testcase->delete = 'delete';
|
||||
$lang->resource->testcase->confirmStoryChange = 'confirmStoryChange';
|
||||
|
||||
/* 测试任务。*/
|
||||
$lang->resource->testtask->index = 'index';
|
||||
$lang->resource->testtask->create = 'create';
|
||||
$lang->resource->testtask->browse = 'browse';
|
||||
$lang->resource->testtask->view = 'view';
|
||||
$lang->resource->testtask->cases = 'lblCases';
|
||||
$lang->resource->testtask->edit = 'edit';
|
||||
$lang->resource->testtask->delete = 'delete';
|
||||
$lang->resource->testtask->batchAssign = 'batchAssign';
|
||||
$lang->resource->testtask->linkcase = 'linkCase';
|
||||
$lang->resource->testtask->unlinkcase = 'lblUnlinkCase';
|
||||
$lang->resource->testtask->runcase = 'lblRunCase';
|
||||
$lang->resource->testtask->results = 'lblResults';
|
||||
|
||||
/* 组织视图。*/
|
||||
$lang->resource->company->index = 'index';
|
||||
$lang->resource->company->browse = 'browse';
|
||||
$lang->resource->company->edit = 'edit';
|
||||
|
||||
/* 部门。*/
|
||||
$lang->resource->dept->browse = 'browse';
|
||||
$lang->resource->dept->updateOrder = 'updateOrder';
|
||||
$lang->resource->dept->manageChild = 'manageChild';
|
||||
$lang->resource->dept->delete = 'delete';
|
||||
|
||||
/* 分组。*/
|
||||
$lang->resource->group->browse = 'browse';
|
||||
$lang->resource->group->create = 'create';
|
||||
$lang->resource->group->edit = 'edit';
|
||||
$lang->resource->group->copy = 'copy';
|
||||
$lang->resource->group->delete = 'delete';
|
||||
$lang->resource->group->managePriv = 'managePriv';
|
||||
$lang->resource->group->manageMember = 'manageMember';
|
||||
|
||||
/* 用户。*/
|
||||
$lang->resource->user->create = 'create';
|
||||
$lang->resource->user->view = 'view';
|
||||
$lang->resource->user->edit = 'edit';
|
||||
$lang->resource->user->delete = 'delete';
|
||||
$lang->resource->user->todo = 'todo';
|
||||
$lang->resource->user->task = 'task';
|
||||
$lang->resource->user->bug = 'bug';
|
||||
$lang->resource->user->project= 'project';
|
||||
$lang->resource->user->profile= 'profile';
|
||||
|
||||
/* 模块维护。*/
|
||||
$lang->resource->tree->browse = 'browse';
|
||||
$lang->resource->tree->updateOrder = 'updateOrder';
|
||||
$lang->resource->tree->manageChild = 'manageChild';
|
||||
$lang->resource->tree->edit = 'edit';
|
||||
$lang->resource->tree->delete = 'delete';
|
||||
$lang->resource->tree->ajaxGetOptionMenu = 'ajaxGetOptionMenu';
|
||||
|
||||
/* 搜索*/
|
||||
$lang->resource->search->buildForm = 'buildForm';
|
||||
$lang->resource->search->buildQuery = 'buildQuery';
|
||||
|
||||
/* 后台管理。*/
|
||||
$lang->resource->admin->index = 'index';
|
||||
|
||||
/* 其他的一些杂项。*/
|
||||
$lang->resource->api->getModel = 'getModel';
|
||||
$lang->resource->file->download = 'download';
|
||||
$lang->resource->file->export2CSV = 'export2CSV';
|
||||
$lang->resource->misc->ping = 'ping';
|
||||
$lang->resource->action->trash = 'trash';
|
||||
$lang->resource->action->undelete = 'undelete';
|
||||
|
||||
@@ -1,161 +1,161 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class groupModel extends model
|
||||
{
|
||||
/* 为某一个公司添加分组。*/
|
||||
public function create()
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->get();
|
||||
return $this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->exec();
|
||||
}
|
||||
|
||||
/* 更新某一个分组信息。*/
|
||||
public function update($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->get();
|
||||
return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->where('id')->eq($groupID)->exec();
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 复制一个分组。*/
|
||||
public function copy($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->remove('options')->get();
|
||||
$this->dao->insert(TABLE_GROUP)->data($group)->check('name', 'unique')->check('name', 'notempty')->exec();
|
||||
if($this->post->options == false) return;
|
||||
if(!dao::isError())
|
||||
{
|
||||
$newGroupID = $this->dao->lastInsertID();
|
||||
$options = join(',', $this->post->options);
|
||||
if(strpos($options, 'copyPriv') !== false) $this->copyPriv($groupID, $newGroupID);
|
||||
if(strpos($options, 'copyUser') !== false) $this->copyUser($groupID, $newGroupID);
|
||||
}
|
||||
}
|
||||
|
||||
/* 拷贝权限。*/
|
||||
private function copyPriv($fromGroup, $toGroup)
|
||||
{
|
||||
$privs = $this->dao->findByGroup($fromGroup)->from(TABLE_GROUPPRIV)->fetchAll();
|
||||
foreach($privs as $priv)
|
||||
{
|
||||
$priv->group = $toGroup;
|
||||
$this->dao->insert(TABLE_GROUPPRIV)->data($priv)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 拷贝用户。*/
|
||||
private function copyUser($fromGroup, $toGroup)
|
||||
{
|
||||
$users = $this->dao->findByGroup($fromGroup)->from(TABLE_USERGROUP)->fetchAll();
|
||||
foreach($users as $user)
|
||||
{
|
||||
$user->group = $toGroup;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($user)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 获取某一个公司的分组列表。*/
|
||||
public function getList($companyID)
|
||||
{
|
||||
return $this->dao->findByCompany($companyID)->from(TABLE_GROUP)->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得分组的key => value对。*/
|
||||
public function getPairs()
|
||||
{
|
||||
return $this->dao->findByCompany($this->app->company->id)->fields('id, name')->from(TABLE_GROUP)->fetchPairs();
|
||||
}
|
||||
|
||||
/* 通过 id获取某一个分组信息。*/
|
||||
public function getByID($groupID)
|
||||
{
|
||||
return $this->dao->findById($groupID)->from(TABLE_GROUP)->fetch();
|
||||
}
|
||||
|
||||
/* 获得分组的权限列表。*/
|
||||
public function getPrivs($groupID)
|
||||
{
|
||||
$privs = array();
|
||||
$stmt = $this->dao->select('module, method')->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->orderBy('module')->query();
|
||||
while($priv = $stmt->fetch()) $privs[$priv->module][$priv->method] = $priv->method;
|
||||
return $privs;
|
||||
}
|
||||
|
||||
/* 获得分组的用户列表。*/
|
||||
public function getUserPairs($groupID)
|
||||
{
|
||||
return $this->dao->select('t2.account, t2.realname')
|
||||
->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('`group`')->eq((int)$groupID)
|
||||
->andWhere('t2.company')->eq($this->app->company->id)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/* 删除一个分组信息。*/
|
||||
public function delete($groupID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_GROUP)->where('id')->eq($groupID)->exec();
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->exec();
|
||||
}
|
||||
|
||||
/* 更新权限。*/
|
||||
public function updatePriv($groupID)
|
||||
{
|
||||
/* 先删除原来的记录。*/
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->exec();
|
||||
|
||||
/* 然后插入新的记录。*/
|
||||
if($this->post->actions == false) return;
|
||||
foreach($this->post->actions as $moduleName => $moduleActions)
|
||||
{
|
||||
foreach($moduleActions as $actionName)
|
||||
{
|
||||
$data->group = $groupID;
|
||||
$data->module = $moduleName;
|
||||
$data->method = $actionName;
|
||||
$this->dao->insert(TABLE_GROUPPRIV)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 更新成员。*/
|
||||
public function updateUser($groupID)
|
||||
{
|
||||
/* 先删除原来的记录。*/
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
|
||||
/* 然后插入新的记录。*/
|
||||
if($this->post->members == false) return;
|
||||
foreach($this->post->members as $account)
|
||||
{
|
||||
$data->account = $account;
|
||||
$data->group = $groupID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class groupModel extends model
|
||||
{
|
||||
/* 为某一个公司添加分组。*/
|
||||
public function create()
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->get();
|
||||
return $this->dao->insert(TABLE_GROUP)->data($group)->batchCheck($this->config->group->create->requiredFields, 'notempty')->exec();
|
||||
}
|
||||
|
||||
/* 更新某一个分组信息。*/
|
||||
public function update($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->get();
|
||||
return $this->dao->update(TABLE_GROUP)->data($group)->batchCheck($this->config->group->edit->requiredFields, 'notempty')->where('id')->eq($groupID)->exec();
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 复制一个分组。*/
|
||||
public function copy($groupID)
|
||||
{
|
||||
$group = fixer::input('post')->specialChars('name, desc')->remove('options')->get();
|
||||
$this->dao->insert(TABLE_GROUP)->data($group)->check('name', 'unique')->check('name', 'notempty')->exec();
|
||||
if($this->post->options == false) return;
|
||||
if(!dao::isError())
|
||||
{
|
||||
$newGroupID = $this->dao->lastInsertID();
|
||||
$options = join(',', $this->post->options);
|
||||
if(strpos($options, 'copyPriv') !== false) $this->copyPriv($groupID, $newGroupID);
|
||||
if(strpos($options, 'copyUser') !== false) $this->copyUser($groupID, $newGroupID);
|
||||
}
|
||||
}
|
||||
|
||||
/* 拷贝权限。*/
|
||||
private function copyPriv($fromGroup, $toGroup)
|
||||
{
|
||||
$privs = $this->dao->findByGroup($fromGroup)->from(TABLE_GROUPPRIV)->fetchAll();
|
||||
foreach($privs as $priv)
|
||||
{
|
||||
$priv->group = $toGroup;
|
||||
$this->dao->insert(TABLE_GROUPPRIV)->data($priv)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 拷贝用户。*/
|
||||
private function copyUser($fromGroup, $toGroup)
|
||||
{
|
||||
$users = $this->dao->findByGroup($fromGroup)->from(TABLE_USERGROUP)->fetchAll();
|
||||
foreach($users as $user)
|
||||
{
|
||||
$user->group = $toGroup;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($user)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/* 获取某一个公司的分组列表。*/
|
||||
public function getList($companyID)
|
||||
{
|
||||
return $this->dao->findByCompany($companyID)->from(TABLE_GROUP)->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得分组的key => value对。*/
|
||||
public function getPairs()
|
||||
{
|
||||
return $this->dao->findByCompany($this->app->company->id)->fields('id, name')->from(TABLE_GROUP)->fetchPairs();
|
||||
}
|
||||
|
||||
/* 通过 id获取某一个分组信息。*/
|
||||
public function getByID($groupID)
|
||||
{
|
||||
return $this->dao->findById($groupID)->from(TABLE_GROUP)->fetch();
|
||||
}
|
||||
|
||||
/* 获得分组的权限列表。*/
|
||||
public function getPrivs($groupID)
|
||||
{
|
||||
$privs = array();
|
||||
$stmt = $this->dao->select('module, method')->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->orderBy('module')->query();
|
||||
while($priv = $stmt->fetch()) $privs[$priv->module][$priv->method] = $priv->method;
|
||||
return $privs;
|
||||
}
|
||||
|
||||
/* 获得分组的用户列表。*/
|
||||
public function getUserPairs($groupID)
|
||||
{
|
||||
return $this->dao->select('t2.account, t2.realname')
|
||||
->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('`group`')->eq((int)$groupID)
|
||||
->andWhere('t2.company')->eq($this->app->company->id)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/* 删除一个分组信息。*/
|
||||
public function delete($groupID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_GROUP)->where('id')->eq($groupID)->exec();
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->exec();
|
||||
}
|
||||
|
||||
/* 更新权限。*/
|
||||
public function updatePriv($groupID)
|
||||
{
|
||||
/* 先删除原来的记录。*/
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('`group`')->eq($groupID)->exec();
|
||||
|
||||
/* 然后插入新的记录。*/
|
||||
if($this->post->actions == false) return;
|
||||
foreach($this->post->actions as $moduleName => $moduleActions)
|
||||
{
|
||||
foreach($moduleActions as $actionName)
|
||||
{
|
||||
$data->group = $groupID;
|
||||
$data->module = $moduleName;
|
||||
$data->method = $actionName;
|
||||
$this->dao->insert(TABLE_GROUPPRIV)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 更新成员。*/
|
||||
public function updateUser($groupID)
|
||||
{
|
||||
/* 先删除原来的记录。*/
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
|
||||
/* 然后插入新的记录。*/
|
||||
if($this->post->members == false) return;
|
||||
foreach($this->post->members as $account)
|
||||
{
|
||||
$data->account = $account;
|
||||
$data->group = $groupID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-1'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->group->browse;?></div>
|
||||
<div class='f-right'><?php echo html::a(inlink('create'), $lang->group->create);?></div>
|
||||
</caption>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->group->id;?></th>
|
||||
<th><?php echo $lang->group->name;?></th>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<th class='w-p60'><?php echo $lang->group->users;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($groups as $group):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $group->id;?></td>
|
||||
<td><?php echo $group->name;?></td>
|
||||
<td class='a-left'><?php echo $group->desc;?></td>
|
||||
<td class='a-left'><?php foreach($groupUsers[$group->id] as $user) echo $user . ' ';?></td>
|
||||
<td>
|
||||
<?php common::printLink('group', 'managepriv', "groupID=$group->id", $lang->group->managePriv);?>
|
||||
<?php common::printLink('group', 'managemember', "groupID=$group->id", $lang->group->manageMember);?>
|
||||
<?php common::printLink('group', 'edit', "groupID=$group->id", $lang->edit);?>
|
||||
<?php common::printLink('group', 'copy', "groupID=$group->id", $lang->copy);?>
|
||||
<?php common::printLink('group', 'delete', "groupID=$group->id", $lang->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table align='center' class='table-1'>
|
||||
<caption class='caption-tl'>
|
||||
<div class='f-left'><?php echo $lang->group->browse;?></div>
|
||||
<div class='f-right'><?php echo html::a(inlink('create'), $lang->group->create);?></div>
|
||||
</caption>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->group->id;?></th>
|
||||
<th><?php echo $lang->group->name;?></th>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<th class='w-p60'><?php echo $lang->group->users;?></th>
|
||||
<th><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<?php foreach($groups as $group):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $group->id;?></td>
|
||||
<td><?php echo $group->name;?></td>
|
||||
<td class='a-left'><?php echo $group->desc;?></td>
|
||||
<td class='a-left'><?php foreach($groupUsers[$group->id] as $user) echo $user . ' ';?></td>
|
||||
<td>
|
||||
<?php common::printLink('group', 'managepriv', "groupID=$group->id", $lang->group->managePriv);?>
|
||||
<?php common::printLink('group', 'managemember', "groupID=$group->id", $lang->group->manageMember);?>
|
||||
<?php common::printLink('group', 'edit', "groupID=$group->id", $lang->edit);?>
|
||||
<?php common::printLink('group', 'copy', "groupID=$group->id", $lang->copy);?>
|
||||
<?php common::printLink('group', 'delete', "groupID=$group->id", $lang->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* The copy view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->group->copy;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', $group->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->option;?></th>
|
||||
<td><?php echo html::checkbox('options', $lang->group->copyOptions);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The copy view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->group->copy;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', $group->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->option;?></th>
|
||||
<td><?php echo html::checkbox('options', $lang->group->copyOptions);?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4 a-left'>
|
||||
<caption><?php echo $lang->group->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class=text-1");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows=5 class=area-1");?></textarea></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The create view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4 a-left'>
|
||||
<caption><?php echo $lang->group->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class=text-1");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows=5 class=area-1");?></textarea></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->group->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', $group->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The edit view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->group->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><?php echo html::input('name', $group->name, "class='text-1'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='area-1'");?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2' class='a-center'><?php echo html::submitButton();?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->group->global;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'browse'), $lang->company->browse);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'create'), $lang->company->create);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'edit'), $lang->company->edit);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->group->user;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('user', 'browse'), $lang->user->browse);?><br />
|
||||
<?php echo html::a($this->createLink('user', 'create'), $lang->user->create);?><br />
|
||||
<?php echo html::a($this->createLink('group', 'browse'), $lang->group->browse);?><br />
|
||||
<?php echo html::a($this->createLink('group', 'create'), $lang->group->create);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->group->index;?></caption>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The index view file of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->group->global;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('company', 'browse'), $lang->company->browse);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'create'), $lang->company->create);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'edit'), $lang->company->edit);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->group->user;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('user', 'browse'), $lang->user->browse);?><br />
|
||||
<?php echo html::a($this->createLink('user', 'create'), $lang->user->create);?><br />
|
||||
<?php echo html::a($this->createLink('group', 'browse'), $lang->group->browse);?><br />
|
||||
<?php echo html::a($this->createLink('group', 'create'), $lang->group->create);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->group->index;?></caption>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The manage member view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>#users span{display:block; width:100px; float:left}</style>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $group->name . $lang->colon . $lang->group->manageMember;?></caption>
|
||||
<tr>
|
||||
<td id='users'><?php foreach($allUsers as $account => $realname) echo '<span>' . html::checkbox('members', array($account => $realname), $groupUsers) . '</span>';?></td>
|
||||
</tr>
|
||||
<tr><td class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->createLink('group', 'browse'));?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The manage member view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>#users span{display:block; width:100px; float:left}</style>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $group->name . $lang->colon . $lang->group->manageMember;?></caption>
|
||||
<tr>
|
||||
<td id='users'><?php foreach($allUsers as $account => $realname) echo '<span>' . html::checkbox('members', array($account => $realname), $groupUsers) . '</span>';?></td>
|
||||
</tr>
|
||||
<tr><td class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->createLink('group', 'browse'));?></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* The manage privilege view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script language="Javascript">
|
||||
function check(checker, module)
|
||||
{
|
||||
$('#' + module + ' input').each(function()
|
||||
{
|
||||
$(this).attr("checked", checker.checked)
|
||||
});
|
||||
}
|
||||
|
||||
function checkall(checker)
|
||||
{
|
||||
$('input').each(function()
|
||||
{
|
||||
$(this).attr("checked", checker.checked)
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1 a-left'>
|
||||
<caption class='caption-tl'><?php echo $group->name . $lang->colon . $lang->group->managePriv;?></caption>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->group->module;?></th>
|
||||
<th><?php echo $lang->group->method;?></th>
|
||||
</tr>
|
||||
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
|
||||
<tr class='f-14px <?php echo cycle('even, bg-yellow');?>'>
|
||||
<th class='a-right'><?php echo $this->lang->$moduleName->common;?> <input type='checkbox' onclick='check(this, "<?php echo $moduleName;?>")'></td>
|
||||
<td id='<?php echo $moduleName;?>' class='pv-10px'>
|
||||
<?php $i = 1;?>
|
||||
<?php foreach($moduleActions as $action => $actionLabel):?>
|
||||
<div class='w-p20 f-left'><input type='checkbox' name='actions[<?php echo $moduleName;?>][]' value='<?php echo $action;?>' <?php if(isset($groupPrivs[$moduleName][$action])) echo "checked";?> /> <?php echo $lang->$moduleName->$actionLabel;?></div>
|
||||
<?php if(($i % 4) == 0) echo "<div class='c-both'></div>"; $i ++;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->checkall;?><input type='checkbox' onclick='checkall(this);'></th>
|
||||
<td class='a-center'><?php echo html::submitButton($lang->save, 'name="submit"') . html::linkButton($lang->goback, $this->createLink('group', 'browse'));?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The manage privilege view of group module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script language="Javascript">
|
||||
function check(checker, module)
|
||||
{
|
||||
$('#' + module + ' input').each(function()
|
||||
{
|
||||
$(this).attr("checked", checker.checked)
|
||||
});
|
||||
}
|
||||
|
||||
function checkall(checker)
|
||||
{
|
||||
$('input').each(function()
|
||||
{
|
||||
$(this).attr("checked", checker.checked)
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class='yui-d0'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table-1 a-left'>
|
||||
<caption class='caption-tl'><?php echo $group->name . $lang->colon . $lang->group->managePriv;?></caption>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->group->module;?></th>
|
||||
<th><?php echo $lang->group->method;?></th>
|
||||
</tr>
|
||||
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
|
||||
<tr class='f-14px <?php echo cycle('even, bg-yellow');?>'>
|
||||
<th class='a-right'><?php echo $this->lang->$moduleName->common;?> <input type='checkbox' onclick='check(this, "<?php echo $moduleName;?>")'></td>
|
||||
<td id='<?php echo $moduleName;?>' class='pv-10px'>
|
||||
<?php $i = 1;?>
|
||||
<?php foreach($moduleActions as $action => $actionLabel):?>
|
||||
<div class='w-p20 f-left'><input type='checkbox' name='actions[<?php echo $moduleName;?>][]' value='<?php echo $action;?>' <?php if(isset($groupPrivs[$moduleName][$action])) echo "checked";?> /> <?php echo $lang->$moduleName->$actionLabel;?></div>
|
||||
<?php if(($i % 4) == 0) echo "<div class='c-both'></div>"; $i ++;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->checkall;?><input type='checkbox' onclick='checkall(this);'></th>
|
||||
<td class='a-center'><?php echo html::submitButton($lang->save, 'name="submit"') . html::linkButton($lang->goback, $this->createLink('group', 'browse'));?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of index module of ZenTaoMS.
|
||||
*
|
||||
* When requests the root of a website, this index module will be called.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class index extends control
|
||||
{
|
||||
/* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD>*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('product');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->loadModel('report');
|
||||
$this->view->header->title = $this->lang->index->common;
|
||||
|
||||
$burns = array();
|
||||
$projects = $this->project->getList('doing');
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$dataXML = $this->report->createSingleXML($this->project->getBurnData($project->id), $this->lang->project->charts->burn->graph);
|
||||
$burns[$project->id] = $this->report->createJSChart('line', $dataXML, 'auto', 260);
|
||||
}
|
||||
$projectGroups = array_chunk($projects, 2);
|
||||
|
||||
$this->view->projectGroups = $projectGroups;
|
||||
$this->view->burns = $burns;
|
||||
$this->view->counts = count($projects);
|
||||
$this->view->actions = $this->loadModel('action')->getDynamic('all', 30);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users['guest']= 'guest'; // append the guest account.
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD>ơ<EFBFBD>*/
|
||||
public function testext()
|
||||
{
|
||||
echo $this->fetch('misc', 'getsid');
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of index module of ZenTaoMS.
|
||||
*
|
||||
* When requests the root of a website, this index module will be called.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class index extends control
|
||||
{
|
||||
/* <20><><EFBFBD>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD>*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('product');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->loadModel('report');
|
||||
$this->view->header->title = $this->lang->index->common;
|
||||
|
||||
$burns = array();
|
||||
$projects = $this->project->getList('doing');
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$dataXML = $this->report->createSingleXML($this->project->getBurnData($project->id), $this->lang->project->charts->burn->graph);
|
||||
$burns[$project->id] = $this->report->createJSChart('line', $dataXML, 'auto', 260);
|
||||
}
|
||||
$projectGroups = array_chunk($projects, 2);
|
||||
|
||||
$this->view->projectGroups = $projectGroups;
|
||||
$this->view->burns = $burns;
|
||||
$this->view->counts = count($projects);
|
||||
$this->view->actions = $this->loadModel('action')->getDynamic('all', 30);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->users['guest']= 'guest'; // append the guest account.
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9><EFBFBD>ơ<EFBFBD>*/
|
||||
public function testext()
|
||||
{
|
||||
echo $this->fetch('misc', 'getsid');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* The index module simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
$lang->index->ping = '接口:同步session';
|
||||
$lang->index->latest = '最新动态';
|
||||
$lang->index->action = '%s, %s <i>%s</i> %s <strong>%s</strong>';
|
||||
<?php
|
||||
/**
|
||||
* The index module simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
$lang->index->ping = '接口:同步session';
|
||||
$lang->index->latest = '最新动态';
|
||||
$lang->index->action = '%s, %s <i>%s</i> %s <strong>%s</strong>';
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* The index module simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
$lang->index->ping = '接口:同步session';
|
||||
$lang->index->latest = '最新动态';
|
||||
$lang->index->action = '%s, %s <i>%s</i> %s <strong>%s</strong>。';
|
||||
<?php
|
||||
/**
|
||||
* The index module simplified chinese file of ZenTaoMS.
|
||||
*
|
||||
* This file should be UTF-8 encoded.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
$lang->index->ping = '接口:同步session';
|
||||
$lang->index->latest = '最新动态';
|
||||
$lang->index->action = '%s, %s <i>%s</i> %s <strong>%s</strong>。';
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of index module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class indexModel extends model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function stat()
|
||||
{
|
||||
return get_included_files();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The model file of index module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class indexModel extends model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function stat()
|
||||
{
|
||||
return get_included_files();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of index module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<div class="yui-d0 yui-t6">
|
||||
<div class='yui-main'>
|
||||
<div class='yui-b'>
|
||||
<?php foreach($projectGroups as $projects):?>
|
||||
<div class="yui-g">
|
||||
<?php foreach($projects as $key => $project):?>
|
||||
<?php
|
||||
$class = 0;
|
||||
if($key == 0) $class = 'first';
|
||||
if($key == 2) break;
|
||||
?>
|
||||
<div class="yui-u <?php echo $class;?> mb-10px">
|
||||
<div class='box-title'>
|
||||
<div class='a-center'>
|
||||
<?php
|
||||
echo html::a($this->createLink('project', 'browse', "projectid=$project->id"), $project->name);
|
||||
echo '(' . $project->begin . ' ~ ' . $project->end . ')';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-content a-center'>
|
||||
<?php
|
||||
echo $burns[$project->id];
|
||||
echo html::linkButton($lang->project->largeBurnChart, $this->createLink('project', 'burn', "projectID=$project->id"));
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='yui-b'>
|
||||
<table class='table-1 colored'>
|
||||
<caption><?php echo $lang->index->latest;?></caption>
|
||||
<?php
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
|
||||
echo "<tr><td>";
|
||||
printf($lang->index->action, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink);
|
||||
echo "</td></tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script language='Javascript'><?php for($i = 1; $i <= $counts; $i ++) echo "createChart$i();"; ?></script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of index module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/colorize.html.php';?>
|
||||
<div class="yui-d0 yui-t6">
|
||||
<div class='yui-main'>
|
||||
<div class='yui-b'>
|
||||
<?php foreach($projectGroups as $projects):?>
|
||||
<div class="yui-g">
|
||||
<?php foreach($projects as $key => $project):?>
|
||||
<?php
|
||||
$class = 0;
|
||||
if($key == 0) $class = 'first';
|
||||
if($key == 2) break;
|
||||
?>
|
||||
<div class="yui-u <?php echo $class;?> mb-10px">
|
||||
<div class='box-title'>
|
||||
<div class='a-center'>
|
||||
<?php
|
||||
echo html::a($this->createLink('project', 'browse', "projectid=$project->id"), $project->name);
|
||||
echo '(' . $project->begin . ' ~ ' . $project->end . ')';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-content a-center'>
|
||||
<?php
|
||||
echo $burns[$project->id];
|
||||
echo html::linkButton($lang->project->largeBurnChart, $this->createLink('project', 'burn', "projectID=$project->id"));
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='yui-b'>
|
||||
<table class='table-1 colored'>
|
||||
<caption><?php echo $lang->index->latest;?></caption>
|
||||
<?php
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
|
||||
echo "<tr><td>";
|
||||
printf($lang->index->action, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink);
|
||||
echo "</td></tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script language='Javascript'><?php for($i = 1; $i <= $counts; $i ++) echo "createChart$i();"; ?></script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,131 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of install currentModule of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class install extends control
|
||||
{
|
||||
/* 构造函数,检查是否是通过安装入口调用。*/
|
||||
public function __construct()
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/* 安装程序首页。*/
|
||||
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;
|
||||
|
||||
/* 获得官方网站最新的版本。*/
|
||||
$snoopy = $this->app->loadClass('snoopy');
|
||||
if($snoopy->fetchText('http://www.zentaoms.com/misc-getlatestrelease.json'))
|
||||
{
|
||||
$result = json_decode($snoopy->results);
|
||||
if(isset($result->release) and $this->config->version != $result->release->version)
|
||||
{
|
||||
$this->view->latestRelease = $result->release;
|
||||
}
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 第一步: 系统检查。*/
|
||||
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->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();
|
||||
}
|
||||
|
||||
/* 第二步:配置表单。*/
|
||||
public function step2()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->setConfig;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 生成配置文件。*/
|
||||
public function step3()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$return = $this->install->checkConfig();
|
||||
if($return->result == 'ok')
|
||||
{
|
||||
$this->view = (object)$_POST;
|
||||
$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'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 第四步,创建公司,生成管理员帐号。*/
|
||||
public function step4()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->install->grantPriv();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('upgrade')->updateVersion($this->config->version);
|
||||
echo (js::alert($this->lang->install->success));
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
die(js::locate('index.php', '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();
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* The control file of install currentModule of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
class install extends control
|
||||
{
|
||||
/* 构造函数,检查是否是通过安装入口调用。*/
|
||||
public function __construct()
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/* 安装程序首页。*/
|
||||
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;
|
||||
|
||||
/* 获得官方网站最新的版本。*/
|
||||
$snoopy = $this->app->loadClass('snoopy');
|
||||
if($snoopy->fetchText('http://www.zentaoms.com/misc-getlatestrelease.json'))
|
||||
{
|
||||
$result = json_decode($snoopy->results);
|
||||
if(isset($result->release) and $this->config->version != $result->release->version)
|
||||
{
|
||||
$this->view->latestRelease = $result->release;
|
||||
}
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 第一步: 系统检查。*/
|
||||
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->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();
|
||||
}
|
||||
|
||||
/* 第二步:配置表单。*/
|
||||
public function step2()
|
||||
{
|
||||
$this->view->header->title = $this->lang->install->setConfig;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 生成配置文件。*/
|
||||
public function step3()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$return = $this->install->checkConfig();
|
||||
if($return->result == 'ok')
|
||||
{
|
||||
$this->view = (object)$_POST;
|
||||
$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'));
|
||||
}
|
||||
}
|
||||
|
||||
/* 第四步,创建公司,生成管理员帐号。*/
|
||||
public function step4()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->install->grantPriv();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('upgrade')->updateVersion($this->config->version);
|
||||
echo (js::alert($this->lang->install->success));
|
||||
unset($_SESSION['installing']);
|
||||
session_destroy();
|
||||
die(js::locate('index.php', '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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* The install module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->install->common = '安装';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '错误 ';
|
||||
|
||||
$lang->install->start = '开始安装';
|
||||
$lang->install->welcome = '欢迎使用禅道项目管理软件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
EOT;
|
||||
|
||||
$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->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->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
$lang->install->dbPort = '服务器端口';
|
||||
$lang->install->dbUser = '数据库用户名';
|
||||
$lang->install->dbPassword = '数据库密码';
|
||||
$lang->install->dbName = 'PMS使用的库';
|
||||
$lang->install->dbPrefix = '建表使用的前缀';
|
||||
$lang->install->createDB = '自动创建数据库';
|
||||
$lang->install->clearDB = '清空现有数据';
|
||||
|
||||
$lang->install->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$lang->install->errorCreateTable = '创建表失败';
|
||||
|
||||
$lang->install->setConfig = '生成配置文件';
|
||||
$lang->install->key = '配置项';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置文件';
|
||||
$lang->install->save2File = '拷贝上面文本框中的内容,将其保存到 " %s "中。';
|
||||
$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 = "安装成功!请删除install.php,登录禅道管理系统,设置用户及分组!";
|
||||
|
||||
<?php
|
||||
/**
|
||||
* The install module english file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$lang->install->common = '安装';
|
||||
$lang->install->next = '下一步';
|
||||
$lang->install->pre = '返回';
|
||||
$lang->install->reload = '刷新';
|
||||
$lang->install->error = '错误 ';
|
||||
|
||||
$lang->install->start = '开始安装';
|
||||
$lang->install->welcome = '欢迎使用禅道项目管理软件!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
EOT;
|
||||
|
||||
$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->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->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
$lang->install->dbPort = '服务器端口';
|
||||
$lang->install->dbUser = '数据库用户名';
|
||||
$lang->install->dbPassword = '数据库密码';
|
||||
$lang->install->dbName = 'PMS使用的库';
|
||||
$lang->install->dbPrefix = '建表使用的前缀';
|
||||
$lang->install->createDB = '自动创建数据库';
|
||||
$lang->install->clearDB = '清空现有数据';
|
||||
|
||||
$lang->install->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$lang->install->errorCreateTable = '创建表失败';
|
||||
|
||||
$lang->install->setConfig = '生成配置文件';
|
||||
$lang->install->key = '配置项';
|
||||
$lang->install->value = '值';
|
||||
$lang->install->saveConfig = '保存配置文件';
|
||||
$lang->install->save2File = '拷贝上面文本框中的内容,将其保存到 " %s "中。';
|
||||
$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 = "安装成功!请删除install.php,登录禅道管理系统,设置用户及分组!";
|
||||
|
||||
|
||||
@@ -1,107 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$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 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->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->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
$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->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$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 = "安装成功!请删除install.php,登录禅道管理系统,设置用户及分组!";
|
||||
|
||||
<?php
|
||||
/**
|
||||
* The install module zh-cn file of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
$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 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->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->requestTypes['GET'] = '普通方式';
|
||||
$lang->install->requestTypes['PATH_INFO'] = '静态友好方式';
|
||||
$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->errorConnectDB = '数据库连接失败 ';
|
||||
$lang->install->errorCreateDB = '数据库创建失败';
|
||||
$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 = "安装成功!请删除install.php,登录禅道管理系统,设置用户及分组!";
|
||||
|
||||
|
||||
@@ -1,249 +1,249 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class installModel extends model
|
||||
{
|
||||
/* 检查禅道的版本。*/
|
||||
public function checkZenTaoVersion()
|
||||
{
|
||||
}
|
||||
|
||||
/* 获得PHP版本。*/
|
||||
public function getPhpVersion()
|
||||
{
|
||||
return PHP_VERSION;
|
||||
}
|
||||
|
||||
/* 检查PHP版本是否符合要求。*/
|
||||
public function checkPHP()
|
||||
{
|
||||
return $result = version_compare(PHP_VERSION, '5.2.0') >= 0 ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 检查PDO扩展是否载入。*/
|
||||
public function checkPDO()
|
||||
{
|
||||
return $result = extension_loaded('pdo') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 检查PDO_MySQL扩展是否载入。*/
|
||||
public function checkPDOMySQL()
|
||||
{
|
||||
return $result = extension_loaded('pdo_mysql') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得tmpRoot目录的信息。*/
|
||||
public function getTmpRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getTmpRoot();
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* 检查tmpRoot目录权限。*/
|
||||
public function checkTmpRoot()
|
||||
{
|
||||
$tmpRoot = $this->app->getTmpRoot();
|
||||
return $result = (is_dir($tmpRoot) and is_writable($tmpRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得DataRoot目录的信息。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 检查dataRoot目录权限。*/
|
||||
public function checkDataRoot()
|
||||
{
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
return $result = (is_dir($dataRoot) and is_writable($dataRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得INI文件的信息。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 获得webRoot的地址。*/
|
||||
public function getWebRoot()
|
||||
{
|
||||
return rtrim(str_replace('\\', '/', pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)), '/') . '/';
|
||||
}
|
||||
|
||||
/* 检查配置。*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$return->result = 'ok';
|
||||
|
||||
/* 连接到数据库。*/
|
||||
$this->setDBParam();
|
||||
$this->dbh = $this->connectDB();
|
||||
if(!is_object($this->dbh))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorConnectDB . $this->dbh;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* 获得数据库版本。*/
|
||||
$version = $this->getMysqlVersion();
|
||||
|
||||
/* 数据库不存在,尝试建之。*/
|
||||
if(!$this->dbExists())
|
||||
{
|
||||
if(!$this->createDB($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateDB;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
/* 创建表。*/
|
||||
if(!$this->createTable($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateTable;
|
||||
return $return;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* 设置数据库参数。*/
|
||||
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;
|
||||
|
||||
}
|
||||
/* 连接到数据库。*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/* 判断数据库是否存在。*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->config->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* 获得mysql的版本号。*/
|
||||
public function getMysqlVersion()
|
||||
{
|
||||
$sql = "SELECT VERSION() AS version";
|
||||
$result = $this->dbh->query($sql)->fetch();
|
||||
return substr($result->version, 0, 3);
|
||||
}
|
||||
|
||||
/* 创建数据库。*/
|
||||
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);
|
||||
}
|
||||
|
||||
/* 创建表。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 生成公司,设立管理员帐号。*/
|
||||
public function grantPriv()
|
||||
{
|
||||
if($this->post->password == '') die(js::error($this->lang->install->errorEmptyPassword));
|
||||
|
||||
/* 先插入公司。*/
|
||||
$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())
|
||||
{
|
||||
/* 设置管理员。*/
|
||||
$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();
|
||||
|
||||
/* 更新group和group表的company字段。*/
|
||||
$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 ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package install
|
||||
* @version $Id$
|
||||
* @link http://www.zentaoms.com
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class installModel extends model
|
||||
{
|
||||
/* 检查禅道的版本。*/
|
||||
public function checkZenTaoVersion()
|
||||
{
|
||||
}
|
||||
|
||||
/* 获得PHP版本。*/
|
||||
public function getPhpVersion()
|
||||
{
|
||||
return PHP_VERSION;
|
||||
}
|
||||
|
||||
/* 检查PHP版本是否符合要求。*/
|
||||
public function checkPHP()
|
||||
{
|
||||
return $result = version_compare(PHP_VERSION, '5.2.0') >= 0 ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 检查PDO扩展是否载入。*/
|
||||
public function checkPDO()
|
||||
{
|
||||
return $result = extension_loaded('pdo') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 检查PDO_MySQL扩展是否载入。*/
|
||||
public function checkPDOMySQL()
|
||||
{
|
||||
return $result = extension_loaded('pdo_mysql') ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得tmpRoot目录的信息。*/
|
||||
public function getTmpRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getTmpRoot();
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/* 检查tmpRoot目录权限。*/
|
||||
public function checkTmpRoot()
|
||||
{
|
||||
$tmpRoot = $this->app->getTmpRoot();
|
||||
return $result = (is_dir($tmpRoot) and is_writable($tmpRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得DataRoot目录的信息。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 检查dataRoot目录权限。*/
|
||||
public function checkDataRoot()
|
||||
{
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
return $result = (is_dir($dataRoot) and is_writable($dataRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
/* 获得INI文件的信息。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 获得webRoot的地址。*/
|
||||
public function getWebRoot()
|
||||
{
|
||||
return rtrim(str_replace('\\', '/', pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_DIRNAME)), '/') . '/';
|
||||
}
|
||||
|
||||
/* 检查配置。*/
|
||||
public function checkConfig()
|
||||
{
|
||||
$return->result = 'ok';
|
||||
|
||||
/* 连接到数据库。*/
|
||||
$this->setDBParam();
|
||||
$this->dbh = $this->connectDB();
|
||||
if(!is_object($this->dbh))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorConnectDB . $this->dbh;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* 获得数据库版本。*/
|
||||
$version = $this->getMysqlVersion();
|
||||
|
||||
/* 数据库不存在,尝试建之。*/
|
||||
if(!$this->dbExists())
|
||||
{
|
||||
if(!$this->createDB($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateDB;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
/* 创建表。*/
|
||||
if(!$this->createTable($version))
|
||||
{
|
||||
$return->result = 'fail';
|
||||
$return->error = $this->lang->install->errorCreateTable;
|
||||
return $return;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* 设置数据库参数。*/
|
||||
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;
|
||||
|
||||
}
|
||||
/* 连接到数据库。*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/* 判断数据库是否存在。*/
|
||||
public function dbExists()
|
||||
{
|
||||
$sql = "SHOW DATABASES like '{$this->config->db->name}'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* 获得mysql的版本号。*/
|
||||
public function getMysqlVersion()
|
||||
{
|
||||
$sql = "SELECT VERSION() AS version";
|
||||
$result = $this->dbh->query($sql)->fetch();
|
||||
return substr($result->version, 0, 3);
|
||||
}
|
||||
|
||||
/* 创建数据库。*/
|
||||
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);
|
||||
}
|
||||
|
||||
/* 创建表。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 生成公司,设立管理员帐号。*/
|
||||
public function grantPriv()
|
||||
{
|
||||
if($this->post->password == '') die(js::error($this->lang->install->errorEmptyPassword));
|
||||
|
||||
/* 先插入公司。*/
|
||||
$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())
|
||||
{
|
||||
/* 设置管理员。*/
|
||||
$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();
|
||||
|
||||
/* 更新group和group表的company字段。*/
|
||||
$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,17 +1,17 @@
|
||||
<script language='Javascript'>var needPing = false;</script>
|
||||
<div class='yui-d0'>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' class='hiddenwin'></iframe>
|
||||
</div>
|
||||
<div id='footer' class='yui-d0 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-g first' id='crumbs'></div>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-u first'> </div>
|
||||
<div class='yui-u a-right'>
|
||||
<span id='poweredby'>powered by <a href='http://www.zentao.cn' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script language='Javascript'>var needPing = false;</script>
|
||||
<div class='yui-d0'>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' class='hiddenwin'></iframe>
|
||||
</div>
|
||||
<div id='footer' class='yui-d0 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-g first' id='crumbs'></div>
|
||||
<div class='yui-g'>
|
||||
<div class='yui-u first'> </div>
|
||||
<div class='yui-u a-right'>
|
||||
<span id='poweredby'>powered by <a href='http://www.zentaoms.com' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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)):?>
|
||||
<h3 class='a-center'><?php echo html::a($this->createLink('install', 'step1'), $lang->install->start);?></h3>
|
||||
<?php else:?>
|
||||
<?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 endif;?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of index method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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)):?>
|
||||
<h3 class='a-center'><?php echo html::a($this->createLink('install', 'step1'), $lang->install->start);?></h3>
|
||||
<?php else:?>
|
||||
<?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 endif;?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
@@ -1,104 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step1 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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->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>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step1 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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->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>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
@@ -1,71 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step2 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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><?php echo $lang->install->value?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->webRoot;?></th>
|
||||
<td><?php echo html::input('webRoot', $webRoot);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->requestType;?></th>
|
||||
<td><?php echo html::radio('requestType', $lang->install->requestTypes, 'GET');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbHost;?></th>
|
||||
<td><?php echo html::input('dbHost', 'localhost');?><?php echo $lang->install->dbHostNote;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPort;?></th>
|
||||
<td><?php echo html::input('dbPort', '3306');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbUser;?></th>
|
||||
<td><?php echo html::input('dbUser', 'root');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPassword;?></th>
|
||||
<td><?php echo html::input('dbPassword');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbName;?></th>
|
||||
<td><?php echo html::input('dbName', 'zentao');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPrefix;?></th>
|
||||
<td><?php echo html::input('dbPrefix', 'zt_') . html::checkBox('clearDB', $lang->install->clearDB);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step2 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 <EFBFBD>ൺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>촴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<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><?php echo $lang->install->value?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->webRoot;?></th>
|
||||
<td><?php echo html::input('webRoot', $webRoot);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->requestType;?></th>
|
||||
<td><?php echo html::radio('requestType', $lang->install->requestTypes, 'GET');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbHost;?></th>
|
||||
<td><?php echo html::input('dbHost', 'localhost');?><?php echo $lang->install->dbHostNote;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPort;?></th>
|
||||
<td><?php echo html::input('dbPort', '3306');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbUser;?></th>
|
||||
<td><?php echo html::input('dbUser', 'root');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPassword;?></th>
|
||||
<td><?php echo html::input('dbPassword');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbName;?></th>
|
||||
<td><?php echo html::input('dbName', 'zentao');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->dbPrefix;?></th>
|
||||
<td><?php echo html::input('dbPrefix', 'zt_') . html::checkBox('clearDB', $lang->install->clearDB);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
@@ -1,85 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step3 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php
|
||||
if(!isset($error))
|
||||
{
|
||||
$configContent = <<<EOT
|
||||
<?php
|
||||
\$config->installed = true; //标志是否已经安装。
|
||||
\$config->debug = false; //是否打开debug功能。如果系统运行不正常,可将其设为true。
|
||||
\$config->requestType = '$requestType'; //如何获取当前请求的信息,可选值:PATH_INFO|GET。
|
||||
\$config->db->host = '$dbHost'; //mysql主机。
|
||||
\$config->db->port = '$dbPort'; //mysql主机端口号。
|
||||
\$config->db->name = '$dbName'; //数据库名称。
|
||||
\$config->db->user = '$dbUser'; //数据库用户名。
|
||||
\$config->db->password = '$dbPassword'; //密码。
|
||||
\$config->db->prefix = '$dbPrefix'; //表前缀。
|
||||
\$config->webRoot = '{$this->post->webRoot}'; //web网站的根目录。如果后面pms的目录有变化,需要修改此选项。
|
||||
\$config->default->domain = '$domain'; //默认域名。
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
<div class='yui-d0'>
|
||||
<?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;?>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
<?php
|
||||
/**
|
||||
* The html template file of step3 method of install module of ZenTaoMS.
|
||||
*
|
||||
* ZenTaoMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ZenTaoMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id$
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php
|
||||
if(!isset($error))
|
||||
{
|
||||
$configContent = <<<EOT
|
||||
<?php
|
||||
\$config->installed = true; //标志是否已经安装。
|
||||
\$config->debug = false; //是否打开debug功能。如果系统运行不正常,可将其设为true。
|
||||
\$config->requestType = '$requestType'; //如何获取当前请求的信息,可选值:PATH_INFO|GET。
|
||||
\$config->db->host = '$dbHost'; //mysql主机。
|
||||
\$config->db->port = '$dbPort'; //mysql主机端口号。
|
||||
\$config->db->name = '$dbName'; //数据库名称。
|
||||
\$config->db->user = '$dbUser'; //数据库用户名。
|
||||
\$config->db->password = '$dbPassword'; //密码。
|
||||
\$config->db->prefix = '$dbPrefix'; //表前缀。
|
||||
\$config->webRoot = '{$this->post->webRoot}'; //web网站的根目录。如果后面pms的目录有变化,需要修改此选项。
|
||||
\$config->default->domain = '$domain'; //默认域名。
|
||||
EOT;
|
||||
}
|
||||
?>
|
||||
<div class='yui-d0'>
|
||||
<?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;?>
|
||||
</div>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user