+ import from my local subversion server.
This commit is contained in:
21
trunk/Makefile
Normal file
21
trunk/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
VERSION=$(shell head -n 1 VERSION)
|
||||
|
||||
all: tgz
|
||||
|
||||
clean:
|
||||
rm -fr pms
|
||||
rm -fr *.tar.gz
|
||||
tgz:
|
||||
mkdir -p pms/lib
|
||||
mkdir -p pms/doc
|
||||
cp doc/zentao.mysql4.sql pms/doc/zentao.sql
|
||||
cp doc/COPY* pms
|
||||
cp -fr lib/front pms/lib
|
||||
cp -fr config pms/
|
||||
cp -fr www pms/
|
||||
cp -fr module pms/
|
||||
find pms -name .svn |xargs rm -fr
|
||||
find pms -name tests |xargs rm -fr
|
||||
mkdir pms/cache
|
||||
tar czvf ZenTaoPMS.$(VERSION).tar.gz pms
|
||||
rm -fr pms
|
||||
1
trunk/VERSION
Normal file
1
trunk/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
0.2.ALPHA
|
||||
156
trunk/bin/convertfrombugfree.php
Normal file
156
trunk/bin/convertfrombugfree.php
Normal file
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
/* <20><> BugFreeת<65><D7AA><EFBFBD><EFBFBD>zentaopms<6D><73>*/
|
||||
$companyID = 1;
|
||||
$myLink = mysql_connect('localhost', 'root', 'zentao');
|
||||
mysql_select_db('Backyard');
|
||||
mysql_query('SET NAMES UTF8', $myLink);
|
||||
clear();
|
||||
convertUser();
|
||||
convertProject();
|
||||
convertModule();
|
||||
convertBug();
|
||||
convertAction();
|
||||
fixModulePath();
|
||||
|
||||
function convertUser()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
$sql = "SELECT * FROM BugUser";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($user = mysql_fetch_assoc($result))
|
||||
{
|
||||
extract($user);
|
||||
$sql = "INSERT INTO zt_user(company, id, account, password, realname, email) values('$companyID', $UserID, '$UserName', '$UserPassword', '$RealName', '$Email')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
$sql = "SELECT OpenedBy AS UserName FROM BugInfo GROUP BY OpenedBy";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($user = mysql_fetch_assoc($result))
|
||||
{
|
||||
extract($user);
|
||||
$sql = "SELECT * FROM zt_user WHERE account = '$UserName'";
|
||||
if(!mysql_fetch_row(mysql_query($sql)))
|
||||
{
|
||||
$sql = "INSERT INTO zt_user(company, account) values('$companyID', '$UserName')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
$sql = "INSERT INTO zt_user(company, account) values('$companyID', 'liyp')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
|
||||
}
|
||||
|
||||
function convertProject()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
$sql = "SELECT * FROM BugProject";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($project = mysql_fetch_assoc($result))
|
||||
{
|
||||
extract($project);
|
||||
$sql = "INSERT INTO zt_product(id, name, company) values('$ProjectID', '$ProjectName', '$companyID')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
|
||||
function convertModule()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
$sql = "SELECT * FROM BugModule";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($module = mysql_fetch_assoc($result))
|
||||
{
|
||||
extract($module);
|
||||
$sql = "INSERT INTO zt_module(id, product, name, parent, grade, view) values($ModuleID, $ProjectID, '$ModuleName', $ParentID, $ModuleGrade, 'bug')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
|
||||
function convertBug()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
$sql = "SELECT * FROM BugInfo";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($bug = mysql_fetch_assoc($result))
|
||||
{
|
||||
foreach($bug as $key => $value)
|
||||
{
|
||||
if(strpos($key, 'Date')) $bug[$key] = strtotime($value);
|
||||
}
|
||||
extract($bug);
|
||||
$sql = "INSERT INTO zt_bug(id, product, module, title, severity, type, os,status, mailto,
|
||||
openedby, openedDate,openedBuild, assignedTo,assignedDate,
|
||||
resolvedBy, resolution, resolvedBuild, resolvedDate,
|
||||
closedBy, closedDate, lastEditedBy, lastEditedDate
|
||||
) values($BugID, '$ProjectID', '$ModuleID', '$BugTitle', '$BugSeverity', '$BugType', '$BugOS', '$BugStatus', '$MailTo',
|
||||
'$OpenedBy', '$OpenedDate', '$OpenedBuild', '$AssignedTo', '$AssignedDate',
|
||||
'$ResolvedBy', '$Resolution', '$ResolvedBuild', '$ResolvedDate',
|
||||
'$ClosedBy', '$ClosedDate', '$LastEditedBy', '$LastEditedDate')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
|
||||
function convertAction()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
$sql = "SELECT * FROM BugHistory ORDER BY BugID, HistoryID";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($history = mysql_fetch_assoc($result))
|
||||
{
|
||||
$historys[$history['BugID']][] = $history;
|
||||
}
|
||||
foreach($historys as $bugID => $bugHistorys)
|
||||
{
|
||||
foreach($bugHistorys as $key => $history)
|
||||
{
|
||||
$history['FullInfo'] = addslashes($history['FullInfo']);
|
||||
$history['ActionDate'] = strtotime($history['ActionDate']);
|
||||
if($key == 0)
|
||||
{
|
||||
$sql = "UPDATE zt_bug SET steps = \"$history[FullInfo]\" WHERE id='$bugID'";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
$history['FullInfo'] = '';
|
||||
}
|
||||
|
||||
extract($history);
|
||||
$sql = "INSERT INTO zt_action values($HistoryID, $companyID, 'bug', $BugID, '$UserName', '$Action', $ActionDate, '$FullInfo')";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function fixModulePath()
|
||||
{
|
||||
global $myLink, $companyID;
|
||||
|
||||
$sql = "SELECT * FROM zt_module ORDER BY grade";
|
||||
$result = mysql_query($sql, $myLink);
|
||||
while($module = mysql_fetch_assoc($result))
|
||||
{
|
||||
if($module['grade'] == 1)
|
||||
{
|
||||
$sql = "UPDATE zt_module set path = ',$module[id],' WHERE id=$module[id]";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT path FROM zt_module WHERE id = $module[parent]";
|
||||
$result2 = mysql_query($sql);
|
||||
$parent = mysql_fetch_assoc($result2);
|
||||
$sql = "UPDATE zt_module set path = '$parent[path]$module[id],' WHERE id=$module[id]";
|
||||
mysql_query($sql) or die(mysql_error());
|
||||
}
|
||||
}
|
||||
}
|
||||
function clear()
|
||||
{
|
||||
global $myLink;
|
||||
$sqls[] = "TRUNCATE TABLE zt_user";
|
||||
$sqls[] = "TRUNCATE TABLE zt_product";
|
||||
$sqls[] = "TRUNCATE TABLE zt_module";
|
||||
$sqls[] = "TRUNCATE TABLE zt_bug";
|
||||
$sqls[] = "TRUNCATE TABLE zt_action";
|
||||
foreach($sqls as $sql) mysql_query($sql, $myLink);
|
||||
}
|
||||
?>
|
||||
31
trunk/bin/exportactions.php
Normal file
31
trunk/bin/exportactions.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
class control {}
|
||||
$moduleRoot = rtrim($argv[1], '/') . '/';
|
||||
|
||||
foreach(glob($moduleRoot . '*') as $modulePath)
|
||||
{
|
||||
$moduleName = basename($modulePath);
|
||||
$controlFile = $modulePath . '/control.php';
|
||||
if(file_exists($controlFile))
|
||||
{
|
||||
include $controlFile;
|
||||
$lines = explode("\n", file_get_contents($controlFile));
|
||||
if(class_exists($moduleName))
|
||||
{
|
||||
$class = new ReflectionClass($moduleName);
|
||||
$methods = $class->getMethods();
|
||||
foreach($methods as $method)
|
||||
{
|
||||
$methodRef = new ReflectionMethod($method->class, $method->name);
|
||||
if($methodRef->isPublic() and strpos($method->name, '__') === false)
|
||||
{
|
||||
echo "\$lang['action']['$moduleName']['$method->name'] = '$method->name';\n";
|
||||
}
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
14
trunk/bin/updaterevision.php
Normal file
14
trunk/bin/updaterevision.php
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* <20>˹<EFBFBD><CBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>µ<EFBFBD>svn<76><6E>Ϣ<EFBFBD><CFA2>*/
|
||||
$svnInfo = `cd ../; svn info --xml |egrep 'revision|date'`;
|
||||
$svnInfo = explode("\n", trim($svnInfo));
|
||||
$revision = $svnInfo[0];
|
||||
$date = $svnInfo[2];
|
||||
preg_match('|"(.*)"|', $revision, $result);
|
||||
$revision = $result[1];
|
||||
preg_match('|>(.*)<|', $date, $result);
|
||||
$date = $result[1];
|
||||
$date = date('Y-m-d H:i:s', strtotime($date));
|
||||
file_put_contents('../cache/revision.txt', "$revision\n$date");
|
||||
?>
|
||||
93
trunk/config/config.php
Normal file
93
trunk/config/config.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: config.test.php 1428 2009-10-20 03:37:53Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$config->version = '0.1 alpha'; // <20>汾<EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
$config->debug = true; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>debug<75><67><EFBFBD>ܡ<EFBFBD>
|
||||
$config->webRoot = '/'; // web<65><62>վ<EFBFBD>ĸ<EFBFBD>Ŀ¼<C4BF><C2BC>
|
||||
$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->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->strictParams= false; // <20><><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>뷽<EFBFBD><EBB7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫһ<C8AB>¡<EFBFBD><C2A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊfalse<73><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>֤˳<D6A4><CBB3>һ<EFBFBD>¡<EFBFBD>
|
||||
$config->requestFix = '-'; // requestType=PATH_INFO: <20><><EFBFBD><EFBFBD>url<72>ķָ<C4B7><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡֵΪб<CEAA>ߡ<EFBFBD><DFA1>»<EFBFBD><C2BB>ߡ<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>
|
||||
|
||||
$config->views = ',html,xml,json,txt,csv,doc,pdf,'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD>ͼ<EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->langs = 'zh-cn,zh-tw,zh-hk,en'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
$config->themes = 'default'; // ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
||||
|
||||
$config->super2OBJ = true; // <20>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
$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>
|
||||
$config->default->domain = 'pms.easysoft.com'; // Ĭ<>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ж<EFBFBD>Ӧ<EFBFBD>ļ<EFBFBD>¼ʱ<C2BC><CAB1>ʹ<EFBFBD>ô<EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>Ĺ<EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>
|
||||
|
||||
$config->db->errorMode = PDO::ERRMODE_EXCEPTION; // PDO<44>Ĵ<EFBFBD><C4B4><EFBFBD>ģʽ: PDO::ERRMODE_SILENT|PDO::ERRMODE_WARNING|PDO::ERRMODE_EXCEPTION
|
||||
$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->host = '127.0.0.1'; // mysql<71><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->db->port = '3306'; // mysql<71><6C><EFBFBD><EFBFBD><EFBFBD>˿ںš<DABA>
|
||||
$config->db->name = 'zentao'; // <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ơ<EFBFBD>
|
||||
$config->db->user = 'root'; // <20><><EFBFBD>ݿ<EFBFBD><DDBF>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
|
||||
$config->db->password = ''; // <20><><EFBFBD>롣
|
||||
$config->db->encoding = 'UTF8'; // <20><><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1>롣
|
||||
$config->db->prefix = 'zt_'; // <20><><EFBFBD>ݱ<EFBFBD>ǰ<C7B0><D7BA>
|
||||
$config->db->dao = true; // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>DAO<41><4F>
|
||||
define('TABLE_ACTION', $config->db->prefix . 'action');
|
||||
define('TABLE_BUG', $config->db->prefix . 'bug');
|
||||
define('TABLE_BUILD', $config->db->prefix . 'build');
|
||||
define('TABLE_CASE', $config->db->prefix . 'case');
|
||||
define('TABLE_CASERESULT', $config->db->prefix . 'caseResult');
|
||||
define('TABLE_CASESTEP', $config->db->prefix . 'caseStep');
|
||||
define('TABLE_COMPANY', $config->db->prefix . 'company');
|
||||
define('TABLE_CONFIG', $config->db->prefix . 'config');
|
||||
define('TABLE_DEPT', $config->db->prefix . 'dept');
|
||||
define('TABLE_EFFORT', $config->db->prefix . 'effort');
|
||||
define('TABLE_FILE', $config->db->prefix . 'file');
|
||||
define('TABLE_HISTORY', $config->db->prefix . 'history');
|
||||
define('TABLE_MODULE', $config->db->prefix . 'module');
|
||||
define('TABLE_USER', $config->db->prefix . 'user');
|
||||
define('TABLE_GROUP', $config->db->prefix . 'group');
|
||||
define('TABLE_USERGROUP', $config->db->prefix . 'userGroup');
|
||||
define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv');
|
||||
define('TABLE_PLANCASE', $config->db->prefix . 'planCase');
|
||||
define('TABLE_PRODUCT', $config->db->prefix . 'product');
|
||||
define('TABLE_RELEASE', $config->db->prefix . 'release');
|
||||
define('TABLE_RELEATION', $config->db->prefix . 'releation');
|
||||
define('TABLE_RESULTSTEP', $config->db->prefix . 'resultStep');
|
||||
define('TABLE_PROJECT', $config->db->prefix . 'project');
|
||||
define('TABLE_TEAM', $config->db->prefix . 'team');
|
||||
define('TABLE_STORY', $config->db->prefix . 'story');
|
||||
define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory');
|
||||
define('TABLE_TASK', $config->db->prefix . 'task');
|
||||
define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate');
|
||||
define('TABLE_TESTPLAN', $config->db->prefix . 'testPlan');
|
||||
define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct');
|
||||
define('TABLE_TODO', $config->db->prefix . 'todo');
|
||||
608
trunk/db/zentao.sql
Normal file
608
trunk/db/zentao.sql
Normal file
@@ -0,0 +1,608 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.1.3.1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- 主机: 127.0.0.1
|
||||
-- 生成日期: 2009 年 09 月 10 日 10:22
|
||||
-- 服务器版本: 5.0.67
|
||||
-- PHP 版本: 5.2.9
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- 数据库: `zentao`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_action`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_action` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`objectType` varchar(30) NOT NULL default '',
|
||||
`objectID` mediumint(8) unsigned NOT NULL default '0',
|
||||
`actor` varchar(30) NOT NULL default '',
|
||||
`action` varchar(30) NOT NULL default '',
|
||||
`date` int(10) unsigned NOT NULL default '0',
|
||||
`comment` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_bug`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`path` varchar(255) NOT NULL default '',
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`sprint` mediumint(8) unsigned NOT NULL default '0',
|
||||
`story` mediumint(8) unsigned NOT NULL default '0',
|
||||
`task` mediumint(8) unsigned NOT NULL default '0',
|
||||
`title` varchar(150) NOT NULL default '',
|
||||
`severity` tinyint(4) NOT NULL default '0',
|
||||
`type` varchar(30) NOT NULL default '',
|
||||
`os` varchar(30) NOT NULL default '',
|
||||
`browser` varchar(30) NOT NULL default '',
|
||||
`machine` varchar(30) NOT NULL default '',
|
||||
`found` varchar(30) NOT NULL default '',
|
||||
`steps` text NOT NULL,
|
||||
`status` enum('active','resolved','closed') NOT NULL default 'active',
|
||||
`mailto` varchar(255) NOT NULL default '',
|
||||
`openedBy` varchar(30) NOT NULL default '',
|
||||
`openedDate` int(10) unsigned NOT NULL default '0',
|
||||
`openedBuild` varchar(30) NOT NULL default '',
|
||||
`assignedTo` varchar(30) NOT NULL default '',
|
||||
`assignedDate` int(10) unsigned NOT NULL default '0',
|
||||
`resolvedBy` varchar(30) NOT NULL default '',
|
||||
`resolution` varchar(30) NOT NULL default '',
|
||||
`resolvedBuild` varchar(30) NOT NULL default '',
|
||||
`resolvedDate` int(10) unsigned NOT NULL default '0',
|
||||
`closedBy` varchar(30) NOT NULL default '',
|
||||
`closedDate` int(11) NOT NULL default '0',
|
||||
`lastEditedBy` varchar(30) NOT NULL default '',
|
||||
`lastEditedDate` int(10) unsigned NOT NULL default '0',
|
||||
`field1` varchar(255) NOT NULL default '',
|
||||
`field2` varchar(255) NOT NULL default '',
|
||||
`feild3` varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_build`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_build` (
|
||||
`id` mediumint(8) unsigned NOT NULL default '0',
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`sprintprj` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(30) NOT NULL default '',
|
||||
`scmPath` char(255) NOT NULL default '',
|
||||
`buildDate` int(10) unsigned NOT NULL default '0',
|
||||
`builder` char(30) NOT NULL default '',
|
||||
`tasks` char(255) NOT NULL default '',
|
||||
`desc` char(255) NOT NULL default ''
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_case`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_case` (
|
||||
`id` mediumint(8) unsigned NOT NULL default '0',
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`path` mediumint(8) unsigned NOT NULL default '0',
|
||||
`story` mediumint(30) unsigned NOT NULL default '0',
|
||||
`title` char(30) NOT NULL default '',
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
`type` enum('1','2','3') NOT NULL default '1',
|
||||
`status` enum('1','2','3') NOT NULL default '1',
|
||||
`frequency` enum('1','2','3') NOT NULL default '1',
|
||||
`order` tinyint(30) unsigned NOT NULL default '0',
|
||||
`openedBy` char(30) NOT NULL default '',
|
||||
`openedDate` int(30) unsigned NOT NULL default '0',
|
||||
`lastEditedBy` char(30) NOT NULL default '',
|
||||
`lastEditedDate` int(30) unsigned NOT NULL default '0',
|
||||
`field1` char(30) NOT NULL default '',
|
||||
`field2` char(30) NOT NULL default '',
|
||||
`feidl3` char(30) NOT NULL default '',
|
||||
`version` tinyint(3) unsigned NOT NULL default '0'
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_caseResult`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_caseResult` (
|
||||
`id` mediumint(8) unsigned NOT NULL default '0',
|
||||
`plan` mediumint(30) unsigned NOT NULL default '0',
|
||||
`build` mediumint(30) unsigned NOT NULL default '0',
|
||||
`case` mediumint(30) unsigned NOT NULL default '0',
|
||||
`result` enum('pass','fail','skip') NOT NULL default 'pass',
|
||||
`status` enum('finished','blocked') NOT NULL default 'finished',
|
||||
`executedBy` char(30) NOT NULL default '',
|
||||
`executedDate` int(30) unsigned NOT NULL default '0',
|
||||
`os` char(30) NOT NULL default '',
|
||||
`browser` char(30) NOT NULL default '',
|
||||
`hardware` char(30) NOT NULL default ''
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_caseStep`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_caseStep` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`case` mediumint(8) unsigned NOT NULL default '0',
|
||||
`caseVersion` tinyint(3) unsigned NOT NULL default '0',
|
||||
`step` char(255) NOT NULL default '',
|
||||
`expect` char(255) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_company`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_company` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`name` char(120) NOT NULL default '',
|
||||
`phone` char(20) NOT NULL,
|
||||
`fax` char(20) NOT NULL default '',
|
||||
`address` char(120) NOT NULL default '',
|
||||
`zipcode` char(10) NOT NULL default '',
|
||||
`website` char(120) NOT NULL default '',
|
||||
`backyard` char(120) NOT NULL default '',
|
||||
`pms` char(120) NOT NULL default '',
|
||||
`guest` enum('1','0') NOT NULL default '0',
|
||||
`admins` char(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_config`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_config` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`owner` char(30) NOT NULL default '',
|
||||
`section` char(30) NOT NULL default '',
|
||||
`key` char(30) NOT NULL default '',
|
||||
`value` char(255) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_division`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_division` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(30) NOT NULL default '',
|
||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`path` char(255) NOT NULL default '',
|
||||
`grade` tinyint(3) unsigned NOT NULL default '0',
|
||||
`order` tinyint(3) unsigned NOT NULL default '0',
|
||||
`position` char(30) NOT NULL default '',
|
||||
`function` char(255) NOT NULL default '',
|
||||
`manager` char(30) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `company` (`company`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_effort`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_effort` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`user` char(30) NOT NULL default '',
|
||||
`todo` enum('1','0') NOT NULL default '1',
|
||||
`date` date NOT NULL default '0000-00-00',
|
||||
`begin` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`end` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`type` enum('1','2','3') NOT NULL default '1',
|
||||
`idvalue` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(30) NOT NULL default '',
|
||||
`desc` char(255) NOT NULL default '',
|
||||
`status` enum('1','2','3') NOT NULL default '1',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `user` (`user`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_file`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_file` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`file` char(30) NOT NULL default '',
|
||||
`type` char(30) NOT NULL default '',
|
||||
`size` mediumint(8) unsigned NOT NULL default '0',
|
||||
`addedBy` char(30) NOT NULL default '',
|
||||
`addedDate` int(10) unsigned NOT NULL default '0',
|
||||
`downloads` mediumint(8) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_group`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_group` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL,
|
||||
`name` char(30) NOT NULL,
|
||||
`desc` char(255) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_groupPriv`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_groupPriv` (
|
||||
`group` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` char(30) NOT NULL default '',
|
||||
`method` char(30) NOT NULL default '',
|
||||
UNIQUE KEY `group` (`group`,`module`,`method`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_history`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_history` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`action` mediumint(8) unsigned NOT NULL default '0',
|
||||
`field` varchar(30) NOT NULL default '',
|
||||
`old` text NOT NULL,
|
||||
`new` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_module`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_module` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(30) NOT NULL default '',
|
||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`path` char(255) NOT NULL default '',
|
||||
`grade` tinyint(3) unsigned NOT NULL default '0',
|
||||
`order` tinyint(3) unsigned NOT NULL default '0',
|
||||
`view` char(30) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_planCase`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_planCase` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`plan` mediumint(8) unsigned NOT NULL default '0',
|
||||
`case` mediumint(8) unsigned NOT NULL default '0',
|
||||
`caseVersion` tinyint(3) unsigned NOT NULL default '0',
|
||||
`assignedTo` char(30) NOT NULL default '',
|
||||
`assignedDate` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_product`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_product` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` varchar(30) NOT NULL default '',
|
||||
`code` varchar(10) NOT NULL default '',
|
||||
`order` tinyint(3) unsigned NOT NULL default '0',
|
||||
`status` varchar(30) NOT NULL default '',
|
||||
`desc` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `company` (`company`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_project`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_project` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`isCat` enum('1','0') NOT NULL default '0',
|
||||
`catID` mediumint(8) unsigned NOT NULL,
|
||||
`type` enum('sprint','project') NOT NULL default 'sprint',
|
||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` varchar(30) NOT NULL default '',
|
||||
`code` varchar(10) NOT NULL default '',
|
||||
`begin` date NOT NULL,
|
||||
`end` date NOT NULL,
|
||||
`status` enum('1','2','3','4') NOT NULL default '1',
|
||||
`statge` enum('1','2','3','4','5') NOT NULL default '1',
|
||||
`pri` enum('1','2','3','4') NOT NULL default '1',
|
||||
`desc` text NOT NULL,
|
||||
`goal` text NOT NULL,
|
||||
`openedBy` varchar(30) NOT NULL default '',
|
||||
`openedDate` int(10) unsigned NOT NULL default '0',
|
||||
`closedBy` varchar(30) NOT NULL default '',
|
||||
`closedDate` int(10) unsigned NOT NULL default '0',
|
||||
`canceledBy` varchar(30) NOT NULL default '',
|
||||
`canceledDate` int(10) unsigned NOT NULL default '0',
|
||||
`PO` varchar(30) NOT NULL default '',
|
||||
`PM` varchar(30) NOT NULL default '',
|
||||
`QM` varchar(30) NOT NULL default '',
|
||||
`team` varchar(30) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `company` (`company`,`type`,`parent`,`begin`,`end`,`status`,`statge`,`pri`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_projectProduct`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_projectProduct` (
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`project`,`product`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_projectStory`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_projectStory` (
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`story` mediumint(8) unsigned NOT NULL default '0',
|
||||
UNIQUE KEY `project` (`project`,`story`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_release`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_release` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` varchar(30) NOT NULL default '',
|
||||
`desc` text NOT NULL,
|
||||
`status` varchar(30) NOT NULL default '',
|
||||
`planDate` date NOT NULL default '0000-00-00',
|
||||
`releaseDate` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`,`status`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_releation`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_releation` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`type` char(30) NOT NULL default '',
|
||||
`id1` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id2` mediumint(8) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_resultStep`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_resultStep` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`result` mediumint(8) unsigned NOT NULL default '0',
|
||||
`step` mediumint(8) unsigned NOT NULL default '0',
|
||||
`stepResult` enum('pass','fail','block','n/a') NOT NULL default 'pass',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_story`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_story` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`replease` mediumint(8) unsigned NOT NULL default '0',
|
||||
`bug` mediumint(8) unsigned NOT NULL default '0',
|
||||
`title` varchar(90) NOT NULL default '',
|
||||
`spec` text NOT NULL,
|
||||
`type` varchar(30) NOT NULL default '',
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
`estimate` tinyint(3) unsigned NOT NULL default '0',
|
||||
`status` varchar(30) NOT NULL default '',
|
||||
`mailto` varchar(255) NOT NULL default '',
|
||||
`openedBy` varchar(30) NOT NULL default '',
|
||||
`openedDate` int(10) unsigned NOT NULL default '0',
|
||||
`assignedTo` varchar(30) NOT NULL default '',
|
||||
`assignedDate` int(10) unsigned NOT NULL default '0',
|
||||
`lastEditedBy` varchar(30) NOT NULL default '',
|
||||
`lastEditedDate` int(10) unsigned NOT NULL default '0',
|
||||
`closedBy` varchar(30) NOT NULL default '',
|
||||
`closedDate` int(10) unsigned NOT NULL default '0',
|
||||
`version` float(4,1) NOT NULL default '0.0',
|
||||
`attatchment` varchar(30) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`,`module`,`replease`,`type`,`pri`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_task`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`story` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(30) NOT NULL default '',
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
`owner` char(30) NOT NULL default '',
|
||||
`estimate` tinyint(3) unsigned NOT NULL default '0',
|
||||
`consumed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`status` enum('wait','doing','done') NOT NULL default 'wait',
|
||||
`desc` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_taskEstimate`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_taskEstimate` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`task` mediumint(8) unsigned NOT NULL default '0',
|
||||
`date` int(10) unsigned NOT NULL default '0',
|
||||
`estimate` tinyint(3) unsigned NOT NULL default '0',
|
||||
`estimater` char(30) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `task` (`task`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_team`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_team` (
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`account` char(30) NOT NULL default '',
|
||||
`role` char(30) NOT NULL default '',
|
||||
`joinDate` date NOT NULL default '0000-00-00',
|
||||
`workingHour` tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`project`,`account`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_testPlan`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_testPlan` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`name` char(30) NOT NULL default '',
|
||||
`sprintprj` mediumint(8) unsigned NOT NULL default '0',
|
||||
`planBegin` int(10) unsigned NOT NULL default '0',
|
||||
`planEnd` int(10) unsigned NOT NULL default '0',
|
||||
`realBegin` int(10) unsigned NOT NULL default '0',
|
||||
`realEnd` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_user`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_user` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`company` mediumint(8) unsigned NOT NULL default '0',
|
||||
`division` mediumint(8) unsigned NOT NULL default '0',
|
||||
`account` char(30) NOT NULL default '',
|
||||
`password` char(32) NOT NULL default '',
|
||||
`realname` char(30) NOT NULL default '',
|
||||
`nickname` char(60) NOT NULL default '',
|
||||
`avatar` char(30) NOT NULL default '',
|
||||
`birthyear` smallint(5) unsigned NOT NULL default '0',
|
||||
`birthday` date NOT NULL default '0000-00-00',
|
||||
`gendar` enum('f','m') NOT NULL default 'f',
|
||||
`email` char(90) NOT NULL default '',
|
||||
`msn` char(90) NOT NULL default '',
|
||||
`qq` char(20) NOT NULL default '',
|
||||
`yahoo` char(90) NOT NULL default '',
|
||||
`gtalk` char(90) NOT NULL default '',
|
||||
`wangwang` char(90) NOT NULL default '',
|
||||
`mobile` char(11) NOT NULL default '',
|
||||
`phone` char(20) NOT NULL default '',
|
||||
`address` char(120) NOT NULL default '',
|
||||
`zipcode` char(10) NOT NULL default '',
|
||||
`join` date NOT NULL default '0000-00-00',
|
||||
`visits` mediumint(8) unsigned NOT NULL default '0',
|
||||
`ip` char(15) NOT NULL,
|
||||
`last` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `company` (`company`,`division`)
|
||||
) ENGINE=MyISAM ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 表的结构 `zt_userGroup`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_userGroup` (
|
||||
`account` char(30) NOT NULL default '',
|
||||
`group` mediumint(8) unsigned NOT NULL default '0',
|
||||
UNIQUE KEY `account` (`account`,`group`)
|
||||
) ENGINE=MyISAM ;
|
||||
674
trunk/doc/COPYING
Normal file
674
trunk/doc/COPYING
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
165
trunk/doc/COPYING.LESSER
Normal file
165
trunk/doc/COPYING.LESSER
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
46
trunk/doc/README
Normal file
46
trunk/doc/README
Normal file
@@ -0,0 +1,46 @@
|
||||
一、什么是禅道项目管理软件
|
||||
|
||||
禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。官方网站:www.zentao.cn
|
||||
|
||||
禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。
|
||||
|
||||
禅道在手,项目无忧!
|
||||
|
||||
二、禅道的含义
|
||||
|
||||
Zen是“禅”的意思,Tao是“道”的意思。ZenTao合意为禅与道。这个名称是我在读《编程之禅》和《编程之道》的时候受到启发,决定采用这个比较有中国味道的名字。
|
||||
|
||||
三、禅道项目管理软件的来由:
|
||||
|
||||
说到这个问题,要从BugFree谈起。自从04年发布BugFree以来到2007年,BugFree陆续发布了五六个版本,在Bug管理方面基本上已经完备。但这个时候产生了一些新的问题。很多网友拿着BugFree进行改动,改造为其他的管理系统。还经常有网友问,BugFree可以不可以加入项目管理的功能。我也一直在思考这些问题。后来我加入了阿里巴巴,在中国雅虎‘、阿里妈妈、淘宝三年的工作经历中,参加了大大小小的项目。也深为项目管理所困惑。于是就产生了做一个工具来解决项目管理的问题。
|
||||
|
||||
由于种种原因,我这个愿望在阿里巴巴并没有实现。说来也是一件幸事,这样我可以把它开源来发布。从今年初我就开始着手考虑这套管理软件的设计。整整花了半年的时间在考虑。7月份从阿里巴巴辞职之后,我开始有有了相对比较多的一点时间来进行这套系统的开发。同时也非常感谢现在的这家单位,为我开发禅道项目管理软件提供了大力的支持。
|
||||
|
||||
四、为什么还要做禅道项目管理软件:
|
||||
|
||||
很多朋友会问,已经有很多的开源项目管理软件或者系统了,为什么还要自己做一个呢?主要原因是我认为现在的开源项目管理软件对这个问题解决的并不好,比如缺乏需求管理,bug管理等功能。而且很多开源的项目管理软件使用起来也不方便。
|
||||
|
||||
市场上也有很多商业的软件,但收费都不菲,而且也未必见得好用。
|
||||
|
||||
现在也有很多在线的项目管理服务,比如国外的basecamp,国内的易度,忙吧等。但我的观点,这些在线的项目管理软件功能有限,缺乏定制,访问速度无法保证,而且缺乏保密。
|
||||
|
||||
五、禅道项目管理软件的特点:
|
||||
|
||||
集成了产品管理、项目管理、测试管理、人员管理、发布管理、事务管理等功能于一体。你只需要一个软件就可以完成项目管理的最核心的任务。
|
||||
开源免费,降低企业部署的成本。
|
||||
功能注重实效,使用方便,没有太多复杂的概念。我设计的理念是一个没有做过项目管理的人经过10分钟的培训可以使用它进行项目管理。:)
|
||||
基于PHP+MySQL开发,企业自主改动方便。并且基于ZenTaoPHP框架,为第三方开发者的加入打下了坚实的基础。
|
||||
主要理念基于scrum,同时结合了PMP里面的很多概念。
|
||||
支持多公司,多项目,多产品,多团队的开发。
|
||||
灵活的权限设置。
|
||||
支持产品与项目之间的矩阵关系。
|
||||
|
||||
六、禅道项目管理软件的现状及开发计划:
|
||||
|
||||
禅道项目管理软件目前正在紧密开发中,已经发布了几个alpha版本。但这几个版本的功能还仅仅是冰山一角。我们计划在今年年底的时候推出beta版本,明年第一季度的时候推出第一个stable的版本。
|
||||
|
||||
七、禅道项目管理软件需要您的帮助
|
||||
|
||||
禅道项目管理软件需要您的帮助,无论您是开发人员,抑或是项目经理,或者是产品经理,还是测试人员,又或者是开源爱好者,您都可以在禅道项目管理软件找到参与的地方。我们会以非常open的心态打造一个禅道项目管理软件的社区。我相信,禅道社区的成功,才是禅道项目管理软件的成功。
|
||||
|
||||
大家现在可以访问http://pms.zentao.cn来查看这个项目管理软件自身的进展情况。大家如果想加入,可以和我联系:wwccss#gmail.com。
|
||||
6
trunk/doc/THANKS
Normal file
6
trunk/doc/THANKS
Normal file
@@ -0,0 +1,6 @@
|
||||
鸣谢
|
||||
|
||||
禅道项目管理软件在开发过程中得到了普加网(青岛普加智能信息有限公司)的大力支持,在此表示感谢! 欢迎大家访问普加网 www.pojaa.com ,获取最酷的民生信息!
|
||||
|
||||
王春生 易软开源软件研发中心
|
||||
2009-10-25
|
||||
411
trunk/lib/front/front.class.php
Normal file
411
trunk/lib/front/front.class.php
Normal file
@@ -0,0 +1,411 @@
|
||||
<?php
|
||||
/**
|
||||
* The front class 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: front.class.php 1439 2009-10-22 01:26:23Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class html
|
||||
{
|
||||
/**
|
||||
* create tags like <a href="">text</a>
|
||||
*
|
||||
* @param string $href the link url.
|
||||
* @param string $title the link title.
|
||||
* @param string $target the target window
|
||||
*/
|
||||
static public function a($href = '', $title = '', $target = "_self")
|
||||
{
|
||||
if(empty($title)) $title = $href;
|
||||
if($target == '_self') return "<a href='$href'>$title</a>\n";
|
||||
return "<a href='$href' target='$target'>$title</a>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like <a href="mailto:">text</a>
|
||||
*
|
||||
* @param string $mail the email address
|
||||
* @param string $title the email title.
|
||||
*/
|
||||
static public function mailto($mail = '', $title = '')
|
||||
{
|
||||
if(empty($title)) $title = $mail;
|
||||
return "<a href='mailto:$mail'>$title</a>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like "<select><option></option></select>"
|
||||
*
|
||||
* @param string $name the name of the select tag.
|
||||
* @param array $options the array to create select tag from.
|
||||
* @param string $selectedItems the item(s) to be selected, can like item1,item2.
|
||||
* @param string $attrib other params such as multiple, size and style.
|
||||
*/
|
||||
static public function select($name = '', $options = array(), $selectedItems = "", $attrib = "")
|
||||
{
|
||||
$options = (array)($options);
|
||||
if(!is_array($options) or empty($options)) return false;
|
||||
|
||||
/* The begin. */
|
||||
$id = $name;
|
||||
if($pos = strpos($name, '[')) $id = substr($name, 0, $pos);
|
||||
$string = "<select name='$name' id='$id' $attrib>\n";
|
||||
|
||||
/* The options. */
|
||||
$selectedItems = ",$selectedItems,";
|
||||
foreach($options as $key => $value)
|
||||
{
|
||||
$key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。
|
||||
$selected = strpos($selectedItems, ",$key,") !== false ? " selected='selected'" : '';
|
||||
$string .= "<option value='$key'$selected>$value</option>\n";
|
||||
}
|
||||
|
||||
/* End. */
|
||||
return $string .= "</select>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create tags like "<input type='radio' />"
|
||||
*
|
||||
* @param string $name the name of the radio tag.
|
||||
* @param array $options the array to create radio tag from.
|
||||
* @param string $checked the value to checked by default.
|
||||
* @param string $attrib other attribs.
|
||||
*/
|
||||
static public function radio($name = '', $options = array(), $checked = "", $attrib = "")
|
||||
{
|
||||
$options = (array)($options);
|
||||
if(!is_array($options) or empty($options)) return false;
|
||||
|
||||
$string = '';
|
||||
foreach($options as $key => $value)
|
||||
{
|
||||
|
||||
$key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。
|
||||
$string .= "<input type='radio' name='$name' value='$key' ";
|
||||
$string .= ($key == $checked) ? " checked ='checked'" : "";
|
||||
$string .= $attrib;
|
||||
$string .= " /> $value\n";
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like "<input type='checkbox' />"
|
||||
*
|
||||
* @param string $name the name of the checkbox tag.
|
||||
* @param array $options the array to create checkbox tag from.
|
||||
* @param string $checked the value to checked by default, can be item1,item2
|
||||
* @param string $attrib other attribs.
|
||||
*/
|
||||
static public function checkbox($name, $options, $checked = "", $attrib = "")
|
||||
{
|
||||
$options = (array)($options);
|
||||
if(!is_array($options) or empty($options)) return false;
|
||||
$string = '';
|
||||
$checked = ",$checked,";
|
||||
|
||||
foreach($options as $key => $value)
|
||||
{
|
||||
$key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。
|
||||
$string .= "<input type='checkbox' name='{$name}[]' value='$key' ";
|
||||
$string .= strpos($checked, ",$key,") !== false ? " checked ='checked'" : "";
|
||||
$string .= $attrib;
|
||||
$string .= " /> $value\n";
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like "<input type='text' />"
|
||||
*
|
||||
* @param string $name the name of the text input tag.
|
||||
* @param string $value the default value.
|
||||
* @param string $attrib other attribs.
|
||||
*/
|
||||
static public function input($name, $value = "", $attrib = "")
|
||||
{
|
||||
return "<input type='text' name='$name' id='$name' value='$value' $attrib />\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like "<textarea></textarea>"
|
||||
*
|
||||
* @param string $name the name of the textarea tag.
|
||||
* @param string $value the default value of the textarea tag.
|
||||
* @param string $attrib other attribs.
|
||||
*/
|
||||
static public function textarea($name, $value = "", $attrib = "")
|
||||
{
|
||||
return "<textarea name='$name' id='$name' $attrib>$value</textarea>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* create tags like "<input type='file' />".
|
||||
*
|
||||
* @param string $name the name of the file name.
|
||||
* @param string $attrib other attribs.
|
||||
*/
|
||||
static public function file($name, $attrib = "")
|
||||
{
|
||||
return "<input type='file' name='$name' id='$name' $attrib />\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* create submit button.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the submit button tag.
|
||||
*/
|
||||
public static function submitButton($label = '')
|
||||
{
|
||||
if(empty($label))
|
||||
{
|
||||
global $lang;
|
||||
$label = $lang->save;
|
||||
}
|
||||
return " <input type='submit' id='submit' value='$label' class='button-s' /> ";
|
||||
}
|
||||
|
||||
/**
|
||||
* create reset button.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the reset button tag.
|
||||
*/
|
||||
public static function resetButton()
|
||||
{
|
||||
global $lang;
|
||||
return " <input type='reset' id='reset' value='{$lang->reset}' class='button-r' /> ";
|
||||
}
|
||||
|
||||
/**
|
||||
* create common button.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the reset button tag.
|
||||
*/
|
||||
public static function commonButton($label = '', $misc = '')
|
||||
{
|
||||
return " <input type='button' value='$label' class='button-c' $misc /> ";
|
||||
}
|
||||
}
|
||||
|
||||
class js
|
||||
{
|
||||
/* The start of javascript. */
|
||||
static private function start()
|
||||
{
|
||||
return <<<EOT
|
||||
<html>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
||||
<script language='Javascript'>
|
||||
EOT;
|
||||
}
|
||||
|
||||
/* The end of javascript. */
|
||||
static private function end()
|
||||
{
|
||||
return "\n</script>\n";
|
||||
}
|
||||
|
||||
/* Show a alert box. */
|
||||
static public function alert($message = '')
|
||||
{
|
||||
return self::start() . "alert('" . $message . "')" . self::end();
|
||||
}
|
||||
|
||||
/* 弹出错误。其中message可以是一条字符串,也可以是一维或者二维数组。*/
|
||||
static public function error($message)
|
||||
{
|
||||
$alertMessage = '';
|
||||
if(is_array($message))
|
||||
{
|
||||
foreach($message as $item)
|
||||
{
|
||||
is_array($item) ? $alertMessage .= join('\n', $item) . '\n' : $alertMessage .= $item . '\n';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$alertMessage = $message;
|
||||
}
|
||||
return self::alert($alertMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* show a confirm box, press ok go to okURL, else go to cancleURL.
|
||||
*
|
||||
* @param string $message the text to be showed.
|
||||
* @param string $okURL the url to go to when press 'ok'.
|
||||
* @param string $cancleURL the url to go to when press 'cancle'.
|
||||
* @param string $okTarget the target to go to when press 'ok'.
|
||||
* @param string $cancleTarget the target to go to when press 'cancle'.
|
||||
*/
|
||||
static public function confirm($message = '', $okURL = '', $cancleURL = '', $okTarget = "self", $cancleTarget = "self", $Echo = true)
|
||||
{
|
||||
$js = self::start();
|
||||
|
||||
$confirmAction = '';
|
||||
if(strtolower($okURL) == "back")
|
||||
{
|
||||
$confirmAction = "history.back(-1);";
|
||||
}
|
||||
elseif(!empty($okURL))
|
||||
{
|
||||
$confirmAction = "$okTarget.location = '$okURL';";
|
||||
}
|
||||
|
||||
$cancleAction = '';
|
||||
if(strtolower($cancleURL) == "back")
|
||||
{
|
||||
$cancleAction = "history.back(-1);";
|
||||
}
|
||||
elseif(!empty($cancleURL))
|
||||
{
|
||||
$cancleAction = "$cancleTarget.location = '$cancleURL';";
|
||||
}
|
||||
|
||||
$js .= <<<EOT
|
||||
if(confirm("$message"))
|
||||
{
|
||||
$confirmAction
|
||||
}
|
||||
else
|
||||
{
|
||||
$cancleAction
|
||||
}
|
||||
EOT;
|
||||
$js .= self::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
/**
|
||||
* change the location of the $target window to the $URL.
|
||||
*
|
||||
* @param string $url the url will go to.
|
||||
* @param string $target the target of the url.
|
||||
* @return string the javascript string.
|
||||
*/
|
||||
static public function locate($url, $target = "self")
|
||||
{
|
||||
$js = self::start();
|
||||
if(strtolower($url) == "back")
|
||||
{
|
||||
$js .= "history.back(-1);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$js .= "$target.location='$url';\n";
|
||||
}
|
||||
return $js . self::end();
|
||||
}
|
||||
|
||||
/* Close current window. */
|
||||
static public function closeWindow()
|
||||
{
|
||||
return self::start(). "window.close();" . self::end();
|
||||
}
|
||||
|
||||
/**
|
||||
* Goto a page after a timer.
|
||||
*
|
||||
* @param string $url the url will go to.
|
||||
* @param string $target the target of the url.
|
||||
* @param int $time the timer, msec.
|
||||
* @return string the javascript string.
|
||||
*/
|
||||
static public function refresh($url, $target = "self", $time = 3000)
|
||||
{
|
||||
$js = self::start();
|
||||
$js .= "setTimeout(\"$target.location='$url'\", $time);";
|
||||
$js .= self::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload a window.
|
||||
*
|
||||
* @param string $window the window to reload.
|
||||
* @return string the javascript string.
|
||||
*/
|
||||
static public function reload($window = 'self')
|
||||
{
|
||||
$js = self::start();
|
||||
$js .= "$window.location.href=$window.location.href";
|
||||
$js .= self::end();
|
||||
return $js;
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the createLink function of JS version.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return string the js code of createLink()
|
||||
*/
|
||||
static public function exportLinkFunc()
|
||||
{
|
||||
global $app, $config;
|
||||
$defaultViewType = $app->getViewType();
|
||||
$js = <<<EOT
|
||||
<script language = 'javascript'>
|
||||
function createLink(moduleName, methodName, vars, viewType)
|
||||
{
|
||||
link = '$config->webRoot';
|
||||
requestType = '$config->requestType';
|
||||
pathType = '$config->pathType';
|
||||
requestFix = '$config->requestFix';
|
||||
moduleVar = '$config->moduleVar';
|
||||
methodVar = '$config->methodVar';
|
||||
viewVar = '$config->viewVar';
|
||||
viewType = viewType ? viewType : '$defaultViewType';
|
||||
|
||||
vars = vars.split('&');
|
||||
for(i = 0; i < vars.length; i ++) vars[i] = vars[i].split('=');
|
||||
|
||||
if(requestType == 'PATH_INFO')
|
||||
{
|
||||
link += moduleName + requestFix + methodName;
|
||||
|
||||
if(pathType == "full")
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][0] + requestFix + vars[i][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = 0; i < vars.length; i ++) link += requestFix + vars[i][1];
|
||||
}
|
||||
link += '.' + viewType;
|
||||
}
|
||||
else
|
||||
{
|
||||
link += '?' + moduleVar + '=' + moduleName + '&' + methodVar + '=' + methodName + '&' + viewVar + '=' + viewType;
|
||||
for(i = 0; i < vars.length; i ++) link += '&' + vars[i][0] + '=' + vars[i][1];
|
||||
}
|
||||
return link;
|
||||
}
|
||||
</script>
|
||||
EOT;
|
||||
return $js;
|
||||
}
|
||||
}
|
||||
21
trunk/lib/front/tests/html_checkbox.expect
Normal file
21
trunk/lib/front/tests/html_checkbox.expect
Normal file
@@ -0,0 +1,21 @@
|
||||
<input type='checkbox' name='checkbox[]' value='a' />texta
|
||||
<input type='checkbox' name='checkbox[]' value='b' />textb
|
||||
<input type='checkbox' name='checkbox[]' value='c' />textc
|
||||
|
||||
<input type='checkbox' name='checkbox[]' value='a' checked ='checked' />texta
|
||||
<input type='checkbox' name='checkbox[]' value='b' />textb
|
||||
<input type='checkbox' name='checkbox[]' value='c' />textc
|
||||
|
||||
<input type='checkbox' name='checkbox[]' value='a' checked ='checked' />texta
|
||||
<input type='checkbox' name='checkbox[]' value='b' checked ='checked' />textb
|
||||
<input type='checkbox' name='checkbox[]' value='c' />textc
|
||||
|
||||
<input type='checkbox' name='checkbox[]' value='a' />texta
|
||||
<input type='checkbox' name='checkbox[]' value='b' />textb
|
||||
<input type='checkbox' name='checkbox[]' value='c' />textc
|
||||
|
||||
<input type='checkbox' name='checkbox[]' value='a' style="color:red" />texta
|
||||
<input type='checkbox' name='checkbox[]' value='b' style="color:red" />textb
|
||||
<input type='checkbox' name='checkbox[]' value='c' style="color:red" />textc
|
||||
|
||||
bool(false)
|
||||
31
trunk/lib/front/tests/html_checkbox.php
Normal file
31
trunk/lib/front/tests/html_checkbox.php
Normal file
@@ -0,0 +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: html_checkbox.php 1156 2009-04-24 08:53:44Z wwccss $
|
||||
*/
|
||||
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
|
||||
?>
|
||||
13
trunk/lib/front/tests/html_radio.expect
Normal file
13
trunk/lib/front/tests/html_radio.expect
Normal file
@@ -0,0 +1,13 @@
|
||||
<input type='radio' name='radio' value='a' />texta
|
||||
<input type='radio' name='radio' value='b' />textb
|
||||
<input type='radio' name='radio' value='c' />textc
|
||||
<input type='radio' name='radio' value='a' />texta
|
||||
<input type='radio' name='radio' value='b' />textb
|
||||
<input type='radio' name='radio' value='c' />textc
|
||||
<input type='radio' name='radio' value='a' />texta
|
||||
<input type='radio' name='radio' value='b' />textb
|
||||
<input type='radio' name='radio' value='c' />textc
|
||||
<input type='radio' name='radio' value='a' style="color:red" />texta
|
||||
<input type='radio' name='radio' value='b' style="color:red" />textb
|
||||
<input type='radio' name='radio' value='c' style="color:red" />textc
|
||||
bool(false)
|
||||
29
trunk/lib/front/tests/html_radio.php
Normal file
29
trunk/lib/front/tests/html_radio.php
Normal file
@@ -0,0 +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: html_radio.php 1156 2009-04-24 08:53:44Z wwccss $
|
||||
*/
|
||||
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
|
||||
?>
|
||||
31
trunk/lib/front/tests/html_select.expect
Normal file
31
trunk/lib/front/tests/html_select.expect
Normal file
@@ -0,0 +1,31 @@
|
||||
<select name='select' id='select' />
|
||||
<option value='a'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c'>textc</option>
|
||||
</select>
|
||||
<select name='select[]' id='select' />
|
||||
<option value='a'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c'>textc</option>
|
||||
</select>
|
||||
<select name='select' id='select' />
|
||||
<option value='a' selected='selected'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c'>textc</option>
|
||||
</select>
|
||||
<select name='select' id='select' />
|
||||
<option value='a' selected='selected'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c' selected='selected'>textc</option>
|
||||
</select>
|
||||
<select name='select' id='select' />
|
||||
<option value='a'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c'>textc</option>
|
||||
</select>
|
||||
<select name='select' id='select' style="color:red" />
|
||||
<option value='a'>texta</option>
|
||||
<option value='b'>textb</option>
|
||||
<option value='c'>textc</option>
|
||||
</select>
|
||||
bool(false)
|
||||
34
trunk/lib/front/tests/html_select.php
Normal file
34
trunk/lib/front/tests/html_select.php
Normal file
@@ -0,0 +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: html_select.php 1156 2009-04-24 08:53:44Z wwccss $
|
||||
*/
|
||||
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
|
||||
?>
|
||||
75
trunk/module/action/model.php
Normal file
75
trunk/module/action/model.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package action
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class actionModel extends model
|
||||
{
|
||||
/* 创建一条action动作。*/
|
||||
public function create($objectType, $objectID, $action, $comment = '')
|
||||
{
|
||||
$companyID = $this->app->company->id;
|
||||
$actor = $this->app->user->account;
|
||||
$actionDate = time();
|
||||
$sql = "INSERT INTO " . TABLE_ACTION . " VALUES('', '$companyID', '$objectType', '$objectID', '$actor', '$action', '$actionDate', '$comment')";
|
||||
$this->dbh->exec($sql);
|
||||
return $this->dbh->lastInsertID();
|
||||
}
|
||||
|
||||
/* 返回某一个对象的所有action列表。*/
|
||||
public function getList($objectType, $objectID)
|
||||
{
|
||||
$actions = array();
|
||||
$sql = "SELECT * FROM " . TABLE_ACTION . " WHERE objectType = '$objectType' AND objectID = '$objectID' AND company = '{$this->app->company->id}' ORDER BY ID";
|
||||
$stmt = $this->dbh->query($sql);
|
||||
while($action = $stmt->fetch())
|
||||
{
|
||||
$action->date = date('Y-m-d H:i:s', $action->date);
|
||||
$actions[$action->id] = $action;
|
||||
}
|
||||
|
||||
$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 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
trunk/module/admin/control.php
Normal file
99
trunk/module/admin/control.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: control.php 1280 2009-09-07 05:41:14Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class admin extends control
|
||||
{
|
||||
/* 构造函数,加载company, user, group模块。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('company');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('group');
|
||||
}
|
||||
|
||||
/* 首页。*/
|
||||
public function index($tab = 'index')
|
||||
{
|
||||
$header['title'] = $this->lang->admin->index;
|
||||
$position[] = $header['title'];
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 公司列表。*/
|
||||
public function browseCompany()
|
||||
{
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->company->browse;
|
||||
$position[] = $this->lang->admin->company;
|
||||
$position[] = $this->lang->company->browse;
|
||||
|
||||
$companies = $this->company->getList();
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('companies', $companies);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 用户列表。*/
|
||||
public function browseUser($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->user->browse;
|
||||
$position[] = $this->lang->admin->user;
|
||||
$position[] = $this->lang->user->browse;
|
||||
|
||||
$users = $this->user->getList($companyID);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('users', $users);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 分组列表。*/
|
||||
public function browseGroup($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->group->browse;
|
||||
$position[] = $this->lang->admin->user;
|
||||
$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();
|
||||
}
|
||||
}
|
||||
33
trunk/module/admin/lang/zh-cn.php
Normal file
33
trunk/module/admin/lang/zh-cn.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @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 = '浏览分组';
|
||||
44
trunk/module/admin/model.php
Normal file
44
trunk/module/admin/model.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: model.php 1270 2009-09-05 02:40:22Z wwccss $
|
||||
* @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()
|
||||
{
|
||||
}
|
||||
}
|
||||
69
trunk/module/admin/view/browsecompany.html.php
Normal file
69
trunk/module/admin/view/browsecompany.html.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: browsecompany.html.php 1270 2009-09-05 02:40:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->company->browse;?></caption>
|
||||
<tr>
|
||||
<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->action;?></th>
|
||||
</tr>
|
||||
<?php foreach($companies as $company):?>
|
||||
<tr>
|
||||
<td><?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 $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>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
67
trunk/module/admin/view/browsegroup.html.php
Normal file
67
trunk/module/admin/view/browsegroup.html.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse group 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->group->browse;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->id;?></th>
|
||||
<th><?php echo $lang->group->name;?></th>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<th><?php echo $lang->group->users;?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
<?php foreach($groups as $group):?>
|
||||
<tr>
|
||||
<td><?php echo $group->id;?></td>
|
||||
<td><?php echo $group->name;?></td>
|
||||
<td><?php echo $group->desc;?></td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($groupUsers[$group->id] as $user)
|
||||
{
|
||||
echo $user . ' ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('group', 'edit', "groupID=$group->id"), $lang->group->edit);?>
|
||||
<?php echo html::a($this->createLink('group', 'managepriv', "groupID=$group->id"), $lang->group->managePriv);?>
|
||||
<?php echo html::a($this->createLink('group', 'managemember', "groupID=$group->id"), $lang->group->manageMember);?>
|
||||
<?php echo html::a($this->createLink('group', 'delete', "groupID=$group->id"), $lang->group->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<div class='a-right'><?php echo html::a($this->createLink('group', 'create'), $lang->group->create);?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
72
trunk/module/admin/view/browseuser.html.php
Normal file
72
trunk/module/admin/view/browseuser.html.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse user 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: browseuser.html.php 1270 2009-09-05 02:40:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->user->browse;?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->id;?></th>
|
||||
<th><?php echo $lang->user->account;?></th>
|
||||
<th><?php echo $lang->user->realname;?></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->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr>
|
||||
<td class='a-right'><?php echo $user->id;?></td>
|
||||
<td><?php echo $user->realname;?></td>
|
||||
<td><?php if(common::hasPriv('user', 'view')) echo html::a($this->createLink('user', 'view', "account=$user->account"), $user->account); else echo $user->account;?></td>
|
||||
<td><?php echo $user->nickname;?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td class='a-center'><?php if(isset($lang->user->gendarList->{$user->gendar})) echo $lang->user->gendarList->{$user->gendar};?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
<td class='a-center'><?php echo $user->join;?></td>
|
||||
<td><?php echo $user->visits;?></td>
|
||||
<td>
|
||||
<?php if(common::hasPriv('user', 'edit')) echo html::a($this->createLink('user', 'edit', "userID=$user->id&from=company"), $lang->user->edit);?>
|
||||
<?php if(common::hasPriv('user', 'delete')) echo html::a($this->createLink('user', 'delete', "userID=$user->id"), $lang->user->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='a-right'><?php if(common::hasPriv('user', 'create')) echo html::a($this->createLink('user', 'create'), $lang->user->create);?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
41
trunk/module/admin/view/index.html.php
Normal file
41
trunk/module/admin/view/index.html.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* The index 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package admin
|
||||
* @version $Id: index.html.php 1270 2009-09-05 02:40:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t2">
|
||||
<div class="yui-b a-center">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->admin->welcome;?></caption>
|
||||
<tr>
|
||||
<td><?php echo $lang->admin->welcome;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
29
trunk/module/admin/view/menu.html.php
Normal file
29
trunk/module/admin/view/menu.html.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php $companyVar = "companyID={$app->company->id}";?>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->admin->company;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('admin', 'browsecompany'), $lang->company->browse);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'create'), $lang->company->create);?><br />
|
||||
<?php echo html::a($this->createLink('company', 'edit', $companyVar ), $lang->company->edit);?> <br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->admin->user;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('admin', 'browseuser', $companyVar), $lang->user->browse);?><br />
|
||||
<?php echo html::a($this->createLink('user', 'create', $companyVar), $lang->user->create);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->admin->group;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('admin', 'browsegroup', $companyVar), $lang->group->browse);?><br />
|
||||
<?php echo html::a($this->createLink('group', 'create', $companyVar), $lang->group->create);?><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
193
trunk/module/bug/control.php
Normal file
193
trunk/module/bug/control.php
Normal file
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of bug 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: control.php 1459 2009-10-23 05:50:21Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class bug extends control
|
||||
{
|
||||
private $products = array();
|
||||
|
||||
/* 构造函数,加载story, release, tree等模块。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('action');
|
||||
$this->products = $this->product->getPairs();
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
$this->assign('products', $this->products);
|
||||
}
|
||||
|
||||
/* bug首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink('bug', 'browse'));
|
||||
}
|
||||
|
||||
/* 浏览一个产品下面的bug。*/
|
||||
public function browse($productID = 0, $type = 'byModule', $param = 0)
|
||||
{
|
||||
$productID = common::saveProductState($productID, key($this->products));
|
||||
$currentModuleID = ($type == 'byModule') ? (int)$param : 0;
|
||||
if($currentModuleID == 0)
|
||||
{
|
||||
$currentModuleName = $this->lang->bug->allBugs;
|
||||
}
|
||||
else
|
||||
{
|
||||
$currentModule = $this->tree->getById($currentModuleID);
|
||||
$currentModuleName = sprintf($this->lang->bug->moduleBugs, $currentModule->name);
|
||||
}
|
||||
|
||||
if($type == "byModule")
|
||||
{
|
||||
$childModuleIds = $this->tree->getAllChildId($currentModuleID);
|
||||
$bugs = $this->bug->getModuleBugs($productID, $childModuleIds);
|
||||
}
|
||||
|
||||
$users = array('' => '', 'Closed' => 'Closed') + $this->user->getRealNames($this->bug->extractAccountsFromList($bugs));
|
||||
|
||||
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common;
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$position[] = $this->lang->bug->common;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleTree', $this->tree->getTreeMenu($productID, $viewType = 'bug', $rooteModuleID = 0, array('treeModel', 'createBugLink')));
|
||||
$this->assign('type', $type);
|
||||
$this->assign('bugs', $bugs);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('currentModuleName', $currentModuleName);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 创建Bug。*/
|
||||
public function create($productID, $moduleID = 0)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$_POST['severity'] = str_replace('item', '', $_POST['severity']);
|
||||
$bugID = $this->bug->create();
|
||||
$this->action->create('bug', $bugID, 'Opened');
|
||||
die(js::locate($this->createLink('bug', 'browse', "productID=$_POST[productID]&type=byModule¶m=$_POST[moduleID]"), 'parent'));
|
||||
}
|
||||
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
|
||||
$productID = (int)$productID;
|
||||
if($productID == 0) $productID = key($this->products);
|
||||
$currentModuleID = (int)$moduleID;
|
||||
|
||||
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create;
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$position[] = $this->lang->bug->create;
|
||||
|
||||
$users = array('' => '') + $this->user->getPairs($this->app->company->id);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleOptionMenu', $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0));
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('users', $users);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 查看一个bug。*/
|
||||
public function view($bugID)
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$productName = $this->products[$productID];
|
||||
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->view;
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName);
|
||||
$position[] = $this->lang->bug->view;
|
||||
|
||||
$users = array('' => '') + $this->user->getRealNames($this->bug->extractAccountsFromSingle($bug));
|
||||
$actions = $this->action->getList('bug', $bugID);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productName', $productName);
|
||||
$this->assign('modulePath', $this->tree->getParents($bug->module));
|
||||
$this->assign('bug', $bug);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('actions', $actions);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个Bug。*/
|
||||
public function edit($bugID)
|
||||
{
|
||||
/* 更新bug信息。*/
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->update($bugID);
|
||||
$actionID = $this->action->create('bug', $bugID, 'Edited', $_POST['comment']);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
/* 生成表单。*/
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$currentModuleID = $bug->module;
|
||||
$header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->edit;
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$position[] = $this->lang->bug->edit;
|
||||
|
||||
$users = array('' => '') + $this->user->getPairs($this->app->company->id);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleOptionMenu', $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0));
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('users', $users);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('bug', $bug);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
$header['title'] = $this->lang->page->delete;
|
||||
$this->assign('header', $header);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function ajaxGetUserBugs($account = '')
|
||||
{
|
||||
if($account == '') $account = $this->app->user->account;
|
||||
$bugs = $this->bug->getUserBugPairs($account);
|
||||
die(html::select('bug', $bugs, '', 'class=select-1'));
|
||||
}
|
||||
}
|
||||
63
trunk/module/bug/lang/en.php
Normal file
63
trunk/module/bug/lang/en.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* The bug module en 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: en.php 1145 2009-04-02 11:21:58Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang['page']['common'] = 'bug';
|
||||
$lang['page']['index'] = "{$lang['page']['common']}/index";
|
||||
$lang['page']['create'] = "{$lang['page']['common']}/create";
|
||||
$lang['page']['read'] = "{$lang['page']['common']}/read";
|
||||
$lang['page']['update'] = "{$lang['page']['common']}/update";
|
||||
$lang['page']['delete'] = "{$lang['page']['common']}/delete";
|
||||
$lang['bug']['id'] = 'id';
|
||||
$lang['bug']['product'] = 'product';
|
||||
$lang['bug']['module'] = 'module';
|
||||
$lang['bug']['path'] = 'path';
|
||||
$lang['bug']['project'] = 'project';
|
||||
$lang['bug']['sprint'] = 'sprint';
|
||||
$lang['bug']['story'] = 'story';
|
||||
$lang['bug']['task'] = 'task';
|
||||
$lang['bug']['title'] = 'title';
|
||||
$lang['bug']['severity'] = 'severity';
|
||||
$lang['bug']['type'] = 'type';
|
||||
$lang['bug']['os'] = 'os';
|
||||
$lang['bug']['browser'] = 'browser';
|
||||
$lang['bug']['machine'] = 'machine';
|
||||
$lang['bug']['found'] = 'found';
|
||||
$lang['bug']['steps'] = 'steps';
|
||||
$lang['bug']['status'] = 'status';
|
||||
$lang['bug']['mailto'] = 'mailto';
|
||||
$lang['bug']['openedBy'] = 'openedBy';
|
||||
$lang['bug']['openedDate'] = 'openedDate';
|
||||
$lang['bug']['openedBuild'] = 'openedBuild';
|
||||
$lang['bug']['assignedTo'] = 'assignedTo';
|
||||
$lang['bug']['assignedDate'] = 'assignedDate';
|
||||
$lang['bug']['resolvedBy'] = 'resolvedBy';
|
||||
$lang['bug']['resolution'] = 'resolution';
|
||||
$lang['bug']['resolvedBuild'] = 'resolvedBuild';
|
||||
$lang['bug']['resolvedDate'] = 'resolvedDate';
|
||||
$lang['bug']['closedBy'] = 'closedBy';
|
||||
$lang['bug']['closedDate'] = 'closedDate';
|
||||
$lang['bug']['lastEditedBy'] = 'lastEditedBy';
|
||||
$lang['bug']['lastEditedDate'] = 'lastEditedDate';
|
||||
$lang['bug']['field1'] = 'field1';
|
||||
$lang['bug']['field2'] = 'field2';
|
||||
$lang['bug']['feild3'] = 'feild3';
|
||||
151
trunk/module/bug/lang/zh-cn.php
Normal file
151
trunk/module/bug/lang/zh-cn.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: zh-cn.php 1406 2009-10-12 07:49:52Z wwccss $
|
||||
* @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 = 'ajax:我的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 = '%s';
|
||||
|
||||
$lang->bug->labProductAndModule = '所属产品::模块';
|
||||
$lang->bug->labProjectAndTask = '相关项目::任务';
|
||||
$lang->bug->labStory = '相关需求';
|
||||
$lang->bug->labBuild = '程序编译版本';
|
||||
$lang->bug->labTypeAndSeverity = '类型::严重程度';
|
||||
$lang->bug->labSystemBrowserAndHardware = '系统::浏览器';
|
||||
$lang->bug->labAssignAndMail = '指派给::抄送给';
|
||||
|
||||
$lang->bug->legendRelated = '相关信息';
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
$lang->bug->legendMailto = '抄送给';
|
||||
$lang->bug->legendAttatch = '附件';
|
||||
$lang->bug->legendLinkBugs = '相关Bug';
|
||||
$lang->bug->legendOpenInfo = '创建信息';
|
||||
$lang->bug->legendResolveInfo = '解决信息';
|
||||
$lang->bug->legendCloseInfo = '关闭信息';
|
||||
$lang->bug->legendStoryAndTask= '需求::任务';
|
||||
$lang->bug->legendCases = '相关用例';
|
||||
$lang->bug->legendSteps = '重现步骤';
|
||||
$lang->bug->legendAction = '操作';
|
||||
$lang->bug->legendHistory = '历史记录';
|
||||
$lang->bug->legendComment = '备注';
|
||||
|
||||
$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->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 = '其他';
|
||||
|
||||
/* Define the types. */
|
||||
$lang->bug->typeList->codeerror = '代码错误';
|
||||
$lang->bug->typeList->interface = '界面优化';
|
||||
$lang->bug->typeList->designchange = '设计变更';
|
||||
$lang->bug->typeList->Others = '其他';
|
||||
|
||||
$lang->bug->statusList->active = 'active';
|
||||
$lang->bug->statusList->resolved = 'resolved';
|
||||
$lang->bug->statusList->closed = 'closed';
|
||||
|
||||
$lang->bug->resolutionList->bydesign = 'By Design';
|
||||
$lang->bug->resolutionList->duplicate = 'Duplicate';
|
||||
$lang->bug->resolutionList->external = 'External';
|
||||
$lang->bug->resolutionList->fixed = 'Fixed';
|
||||
$lang->bug->resolutionList->notrepro = 'Not Repro';
|
||||
$lang->bug->resolutionList->postponed = 'Postponed';
|
||||
$lang->bug->resolutionList->willnotfix = "Won not Fix";
|
||||
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属产品';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->path = '模块路径';
|
||||
$lang->bug->project = '所属项目';
|
||||
$lang->bug->story = '相关需求';
|
||||
$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 = '创建Build';
|
||||
$lang->bug->assignedTo = '指派给';
|
||||
$lang->bug->assignedDate = '指派日期';
|
||||
$lang->bug->resolvedBy = '解决者';
|
||||
$lang->bug->resolution = '解决方案';
|
||||
$lang->bug->resolvedBuild = '解决Build';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->lastEditedDate = '最后修改日期';
|
||||
$lang->bug->files = '附件';
|
||||
$lang->bug->field1 = 'field1';
|
||||
$lang->bug->field2 = 'field2';
|
||||
$lang->bug->feild3 = 'feild3';
|
||||
161
trunk/module/bug/model.php
Normal file
161
trunk/module/bug/model.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: model.php 1455 2009-10-23 01:56:37Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class bugModel extends model
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/* 创建一个Bug。*/
|
||||
function create()
|
||||
{
|
||||
extract($_POST);
|
||||
$openedBy = $this->app->user->account;
|
||||
$openedDate = time();
|
||||
$assignedDate = !empty($assignedTo) ? time() : 0;
|
||||
$sql = "INSERT INTO " . TABLE_BUG . " (product, module, type, severity, os, browser, assignedTo, assignedDate, mailTo, title, steps, openedBy, openedDate)
|
||||
VALUES('$productID', '$moduleID', '$type', '$severity', '$os', '$browser', '$assignedTo', '$assignedDate', '$mailTo', '$title', '$steps', '$openedBy', '$openedDate' )";
|
||||
$this->dbh->exec($sql);
|
||||
return $this->dbh->lastInsertID();
|
||||
}
|
||||
|
||||
/* 获得某一个产品,某一个模块下面的所有bug。*/
|
||||
public function getModuleBugs($productID, $moduleIds = 0)
|
||||
{
|
||||
$where = " WHERE `product` = '$productID'";
|
||||
$where .= !empty($moduleIds) ? " AND module " . helper::dbIN($moduleIds) : '';
|
||||
$sql = "SELECT * FROM " . TABLE_BUG . $where . " ORDER BY id DESC";
|
||||
$stmt = $this->dbh->query($sql);
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
/* 获取一个bug的详细信息。*/
|
||||
public function getById($bugID)
|
||||
{
|
||||
$bug = $this->dbh->query("SELECT * FROM " . TABLE_BUG . " WHERE id = '$bugID'")->fetch();
|
||||
foreach($bug as $key => $value)
|
||||
{
|
||||
if(strpos($key, 'Date') !== false)
|
||||
{
|
||||
if(empty($value))
|
||||
{
|
||||
$bug->$key = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bug->$key = date('Y-m-d H:i:s', $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $bug;
|
||||
}
|
||||
|
||||
/* 更新bug信息。*/
|
||||
public function update($bugID)
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
$changes = array();
|
||||
foreach($_POST as $key => $value)
|
||||
{
|
||||
if($key == 'comment') continue;
|
||||
if(strpos($key, 'Date') !== false) $_POST[$key] = strtotime($value);
|
||||
if($key == 'severity') $value = str_replace('item', '', $value);
|
||||
if($value != $bug->$key)
|
||||
{
|
||||
$change['field'] = $key;
|
||||
$change['old'] = $bug->$key;
|
||||
$change['new'] = $value;
|
||||
$changes[] = $change;
|
||||
}
|
||||
}
|
||||
extract($_POST);
|
||||
$now = time();
|
||||
$severity = str_replace('item', '', $severity);
|
||||
$lastEditedDate = $now;
|
||||
$assignedDate = $bug->assignedDate;
|
||||
|
||||
if($assignedTo != $bug->assignedTo) $assignedDate = $now;
|
||||
if($resolution != '' and empty($resolvedDate)) $resolvedDate = $now;
|
||||
if($closedBy != '' and empty($closedDate)) $closedDate = $now;
|
||||
|
||||
$sql = "UPDATE " . TABLE_BUG . " SET
|
||||
title = '$title', product='$product', module = '$module',
|
||||
type='$type', severity = '$severity', os = '$os', status = '$status',
|
||||
assignedTo='$assignedTo', assignedDate = '$assignedDate', resolvedBy = '$resolvedBy', resolvedDate = '$resolvedDate', resolution='$resolution',
|
||||
closedBy = '$closedBy', closedDate = '$closedDate', steps = '$steps',
|
||||
lastEditedBy = '{$this->app->user->account}', lastEditedDate = '$lastEditedDate'
|
||||
WHERE id ='$bugID' LIMIT 1 ";
|
||||
$this->dbh->exec($sql);
|
||||
return $changes;
|
||||
}
|
||||
|
||||
/* 从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)
|
||||
->query();
|
||||
while($bug = $stmt->fetch())
|
||||
{
|
||||
$bug->title = $bug->product . ' / ' . $bug->title;
|
||||
$bugs[$bug->id] = $bug->title;
|
||||
}
|
||||
return $bugs;
|
||||
}
|
||||
}
|
||||
105
trunk/module/bug/view/browse.html.php
Normal file
105
trunk/module/bug/view/browse.html.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: browse.html.php 1369 2009-09-29 05:41:15Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/treeview.html.php';?>
|
||||
<?php include '../../common/tablesorter.html.php';?>
|
||||
<script language='Javascript'>
|
||||
function selectProduct(productID)
|
||||
{
|
||||
link = createLink('bug', 'browse', 'productID=' + productID + '&type=byModule¶m=0');
|
||||
location.href=link;
|
||||
}
|
||||
</script>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->bug->selectProduct;?>
|
||||
<?php echo html::select('productID', $products, $productID, 'onchange="selectProduct(this.value);" style="width:200px"');?>
|
||||
</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $moduleTree;?></div>
|
||||
<div class='a-right'>
|
||||
<?php echo html::a($this->createLink('bug', 'browse', "productID=$productID"), $lang->bug->allBugs);?>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manageBug);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id='tabbar' class='yui-d0' style='clear:right'>
|
||||
<ul>
|
||||
<?php
|
||||
echo "<li><nobr>$productName</nobr></li>";
|
||||
echo "<li id='byModuleTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=byModule¶m=$currentModuleID"), $currentModuleName) . "</nobr></li>";
|
||||
//echo "<li id='assignToMeTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToMe"), $lang->bug->assignToMe) . "</nobr></li>";
|
||||
//echo "<li id='openedByMeTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=openedByMe"), $lang->bug->openedByMe) . "</nobr></li>";
|
||||
//echo "<li id='resolvedByMeTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=resolvedByMe"), $lang->bug->resolvedByMe) . "</nobr></li>";
|
||||
//echo "<li id='assignToNullTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=assignToNull"), $lang->bug->assignToNull) . "</nobr></li>";
|
||||
//echo "<li id='longLifeBugsTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=longLifeBugs"), $lang->bug->longLifeBugs) . "</nobr></li>";
|
||||
//echo "<li id='postponedBugsTab'><nobr>" . html::a($this->createLink('bug', 'browse', "productid=$productID&type=postponedBugs"), $lang->bug->postponedBugs) . "</nobr></li>";
|
||||
echo <<<EOT
|
||||
<script language="Javascript">
|
||||
$("#{$type}Tab").addClass('active');
|
||||
</script>
|
||||
EOT;
|
||||
?>
|
||||
</ul>
|
||||
<?php if(common::hasPriv('bug', 'create')) echo '<div>' . html::a($this->createLink('bug', 'create', "productID=$productID&moduleID=$currentModuleID"), $lang->bug->create) . '</div>';?>
|
||||
</div>
|
||||
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->bug->id;?></th>
|
||||
<th><?php echo $lang->bug->severity;?></th>
|
||||
<th><?php echo $lang->bug->title;?></th>
|
||||
<th><?php echo $lang->bug->openedBy;?></th>
|
||||
<th><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th><?php echo $lang->bug->resolvedBy;?></th>
|
||||
<th><?php echo $lang->bug->resolution;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<tr class='a-center'>
|
||||
<td class='a-right'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?></td>
|
||||
<td><?php echo $bug->severity?></td>
|
||||
<td width='50%' class='a-left'><?php echo $bug->title;?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td><?php echo $bug->resolution;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
98
trunk/module/bug/view/create.html.php
Normal file
98
trunk/module/bug/view/create.html.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: create.html.php 1359 2009-09-28 01:52:20Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<script language='Javascript'>
|
||||
function loadModuleMenu(productID)
|
||||
{
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug');
|
||||
$('#moduleIdBox').load(link);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class='yui-doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->bug->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->labProductAndModule;?></th>
|
||||
<td class='a-left'>
|
||||
<?php echo html::select('productID', $products, $productID, "onchange=loadModuleMenu(this.value); class='select-2'");?>
|
||||
<span id='moduleIdBox'><?php echo html::select('moduleID', $moduleOptionMenu, $currentModuleID, 'class=select-3');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->labStory;?></th>
|
||||
<td class='a-left'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->labProjectAndTask;?></th>
|
||||
<td class='a-left'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->labBuild;?></th>
|
||||
<td class='a-left'>
|
||||
</td>
|
||||
</tr>-->
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->labTypeAndSeverity;?></th>
|
||||
<td class='a-left'>
|
||||
<?php echo html::select('type', (array)$lang->bug->typeList, '', 'class=select-2');?>
|
||||
<?php echo html::select('severity', (array)$lang->bug->severityList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->labSystemBrowserAndHardware;?></nobr></th>
|
||||
<td class='a-left'>
|
||||
<?php echo html::select('os', (array)$lang->bug->osList, '', 'class=select-2');?>
|
||||
<?php echo html::select('browser', (array)$lang->bug->browserList, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><nobr><?php echo $lang->bug->labAssignAndMail;?></nobr></th>
|
||||
<td class='a-left'>
|
||||
<?php echo html::select('assignedTo', $users, '', 'class=select-2');?>
|
||||
<?php echo html::select('mailTo', $users, '', 'class=select-2');?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->title;?></th>
|
||||
<td class='a-left'><input type='text' name='title' class='text-1' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->bug->steps;?></th>
|
||||
<td class='a-left'><textarea name='steps' class='area-1' rows='8'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<?php echo html::submitButton() . html::resetButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
215
trunk/module/bug/view/edit.html.php
Normal file
215
trunk/module/bug/view/edit.html.php
Normal file
@@ -0,0 +1,215 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<script language='Javascript'>
|
||||
function loadModuleMenu(productID)
|
||||
{
|
||||
link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug');
|
||||
$('#moduleIdBox').load(link);
|
||||
}
|
||||
</script>
|
||||
<form method='post'>
|
||||
<div class='yui-d0'>
|
||||
<div id='titlebar'>
|
||||
<div id='main'>
|
||||
BUG #<?php echo $bug->id . $lang->colon;?>
|
||||
<?php echo html::input('title', $bug->title, 'class=text-1');?>
|
||||
</div>
|
||||
<div><?php echo html::submitButton()?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-doc3 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
|
||||
<div class='yui-u first'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendBasicInfo;?></legend>
|
||||
<table class='table-1 a-left' cellpadding='0' cellspacing='0'>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->labProductAndModule;?></td>
|
||||
<td>
|
||||
<?php echo html::select('product', $products, $productID, "onchange=loadModuleMenu(this.value); class='select-2'");?>
|
||||
<span id='moduleIdBox'><?php echo html::select('module', $moduleOptionMenu, $currentModuleID);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->type;?></td>
|
||||
<td><?php echo html::select('type', (array)$lang->bug->typeList, $bug->type, 'class=select-2');?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->severity;?></td>
|
||||
<td><?php echo html::select('severity', (array)$lang->bug->severityList, $bug->severity, 'class=select-2');?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->os;?></td>
|
||||
<td><?php echo html::select('os', (array)$lang->bug->osList, $bug->os, 'class=select-2');?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->status;?></td>
|
||||
<td><?php echo html::select('status', (array)$lang->bug->statusList, $bug->status, 'class=select-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, 'class=select-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->assignedDate;?></td>
|
||||
<td><?php echo $bug->assignedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->lastEditedBy;?></td>
|
||||
<td><?php echo $bug->lastEditedBy;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->lastEditedDate;?></td>
|
||||
<td><?php echo $bug->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendStoryAndTask;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->story;?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->task;?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendMailto;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendAttatch;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='yui-u'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendOpenInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->openedBy;?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->openedDate;?></td>
|
||||
<td><?php echo $bug->openedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->openedBuild;?></td>
|
||||
<td><?php echo html::input('openedBuild', $bug->openedBuild, 'class=text-2');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendResolveInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->resolvedBy;?></td>
|
||||
<td><?php echo html::select('resolvedBy', $users, $bug->resolvedBy, 'class=select-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolvedDate;?></td>
|
||||
<td><?php echo html::input('resolvedDate', $bug->resolvedDate, 'class=text-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolvedBuild;?></td>
|
||||
<td><?php echo html::input('resolvedBuild', $bug->resolvedBuild, 'class=text-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolution;?></td>
|
||||
<td><?php echo html::select('resolution', array(''=> '') + (array)$lang->bug->resolutionList, $bug->resolution, 'class=select-2');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendCloseInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->closedBy;?></td>
|
||||
<td><?php echo html::select('closedBy', $users, $bug->closedBy, 'class=select-2');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->closedDate;?></td>
|
||||
<td><?php echo html::input('closedDate', $bug->closedDate, 'class=text-2');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendLinkBugs;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendCases;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendComment;?></legend>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td width='90%'><textarea name='comment' rows='4' class='area-1'></textarea></td>
|
||||
<td>
|
||||
<?php echo html::submitButton();?>
|
||||
<input type='button' value='<?php echo $lang->bug->buttonToList;?>' class='button-s'
|
||||
onclick='location.href="<?php echo $this->createLink('bug', 'browse', "productID=$productID");?>"' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendSteps;?></legend>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td width='90%'><textarea name='steps' rows='4' class='area-1'><?php echo $bug->steps;?></textarea></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
28
trunk/module/bug/view/index.html.php
Normal file
28
trunk/module/bug/view/index.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: index.html.php 1159 2009-04-26 13:53:11Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
233
trunk/module/bug/view/view.html.php
Normal file
233
trunk/module/bug/view/view.html.php
Normal file
@@ -0,0 +1,233 @@
|
||||
<?php
|
||||
/**
|
||||
* The 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package bug
|
||||
* @version $Id: view.html.php 1314 2009-09-14 06:09:08Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
|
||||
<div class='yui-d0'>
|
||||
<div id='titlebar'>
|
||||
<div id='main'>BUG #<?php echo $bug->id . $lang->colon . $bug->title;?></div>
|
||||
<div>
|
||||
<?php
|
||||
if(common::hasPriv('bug', 'edit')) echo html::a($this->createLink('bug', 'edit', "bugID=$bug->id"), $lang->bug->buttonEdit);
|
||||
//echo html::a($this->createLink('bug', 'resolve', "bugID=$bug->id"), $lang->bug->buttonResolve);
|
||||
//echo html::a($this->createLink('bug', 'close', "bugID=$bug->id"), $lang->bug->buttonClose);
|
||||
//echo html::a($this->createLink('bug', 'activate', "bugID=$bug->id"), $lang->bug->buttonActivate);
|
||||
echo html::a($this->createLink('bug', 'browse', "productID=$bug->product"), $lang->bug->buttonToList);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-doc3 yui-t7'>
|
||||
<div class='yui-g'>
|
||||
|
||||
<div class='yui-u first'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendBasicInfo;?></legend>
|
||||
<table class='table-1 a-left' cellpadding='0' cellspacing='0'>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->labProductAndModule;?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo $productName;
|
||||
if(!empty($modulePath)) echo $lang->arrow;
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
echo $module->name;
|
||||
if(isset($modulePath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->type;?></td>
|
||||
<td><?php echo $lang->bug->typeList->{$bug->type};?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->os;?></td>
|
||||
<td><?php echo $lang->bug->osList->{$bug->os};?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->severity;?></td>
|
||||
<td><?php echo $bug->severity;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->status;?></td>
|
||||
<td><?php echo $bug->status;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->assignedTo;?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->assignedDate;?></td>
|
||||
<td><?php echo $bug->assignedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->lastEditedBy;?></td>
|
||||
<td><?php echo $users[$bug->lastEditedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->lastEditedDate;?></td>
|
||||
<td><?php echo $bug->lastEditedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendStoryAndTask;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->story;?></td>
|
||||
<td><?php //echo $bug->story;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->task;?></td>
|
||||
<td><?php //echo $bug->task;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendMailto;?></legend>
|
||||
<div></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendAttatch;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='yui-u'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendOpenInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->openedBy;?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->openedDate;?></td>
|
||||
<td><?php echo $bug->openedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->openedBuild;?></td>
|
||||
<td><?php echo $bug->openedBuild;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendResolveInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->resolvedBy;?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolvedDate;?></td>
|
||||
<td><?php echo $bug->resolvedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolvedBuild;?></td>
|
||||
<td><?php echo $bug->resolvedBuild;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->resolution;?></td>
|
||||
<td><?php if(!empty($bug->resolution)) echo $lang->bug->resolutionList->{$bug->resolution};?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendCloseInfo;?></legend>
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td width='40%' class='rowhead'><?php echo $lang->bug->closedBy;?></td>
|
||||
<td><?php echo $users[$bug->closedBy];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='rowhead'><?php echo $lang->bug->closedDate;?></td>
|
||||
<td><?php echo $bug->closedDate;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendLinkBugs;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendCases;?></legend>
|
||||
<div> </div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='yui-d0'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendAction;?></legend>
|
||||
<div class='a-center' style='font-size:16px; font-weight:bold'>
|
||||
<?php
|
||||
if(common::hasPriv('bug', 'edit')) echo html::a($this->createLink('bug', 'edit', "bugID=$bug->id"), $lang->bug->buttonEdit);
|
||||
//echo html::a($this->createLink('bug', 'resolve', "bugID=$bug->id"), $lang->bug->buttonResolve);
|
||||
//echo html::a($this->createLink('bug', 'close', "bugID=$bug->id"), $lang->bug->buttonClose);
|
||||
//echo html::a($this->createLink('bug', 'activate', "bugID=$bug->id"), $lang->bug->buttonActivate);
|
||||
echo html::a($this->createLink('bug', 'browse', "productID=$bug->product"), $lang->bug->buttonToList);
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendSteps;?></legend>
|
||||
<div><?php echo nl2br($bug->steps);?></div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->bug->legendHistory;?></legend>
|
||||
<ol>
|
||||
<?php foreach($actions as $action):?>
|
||||
<li>
|
||||
<span><?php echo "$action->date, <strong>$action->action</strong> BY <strong>$action->actor</strong>"; ?></span>
|
||||
<?php if(!empty($action->comment) or !empty($action->history)):?>
|
||||
<div class='history'>
|
||||
<?php
|
||||
foreach($action->history as $history)
|
||||
{
|
||||
echo "CHANGE <strong>$history->field</strong> FROM '$history->old' TO '$history->new' . <br />";
|
||||
}
|
||||
echo nl2br($action->comment);
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ol>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
28
trunk/module/common/action.html.php
Normal file
28
trunk/module/common/action.html.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->history;?></legend>
|
||||
<ol>
|
||||
<?php foreach($actions as $action):?>
|
||||
<li>
|
||||
<span><?php echo "$action->date, <strong>$action->action</strong> by <strong>$action->actor</strong>"; ?></span>
|
||||
<?php if(!empty($action->comment) or !empty($action->history)):?>
|
||||
<div class='history'>
|
||||
<?php
|
||||
foreach($action->history as $history)
|
||||
{
|
||||
if($history->diff != '')
|
||||
{
|
||||
echo "CHANGE <strong>$history->field</strong>, the diff is: <blockquote>" . nl2br($history->diff) . "</blockquote>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "CHANGE <strong>$history->field</strong> FROM '$history->old' TO '$history->new' . <br />";
|
||||
}
|
||||
}
|
||||
echo nl2br($action->comment);
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ol>
|
||||
</fieldset>
|
||||
208
trunk/module/common/control.php
Normal file
208
trunk/module/common/control.php
Normal file
@@ -0,0 +1,208 @@
|
||||
<?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 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;
|
||||
}
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
if(!common::hasPriv($module, $method))
|
||||
{
|
||||
$referer = helper::safe64Encode($_SERVER['HTTP_REFERER']);
|
||||
$denyLink = $this->createLink('user', 'deny', "module=$module&method=$method&referer=$referer");
|
||||
|
||||
/* 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
|
||||
{
|
||||
$this->locate($this->createLink('user', 'login'));
|
||||
}
|
||||
}
|
||||
|
||||
/* <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[$module][$method])) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* <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><EFBFBD><EFBFBD><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><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->setSessionCompany($_SESSION['company']);
|
||||
}
|
||||
$company = $this->company->getByDomain();
|
||||
if(!$company) $company = $this->company->getByDomain($this->config->default->domain);
|
||||
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $_SERVER['HTTP_HOST']), __FILE__, __LINE__, $exit = true);
|
||||
$_SESSION['company'] = $company;
|
||||
$this->app->setSessionCompany($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->setSessionUser($_SESSION['user']);
|
||||
}
|
||||
elseif($this->app->company->guest)
|
||||
{
|
||||
$user = new stdClass();
|
||||
$user->account = 'guest';
|
||||
$user->realname = 'guest';
|
||||
$this->loadModel('user');
|
||||
$user->rights = $this->user->authorize('guest');
|
||||
$_SESSION['user'] = $user;
|
||||
$this->app->setSessionUser($_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, $defaultProjectID)
|
||||
{
|
||||
global $app;
|
||||
if($projectID > 0) $app->session->set('project', (int)$projectID);
|
||||
if($projectID == 0 and $app->session->project == '') $app->session->set('project', $defaultProjectID);
|
||||
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)
|
||||
{
|
||||
$changes = array();
|
||||
foreach($new as $key => $value)
|
||||
{
|
||||
if(strtolower($key) == 'lastediteddate') continue;
|
||||
if($new->$key !== $old->$key)
|
||||
{
|
||||
$diff = '';
|
||||
if(substr_count($value, "\n") > 1 or substr_count($old->$key, "\n") > 1) $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", $text1);
|
||||
$o = explode("\n", $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);
|
||||
}
|
||||
}
|
||||
6
trunk/module/common/footer.html.php
Normal file
6
trunk/module/common/footer.html.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<div id='footer' class='yui-d0'>
|
||||
powered by <a href='http://www.zentao.cn' target='_blank'>ZenTaoPMS</a> <span style='font-size:8px;'>(<?php echo $config->version, ' ', $config->svn->revision, ' ', $config->svn->lastDate ;?>)</span>.
|
||||
</div>
|
||||
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' style='<?php if($config->debug) echo "display:block; margin:10px; width:90%; height:100px; border:1px solid #fff";?>'></iframe>
|
||||
</body>
|
||||
</html>
|
||||
138
trunk/module/common/header.html.php
Normal file
138
trunk/module/common/header.html.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
$clientTheme = $this->app->getClientTheme();
|
||||
$webRoot = $this->app->getWebRoot();
|
||||
$jsRoot = $webRoot . "js/";
|
||||
$themeRoot = $webRoot . "theme/";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dli'>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
||||
<?php
|
||||
if(isset($header['title'])) echo "<title>$header[title] - $lang->zentaoMS</title>\n";
|
||||
if(isset($header['keyword'])) echo "<meta name='keywords' content='$header[keyword]'>\n";
|
||||
if(isset($header['desc'])) echo "<meta name='description' content='$header[desc]'>\n";
|
||||
?>
|
||||
<link rel='stylesheet' href='<?php echo $clientTheme . 'yui.css';?>' type='text/css' media='screen' />
|
||||
<link rel='stylesheet' href='<?php echo $clientTheme . 'style.css';?>' type='text/css' media='screen' />
|
||||
<script src="<?php echo $jsRoot;?>jquery/lib.js" type="text/javascript"></script>
|
||||
<?php echo js::exportLinkFunc();?>
|
||||
<script type="text/javascript">
|
||||
cssRoot = '<?php echo $themeRoot;?>';
|
||||
cssFile = '';
|
||||
if($.browser.msie && Math.floor(parseInt($.browser.version)) == 6)
|
||||
{
|
||||
cssFile = cssRoot + 'ie.6.css';
|
||||
}
|
||||
else if($.browser.mozilla)
|
||||
{
|
||||
cssFile = cssRoot + 'firefox.css';
|
||||
}
|
||||
if(cssFile != '')
|
||||
{
|
||||
document.write("<link rel='stylesheet' href='" + cssFile + "' type='text/css' media='screen' />");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='topbar' class='yui-d0 yui-t6'>
|
||||
<div class='yui-main'>
|
||||
<div class='yui-b'>
|
||||
<?php printf($lang->welcome, $app->company->name);?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='yui-b a-right'>
|
||||
<?php if(isset($app->user)) echo $app->user->realname;?>
|
||||
<?php
|
||||
if(isset($app->user) and $app->user->account != 'guest')
|
||||
{
|
||||
echo html::a($this->createLink('my', 'index'), $lang->myControl);
|
||||
echo html::a($this->createLink('user', 'logout'), $lang->logout);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('user', 'login'), $lang->login);
|
||||
}
|
||||
?>
|
||||
<a href='http://www.zentao.cn' target='_blank'><?php echo $lang->zentaoSite;?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='navbar' class='yui-d0'>
|
||||
<div id='mainmenu'>
|
||||
<ul>
|
||||
<?php
|
||||
echo "<li>$lang->zentaoMS</li>";
|
||||
/* 设定当前的主菜单项。默认先取当前的模块名,如果有该模块所对应的菜单分组,则取分组名作为主菜单项。*/
|
||||
$moduleName = $this->app->getModuleName();
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
|
||||
/* 循环打印主菜单。*/
|
||||
foreach($lang->menu as $menuKey => $menu)
|
||||
{
|
||||
$active = $menuKey == $mainMenu ? 'id=active' : '';
|
||||
list($menuLabel, $module, $method) = explode('|', $menu);
|
||||
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
$link = $this->createLink($module, $method);
|
||||
echo "<li $active><nobr><a href='$link'>$menuLabel</a></nobr></li>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id='submenu'>
|
||||
<ul>
|
||||
<?php
|
||||
if(isset($lang->menu->$mainMenu))
|
||||
{
|
||||
$submenus = $lang->submenu->$mainMenu;
|
||||
foreach($submenus as $submenu)
|
||||
{
|
||||
if($submenu == '|')
|
||||
{
|
||||
echo "<li>$submenu</li>";
|
||||
continue;
|
||||
}
|
||||
@list($menuLabel, $module, $method, $vars) = explode('|', $submenu);
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
$link = $this->createLink($module, $method, $vars);
|
||||
echo "<li $active><a href='$link'>$menuLabel</a></li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='posbar' class='yui-d0'>
|
||||
<?php
|
||||
echo $lang->currentPos;
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->index);
|
||||
echo html::a($this->createLink($module, $method), $lang->zentaoMS) . $lang->arrow;
|
||||
if($moduleName != 'index')
|
||||
{
|
||||
list($menuLabel, $module, $method) = explode('|', $lang->menu->$mainMenu);
|
||||
echo html::a($this->createLink($module, $method), $menuLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->index->common;
|
||||
}
|
||||
if(isset($position))
|
||||
{
|
||||
echo $lang->arrow;
|
||||
foreach($position as $key => $link)
|
||||
{
|
||||
echo $link;
|
||||
if(isset($position[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
25
trunk/module/common/lang/en.php
Normal file
25
trunk/module/common/lang/en.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* The common english language file of ZenTaoMS.
|
||||
*
|
||||
* All items used commonly should be defined here.
|
||||
*
|
||||
* 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: en.php 1139 2009-03-30 13:55:38Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
112
trunk/module/common/lang/zh-cn.php
Normal file
112
trunk/module/common/lang/zh-cn.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: zh-cn.php 1449 2009-10-22 08:31:03Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->zentaoMS = '禅道项目管理系统';
|
||||
$lang->logout = '退出系统';
|
||||
$lang->login = '登陆';
|
||||
$lang->currentPos = '当前位置:';
|
||||
$lang->arrow = ' » ';
|
||||
$lang->colon = '::';
|
||||
$lang->reset = '重填';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->save = '保存';
|
||||
$lang->action = '操作';
|
||||
$lang->comment = '备注';
|
||||
$lang->history = '历史记录';
|
||||
$lang->welcome = "欢迎使用%s{$lang->colon}{$lang->zentaoMS}";
|
||||
$lang->zentaoSite = "官方网站";
|
||||
$lang->myControl = "我的地盘";
|
||||
|
||||
/* 菜单设置:顶级的tab。*/
|
||||
$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->misc = '其他相关|misc|index';
|
||||
$lang->menu->admin = '后台管理|admin|index';
|
||||
|
||||
/*菜单设置:下级菜单。*/
|
||||
$lang->submenu->index->item1 = '浏览产品|product|browse';
|
||||
$lang->submenu->index->item2 = '浏览项目|project|browse';
|
||||
|
||||
$lang->submenu->product->item1 = '浏览产品|product|index';
|
||||
$lang->submenu->product->item2 = '新增产品|product|create';
|
||||
|
||||
$lang->submenu->project ->item1 = '新增项目|project|create';
|
||||
$lang->submenu->project ->item2 = '浏览项目|project|browse';
|
||||
|
||||
$lang->submenu->qa->item1 = '缺陷管理|bug|index';
|
||||
//$lang->submenu->qa->item2 = '用例管理|testcase|index';
|
||||
|
||||
$lang->submenu->my->item1 = '我的TODO|my|todo';
|
||||
$lang->submenu->my->item2 = '我的任务|my|task';
|
||||
$lang->submenu->my->item3 = '我的项目|my|project';
|
||||
$lang->submenu->my->item4 = '我的Bug|my|bug';
|
||||
$lang->submenu->my->item6 = '我的档案|my|editprofile';
|
||||
|
||||
$lang->submenu->company->item1 = '组织结构|company|index';
|
||||
|
||||
$lang->submenu->admin->item1 = '浏览公司|admin|browsecompany';
|
||||
$lang->submenu->admin->item2 = '新增公司|company|create';
|
||||
$lang->submenu->admin->item3 = '|';
|
||||
$lang->submenu->admin->item4 = '浏览分组|admin|browsegroup';
|
||||
$lang->submenu->admin->item5 = '新增分组|group|create';
|
||||
$lang->submenu->admin->item6 = '|';
|
||||
$lang->submenu->admin->item7 = '浏览用户|admin|browseuser';
|
||||
$lang->submenu->admin->item8 = '新增用户|user|create';
|
||||
|
||||
/*菜单设置:分组设置。*/
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->company = 'admin';
|
||||
$lang->menugroup->user = 'admin';
|
||||
$lang->menugroup->group = 'admin';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase= '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->email = "『%s』应当为合法的EMAIL。";
|
||||
|
||||
/* 分页信息。*/
|
||||
$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!";
|
||||
9
trunk/module/common/tablesorter.html.php
Normal file
9
trunk/module/common/tablesorter.html.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<link rel="stylesheet" href="/theme/default/tablesorter.css" />
|
||||
<script src="/js/jquery/tablesorter/min.js" type="text/javascript"></script>
|
||||
<script language='javascript'>
|
||||
$(function()
|
||||
{
|
||||
$(".tablesorter").tablesorter();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
13
trunk/module/common/treeview.html.php
Normal file
13
trunk/module/common/treeview.html.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<style> #main ul li { list-style-type:none;}</style>
|
||||
<link rel="stylesheet" href="/theme/default/treeview.css" />
|
||||
<script src="/js/jquery/treeview/min.js" type="text/javascript"></script>
|
||||
<script language='javascript'>
|
||||
$(function()
|
||||
{
|
||||
$("#tree").treeview(
|
||||
{
|
||||
persist: "cookie",
|
||||
collapsed: false
|
||||
})
|
||||
})
|
||||
</script>
|
||||
113
trunk/module/company/control.php
Normal file
113
trunk/module/company/control.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: control.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class company extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('admin');
|
||||
$this->loadModel('dept');
|
||||
$this->app->loadLang('user');
|
||||
}
|
||||
|
||||
/* 公司首页。*/
|
||||
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);
|
||||
|
||||
$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->display();
|
||||
}
|
||||
|
||||
/* 新增一个公司。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->create();
|
||||
die(js::locate($this->createLink('admin', 'browsecompany'), 'parent'));
|
||||
}
|
||||
|
||||
$this->lang->set('menugroup.company', 'admin');
|
||||
$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($companyID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->update($companyID);
|
||||
die(js::locate($this->createLink('admin', 'browsecompany'), 'parent'));
|
||||
}
|
||||
|
||||
$this->lang->set('menugroup.company', 'admin');
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->company->edit;
|
||||
$position[] = html::a($this->createLink('admin', 'browsecompany'), $this->lang->admin->company);
|
||||
$position[] = $this->lang->company->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('company', $this->company->getById($companyID));
|
||||
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
trunk/module/company/lang/en.php
Normal file
39
trunk/module/company/lang/en.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* The company module en 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: en.php 1145 2009-04-02 11:21:58Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang['page']['common'] = 'company';
|
||||
$lang['page']['index'] = "{$lang['page']['common']}/index";
|
||||
$lang['page']['create'] = "{$lang['page']['common']}/create";
|
||||
$lang['page']['read'] = "{$lang['page']['common']}/read";
|
||||
$lang['page']['update'] = "{$lang['page']['common']}/update";
|
||||
$lang['page']['delete'] = "{$lang['page']['common']}/delete";
|
||||
$lang['company']['id'] = 'id';
|
||||
$lang['company']['name'] = 'name';
|
||||
$lang['company']['phpone'] = 'phpone';
|
||||
$lang['company']['fax'] = 'fax';
|
||||
$lang['company']['address'] = 'address';
|
||||
$lang['company']['zipcode'] = 'zipcode';
|
||||
$lang['company']['website'] = 'website';
|
||||
$lang['company']['backyard'] = 'backyard';
|
||||
$lang['company']['pms'] = 'pms';
|
||||
$lang['company']['guest'] = 'guest';
|
||||
46
trunk/module/company/lang/zh-cn.php
Normal file
46
trunk/module/company/lang/zh-cn.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @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 = '匿名登陆';
|
||||
81
trunk/module/company/model.php
Normal file
81
trunk/module/company/model.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: model.php 1268 2009-09-05 02:36:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class companyModel extends model
|
||||
{
|
||||
/* <20><><EFBFBD>ù<EFBFBD>˾<EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
function getList()
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_COMPANY;
|
||||
$stmt = $this->dbh->query($sql);
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* ͨ<><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 = filter_input(INPUT_SERVER, 'HTTP_HOST');
|
||||
$sql = 'SELECT * FROM ' . TABLE_COMPANY . " WHERE `pms` = '$domain' LIMIT 1";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* ͨ<><CDA8>id<69><64>ȡ<EFBFBD><C8A1>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
public function getByID($companyID = '')
|
||||
{
|
||||
$sql = 'SELECT * FROM ' . TABLE_COMPANY . " WHERE `id` = '$companyID' LIMIT 1";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
function create()
|
||||
{
|
||||
extract($_POST);
|
||||
$sql = "INSERT INTO " . TABLE_COMPANY . " (name, phone, fax, address, zipcode, website, backyard, pms, guest)
|
||||
VALUES('$name', '$phone', '$fax', '$address', '$zipcode', '$website', '$backyard', '$pms', '$guest')";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>Ϣ<EFBFBD><CFA2>*/
|
||||
function update($companyID)
|
||||
{
|
||||
extract($_POST);
|
||||
$sql = "UPDATE " . TABLE_COMPANY . " SET name = '$name', phone = '$phone', fax = '$fax', address = '$address',
|
||||
zipcode = '$zipcode', website = '$website', backyard = '$backyard', pms = '$pms', guest = '$guest'
|
||||
WHERE id = '$companyID' LIMIT 1";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* ɾ<><C9BE>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>˾<EFBFBD><CBBE>*/
|
||||
function delete($companyID)
|
||||
{
|
||||
return $this->dbh->query("DELETE FROM " . TABLE_COMPANY . " WHERE id = '$companyID' LIMIT 1");
|
||||
}
|
||||
}
|
||||
98
trunk/module/company/view/browse.html.php
Normal file
98
trunk/module/company/view/browse.html.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: browse.html.php 1366 2009-09-29 01:37:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/treeview.html.php';?>
|
||||
<?php include '../../common/tablesorter.html.php';?>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->dept->common;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $deptTree;?></div>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('dept', 'browse')) echo html::a($this->createLink('dept', 'browse'), $lang->dept->manage);?>
|
||||
<?php if(common::hasPriv('user', 'create')) echo html::a($this->createLink('user', 'create', "companyID={$this->app->company->id}&from=company"), $lang->user->create);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1 tablesorter'>
|
||||
<caption>
|
||||
<?php
|
||||
echo html::a($this->createLink('company', 'browse'), $app->company->name) . $lang->arrow;
|
||||
foreach($parentDepts as $dept)
|
||||
{
|
||||
echo html::a($this->createLink('company', 'browse', "deptID=$dept->id"), $dept->name) . $lang->arrow;
|
||||
}
|
||||
echo $lang->dept->users;
|
||||
?>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->id;?></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->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr>
|
||||
<td class='a-right'><?php echo $user->id;?></td>
|
||||
<td><?php echo $user->realname;?></td>
|
||||
<td><?php if(common::hasPriv('user', 'view')) echo html::a($this->createLink('user', 'view', "account=$user->account"), $user->account); else echo $user->account;?></td>
|
||||
<td><?php echo $user->nickname;?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td class='a-center'><?php if(isset($lang->user->gendarList->{$user->gendar})) echo $lang->user->gendarList->{$user->gendar};?></td>
|
||||
<td><?php echo $user->phone;?></td>
|
||||
<td class='a-center'><?php echo $user->join;?></td>
|
||||
<td><?php echo $user->visits;?></td>
|
||||
<td>
|
||||
<?php if(common::hasPriv('user', 'edit')) echo html::a($this->createLink('user', 'edit', "userID=$user->id&from=company"), $lang->user->edit);?>
|
||||
<?php if(common::hasPriv('user', 'delete')) echo html::a($this->createLink('user', 'delete', "userID=$user->id"), $lang->user->delete, "hiddenwin");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
72
trunk/module/company/view/create.html.php
Normal file
72
trunk/module/company/view/create.html.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: create.html.php 1268 2009-09-05 02:36:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post'>
|
||||
<table align='center' class='table-3 a-left'>
|
||||
<caption><?php echo $lang->company->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><input type='text' name='name' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><input type='text' name='phone' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><input type='text' name='fax' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><input type='text' name='address' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><input type='text' name='zipcode' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><input type='text' name='website' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><input type='text' name='backyard' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><input type='text' name='pms' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><input type='text' name='guest' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><input type='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
72
trunk/module/company/view/edit.html.php
Normal file
72
trunk/module/company/view/edit.html.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package company
|
||||
* @version $Id: edit.html.php 1268 2009-09-05 02:36:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-3 a-left'>
|
||||
<caption><?php echo $lang->company->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->name;?></th>
|
||||
<td><input type='text' name='name' value='<?php echo $company->name;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->phone;?></th>
|
||||
<td><input type='text' name='phone' value='<?php echo $company->phone;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->fax;?></th>
|
||||
<td><input type='text' name='fax' value='<?php echo $company->fax;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->address;?></th>
|
||||
<td><input type='text' name='address' value='<?php echo $company->address;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->zipcode;?></th>
|
||||
<td><input type='text' name='zipcode' value='<?php echo $company->zipcode;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->website;?></th>
|
||||
<td><input type='text' name='website' value='<?php echo $company->website;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->backyard;?></th>
|
||||
<td><input type='text' name='backyard' value='<?php echo $company->backyard;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->pms;?></th>
|
||||
<td><input type='text' name='pms' value='<?php echo $company->pms;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->company->guest;?></th>
|
||||
<td><input type='text' name='guest' value='<?php echo $company->guest;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><input type='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
93
trunk/module/dept/control.php
Normal file
93
trunk/module/dept/control.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id: control.php 1342 2009-09-21 06:37:30Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class dept extends control
|
||||
{
|
||||
const NEW_CHILD_COUNT = 5;
|
||||
|
||||
/* 部门列表。*/
|
||||
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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
35
trunk/module/dept/lang/zh-cn.php
Normal file
35
trunk/module/dept/lang/zh-cn.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @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 = " 您确定删除该部门吗?";
|
||||
246
trunk/module/dept/model.php
Normal file
246
trunk/module/dept/model.php
Normal file
@@ -0,0 +1,246 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@gmail.com>
|
||||
* @package dept
|
||||
* @version $Id: model.php 1360 2009-09-28 03:03:15Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class deptModel extends model
|
||||
{
|
||||
/* 通过部门id获取部门信息。*/
|
||||
public function getByID($deptID)
|
||||
{
|
||||
return $this->dbh->query("SELECT * FROM " . TABLE_DEPT . " WHERE id = '$deptID'")->fetch();
|
||||
}
|
||||
|
||||
/* 生成查询的sql语句。*/
|
||||
private function buildMenuQuery($rootDeptID)
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_DEPT . " WHERE company = {$this->app->company->id}";
|
||||
if($rootDeptID > 0)
|
||||
{
|
||||
$rootDept = $this->getByID($rootDeptID);
|
||||
if($rootDept) $sql .= " AND `path` LIKE '$rootDept->path%'";
|
||||
}
|
||||
$sql .= " ORDER BY grade DESC, `order`";
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/* 获取部门的下类列表,用于生成select控件。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 获取树状的部门列表。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 生成编辑链接。*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 生成用户链接。*/
|
||||
function createMemberLink($dept)
|
||||
{
|
||||
$linkHtml = html::a(helper::createLink('company', 'browse', "dept={$dept->id}"), $dept->name);
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
/* 获得某一个部门的直接下级部门。*/
|
||||
public function getSons($deptID)
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_DEPT . " WHERE parent = '$deptID' ORDER BY `order`";
|
||||
return $this->dbh->query($sql)->fetchAll();
|
||||
}
|
||||
|
||||
/* 获得一个部门的id列表。*/
|
||||
public function getAllChildId($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$dept = $this->getById($deptID);
|
||||
$sql = "SELECT id FROM " . TABLE_DEPT . " WHERE path LIKE '{$dept->path}%'";
|
||||
$stmt = $this->dbh->query($sql);
|
||||
$deptIds = array();
|
||||
while($id = $stmt->fetchColumn()) $deptIds[] = $id;
|
||||
return $deptIds;
|
||||
}
|
||||
|
||||
/* 获得一个部门的所有上级部门。*/
|
||||
public function getParents($deptID)
|
||||
{
|
||||
if($deptID == 0) return array();
|
||||
$sql = "SELECT path FROM " . TABLE_DEPT . " WHERE id = '$deptID'";
|
||||
$path = $this->dbh->query($sql)->fetchColumn();
|
||||
$path = substr($path, 1, -1);
|
||||
if(empty($path)) return array();
|
||||
$sql = "SELECT * FROM " . TABLE_DEPT . " WHERE id IN($path) ORDER BY grade";
|
||||
$parents = $this->dbh->query($sql)->fetchAll();
|
||||
return $parents;
|
||||
}
|
||||
|
||||
/* 更新排序信息。*/
|
||||
public function updateOrder($orders)
|
||||
{
|
||||
foreach($orders as $deptID => $order)
|
||||
{
|
||||
$sql = "UPDATE " . TABLE_DEPT . " SET `order` = '$order' WHERE id = '$deptID' LIMIT 1";
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/* 更新某一个部门的子部门。*/
|
||||
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))
|
||||
{
|
||||
$sql = "INSERT INTO " . TABLE_DEPT . "(`company`, `name`, `parent`, `path`, `grade`)
|
||||
VALUES('{$this->app->company->id}', '$deptName', '$parentDeptID', '', '$grade')";
|
||||
$this->dbh->exec($sql);
|
||||
$deptID = $this->dbh->lastInsertID();
|
||||
$childPath = $parentPath . "$deptID,";
|
||||
$sql = "UPDATE " . TABLE_DEPT . " SET `path` = '$childPath' WHERE id = '$deptID' LIMIT 1";
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$deptID = str_replace('id', '', $deptID);
|
||||
$sql = "UPDATE " . TABLE_DEPT . " SET `name` = '$deptName' WHERE id = '$deptID' LIMIT 1";
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 获得某一个部门的成员列表。*/
|
||||
public function getUsers($deptID)
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_USER . " WHERE dept " . helper::dbIN($deptID) . " ORDER BY id";
|
||||
return $this->dbh->query($sql)->fetchAll();
|
||||
}
|
||||
|
||||
/* 删除一个部门。Todo: 需要修改下级目录的权限,还有对应的需求列表。*/
|
||||
function delete($deptID)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_DEPT . " WHERE id = '$deptID' LIMIT 1";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
82
trunk/module/dept/view/browse.html.php
Normal file
82
trunk/module/dept/view/browse.html.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dept
|
||||
* @version $Id: browse.html.php 1451 2009-10-22 09:01:21Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/treeview.html.php';?>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<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'>
|
||||
<input type='submit' value='<?php echo $lang->dept->updateOrder;?>' />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<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>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
51
trunk/module/dept/view/create.html.php
Normal file
51
trunk/module/dept/view/create.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: create.html.php 1325 2009-09-16 07:41:23Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/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/footer.html.php';?>
|
||||
52
trunk/module/dept/view/edit.html.php
Normal file
52
trunk/module/dept/view/edit.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: edit.html.php 1325 2009-09-16 07:41:23Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/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/footer.html.php';?>
|
||||
138
trunk/module/group/control.php
Normal file
138
trunk/module/group/control.php
Normal file
@@ -0,0 +1,138 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: control.php 1342 2009-09-21 06:37:30Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class group extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('admin');
|
||||
$this->loadModel('user');
|
||||
}
|
||||
|
||||
/* 创建一个用户组。*/
|
||||
public function create($companyID = 0)
|
||||
{
|
||||
if($companyID == 0) $companyID = $this->app->company->id;
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->create($companyID);
|
||||
die(js::locate($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->group->create;
|
||||
$position[] = html::a($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), $this->lang->admin->group);
|
||||
$position[] = $this->lang->group->create;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个用户。*/
|
||||
public function edit($groupID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->update($groupID);
|
||||
die(js::locate($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->group->edit;
|
||||
$position[] = html::a($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), $this->lang->admin->group);
|
||||
$position[] = $this->lang->group->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('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);
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
$position[] = html::a($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), $this->lang->admin->group);
|
||||
$position[] = $group->name . $this->lang->colon . $this->lang->group->managePriv;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $group);
|
||||
$this->assign('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('admin', 'browsegroup', "companyid={$this->app->company->id}"), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
$groupUsers = join(',', array_keys($groupUsers));
|
||||
$allUsers = $this->user->getPairs($this->app->company->id);
|
||||
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
$position[] = html::a($this->createLink('admin', 'browsegroup', "companyid={$this->app->company->id}"), $this->lang->admin->group);
|
||||
$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')
|
||||
{
|
||||
echo js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID=$groupID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->group->delete($groupID);
|
||||
echo js::locate($this->createLink('admin', 'browsegroup', "companyID={$this->app->company->id}"), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
84
trunk/module/group/lang/lang.php
Normal file
84
trunk/module/group/lang/lang.php
Normal file
@@ -0,0 +1,84 @@
|
||||
$lang['action']['admin']['index'] = 'index';
|
||||
$lang['action']['admin']['browseCompany'] = 'browseCompany';
|
||||
$lang['action']['admin']['browseUser'] = 'browseUser';
|
||||
$lang['action']['admin']['browseGroup'] = 'browseGroup';
|
||||
|
||||
$lang['action']['bug']['index'] = 'index';
|
||||
$lang['action']['bug']['create'] = 'create';
|
||||
$lang['action']['bug']['read'] = 'read';
|
||||
$lang['action']['bug']['update'] = 'update';
|
||||
$lang['action']['bug']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['common']['checkPriv'] = 'checkPriv';
|
||||
$lang['action']['common']['setCompany'] = 'setCompany';
|
||||
$lang['action']['common']['sendHeader'] = 'sendHeader';
|
||||
|
||||
$lang['action']['company']['create'] = 'create';
|
||||
$lang['action']['company']['edit'] = 'edit';
|
||||
$lang['action']['company']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['group']['create'] = 'create';
|
||||
$lang['action']['group']['edit'] = 'edit';
|
||||
$lang['action']['group']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['index']['index'] = 'index';
|
||||
|
||||
$lang['action']['my']['index'] = 'index';
|
||||
|
||||
$lang['action']['product']['index'] = 'index';
|
||||
$lang['action']['product']['browse'] = 'browse';
|
||||
$lang['action']['product']['create'] = 'create';
|
||||
$lang['action']['product']['edit'] = 'edit';
|
||||
$lang['action']['product']['update'] = 'update';
|
||||
$lang['action']['product']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['project']['index'] = 'index';
|
||||
$lang['action']['project']['browse'] = 'browse';
|
||||
$lang['action']['project']['create'] = 'create';
|
||||
$lang['action']['project']['edit'] = 'edit';
|
||||
$lang['action']['project']['delete'] = 'delete';
|
||||
$lang['action']['project']['manageProducts'] = 'manageProducts';
|
||||
$lang['action']['project']['manageChilds'] = 'manageChilds';
|
||||
$lang['action']['project']['manageMembers'] = 'manageMembers';
|
||||
$lang['action']['project']['unlinkMember'] = 'unlinkMember';
|
||||
$lang['action']['project']['linkStory'] = 'linkStory';
|
||||
$lang['action']['project']['unlinkStory'] = 'unlinkStory';
|
||||
|
||||
$lang['action']['qa']['index'] = 'index';
|
||||
|
||||
$lang['action']['release']['index'] = 'index';
|
||||
$lang['action']['release']['create'] = 'create';
|
||||
$lang['action']['release']['read'] = 'read';
|
||||
$lang['action']['release']['update'] = 'update';
|
||||
$lang['action']['release']['delete'] = 'delete';
|
||||
$lang['action']['release']['browse'] = 'browse';
|
||||
|
||||
$lang['action']['search']['index'] = 'index';
|
||||
$lang['action']['search']['split'] = 'split';
|
||||
|
||||
$lang['action']['story']['create'] = 'create';
|
||||
$lang['action']['story']['edit'] = 'edit';
|
||||
$lang['action']['story']['update'] = 'update';
|
||||
$lang['action']['story']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['task']['create'] = 'create';
|
||||
$lang['action']['task']['edit'] = 'edit';
|
||||
$lang['action']['task']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['tree']['setProduct'] = 'setProduct';
|
||||
$lang['action']['tree']['browse'] = 'browse';
|
||||
$lang['action']['tree']['edit'] = 'edit';
|
||||
$lang['action']['tree']['update'] = 'update';
|
||||
$lang['action']['tree']['updateOrder'] = 'updateOrder';
|
||||
$lang['action']['tree']['manageChild'] = 'manageChild';
|
||||
$lang['action']['tree']['delete'] = 'delete';
|
||||
|
||||
$lang['action']['user']['create'] = 'create';
|
||||
$lang['action']['user']['edit'] = 'edit';
|
||||
$lang['action']['user']['delete'] = 'delete';
|
||||
$lang['action']['user']['login'] = 'login';
|
||||
$lang['action']['user']['deny'] = 'deny';
|
||||
$lang['action']['user']['logout'] = 'logout';
|
||||
|
||||
|
||||
|
||||
137
trunk/module/group/lang/zh-cn.php
Normal file
137
trunk/module/group/lang/zh-cn.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: zh-cn.php 1432 2009-10-20 07:38:43Z wwccss $
|
||||
* @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 = '权限';
|
||||
|
||||
/* 所有resource列表。*/
|
||||
$lang->resource->index->index = 'index';
|
||||
|
||||
$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->story->create = 'create';
|
||||
$lang->resource->story->edit = 'edit';
|
||||
$lang->resource->story->delete = 'delete';
|
||||
$lang->resource->story->view = 'view';
|
||||
//$lang->resource->story->comment = 'comment';
|
||||
|
||||
//$lang->resource->release->index = 'index';
|
||||
//$lang->resource->release->create = 'create';
|
||||
//$lang->resource->release->read = 'read';
|
||||
//$lang->resource->release->update = 'update';
|
||||
//$lang->resource->release->delete = 'delete';
|
||||
//$lang->resource->release->browse = 'browse';
|
||||
|
||||
$lang->resource->tree->browse = 'browse';
|
||||
$lang->resource->tree->updateOrder = 'updateOrder';
|
||||
$lang->resource->tree->manageChild = 'manageChild';
|
||||
$lang->resource->tree->delete = 'delete';
|
||||
|
||||
$lang->resource->project->index = 'index';
|
||||
$lang->resource->project->browse = 'browse';
|
||||
$lang->resource->project->create = 'create';
|
||||
$lang->resource->project->edit = 'edit';
|
||||
$lang->resource->project->delete = 'delete';
|
||||
$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->ajaxGetUserTasks = 'ajaxGetUserTasks';
|
||||
|
||||
$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->ajaxGetUserBugs = 'ajaxGetUserBugs';
|
||||
|
||||
$lang->resource->admin->index = 'index';
|
||||
$lang->resource->admin->browseCompany = 'browseCompany';
|
||||
$lang->resource->admin->browseUser = 'browseUser';
|
||||
$lang->resource->admin->browseGroup = 'browseGroup';
|
||||
|
||||
$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->create = 'create';
|
||||
$lang->resource->group->edit = 'edit';
|
||||
$lang->resource->group->delete = 'delete';
|
||||
$lang->resource->group->managePriv = 'managePriv';
|
||||
|
||||
$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->my->index = 'index';
|
||||
$lang->resource->my->editProfile = 'editProfile';
|
||||
$lang->resource->my->todo = 'todo';
|
||||
$lang->resource->my->task = 'task';
|
||||
$lang->resource->my->bug = 'bug';
|
||||
$lang->resource->my->project = 'project';
|
||||
|
||||
$lang->resource->todo->create = 'create';
|
||||
$lang->resource->todo->edit = 'edit';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->mark = 'mark';
|
||||
115
trunk/module/group/model.php
Normal file
115
trunk/module/group/model.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: model.php 1280 2009-09-07 05:41:14Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class groupModel extends model
|
||||
{
|
||||
/* 为某一个公司添加分组。*/
|
||||
public function create($companyID)
|
||||
{
|
||||
extract($_POST);
|
||||
$sql = "INSERT INTO " . TABLE_GROUP . " (`company`, `name`, `desc`) VALUES ('$companyID', '$name', '$desc')";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 更新某一个分组信息。*/
|
||||
public function update($groupID)
|
||||
{
|
||||
extract($_POST);
|
||||
$sql = "UPDATE " . TABLE_GROUP . " SET `name` = '$name', `desc` = '$desc' WHERE id = '$groupID'";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
|
||||
/* 获取某一个公司的分组列表。*/
|
||||
public function getList($companyID)
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_GROUP . " WHERE company = '$companyID'";
|
||||
$groups = $this->dbh->query($sql)->fetchAll();
|
||||
if($groups) return $groups;
|
||||
return array();
|
||||
}
|
||||
|
||||
/* 通过 id获取某一个分组信息。*/
|
||||
public function getByID($groupID)
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_GROUP . " WHERE id = '$groupID'";
|
||||
return $this->dbh->query($sql)->fetch();
|
||||
}
|
||||
|
||||
/* 获得分组的权限列表。*/
|
||||
public function getPrivs($groupID)
|
||||
{
|
||||
$privs = array();
|
||||
$sql = "SELECT module, method FROM " . TABLE_GROUPPRIV . " WHERE `group` = '$groupID' ORDER BY module";
|
||||
$stmt = $this->dbh->query($sql);
|
||||
while($priv = $stmt->fetch()) $privs[$priv->module][$priv->method] = $priv->method;
|
||||
return $privs;
|
||||
}
|
||||
|
||||
/* 获得分组的用户列表。*/
|
||||
public function getUserPairs($groupID)
|
||||
{
|
||||
$sql = "SELECT T2.account, T2.realname FROM " . TABLE_USERGROUP . " AS T1 LEFT JOIN " . TABLE_USER . " AS T2 ON T1.account = T2.account WHERE `group` = '$groupID'";
|
||||
return $this->fetchPairs($sql);
|
||||
}
|
||||
|
||||
/* 删除一个分组信息。*/
|
||||
public function delete($groupID)
|
||||
{
|
||||
$sqls[] = "DELETE FROM " . TABLE_GROUP . " WHERE id = '$groupID'";
|
||||
$sqls[] = "DELETE FROM " . TABLE_USERGROUP . " WHERE `group` = '$groupID'";
|
||||
$sqls[] = "DELETE FROM " . TABLE_GROUPPRIV . " WHERE `group` = '$groupID'";
|
||||
foreach($sqls as $sql) $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 更新权限。*/
|
||||
public function updatePriv($groupID)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_GROUPPRIV . " WHERE `group` = '$groupID'";
|
||||
$this->dbh->exec($sql);
|
||||
if(empty($_POST['actions'])) return;
|
||||
foreach($_POST['actions'] as $moduleName => $moduleActions)
|
||||
{
|
||||
foreach($moduleActions as $actionName)
|
||||
{
|
||||
$sql = "INSERT INTO " . TABLE_GROUPPRIV . " VALUES('$groupID', '$moduleName', '$actionName')";
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 更新成员。*/
|
||||
public function updateUser($groupID)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_USERGROUP . " WHERE `group` = '$groupID'";
|
||||
$this->dbh->exec($sql);
|
||||
if(empty($_POST['members'])) return;
|
||||
foreach($_POST['members'] as $account)
|
||||
{
|
||||
$sql = "INSERT INTO " . TABLE_USERGROUP . " VALUES('$account', '$groupID')";
|
||||
$this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
44
trunk/module/group/view/create.html.php
Normal file
44
trunk/module/group/view/create.html.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: create.html.php 1274 2009-09-05 08:51:53Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-3 a-left'>
|
||||
<caption><?php echo $lang->group->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><input type='text' name='name' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><textarea name='desc' rows='5' style='width:100%'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><input type='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
44
trunk/module/group/view/edit.html.php
Normal file
44
trunk/module/group/view/edit.html.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: edit.html.php 1274 2009-09-05 08:51:53Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-3 a-left'>
|
||||
<caption><?php echo $lang->group->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->name;?></th>
|
||||
<td><input type='text' name='name' value="<?php echo $group->name;?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->group->desc;?></th>
|
||||
<td><textarea name='desc' rows='5' style='width:100%'><?php echo $group->desc;?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'><input type='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
58
trunk/module/group/view/index.html.php
Normal file
58
trunk/module/group/view/index.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: index.html.php 1274 2009-09-05 08:51:53Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/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/footer.html.php';?>
|
||||
43
trunk/module/group/view/managemember.html.php
Normal file
43
trunk/module/group/view/managemember.html.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-5 a-left'>
|
||||
<caption><?php echo $group->name . $lang->colon . $lang->group->manageMember;?></caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
echo html::checkbox('members', $allUsers, $groupUsers);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='1' class='a-center'><input type='submit' name='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
50
trunk/module/group/view/managepriv.html.php
Normal file
50
trunk/module/group/view/managepriv.html.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package group
|
||||
* @version $Id: managepriv.html.php 1280 2009-09-07 05:41:14Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $group->name . $lang->colon . $lang->group->managePriv;?></caption>
|
||||
<tr class='rowhead'>
|
||||
<th><?php echo $lang->group->module;?></th>
|
||||
<th><?php echo $lang->group->method;?></th>
|
||||
</tr>
|
||||
<?php foreach($lang->resource as $moduleName => $moduleActions):?>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $this->lang->$moduleName->common;?></th>
|
||||
<td>
|
||||
<?php foreach($moduleActions as $action):?>
|
||||
<input type='checkbox' name='actions[<?php echo $moduleName;?>][]' value='<?php echo $action;?>' <?php if(isset($groupPrivs[$moduleName][$action])) echo "checked";?> /> <?php echo $lang->$moduleName->$action;?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td colspan='3' class='a-center'><input type='submit' name='submit' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
48
trunk/module/index/control.php
Normal file
48
trunk/module/index/control.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: control.php 1446 2009-10-22 08:29:25Z wwccss $
|
||||
* @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()
|
||||
{
|
||||
$header['title'] = $this->lang->index->common;
|
||||
|
||||
$projects = $this->project->getList();
|
||||
$products = array_values($this->product->getList());
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('projects', $projects);
|
||||
$this->assign('products', $products);
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
24
trunk/module/index/lang/en.php
Normal file
24
trunk/module/index/lang/en.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* The index 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: en.php 1140 2009-03-30 14:00:25Z wwccss $
|
||||
* @link http://www.zentao.cn/
|
||||
*/
|
||||
$lang['welcome'] = 'Welcome to ZenTaoMS system!';
|
||||
27
trunk/module/index/lang/zh-cn.php
Normal file
27
trunk/module/index/lang/zh-cn.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
36
trunk/module/index/model.php
Normal file
36
trunk/module/index/model.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: model.php 1140 2009-03-30 14:00:25Z wwccss $
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class indexModel extends model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function stat()
|
||||
{
|
||||
return get_included_files();
|
||||
}
|
||||
}
|
||||
90
trunk/module/index/view/index.html.php
Normal file
90
trunk/module/index/view/index.html.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package ZenTaoMS
|
||||
* @version $Id: index.html.php 1446 2009-10-22 08:29:25Z wwccss $
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div class="yui-d0 yui-t7">
|
||||
<div class="yui-gb">
|
||||
<?php foreach($projects as $key => $project):?>
|
||||
<?php
|
||||
$class = 0;
|
||||
if($key == 0) $class = 'first';
|
||||
if($key == 3) break;
|
||||
?>
|
||||
<div class="yui-u <?php echo $class;?>">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $project->name;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->name;?></th>
|
||||
<td><?php echo html::a($this->createLink('project', 'browse', "projectid=$project->id"), $project->name);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->code;?></th>
|
||||
<td><?php echo $project->code;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->begin;?></th>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->end;?></th>
|
||||
<td><?php echo $project->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo $project->status;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="yui-d0 yui-t7">
|
||||
<div class="yui-gb">
|
||||
<?php foreach($products as $key => $product):?>
|
||||
<?php
|
||||
$class = 0;
|
||||
if($key == 0) $class = 'first';
|
||||
if($key == 3) break;
|
||||
?>
|
||||
<div class="yui-u <?php echo $class;?>">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $product->name;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->name;?></th>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$product->id"), $product->name);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->code;?></th>
|
||||
<td><?php echo $product->code;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->desc;?></th>
|
||||
<td><?php echo nl2br($product->desc);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
136
trunk/module/my/control.php
Normal file
136
trunk/module/my/control.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: control.php 1400 2009-10-10 03:23:46Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class my extends control
|
||||
{
|
||||
/* 构造函数。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('user');
|
||||
}
|
||||
|
||||
/* 首页,暂时跳转到待办事宜。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink('my', 'todo'));
|
||||
}
|
||||
|
||||
/* 用户的todo列表。*/
|
||||
public function todo($date = 'today')
|
||||
{
|
||||
/* 加载todo model。*/
|
||||
$this->loadModel('todo');
|
||||
|
||||
/* 设定header和position信息。*/
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->todo;
|
||||
$position[] = $this->lang->my->todo;
|
||||
|
||||
if($date == 'today') $date = $this->todo->today();
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'todo');
|
||||
$this->assign('dates', $this->todo->buildDateList());
|
||||
$this->assign('date', $date);
|
||||
$this->assign('todos', $this->todo->getList($date));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 用户的task列表。*/
|
||||
public function task()
|
||||
{
|
||||
/* 加载task model。*/
|
||||
$this->loadModel('task');
|
||||
|
||||
/* 设定header和position信息。*/
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->task;
|
||||
$position[] = $this->lang->my->task;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'task');
|
||||
$this->assign('tasks', $this->user->getTasks($this->app->user->account));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 用户的bug列表。*/
|
||||
public function bug()
|
||||
{
|
||||
/* 加载bug model。*/
|
||||
$this->loadModel('bug');
|
||||
|
||||
/* 设定header和position信息。*/
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->bug;
|
||||
$position[] = $this->lang->my->bug;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'bug');
|
||||
$this->assign('bugs', $this->user->getBugs($this->app->user->account));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 用户的project列表。*/
|
||||
public function project()
|
||||
{
|
||||
/* 加载project model。*/
|
||||
$this->loadModel('project');
|
||||
|
||||
/* 设定header和position信息。*/
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->project;
|
||||
$position[] = $this->lang->my->project;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'project');
|
||||
$this->assign('projects', $this->user->getProjects($this->app->user->account));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑个人档案。*/
|
||||
public function editProfile()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->user->update($this->app->user->id);
|
||||
die(js::locate($this->createLink('my', 'index'), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->my->editProfile;
|
||||
$position[] = $this->lang->my->editProfile;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('user', $this->app->user);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
11
trunk/module/my/lang/zh-cn.php
Normal file
11
trunk/module/my/lang/zh-cn.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$lang->my->common = '我的地盘';
|
||||
$lang->my->index = '首页';
|
||||
$lang->my->profile = '我的档案';
|
||||
$lang->my->project = '我的项目';
|
||||
$lang->my->task = '我的任务';
|
||||
$lang->my->bug = '我的Bug';
|
||||
$lang->my->todo = '我的TODO';
|
||||
$lang->my->story = '我的需求';
|
||||
$lang->my->team = '我的团队';
|
||||
$lang->my->editProfile = '我的档案';
|
||||
28
trunk/module/my/model.php
Normal file
28
trunk/module/my/model.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: model.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class myModel extends model
|
||||
{
|
||||
}
|
||||
52
trunk/module/my/view/bug.html.php
Normal file
52
trunk/module/my/view/bug.html.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* The bug view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: bug.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th><?php echo $lang->bug->id;?></th>
|
||||
<th><?php echo $lang->bug->severity;?></th>
|
||||
<th><?php echo $lang->bug->title;?></th>
|
||||
<th><?php echo $lang->bug->openedBy;?></th>
|
||||
<th><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th><?php echo $lang->bug->resolvedBy;?></th>
|
||||
<th><?php echo $lang->bug->resolution;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id, '_blank');?></td>
|
||||
<td><?php echo $bug->severity?></td>
|
||||
<td width='50%' class='a-left'><?php echo $bug->title;?></td>
|
||||
<td><?php echo $bug->openedBy;?></td>
|
||||
<td><?php echo $bug->assignedTo;?></td>
|
||||
<td><?php echo $bug->resolvedBy;?></td>
|
||||
<td><?php echo $bug->resolution;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php include './footer.html.php';?>
|
||||
58
trunk/module/my/view/editprofile.html.php
Normal file
58
trunk/module/my/view/editprofile.html.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of user 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package user
|
||||
* @version $Id: editprofile.html.php 1400 2009-10-10 03:23:46Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-4 a-left'>
|
||||
<caption><?php echo $lang->my->editProfile;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><input type='text' name='account' value='<?php echo $user->account;?>' readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->realname;?></th>
|
||||
<td><input type='text' name='realname' value='<?php echo $user->realname;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->email;?></th>
|
||||
<td><input type='text' name='email' value='<?php echo $user->email;?>' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->gendar;?></th>
|
||||
<td><?php echo html::radio('gendar', $lang->user->gendarList, $user->gendar);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->password;?></th>
|
||||
<td><input type='password' name='password' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<?php echo html::submitButton() . html::resetButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
4
trunk/module/my/view/footer.html.php
Normal file
4
trunk/module/my/view/footer.html.php
Normal file
@@ -0,0 +1,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
102
trunk/module/my/view/header.html.php
Normal file
102
trunk/module/my/view/header.html.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* The header view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: header.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/tablesorter.html.php';?>
|
||||
<script language='Javascript'>
|
||||
function changeDate(date)
|
||||
{
|
||||
link = createLink('my', 'todo', 'date=' + date);
|
||||
location.href=link;
|
||||
}
|
||||
</script>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->my->profile;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><?php echo $app->user->account;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->realname;?></th>
|
||||
<td><?php echo $app->user->realname;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->nickname;?></th>
|
||||
<td><?php echo $app->user->nickname;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->join;?></th>
|
||||
<td><?php echo $app->user->join;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->visits;?></th>
|
||||
<td><?php echo $app->user->visits;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->ip;?></th>
|
||||
<td><?php echo $app->user->ip;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->last;?></th>
|
||||
<td><?php echo $app->user->last;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
echo html::a($this->createLink('my', 'editprofile'), $lang->user->editProfile);
|
||||
//echo html::a($this->createLink('user', 'editpassword'), $lang->user->editPassword);
|
||||
echo html::a($this->createLink('user', 'logout'), $lang->logout);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id='tabbar' class='yui-d0' style='clear:right'>
|
||||
<ul>
|
||||
<?php
|
||||
echo "<li><nobr>{$app->user->realname}</nobr></li>";
|
||||
echo "<li id='todotab'><nobr>" . html::a($this->createLink('my', 'todo'), $lang->my->todo) . "</nobr></li>";
|
||||
echo "<li id='tasktab'><nobr>" . html::a($this->createLink('my', 'task'), $lang->my->task) . "</nobr></li>";
|
||||
echo "<li id='projecttab'><nobr>". html::a($this->createLink('my', 'project'), $lang->my->project) . "</nobr></li>";
|
||||
//echo "<li id='storytab'><nobr>" . html::a($this->createLink('my', 'story'), $lang->my->story) . "</nobr></li>";
|
||||
echo "<li id='bugtab'><nobr>" . html::a($this->createLink('my', 'bug'), $lang->my->bug) . "</nobr></li>";
|
||||
//echo "<li id='teamtab'><nobr>" . html::a($this->createLink('my', 'team'), $lang->my->team) . "</nobr></li>";
|
||||
echo <<<EOT
|
||||
<script language="Javascript">
|
||||
$("#{$tabID}tab").addClass('active');
|
||||
</script>
|
||||
EOT;
|
||||
?>
|
||||
</ul>
|
||||
<?php if($tabID == 'todo'):?>
|
||||
<div>
|
||||
<?php
|
||||
echo html::select('date', $dates, $date, 'onchange=changeDate(this.value)');
|
||||
echo html::a($this->createLink('todo', 'create', "date=$date"), $lang->todo->create);
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
96
trunk/module/my/view/index.html.php
Normal file
96
trunk/module/my/view/index.html.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of my 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package my
|
||||
* @version $Id: index.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/tablesorter.html.php';?>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->my->profile;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><?php echo $app->user->account;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->realname;?></th>
|
||||
<td><?php echo $app->user->realname;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->nickname;?></th>
|
||||
<td><?php echo $app->user->nickname;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->join;?></th>
|
||||
<td><?php echo $app->user->join;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->visits;?></th>
|
||||
<td><?php echo $app->user->visits;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->ip;?></th>
|
||||
<td><?php echo $app->user->ip;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->last;?></th>
|
||||
<td><?php echo $app->user->last;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
echo html::a($this->createLink('my', 'editprofile'), $lang->user->editProfile);
|
||||
//echo html::a($this->createLink('user', 'editpassword'), $lang->user->editPassword);
|
||||
echo html::a($this->createLink('user', 'logout'), $lang->logout);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id='tabbar' class='yui-d0' style='clear:right'>
|
||||
<ul>
|
||||
<?php
|
||||
echo "<li><nobr>{$app->user->realname}</nobr></li>";
|
||||
echo "<li id='todotab'><nobr>" . html::a($this->createLink('my', 'index', "tabID=todo"), $lang->my->todo) . "</nobr></li>";
|
||||
echo "<li id='tasktab'><nobr>" . html::a($this->createLink('my', 'index', "tabID=task"), $lang->my->task) . "</nobr></li>";
|
||||
echo "<li id='projecttab'><nobr>". html::a($this->createLink('my', 'index', "tabID=project"), $lang->my->project) . "</nobr></li>";
|
||||
//echo "<li id='storytab'><nobr>" . html::a($this->createLink('my', 'index', "tabID=story"), $lang->my->story) . "</nobr></li>";
|
||||
echo "<li id='bugtab'><nobr>" . html::a($this->createLink('my', 'index', "tabID=bug"), $lang->my->bug) . "</nobr></li>";
|
||||
//echo "<li id='teamtab'><nobr>" . html::a($this->createLink('my', 'index', "tabID=team"), $lang->my->team) . "</nobr></li>";
|
||||
echo <<<EOT
|
||||
<script language="Javascript">
|
||||
$("#{$tabID}tab").addClass('active');
|
||||
</script>
|
||||
EOT;
|
||||
?>
|
||||
</ul>
|
||||
<?php if($tabID == 'todo'):?>
|
||||
<div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include $tabID . '.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
54
trunk/module/my/view/project.html.php
Normal file
54
trunk/module/my/view/project.html.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* The project view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: project.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='rowhead'>
|
||||
<th><?php echo $lang->project->name;?></th>
|
||||
<th><?php echo $lang->project->code;?></th>
|
||||
<th><?php echo $lang->project->begin;?></th>
|
||||
<th><?php echo $lang->project->end;?></th>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
<th><?php echo $lang->team->role;?></th>
|
||||
<th><?php echo $lang->team->joinDate;?></th>
|
||||
<th><?php echo $lang->team->workingHour;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($projects as $project):?>
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('project', 'browse', "projectID=$project->id"), $project->name);?></td>
|
||||
<td><?php echo $project->code;?></td>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
<td><?php echo $project->end;?></td>
|
||||
<td><?php echo $project->status;?></td>
|
||||
<td><?php echo $project->role;?></td>
|
||||
<td><?php echo $project->joinDate;?></td>
|
||||
<td><?php echo $project->workingHour;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php include './footer.html.php';?>
|
||||
27
trunk/module/my/view/story.html.php
Normal file
27
trunk/module/my/view/story.html.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The story view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: story.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
54
trunk/module/my/view/task.html.php
Normal file
54
trunk/module/my/view/task.html.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* The task view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: task.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr class='rowhead'>
|
||||
<th><?php echo $lang->task->name;?></th>
|
||||
<th><?php echo $lang->task->project;?></th>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<th><?php echo $lang->task->pri;?></th>
|
||||
<th><?php echo $lang->task->estimate;?></th>
|
||||
<th><?php echo $lang->task->consumed;?></th>
|
||||
<th><?php echo $lang->task->status;?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $task->name);?></td>
|
||||
<td><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID"), $task->projectName);?></th>
|
||||
<td><?php echo $task->storyTitle;?></td>
|
||||
<td><?php echo $task->pri;?></td>
|
||||
<td><?php echo $task->estimate;?></td>
|
||||
<td><?php echo $task->consumed;?></td>
|
||||
<td><?php echo $lang->task->statusList->{$task->status};?></td>
|
||||
<td><?php echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $lang->task->edit, '_blank');?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php include './footer.html.php';?>
|
||||
26
trunk/module/my/view/team.html.php
Normal file
26
trunk/module/my/view/team.html.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* The team view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: team.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php include './footer.html.php';?>
|
||||
69
trunk/module/my/view/todo.html.php
Normal file
69
trunk/module/my/view/todo.html.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* The todo view file of dashboard 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package dashboard
|
||||
* @version $Id: todo.html.php 1399 2009-10-10 02:10:41Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<table class='table-1 tablesorter'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->id;?></th>
|
||||
<th><?php echo $lang->todo->type;?></th>
|
||||
<th><?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th><?php echo $lang->todo->begin;?></th>
|
||||
<th><?php echo $lang->todo->end;?></th>
|
||||
<!--<th><?php echo $lang->todo->desc;?></th>-->
|
||||
<th><?php echo $lang->todo->status;?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($todos as $todo):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo $todo->id;?></td>
|
||||
<td><?php echo $lang->todo->typeList->{$todo->type};?></td>
|
||||
<td><?php echo $todo->pri;?></td>
|
||||
<td class='a-left'>
|
||||
<?php
|
||||
if($todo->type == 'bug') $link = $this->createLink('bug', 'view', "id={$todo->idvalue}");
|
||||
if($todo->type == 'task') $link = $this->createLink('task', 'edit', "id={$todo->idvalue}");
|
||||
if($todo->type == 'custom') $link = $this->createLink('todo', 'edit', "id={$todo->id}");
|
||||
echo html::a($link, $todo->name);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $todo->begin;?></td>
|
||||
<td><?php echo $todo->end;?></td>
|
||||
<!--<td><?php echo $todo->desc;?></td>-->
|
||||
<td class='<?php echo $todo->status;?>'><?php echo $lang->todo->statusList->{$todo->status};?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo html::a($this->createLink('todo', 'mark', "id=$todo->id&status=$todo->status"), $lang->todo->{'mark'.ucfirst($todo->status)}, 'hiddenwin');
|
||||
echo html::a($this->createLink('todo', 'edit', "id=$todo->id"), $lang->todo->edit);
|
||||
echo html::a($this->createLink('todo', 'delete', "id=$todo->id"), $lang->todo->delete, 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php include './footer.html.php';?>
|
||||
141
trunk/module/product/control.php
Normal file
141
trunk/module/product/control.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: control.php 1466 2009-10-24 06:17:18Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class product extends control
|
||||
{
|
||||
private $products = array();
|
||||
|
||||
/* 构造函数,加载story, release, tree等模块。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
/* 加载需要的模块。*/
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('release');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('user');
|
||||
|
||||
/* 获取所有的产品列表。如果还没有产品,则跳转到产品的添加页面。*/
|
||||
$this->products = $this->product->getPairs();
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
$this->assign('products', $this->products);
|
||||
}
|
||||
|
||||
/* 产品视图首页。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink($this->moduleName, 'browse'));
|
||||
}
|
||||
|
||||
/* 浏览某一个产品。*/
|
||||
public function browse($productID = 0, $moduleID = 0, $orderBy = 'id|desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
/* 设置当前的产品id和模块id。*/
|
||||
$this->session->set('storyList', $this->app->getURI(true));
|
||||
$productID = common::saveProductState($productID, key($this->products));
|
||||
$moduleID = (int)$moduleID;
|
||||
$childModuleIds = $this->tree->getAllChildID($moduleID);
|
||||
|
||||
/* 设置header和导航条信息。*/
|
||||
$header['title'] = $this->lang->product->index . $this->lang->colon . $this->products[$productID];
|
||||
$position[] = $this->products[$productID];
|
||||
|
||||
/* 加载分页类,并查询stories列表。*/
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$stories = $this->story->getProductStories($productID, $childModuleIds, $orderBy, $pager);
|
||||
|
||||
/* 获取用户列表。*/
|
||||
$users = array('' => '') + $this->user->getRealNames($this->story->extractAccountsFromList($stories));
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleID', $moduleID);
|
||||
$this->assign('stories', $stories);
|
||||
$this->assign('moduleTree', $this->tree->getTreeMenu($productID, $viewType = 'product', $rooteModuleID = 0, array('treeModel', 'createStoryLink')));
|
||||
$this->assign('parentModules', $this->tree->getParents($moduleID));
|
||||
$this->assign('pager', $pager->get());
|
||||
$this->assign('users', $users);
|
||||
$this->assign('orderBy', $orderBy);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 新增产品。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$productID = $this->product->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink($this->moduleName, 'browse', "productID=$productID"), 'parent'));
|
||||
}
|
||||
|
||||
$header['title'] = $this->lang->product->create;
|
||||
$position[] = $header['title'];
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑产品。*/
|
||||
public function edit($productID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->product->update($productID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('product', 'browse', "product=$productID"), 'parent'));
|
||||
}
|
||||
|
||||
$product = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch();
|
||||
$header['title'] = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
|
||||
$position[] = $this->lang->product->edit;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('product', $product);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除产品。*/
|
||||
public function delete($productID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->product->confirmDelete, $this->createLink('product', 'delete', "productID=$productID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->product->delete($productID);
|
||||
echo js::locate($this->createLink('product', 'browse'), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
trunk/module/product/lang/zh-cn.php
Normal file
47
trunk/module/product/lang/zh-cn.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The product 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->product->common = '产品';
|
||||
$lang->product->index = "产品首页";
|
||||
$lang->product->browse = "浏览产品";
|
||||
$lang->product->edit = "编辑产品";
|
||||
$lang->product->create = "新增产品";
|
||||
$lang->product->read = "产品详情";
|
||||
$lang->product->edit = "编辑产品";
|
||||
$lang->product->delete = "删除产品";
|
||||
|
||||
$lang->product->selectProduct = "请选择产品";
|
||||
$lang->product->saveButton = " 保存 (S) ";
|
||||
$lang->product->confirmDelete = " 您确定删除该产品吗?";
|
||||
|
||||
$lang->product->errorFormat = '产品数据格式不正确';
|
||||
$lang->product->errorEmptyName = '产品名称不能为空';
|
||||
$lang->product->errorEmptyCode = '产品代号不能为空';
|
||||
|
||||
$lang->product->id = '编号';
|
||||
$lang->product->company = '所属公司';
|
||||
$lang->product->name = '产品名称';
|
||||
$lang->product->code = '产品代号';
|
||||
$lang->product->order = '排序';
|
||||
$lang->product->status = '状态';
|
||||
$lang->product->desc = '产品描述';
|
||||
89
trunk/module/product/model.php
Normal file
89
trunk/module/product/model.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: model.php 1450 2009-10-22 08:31:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class productModel extends model
|
||||
{
|
||||
/* ͨ<><CDA8>ID<49><44>ȡ<EFBFBD><C8A1>Ʒ<EFBFBD><C6B7>Ϣ<EFBFBD><CFA2>*/
|
||||
function findByID($productID)
|
||||
{
|
||||
return $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch();
|
||||
}
|
||||
|
||||
/* <20><>ȡ<EFBFBD><C8A1>Ʒ<EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
public function getList()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PRODUCT)->where('company')->eq($this->app->company->id)->fetchAll('id');
|
||||
}
|
||||
|
||||
/* <20><>ȡ<EFBFBD><C8A1>Ʒid=>name<6D>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
public function getPairs()
|
||||
{
|
||||
return $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('company')->eq($this->app->company->id)->fetchPairs();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>*/
|
||||
function create()
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
$product = fixer::input('post')
|
||||
->add('company', $this->app->company->id)
|
||||
->stripTags('name,code')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_PRODUCT)
|
||||
->data($product)
|
||||
->autoCheck()
|
||||
->batchCheck('name,code', 'notempty')
|
||||
->check('name', 'unique')
|
||||
->check('code', 'unique')
|
||||
->exec();
|
||||
return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD>²<EFBFBD>Ʒ<EFBFBD><C6B7>*/
|
||||
function update($productID)
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>*/
|
||||
$productID = (int)$productID;
|
||||
$product = fixer::input('post')
|
||||
->stripTags('name,code')
|
||||
->specialChars('desc')
|
||||
->get();
|
||||
$this->dao->update(TABLE_PRODUCT)
|
||||
->data($product)
|
||||
->autoCheck()
|
||||
->batchCheck('name,code', 'notempty')
|
||||
->check('name', 'unique', "id != $productID")
|
||||
->check('code', 'unique', "id != $productID")
|
||||
->where('id')->eq($productID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/* ɾ<><C9BE>ijһ<C4B3><D2BB><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>*/
|
||||
function delete($productID)
|
||||
{
|
||||
return $this->dao->delete()->from(TABLE_PRODUCT)->where('id')->eq((int)$productID)->andWhere('company')->eq($this->app->company->id)->limit(1)->exec();
|
||||
}
|
||||
}
|
||||
155
trunk/module/product/view/browse.html.php
Normal file
155
trunk/module/product/view/browse.html.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: browse.html.php 1450 2009-10-22 08:31:22Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/treeview.html.php';?>
|
||||
<script language='Javascript'>
|
||||
function selectProduct(productID)
|
||||
{
|
||||
link = createLink('product', 'browse', 'productID=' + productID);
|
||||
location.href=link;
|
||||
}
|
||||
</script>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->product->selectProduct;?>
|
||||
<?php echo html::select('productID', $products, $productID, 'onchange="selectProduct(this.value);" style="width:200px"');?>
|
||||
</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $moduleTree;?></div>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('product', 'edit')) echo html::a($this->createLink('product', 'edit', "productID=$productID"), $lang->edit);?>
|
||||
<?php if(common::hasPriv('product', 'delete')) echo html::a($this->createLink('product', 'delete', "productID=$productID&confirm=no"), $lang->delete, 'hiddenwin');?>
|
||||
<?php if(common::hasPriv('tree', 'browse')) echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=product"), $lang->tree->manage);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->release->browse;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->id;?></th>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
</tr>
|
||||
<?php //foreach($releases as $release):?>
|
||||
<tr>
|
||||
<td><?php //echo $release->id;?></td>
|
||||
<td><?php //echo $release->name;?></td>
|
||||
<td><?php //echo $release->desc;?></td>
|
||||
<td><?php //echo $release->status;?></td>
|
||||
</tr>
|
||||
<?php //endforeach;?>
|
||||
</table>
|
||||
<?php
|
||||
$vars['productID'] = $productID;
|
||||
$addLink = $this->createLink('release', 'create', $vars);
|
||||
echo "<a href='$addLink'>{$lang->release->create}</a>";
|
||||
?>
|
||||
-->
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption>
|
||||
<div class='half-left'>
|
||||
<?php
|
||||
echo html::a($this->createLink('product', 'browse', "productID=$productID"), $productName) . $lang->arrow;
|
||||
foreach($parentModules as $module)
|
||||
{
|
||||
echo html::a($this->createLink('product', 'browse', "productID=$productID&moduleID=$module->id"), $module->name) . $lang->arrow;
|
||||
}
|
||||
echo $lang->story->browse;
|
||||
?>
|
||||
</div>
|
||||
<div class='half-right'>
|
||||
<?php
|
||||
if(common::hasPriv('story', 'create')) echo html::a($this->createLink('story', 'create', "productID=$productID&moduleID=$moduleID"), $lang->story->create);
|
||||
?>
|
||||
</div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
$app->global->vars = "productID=$productID&moduleID=$moduleID";
|
||||
$app->global->orderBy = $orderBy;
|
||||
function printOrderLink($fieldName)
|
||||
{
|
||||
global $app, $lang;
|
||||
if(strpos($app->global->orderBy, $fieldName) !== false)
|
||||
{
|
||||
if(stripos($app->global->orderBy, 'desc') !== false) $orderBy = str_replace('desc', 'asc', $app->global->orderBy);
|
||||
if(stripos($app->global->orderBy, 'asc') !== false) $orderBy = str_replace('asc', 'desc', $app->global->orderBy);
|
||||
}
|
||||
else
|
||||
{
|
||||
$orderBy = $fieldName . '|' . 'asc';
|
||||
}
|
||||
$link = helper::createLink('product', 'browse', $app->global->vars ."&orderBy=$orderBy");
|
||||
echo html::a($link, $lang->story->$fieldName);
|
||||
}
|
||||
?>
|
||||
<th><?php printOrderLink('id');?></th>
|
||||
<th><?php printOrderLink('pri');?></th>
|
||||
<th><?php printOrderLink('title');?></th>
|
||||
<th><?php printOrderLink('assignedTo');?></th>
|
||||
<th><?php printOrderLink('openedBy');?></th>
|
||||
<th><?php printOrderLink('estimate');?></th>
|
||||
<th><?php printOrderLink('status');?></th>
|
||||
<th><?php echo $lang->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
$viewLink = $this->createLink('story', 'view', "storyID=$story->id");
|
||||
$canView = common::hasPriv('story', 'view');
|
||||
?>
|
||||
<tr class='a-center'>
|
||||
<td><?php if($canView) echo html::a($viewLink, sprintf('%03d', $story->id)); else printf('%03d', $story->id);?></td>
|
||||
<td><?php echo $story->pri;?></td>
|
||||
<td class='a-left'><nobr><?php echo $story->title;?></nobr></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td class='<?php echo $story->status;?>'><?php $statusList = (array)$lang->story->statusList; echo $statusList[$story->status];?></td>
|
||||
<td>
|
||||
<?php if(common::hasPriv('story', 'edit')) echo html::a($this->createLink('story', 'edit', "story={$story->id}"), $lang->edit);?>
|
||||
<?php if(common::hasPriv('story', 'delete')) echo html::a($this->createLink('story', 'delete', "story={$story->id}&confirm=no"), $lang->delete, 'hiddenwin');?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $pager;?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
51
trunk/module/product/view/create.html.php
Normal file
51
trunk/module/product/view/create.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: create.html.php 1262 2009-09-03 08:32:28Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/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/footer.html.php';?>
|
||||
52
trunk/module/product/view/edit.html.php
Normal file
52
trunk/module/product/view/edit.html.php
Normal file
@@ -0,0 +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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: edit.html.php 1273 2009-09-05 08:50:43Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/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/footer.html.php';?>
|
||||
113
trunk/module/product/view/index.html.php
Normal file
113
trunk/module/product/view/index.html.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package product
|
||||
* @version $Id: index.html.php 1262 2009-09-03 08:32:28Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<style> #main ul li { list-style-type:none;}</style>
|
||||
<link rel="stylesheet" href="/theme/default/treeview.css" />
|
||||
<script src="/js/jquery/lib.js" type="text/javascript"></script>
|
||||
<script src="/js/jquery/treeview/jquery.treeview.js" type="text/javascript"></script>
|
||||
<script language='javascript'>
|
||||
$(function()
|
||||
{
|
||||
$("#module").treeview(
|
||||
{
|
||||
persist: "cookie",
|
||||
collapsed: true,
|
||||
});
|
||||
});
|
||||
|
||||
function selectProduct(product)
|
||||
{
|
||||
link = createLink('product', 'index', 'product=' + product);
|
||||
location.href=link;
|
||||
}
|
||||
</script>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->product->selectProduct;?>
|
||||
<?php echo html::select('product', $products, $product, 'onchange="selectProduct(this.value);" style="width:200px"');?>
|
||||
</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='main'><?php echo $modules;?></div>
|
||||
<div class='a-right'>
|
||||
<?php echo html::a($this->createLink('product', 'edit', "pid=$product"), $lang->product->edit);?>
|
||||
<?php echo html::a($this->createLink('product', 'delete', "product=$product&confirm=no"), $lang->product->delete, 'hiddenwin');?>
|
||||
<?php echo html::a($this->createLink('product', 'mangemodule', "product=$product"), $lang->product->mangeModule);?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->release->browse;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->id;?></th>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<th><?php echo $lang->release->desc;?></th>
|
||||
<th><?php echo $lang->release->status;?></th>
|
||||
</tr>
|
||||
<?php foreach($releases as $release):?>
|
||||
<tr>
|
||||
<td><?php echo $release->id;?></td>
|
||||
<td><?php echo $release->name;?></td>
|
||||
<td><?php echo $release->desc;?></td>
|
||||
<td><?php echo $release->status;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php
|
||||
$vars['product'] = $product;
|
||||
$addLink = $this->createLink('release', 'create', $vars);
|
||||
echo "<a href='$addLink'>{$lang->release->create}</a>";
|
||||
?>
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<table align='center' class='table-1'>
|
||||
<caption><?php echo $lang->story->browse;?></caption>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->id;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th><?php echo $lang->story->spec;?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($stories as $story):?>
|
||||
<tr>
|
||||
<td><?php echo $story->id;?></td>
|
||||
<td><?php echo $story->title;?></td>
|
||||
<td><?php echo $story->spec;?></td>
|
||||
<td><?php echo html::a($this->createLink('story', 'delete', "story={$story->id}&confirm=no"), $lang->story->delete, 'hiddenwin2');?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php
|
||||
$addLink = $this->createLink('story', 'create', "product=$product");
|
||||
echo "<a href='$addLink'>{$lang->story->create}</a>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
309
trunk/module/project/control.php
Normal file
309
trunk/module/project/control.php
Normal file
@@ -0,0 +1,309 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: control.php 1459 2009-10-23 05:50:21Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
class project extends control
|
||||
{
|
||||
private $projects;
|
||||
|
||||
/* 构造函数,加载product, task, story等模块。*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('task');
|
||||
$this->loadModel('story');
|
||||
$this->projects = $this->project->getPairs();
|
||||
if(empty($this->projects)) $this->locate($this->createLink('project', 'create'));
|
||||
}
|
||||
|
||||
/* 项目视图首页,暂时跳转到浏览页面。*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate($this->createLink($this->moduleName, 'browse'));
|
||||
}
|
||||
|
||||
/* 浏览某一个项目。*/
|
||||
public function browse($projectID = 0, $tabID = 'task')
|
||||
{
|
||||
/* 获取当前项目的详细信息,相关产品,子项目以及团队成员。*/
|
||||
$projectID = common::saveProjectState($projectID, key($this->projects));
|
||||
$project = $this->project->getById($projectID);
|
||||
$products = $this->project->getProducts($project->id);
|
||||
$childProjects = $this->project->getChildProjects($project->id);
|
||||
$teamMembers = $this->project->getTeamMembers($project->id);
|
||||
|
||||
/* 设定header和position信息。*/
|
||||
$header['title'] = $this->lang->project->browse . $this->lang->colon . $project->name;
|
||||
$position[] = $project->name;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $this->projects);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('childProjects', $childProjects);
|
||||
$this->assign('products', $products);
|
||||
$this->assign('teamMembers', $teamMembers);
|
||||
$this->assign('tabID', $tabID);
|
||||
|
||||
/* 处理Tab。*/
|
||||
if($tabID == 'task')
|
||||
{
|
||||
$tasks = $this->task->getProjectTasks($projectID);
|
||||
$this->assign('tasks', $tasks);
|
||||
}
|
||||
elseif($tabID == 'story')
|
||||
{
|
||||
$stories = $this->story->getProjectStories($projectID);
|
||||
$this->assign('stories', $stories);
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 创建一个项目。*/
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$projectID = $this->project->create($_POST);
|
||||
$this->locate($this->createLink('project', 'browse', "projectID=$projectID"));
|
||||
}
|
||||
$header['title'] = $this->lang->project->create;
|
||||
$position[] = $header['title'];
|
||||
$projects = array('' => '') + $this->projects;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $projects);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 编辑一个项目。*/
|
||||
public function edit($projectID)
|
||||
{
|
||||
$browseProjectLink = $this->createLink('project', 'browse', "projectID=$projectID");
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->project->update($projectID);
|
||||
die(js::locate($browseProjectLink, 'parent'));
|
||||
}
|
||||
$projects = array('' => '') + $this->projects;
|
||||
$project = $this->project->getById($projectID);
|
||||
|
||||
/* 从列表中删除当前项目。*/
|
||||
unset($projects[$projectID]);
|
||||
|
||||
/* 标题和位置信息。*/
|
||||
$header['title'] = $this->lang->project->edit . $this->lang->colon . $project->name;
|
||||
$position[] = html::a($browseProjectLink, $project->name);
|
||||
$position[] = $this->lang->project->edit;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $projects);
|
||||
$this->assign('project', $project);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 删除一个项目。*/
|
||||
public function delete($projectID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm(sprintf($this->lang->project->confirmDelete, $this->projects[$projectID]), $this->createLink('project', 'delete', "projectID=$projectID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->project->delete($projectID);
|
||||
echo js::locate($this->createLink('project', 'browse'), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* 维护相关的产品。*/
|
||||
public function manageProducts($projectID)
|
||||
{
|
||||
$browseProjectLink = $this->createLink('project', 'browse', "projectID=$projectID");
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->project->updateProducts($projectID);
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
$project = $this->project->getById($projectID);
|
||||
|
||||
/* 标题和位置信息。*/
|
||||
$header['title'] = $this->lang->project->manageProducts . $this->lang->colon . $project->name;
|
||||
$position[] = html::a($browseProjectLink, $project->name);
|
||||
$position[] = $this->lang->project->manageProducts;
|
||||
|
||||
$allProducts = $this->product->getPairs();
|
||||
$linkedProducts = $this->project->getProducts($project->id);
|
||||
$linkedProducts = join(',', array_keys($linkedProducts));
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('allProducts', $allProducts);
|
||||
$this->assign('linkedProducts', $linkedProducts);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 维护子项目。*/
|
||||
public function manageChilds($projectID)
|
||||
{
|
||||
$browseProjectLink = $this->createLink('project', 'browse', "projectID=$projectID");
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->project->updateChilds($projectID);
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
$project = $this->project->getById($projectID);
|
||||
$projects = $this->projects;
|
||||
unset($projects[$projectID]);
|
||||
unset($projects[$project->parent]);
|
||||
if(empty($projects)) $this->locate($browseProjectLink);
|
||||
|
||||
/* 标题和位置信息。*/
|
||||
$header['title'] = $this->lang->project->manageChilds . $this->lang->colon . $project->name;
|
||||
$position[] = html::a($browseProjectLink, $project->name);
|
||||
$position[] = $this->lang->project->manageChilds;
|
||||
|
||||
$childProjects = $this->project->getChildProjects($project->id);
|
||||
$childProjects = join(",", array_keys($childProjects));
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $projects);
|
||||
$this->assign('childProjects', $childProjects);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 维护团队成员。*/
|
||||
public function manageMembers($projectID = 0)
|
||||
{
|
||||
$browseProjectLink = $this->createLink('project', 'browse', "projectID=$projectID");
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->project->manageMembers($projectID);
|
||||
$this->locate($browseProjectLink);
|
||||
exit;
|
||||
}
|
||||
$this->loadModel('user');
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$users = $this->user->getPairs($this->app->company->id);
|
||||
$users = array('' => '') + $users;
|
||||
$members = $this->project->getTeamMembers($projectID);
|
||||
|
||||
$header['title'] = $this->lang->project->manageMembers . $this->lang->colon . $project->name;
|
||||
$position[] = html::a($browseProjectLink, $project->name);
|
||||
$position[] = $this->lang->project->manageMembers;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
|
||||
$this->assign('project', $project);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('members', $members);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 移除一个成员。*/
|
||||
public function unlinkMember($projectID, $account, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->project->confirmUnlinkMember, $this->createLink('project', 'unlinkMember', "projectID=$projectID&account=$account&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->project->unlinkMember($projectID, $account);
|
||||
echo js::locate($this->createLink('project', 'browse', "projectID=$projectID"), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* 关联需求。*/
|
||||
public function linkStory($projectID = 0)
|
||||
{
|
||||
/* 获得项目和相关产品信息。如果没有相关产品,则跳转到产品关联页面。*/
|
||||
$project = $this->project->getById($projectID);
|
||||
$products = $this->project->getProducts($projectID);
|
||||
$browseLink = $this->createLink('project', 'browse', "projectID=$projectID&tab=story");
|
||||
|
||||
if(empty($products))
|
||||
{
|
||||
echo js::alert($this->lang->project->errorNoLinkedProducts);
|
||||
die(js::locate($this->createLink('project', 'manageproducts', "projectID=$projectID")));
|
||||
}
|
||||
|
||||
/* 更新数据库。*/
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->project->linkStory($projectID);
|
||||
die(js::locate($browseLink, 'parent'));
|
||||
exit;
|
||||
}
|
||||
|
||||
/* 加载数据。*/
|
||||
$this->loadModel('story');
|
||||
|
||||
$header['title'] = $project->name . $this->lang->colon . $this->lang->project->linkStory;
|
||||
$position[] = html::a($browseLink, $project->name);
|
||||
$position[] = $this->lang->project->linkStory;
|
||||
|
||||
$allStories = $this->story->getProductStories(array_keys($products));
|
||||
$prjStories = $this->story->getProjectStoryPair($projectID);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('products', $products);
|
||||
$this->assign('allStories', $allStories);
|
||||
$this->assign('prjStories', $prjStories);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/* 移除一个需求。*/
|
||||
public function unlinkStory($projectID, $storyID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->project->confirmUnlinkStory, $this->createLink('project', 'unlinkstory', "projectID=$projectID&storyID=$storyID&confirm=yes"));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->project->unlinkStory($projectID, $storyID);
|
||||
echo js::locate($this->createLink('project', 'browse', "projectID=$projectID&tab=story"), 'parent');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
81
trunk/module/project/lang/zh-cn.php
Normal file
81
trunk/module/project/lang/zh-cn.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* The project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: zh-cn.php 1363 2009-09-29 01:19:26Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->project->common = '项目';
|
||||
$lang->project->index = "项目首页";
|
||||
$lang->project->create = "添加项目";
|
||||
$lang->project->delete = "删除项目";
|
||||
$lang->project->browse = "浏览项目";
|
||||
$lang->project->edit = "编辑项目";
|
||||
$lang->project->manage = "维护模块";
|
||||
|
||||
$lang->project->selectProject = "请选择项目";
|
||||
$lang->project->manageMembers = '团队管理';
|
||||
$lang->project->unlinkMember = '移除';
|
||||
$lang->project->manageProducts = '关联产品';
|
||||
$lang->project->linkStory = '关联需求';
|
||||
$lang->project->unlinkStory = '移除需求';
|
||||
$lang->project->manageTasks = '任务管理';
|
||||
$lang->project->linkTask = '关联任务';
|
||||
$lang->project->manageChilds = '关联子项目';
|
||||
$lang->project->confirmDelete = '您确定删除项目[%s]吗?';
|
||||
$lang->project->confirmUnlinkMember = '您确定从该项目中移除该用户吗?';
|
||||
$lang->project->confirmUnlinkStory = '您确定从该项目中移除该需求吗?';
|
||||
|
||||
$lang->project->errorNoLinkedProducts = '该项目没有关联的产品,系统将转到产品关联页面';
|
||||
|
||||
$lang->project->id = '项目编号';
|
||||
$lang->project->company = '所属公司';
|
||||
$lang->project->iscat = '作为目录';
|
||||
$lang->project->type = '项目类型';
|
||||
$lang->project->parent = '上级项目';
|
||||
$lang->project->name = '项目名称';
|
||||
$lang->project->code = '项目代号';
|
||||
$lang->project->begin = '开始日期';
|
||||
$lang->project->end = '结束日期';
|
||||
$lang->project->status = '项目状态';
|
||||
$lang->project->statge = '所处阶段';
|
||||
$lang->project->pri = '优先级';
|
||||
$lang->project->desc = '项目描述';
|
||||
$lang->project->goal = '项目目标';
|
||||
$lang->project->openedBy = '由谁创建';
|
||||
$lang->project->openedDate = '创建日期';
|
||||
$lang->project->closedBy = '由谁关闭';
|
||||
$lang->project->closedDate = '关闭日期';
|
||||
$lang->project->canceledBy = '由谁取消';
|
||||
$lang->project->canceledDate = '取消日期';
|
||||
$lang->project->PO = '产品负责人';
|
||||
$lang->project->PM = '项目负责人';
|
||||
$lang->project->QM = '测试负责人';
|
||||
$lang->project->team = '团队名称';
|
||||
$lang->project->products = '相关产品';
|
||||
$lang->project->childProjects= '子项目';
|
||||
$lang->project->tasks = '任务列表';
|
||||
$lang->project->stories = '需求列表';
|
||||
$lang->project->bugs = 'Bug列表';
|
||||
$lang->project->burndown = '燃烧图';
|
||||
|
||||
$lang->team->account = '用户';
|
||||
$lang->team->role = '角色';
|
||||
$lang->team->joinDate = '加盟日';
|
||||
$lang->team->workingHour = '工时/天';
|
||||
196
trunk/module/project/model.php
Normal file
196
trunk/module/project/model.php
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: model.php 1383 2009-09-30 07:33:17Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class projectModel extends model
|
||||
{
|
||||
const LINK_MEMBERS_ONE_TIME = 10;
|
||||
|
||||
/* 新增项目。*/
|
||||
public function create($project = array())
|
||||
{
|
||||
if(!is_array($project) or empty($project)) return false;
|
||||
$companyID = $this->app->company->id;
|
||||
extract($project);
|
||||
$sql = "INSERT INTO " . TABLE_PROJECT . " (`company`, `name`, `code`, `begin`, `end`, `goal`, `desc`, `team`) VALUES('$companyID', '$name', '$code', '$begin', '$end', '$goal', '$desc', '$team')";
|
||||
$this->dbh->query($sql);
|
||||
return $this->dbh->lastInsertId();
|
||||
}
|
||||
|
||||
/* 更新一个项目。*/
|
||||
public function update($projectID)
|
||||
{
|
||||
extract($_POST);
|
||||
$sql = " UPDATE " . TABLE_PROJECT . " SET `name` = '$name', `code` = '$code', `parent` = '$parent',
|
||||
`begin` = '$begin', `end` = '$end', `goal` = '$goal', `desc` = '$desc', `team` = '$team'
|
||||
WHERE id = '$projectID'";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 删除一个项目。*/
|
||||
public function delete($projectID)
|
||||
{
|
||||
return $this->dbh->exec("DELETE FROM " . TABLE_PROJECT . " WHERE id = '$projectID' LIMIT 1");
|
||||
}
|
||||
|
||||
/* 获得项目目录列表。*/
|
||||
public function getCats()
|
||||
{
|
||||
$cats = array();
|
||||
$stmt = $this->dbh->query("SELECT id, name FROM " . TABLE_PROJECT . " WHERE isCat = '1'");
|
||||
while($cat = $stmt->fetch()) $cats[$cat->id] = $cat->name;
|
||||
return $cats;
|
||||
}
|
||||
|
||||
/* 获得项目id=>name列表。*/
|
||||
public function getPairs()
|
||||
{
|
||||
$projects = array();
|
||||
$sql = "SELECT id, name FROM " . TABLE_PROJECT . " WHERE isCat = '0' AND company = '{$this->app->company->id}'";
|
||||
return $this->fetchPairs($sql);;
|
||||
}
|
||||
|
||||
/* 获得完整的列表。*/
|
||||
public function getList()
|
||||
{
|
||||
$sql = "SELECT * FROM " . TABLE_PROJECT . " WHERE isCat = '0' AND company = '{$this->app->company->id}'";
|
||||
return $this->dbh->query($sql)->fetchAll();
|
||||
}
|
||||
|
||||
/* 通过Id获取项目信息。*/
|
||||
public function getById($projectID)
|
||||
{
|
||||
return $this->dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE id = '$projectID'")->fetch();
|
||||
}
|
||||
|
||||
/* 获得相关的产品列表。*/
|
||||
public function getProducts($projectID)
|
||||
{
|
||||
$sql = " SELECT T2.id, T2.name FROM " . TABLE_PROJECTPRODUCT . " AS T1 " .
|
||||
" LEFT JOIN " . TABLE_PRODUCT . " AS T2 ON T1.product = T2.id " .
|
||||
" WHERE T1.project = '$projectID'";
|
||||
return $this->fetchPairs($sql);
|
||||
}
|
||||
|
||||
/* 更新相关产品。*/
|
||||
public function updateProducts($projectID)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_PROJECTPRODUCT . " WHERE project = '$projectID'";
|
||||
$this->dbh->exec($sql);
|
||||
if(!isset($_POST['products'])) return;
|
||||
$products = array_unique($_POST['products']);
|
||||
foreach($products as $productID)
|
||||
{
|
||||
$sql = "REPLACE INTO " . TABLE_PROJECTPRODUCT . " VALUES('$projectID', '$productID')";
|
||||
$this->dbh->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/* 获得相关的子项目列表。*/
|
||||
public function getChildProjects($projectID)
|
||||
{
|
||||
$sql = "SELECT id, name FROM " . TABLE_PROJECT . " WHERE parent = '$projectID'";
|
||||
return $this->fetchPairs($sql, 'id', 'name');
|
||||
}
|
||||
|
||||
/* 更新child项目。*/
|
||||
public function updateChilds($projectID)
|
||||
{
|
||||
$sql = "UPDATE " . TABLE_PROJECT . " SET parent = 0 WHERE parent = '$projectID'";
|
||||
$this->dbh->exec($sql);
|
||||
if(!isset($_POST['childs'])) return;
|
||||
$childs = array_unique($_POST['childs']);
|
||||
foreach($childs as $childProjectID)
|
||||
{
|
||||
$sql = "UPDATE " . TABLE_PROJECT . " SET parent = '$projectID' WHERE id = '$childProjectID'";
|
||||
$this->dbh->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/* 关联需求。*/
|
||||
public function linkStory($projectID)
|
||||
{
|
||||
if(!isset($_POST['stories']) or empty($_POST['stories'])) return;
|
||||
extract($_POST);
|
||||
foreach($stories as $key => $storyID)
|
||||
{
|
||||
$productID = $products[$key];
|
||||
$sql = "INSERT INTO " . TABLE_PROJECTSTORY . " VALUES ('$projectID', '$productID', '$storyID')";
|
||||
$this->dbh->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/* 移除一个需求。*/
|
||||
public function unlinkStory($projectID, $storyID)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_PROJECTSTORY . " WHERE project = '$projectID' AND story = '$storyID' LIMIT 1";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
|
||||
/* 获取团队成员。*/
|
||||
public function getTeamMembers($projectID)
|
||||
{
|
||||
$sql = "SELECT T1.*, T2.realname FROM " . TABLE_TEAM . " AS T1 LEFT JOIN " . TABLE_USER . " AS T2 ON T1.account = T2.account WHERE T1.project = '$projectID'";
|
||||
$stmt = $this->dbh->query($sql);
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
/* 获取团队成员account=>name列表。*/
|
||||
public function getTeamMemberPair($projectID)
|
||||
{
|
||||
$sql = "SELECT T2.account, T2.realname FROM " . TABLE_TEAM . " AS T1 LEFT JOIN " . TABLE_USER . " AS T2 ON T1.account = T2.account WHERE T1.project = '$projectID'";
|
||||
return $this->fetchPairs($sql);
|
||||
}
|
||||
|
||||
/* 关联成员。*/
|
||||
public function manageMembers($projectID)
|
||||
{
|
||||
extract($_POST);
|
||||
|
||||
foreach($accounts as $key => $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
$role = $roles[$key];
|
||||
$workingHour = $workingHours[$key];
|
||||
$mode = $modes[$key];
|
||||
|
||||
if($mode == 'update')
|
||||
{
|
||||
$sql = "UPDATE " . TABLE_TEAM . " SET role = '$role', workingHour = '$workingHour' WHERE project = '$projectID' AND account = '$account'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO " . TABLE_TEAM . " (project, account, joinDate, role, workingHour) VALUES ('$projectID', '$account', NOW(), '$role', '$workingHour')";
|
||||
}
|
||||
$this->dbh->query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/* 删除一个成员。*/
|
||||
public function unlinkMember($projectID, $account)
|
||||
{
|
||||
$sql = "DELETE FROM " . TABLE_TEAM . " WHERE project = '$projectID' AND account = '$account'";
|
||||
return $this->dbh->exec($sql);
|
||||
}
|
||||
}
|
||||
166
trunk/module/project/view/browse.html.php
Normal file
166
trunk/module/project/view/browse.html.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: browse.html.php 1353 2009-09-24 09:28:35Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<?php include '../../common/tablesorter.html.php';?>
|
||||
<script src="<?php echo $jsRoot;?>misc/sorttable.js" type="text/javascript"></script>
|
||||
<script language='javascript'>
|
||||
function selectProject(projectID)
|
||||
{
|
||||
link = createLink('project', 'browse', 'projectID=' + projectID);
|
||||
location.href=link;
|
||||
}
|
||||
</script>
|
||||
<div class="yui-d0 yui-t3">
|
||||
<div class="yui-b">
|
||||
<table class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->project->selectProject;?>
|
||||
<?php echo html::select('projectID', $projects, $project->id, 'onchange="selectProject(this.value);" style="width:200px"');?>
|
||||
</caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->name;?></th>
|
||||
<td><?php echo $project->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->code;?></th>
|
||||
<td><?php echo $project->code;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->begin;?></th>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->end;?></th>
|
||||
<td><?php echo $project->end;?></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->status;?></th>
|
||||
<td><?php echo $project->status;?></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td colspan='2' class='a-right'>
|
||||
<?php
|
||||
if(common::hasPriv('project', 'edit')) echo html::a($this->createLink('project', 'edit', "projectID=$project->id"), $lang->project->edit);
|
||||
if(common::hasPriv('project', 'delete')) echo html::a($this->createLink('project', 'delete', "projectID=$project->id"), $lang->project->delete, 'hiddenwin');
|
||||
//echo html::a($this->createLink('tree', 'browse', "productID=$productID&view=product"), $lang->tree->manage);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align='center' class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->project->products;?>
|
||||
</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php foreach($products as $productID => $productName) echo html::a($this->createLink('product', 'browse', "productID=$productID"), $productName) . '<br />';?>
|
||||
<div class='a-right'>
|
||||
<?php
|
||||
if(common::hasPriv('project', 'manageproducts')) echo html::a($this->createLink('project', 'manageproducts', "projectID=$project->id"), $lang->project->manageProducts);
|
||||
if(common::hasPriv('project', 'linkstory')) echo html::a($this->createLink('project', 'linkstory', "projectID=$project->id"), $lang->project->linkStory);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--
|
||||
<table align='center' class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->project->childProjects;?>
|
||||
</caption>
|
||||
<tr>
|
||||
<td>
|
||||
<?php foreach($childProjects as $childProjectID => $childProjectName) echo html::a($this->createLink('project', 'browse', "projectID=$childProjectID"), $childProjectName) . '<br />';?>
|
||||
<div class='a-right'>
|
||||
<?php echo html::a($this->createLink('project', 'managechilds', "projectID=$project->id"), $lang->project->manageChilds) . '<br />';?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>-->
|
||||
<table align='center' class='table-1'>
|
||||
<caption>
|
||||
<?php echo $lang->project->team . $lang->colon . $project->team; ?>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $lang->team->account;?></th>
|
||||
<th><?php echo $lang->team->role;?></th>
|
||||
<th><?php echo $lang->team->joinDate;?></th>
|
||||
<th><?php echo $lang->team->workingHour;?></th>
|
||||
<?php if(common::hasPriv('project', 'unlinkmember')) echo "<th>$lang->action</th>";?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($teamMembers as $member):?>
|
||||
<tr class='a-center'>
|
||||
<td>
|
||||
<?php
|
||||
if(common::hasPriv('user', 'view')) echo html::a($this->createLink('user', 'view', "account=$member->account"), $member->realname);
|
||||
else echo $member->realname;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $member->role;?></td>
|
||||
<td><?php echo substr($member->joinDate, 2);?></td>
|
||||
<td><?php echo $member->workingHour;?></td>
|
||||
<?php if(common::hasPriv('project', 'unlinkmember')) echo "<td>" . html::a($this->createLink('project', 'unlinkmember', "projectID=$project->id&account=$member->account"), $lang->project->unlinkMember, 'hiddenwin') . '</td>';?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='a-right'>
|
||||
<?php if(common::hasPriv('project', 'managemembers')) echo html::a($this->createLink('project', 'managemembers', "projectID=$project->id"), $lang->project->manageMembers) . '<br />';?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id='tabbar' class='yui-d0'>
|
||||
<ul>
|
||||
<?php
|
||||
echo "<li><nobr>$project->name</nobr></li>";
|
||||
echo "<li id='tasktab'><nobr>" . html::a($this->createLink('project', 'browse', "projectID=$project->id&tabID=task"), $lang->project->tasks) . "</nobr></li>";
|
||||
echo "<li id='storytab'><nobr>" . html::a($this->createLink('project', 'browse', "projectID=$project->id&tabID=story"), $lang->project->stories) . "</nobr></li>";
|
||||
//echo "<li id='bugtab'><nobr>" . html::a($this->createLink('project', 'browse', "projectID=$project->id&tabID=bug"), $lang->project->bugs) . "</nobr></li>";
|
||||
//echo "<li id='burntab'><nobr>" . html::a($this->createLink('project', 'browse', "projectID=$project->id&tabID=burn"), $lang->project->burndown) . "</nobr></li>";
|
||||
echo <<<EOT
|
||||
<script language="Javascript">
|
||||
$("#{$tabID}tab").addClass('active');
|
||||
</script>
|
||||
EOT;
|
||||
?>
|
||||
</ul>
|
||||
<?php if($tabID == 'task' and common::hasPriv('task', 'create')) :?>
|
||||
<div><?php echo html::a($this->createLink('task', 'create', "project=$project->id"), $lang->task->create);?></div>
|
||||
<?php elseif($tabID == 'story' and common::hasPriv('project', 'linkstory')) :?>
|
||||
<div><?php echo html::a($this->createLink('project', 'linkstory', "project=$project->id"), $lang->project->linkStory);?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include $tabID . '.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
0
trunk/module/project/view/bug.html.php
Normal file
0
trunk/module/project/view/bug.html.php
Normal file
0
trunk/module/project/view/burn.html.php
Normal file
0
trunk/module/project/view/burn.html.php
Normal file
74
trunk/module/project/view/create.html.php
Normal file
74
trunk/module/project/view/create.html.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: create.html.php 1353 2009-09-24 09:28:35Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $lang->project->create;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->name;?></th>
|
||||
<td><input type='text' name='name' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->code;?></th>
|
||||
<td><input type='text' name='code' class='text-3' /></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->parent;?></th>
|
||||
<td><?php echo html::select('parent', $projects, '', 'class=select-3');?></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->begin;?></th>
|
||||
<td><input type='text' name='begin' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->end;?></th>
|
||||
<td><input type='text' name='end' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->team;?></th>
|
||||
<td><input type='text' name='team' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->goal;?></th>
|
||||
<td><textarea name='goal' rows='5' class='area-1'></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->desc;?></th>
|
||||
<td><textarea name='desc' rows='5' class='area-1'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<input type='submit' name='submit' value='<?php echo $lang->save?>' class='button-s' />
|
||||
<input type='reset' name='reset' value='<?php echo $lang->reset?>' class='button-r' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
74
trunk/module/project/view/edit.html.php
Normal file
74
trunk/module/project/view/edit.html.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: edit.html.php 1353 2009-09-24 09:28:35Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table align='center' class='table-1 a-left'>
|
||||
<caption><?php echo $lang->project->edit;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->name;?></th>
|
||||
<td><input type='text' name='name' value='<?php echo $project->name;?>' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->code;?></th>
|
||||
<td><input type='text' name='code' value='<?php echo $project->code;?>' class='text-3' /></td>
|
||||
</tr>
|
||||
<!---
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->parent;?></th>
|
||||
<td><?php echo html::select('parent', $projects, $project->parent, 'class=select-3');?></td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->begin;?></th>
|
||||
<td><input type='text' name='begin' value='<?php echo $project->begin;?>' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->end;?></th>
|
||||
<td><input type='text' name='end' value='<?php echo $project->end;?>' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->team;?></th>
|
||||
<td><input type='text' name='team' value='<?php echo $project->team;?>' class='text-3' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->goal;?></th>
|
||||
<td><textarea name='goal' rows='5' class='area-1'><?php echo $project->goal;?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->project->desc;?></th>
|
||||
<td><textarea name='desc' rows='5' class='area-1'><?php echo $project->desc;?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='a-center'>
|
||||
<input type='submit' name='submit' value='<?php echo $lang->save?>' class='button-s' />
|
||||
<input type='reset' name='reset' value='<?php echo $lang->reset?>' class='button-r' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/footer.html.php';?>
|
||||
28
trunk/module/project/view/index.html.php
Normal file
28
trunk/module/project/view/index.html.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of project 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 Chunsheng Wang
|
||||
* @author Chunsheng Wang <wwccss@263.net>
|
||||
* @package project
|
||||
* @version $Id: index.html.php 1159 2009-04-26 13:53:11Z wwccss $
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/header.html.php';?>
|
||||
<div id='doc3'>
|
||||
</div>
|
||||
<?php include '../../common/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