Compare commits

..

3 Commits

Author SHA1 Message Date
wangchunsheng
638e029a21 * fix the error of my.in.js. 2011-10-31 02:25:00 +00:00
wangchunsheng
b9815fe2e2 * rename it. 2011-10-31 02:09:27 +00:00
wangchunsheng
d0a417d6ca + tag of 2.3. 2011-10-31 02:05:17 +00:00
1973 changed files with 44885 additions and 157400 deletions

13
.gitignore vendored
View File

@@ -1,13 +0,0 @@
config/my.php
www/data/
www/install.php
www/upgrade.php
tools/*
release/*
tmp/*
tmp/extensions/*
tmp/log/*
tmp/model/*
tmp/cache/*
tmp/extension/*
.gitkeep

205
COPYING
View File

@@ -1,205 +0,0 @@
Z PUBLIC LICENSE 1.2
许可
Z PUBLIC LICENSE 由青岛易软天创网络科技有限公司www.cnezsoft.com起草简称ZPL协议。
任何人均可使用该协议来发布开源软件,并可对下面协议正文中以下划线标注的空白部分做相应修改,
除此之外的任何内容不得做任何修改。青岛易软天创网络科技有限公司拥有对该协议条款的最终解释权。
前言:
禅道项目管理软件(以下简称该软件)由 青岛易软天创网络科技有限公司www.cnezsoft.com开发以下简称我。我依法拥有该软件的所有版权。
本着共享开放的角度,我以开放源代码的形式发布该软件。您可以在遵守该协议的前提下使用该软件。
自您安装该软件开始,您和我之间的合同关系自动成立。除非您停止使用该软件或与我有签署额外合同,
您须认真遵循该授权协议约定的每一条款。
我的联系方式:
联系人:徐先生
电话: 4006-8899-23
Email co@cnezsoft.com
QQ 1492153927
地址: 青岛开发区井冈山路东方银座 C座 1106
约定:
下述条款中所指该软件的标志包括如下方面:
该软件源代码及文档中关于该软件的版权提示、文字、图片和链接。
该软件运行时界面上呈现出来的有关该软件的文字、图片和链接。
不包括如下方面:
该软件提供的演示数据中关于该软件的文字、图片和链接。
一、免责
该软件是以开放源代码的方式发行,您使用该软件无需任何费用,因此在使用该软件前,您须知晓:
1.1 我没有对该软件提供任何技术支持的义务,您可联系我购买商业的技术支持。
1.2 我对因使用该软件而产生直接或间接的任何问题不负任何责任。
1.3 开源不等于免费,开源不等于无版权,开源软件的发展需要您我共同的努力。
二、自用该软件
2.1 您个人或您就职的公司(组织)可自由使用该软件,我不对您或您就职公司(组织)的性质做任何限制。
2.2 您可以在您个人或您就职公司(组织)任意数量的电脑上运行该软件,我不对电脑的数量做任何限制。
2.3 您可以对该软件源代码进行修改以适应您个人或您所在公司(组织)使用的要求,您做的改动无需对外发布。
2.4 您个人或您就职公司(组织)使用该软件时,必须保留该软件的所有标志,不得以任何方式隐藏或遮掩任一标志。
三、为用户定制
3.1 您可以使用该软件为您的用户部署各种形式的应用,我不对应用的性质做任何限制。
3.2 您可以使用该软件为您的用户部署任意数量的应用,我不对应用的数量做任何限制。
3.3 您可以对该软件源代码进行修改以适应您的用户的要求,您做的改动无需对外发布。
3.4 您对该软件源代码所做的修改可以源代码或二进制的方式提供给您的用户。
3.5 您使用该软件为您的任一用户部署的任一应用都必须保留该软件所有的标志。
3.6 您使用该软件为您的任一用户部署的任一应用都不得以任何方式隐藏或遮掩该软件任一标志。
四、提供在线服务
4.1 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务及该服务用户的性质做任何限制。
4.2 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务的用户数量做任何限制。
4.3 您可以对该软件源代码进行修改以适应在线服务的要求,您做的改动无需对外发布。
4.4 您使用该软件搭建在线服务时,必须以明确的方式告知您的用户该服务是基于该软件搭建的。
4.5 您使用该软件搭建在线服务为您的任一用户部署的任一应用必须保留该软件所有的标志。
4.6 您使用该软件搭建在线服务为您的任一用户部署的任一应用不得以任何方式隐藏或遮掩该软件任一标志。
4.7 您使用该软件搭建在线服务时,不得为您的用户提供去除、隐藏或遮掩该软件任一标志的功能。
五、无改动发布或集成该软件
5.1 我欢迎并感谢您将该软件发布在您的个人网站、企业官网或者其他的第三方网站。
5.2 我欢迎并感谢您将该软件集成在其他系统中一起发布,比如云服务镜像、操作系统发行版等。
5.3 您在发布或者集成该软件的时候,不得对该软件源码做任何改动。
5.4 您在发布或者集成该软件的时候,须保留该软件的所有标志。
六、发布基于该软件的衍生作品
6.1 我欢迎并感谢您为该软件开发衍生作品。
6.2 您开发的衍生作品中涉及到对该软件源代码改动的地方,须遵循如下条款:
6.2.1 如修改了该软件的源代码,须依据本协议发布修改后的源代码。
6.2.2 如修改了该软件的源代码,须保留代码里面该软件原有的所有标志。
6.2.3 您可以在代码中追加您自己的标志。
6.2.4 您可以对您开发的衍生作品进行收费。
6.2.5 第三方的用户可在遵循6.2所有条款下可继续在您开发的衍生作品基础上进行修改并发布。
6.3 您开发的衍生作品中独立于本软件开发的代码,可以源代码或二进制的方式进行发布,可免费或收费发布。
6.4 您开发的衍生作品不得以任何方式去除、隐藏或遮掩该软件的任一标志。
七、发布基于该软件API的应用
7.1 我欢迎并感谢您为该软件开发基于API的各种应用比如客户端软件等。
7.2 您基于该软件API机制开发的应用可以源代码或者二进制的方式进行发布我对此没有任何限制。
7.3 您基于该软件API机制开发的应用授权协议可以自行约定我对此没有任何限制。
7.4 您基于该软件API机制开发的应用可以免费或者收费发布我对此没有任何限制。
八、授权例外
如果上述条款无法满足您使用该软件的要求,可联系我签署额外的合同以获得更灵活的授权许可。
九、合同约束
9.1 如果您违反了该协议的任一条款,该授权协议将自动终止,我保留通过法律手段追究责任的权利。
Z PUBLIC LICENSE 1.2
Authorization
Z PUBLIC LICENSE, also known as ZPL Agreement, is drafted by QingDao Nature Easy Soft Network Technology Co,LTD. (,www.cnezsoft.com).
Anyone can use the agreement to publish open source software, and modify the blank underlined part of the following text of the agreement accordingly.
No other text of the agreement shall be changed. QingDao Nature Easy Soft Network Technology Co,LTD has the final authority to interpret the terms of the agreement.
Preface
ZenTaoPMS (Hereinafter referred to as "the software") developed by Nature EasySoft Network Tecnology Co.ltd, QingDao, China (www.cnezsoft.com) (hereinafter referred to I). I'm entitled to all copyright of the software.
The software is released as open source software. You are authorized to use the software as long as you are in compliance with this agreement.
By installation of the software, you agree that a contractual relationship between you and me is automatically established.
You are obliged to fully comply with all the terms of this agreement unless you choose to stop using the software or you have signed additional contracts with me.
My Contact:
Contact: Mr. Xu
Phone: 4006-8899-23
Email: co@cnezsoft.com
QQ: 1492153927
Address: Qingdao Development Zone, the Oriental Kenzo C 1106
We agree:
Indications of the software include:
Notes, texts, pictures and links showing copyright attribution of the software in the source code and related documentation.
and texts, picture and links on the interface of the software when running.
Excluding
texts, picture and links on the interface of the demo versions of the software.
1. Disclaimer
The software is an open-source software, so you are authorized to use the software without paying a fee. Before you start to use it, please note:
1.1 I do not have any obligation to provide technical support for the software. You can contact me to purchase technical support service.
1.2 I'm not responsible for any liability caused by your using the software directly or indirectly.
1.3 Open source software does not mean it's free of charge, neither does it mean the software does not enjoy copyright.
2. For personal use
2.1 You or your company/organization are authorized to use the software for your internal use for both commercial and non-commercial purposes..
2.2 You or your company/organization are authorized to run the software on any number of computers.
2.3 You or your company/organization are authorized to modify the source code of the software to meet your requirements. You do not need to release the modified codes.
2.4 You or your company/organization must keep all the indications of the software when using it. None of the indications can be removed, hidden or obscured in any way.
3. For customized software
3.1 You are authorized to use the software to deploy various forms of application for your users in any way you like.
3.2 You are authorized to use the software to deploy any number of applications for your users.
3.3 You are authorized to modify the source code to meet your user's requirements without releasing the modified codes.
3.4 You are authorized to provide the modified codes to your users in either source code form or binary.
3.5 You must keep all the indications of the software when providing applications to your users.
3.6 None of the indications of the software may be removed, hidden or obscured in any way when you provide applications to your users.
4. Online service
4.1 You are authorized to use the software to build your online service for your users in any way you like.
4.2 You are authorized to use the software to build your online service for any number of your users.
4.3 You are authorized to modify the source codes of the software to meet your user's requirements on online service without releasing the modified codes.
4.4 You must notify your users clearly that your service is based on the software when you use it to build your online service.
4.5 You must keep all the indications of the software when providing online service to your users.
4.6 You must keep all the indications of the software in any application you make for your users. None of the indications can be hidden or obscured in any way.
4.7 You are forbidden from assisting your users by providing tools for your users to remove, hide or obscure any indication of the software when you use the software to build your online service.
5. Publish or integrate the software without modification
5.1 You are authorized to publish the software on your personal sites, corporate official website or other third-party sites.
5.2 You are authorized to integrate the software with other systems, such as cloud virtual machine images, operating system images and so on.
5.3 Do not modify the source code of the software when you publish or integrate it.
5.4 All indications of the software must be kept the same when you publish or integrate the software.
6. Publish derived work based on the software
6.1 You are authorized to develop derived work based on the software.
6.2 The modified codes of the software in your derived work must follow the following terms:
6.2.1 The source codes must be released if you make any modification to the software.
6.2.2 All indications of the software must be kept the same.
6.2.3 You are entitled to add your indications to the modified codes.
6.2.4 You are entitled to charge fees for the derived work you developed based on the software.
6.2.5 You agree to authorize third party users to modify and release the derived work in compliance with 6.2.
6.3 If the codes of the work are independently developed by yourself, You are authorized to release the work in either source code form or binary. You are entitled to charge your users or make it free.
6.4 None of the indications of the software can be removed, hidden or obscured in any way in the derived work you developed.
7. Publish applications based on API of the software
7.1 You are authorized to develop your applications based on the API of the software, for example, client software.
7.2 You are authorized to publish applications you developed based on the API in either source code form or binary.
7.3 You are authorized to use your own license to release applications you developed based on the API.
7.4 You are entitled to release applications you developed based on the API either free or with a charge.
8. Exceptions
If the terms above do not meet your requirements when using the software, please contact me for a more flexible license.
9. Termination
9.1 Violation of any of the terms of the agreement will result in immediate termination of this license. I reserve all rights to take legal actions in case of dispute.

127
Makefile
View File

@@ -1,84 +1,89 @@
VERSION=$(shell head -n 1 VERSION)
all: pms
all: tgz
sae: tgz build4sae
clean:
rm -fr zentaopms
rm -fr zentaostory
rm -fr zentaotask
rm -fr zentaotest
rm -fr *.tar.gz
rm -fr *.zip
rm -fr api*
rm -fr build/linux/lampp
rm -fr lampp
pms:
mkdir zentaopms
cp -fr bin zentaopms/
cp -fr config zentaopms/ && rm -fr zentaopms/config/my.php
cp -fr db zentaopms/
cp -fr doc zentaopms/ && rm -fr zentaopms/doc/phpdoc && rm -fr zentaopms/doc/doxygen
tgz:
# make the directories.
mkdir -p zentaopms/lib
mkdir -p zentaopms/db
mkdir -p zentaopms/bin
mkdir -p zentaopms/config
mkdir -p zentaopms/www/data/upload
mkdir -p zentaopms/tmp/cache
mkdir -p zentaopms/tmp/log
mkdir -p zentaopms/tmp/model
mkdir -p zentaopms/tmp/extension
# copy files.
cp -fr framework zentaopms/
cp -fr lib zentaopms/
cp -fr lib/ zentaopms/
cp -fr config/config.php zentaopms/config/
cp -fr module zentaopms/
cp -fr www zentaopms && rm -fr zentaopms/www/data/ && mkdir -p zentaopms/www/data/upload
cp -fr tmp zentaopms
rm -fr zentaopms/tmp/cache/*
rm -fr zentaopms/tmp/extension/*
rm -fr zentaopms/tmp/log/*
rm -fr zentaopms/tmp/model/*
cp VERSION zentaopms/
# combine js and css files.
cp -fr tools zentaopms/tools && cd zentaopms/tools/ && php ./minifyfront.php
rm -fr zentaopms/tools
cp -fr www/*.ico www/fusioncharts www/*.php www/js www/*.txt www/theme www/.htaccess zentaopms/www
cp bin/ztc* bin/computeburn.php bin/getbugs.php bin/initext.php bin/todo.php bin/convertopt.php zentaopms/bin
cp -fr db zentaopms/
cp -fr doc/* zentaopms/
# create my.min.js
rm zentaopms/www/js/my.min.js
java -jar ~/bin/yuicompressor/build/yuicompressor-2.4.6.jar www/js/my.full.js > zentaopms/www/js/my.min.js
# create the restart file for svn.
# touch zentaopms/module/svn/restart
touch zentaopms/module/svn/restart
# touch the front.class.php to make it's mtime to new.
touch zentaopms/lib/front/front.class.php
# delee the unused files.
find zentaopms -name .gitkeep |xargs rm -fr
find zentaopms -name .svn |xargs rm -fr
find zentaopms -name tests |xargs rm -fr
# notify.zip.
mkdir zentaopms/www/data/notify/
# change mode.
chmod -R 777 zentaopms/tmp/
chmod -R 777 zentaopms/www/data
chmod -R 777 zentaopms/config
chmod 777 zentaopms/module
chmod 777 zentaopms/www
chmod 777 -R zentaopms/tmp/
chmod 777 -R zentaopms/www/data
chmod 777 zentaopms/config
chmod a+rx zentaopms/bin/*
find zentaopms/ -name ext |xargs chmod -R 777
echo full > zentaopms/.flow
# zip it.
zip -r -9 ZenTaoPMS.$(VERSION).zip zentaopms
rm -fr zentaopms
deb:
mkdir buildroot
cp -r build/debian/DEBIAN buildroot
sed -i '/^Version/cVersion: ${VERSION}' buildroot/DEBIAN/control
mkdir buildroot/opt
mkdir buildroot/etc/apache2/sites-enabled/ -p
cp build/debian/zentaopms.conf buildroot/etc/apache2/sites-enabled/
cp ZenTaoPMS.${VERSION}.zip buildroot/opt
cd buildroot/opt; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms zentao; rm ZenTaoPMS.${VERSION}.zip
sed -i 's/index.php/\/zentao\/index.php/' buildroot/opt/zentao/www/.htaccess
sudo dpkg -b buildroot/ ZenTaoPMS_${VERSION}_1_all.deb
rm -rf buildroot
rpm:
mkdir ~/rpmbuild/SPECS -p
cp build/rpm/zentaopms.spec ~/rpmbuild/SPECS
sed -i '/^Version/cVersion:${VERSION}' ~/rpmbuild/SPECS/zentaopms.spec
mkdir ~/rpmbuild/SOURCES
cp ZenTaoPMS.${VERSION}.zip ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SOURCES/etc/httpd/conf.d/ -p
cp build/debian/zentaopms.conf ~/rpmbuild/SOURCES/etc/httpd/conf.d/
mkdir ~/rpmbuild/SOURCES/opt/ -p
cd ~/rpmbuild/SOURCES; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms opt/zentao;
sed -i 's/index.php/\/zentao\/index.php/' ~/rpmbuild/SOURCES/opt/zentao/www/.htaccess
cd ~/rpmbuild/SOURCES; tar -czvf zentaopms-${VERSION}.tar.gz etc opt; rm -rf ZenTaoPMS.${VERSION}.zip etc opt;
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
cp ~/rpmbuild/RPMS/noarch/zentaopms-${VERSION}-1.noarch.rpm ./
rm -rf ~/rpmbuild
patchphpdoc:
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
phpdoc:
phpdoc -d bin,framework,config,lib,module,www -t api -o HTML:frames:phphtmllib -ti ZenTaoPMSAPI<50>ο<EFBFBD><CEBF>ֲ<EFBFBD> -s on -pp on -i *test*
phpdoc -d bin,framework,config,lib,module,www -t api.chm -o chm:default:default -ti ZenTaoPMSAPI<50>ο<EFBFBD><CEBF>ֲ<EFBFBD> -s on -pp on -i *test*
doxygen:
doxygen doc/doxygen/doxygen.conf
doxygen misc/doc/doxygen/doxygen.conf
build4sae:
unzip ZenTaoPMS.$(VERSION).zip
rm -fr ZenTaoPMS.$(VERSION).zip
mv zentaopms/www/* zentaopms
rm -fr zentaopms/data
# replace the directory of index.php, install.php, upgrade.php.
sed -e 's/..\/framework/framework/g' zentaopms/index.php |sed -e "s/dirname(//" |sed -e 's/)))/))/' >zentaopms/index.php.new
sed -e 's/..\/framework/framework/g' zentaopms/install.php |sed -e "s/dirname(//" |sed -e 's/)))/))/' >zentaopms/install.php.new
sed -e 's/..\/framework/framework/g' zentaopms/upgrade.php |sed -e "s/dirname(//" |sed -e 's/)))/))/' >zentaopms/upgrade.php.new
mv zentaopms/index.php.new zentaopms/index.php
mv zentaopms/install.php.new zentaopms/install.php
mv zentaopms/upgrade.php.new zentaopms/upgrade.php
# replace the error_log to sae_debug
sed -e 's/error_log/sae_debug/g' zentaopms/framework/router.class.php | sed -e "s/saveSQL/saveSQL4SAE/" >zentaopms/framework/router.class.php.new
mv zentaopms/framework/router.class.php.new zentaopms/framework/router.class.php
cat build/sae/savesql.php >> zentaopms/framework/helper.class.php
# change the logic of merge model file in helper.class.php.
sed -e 's/\$$app->getTmpRoot/"saemc:\/\/" . \$$app\-\>getTmpRoot/g' zentaopms/framework/helper.class.php >zentaopms/framework/helper.class.new
mv zentaopms/framework/helper.class.new zentaopms/framework/helper.class.php
# touch the my.php.
touch zentaopms/config/my.php
# get the extension files.
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/sae
mv sae/lib/saestorage zentaopms/lib/
cp -fr sae/* zentaopms/module/
# create the package.
mkdir 10
mv zentaopms 10/code
cp build/sae/config.yaml 10/
zip -r -9 ZenTaoPMS.$(VERSION).sae.zip 10
rm -fr sae
rm -fr 10

View File

@@ -1,48 +0,0 @@
1. What is ZenTao for?
=====================
ZenTao, developed by Nature Easy Soft Network Technology Development Co. Ltd, is an open source project management software. Combining product management, project management, quality management, document project, organization management and todo management, ZenTao is professional R&D project management software, completely covering the core processes of R & D project. Results-oriented with perfect functions, easy operation, beautiful interface, powerful search functions, various statistical statements and complete API, ZenTao is reasonably structured and can be extended flexibly.
ZenTao - focuses on R & D project management.
2. Why are we called ZenTao?
============================
In Chinese, Zen(禅) and Tao(道) are two words that have rich meanings in both religion and culture. ZenTao Project Management Software is originated in the cultural meanings of Zen and Tao, expecting to convey our understanding and thinking on management. Inspired by two books The Tao of Programming and The Zen of Programming, we name our software ZenTao.
3. Design philosophy of ZenTao Project Management Software
==========================================================
The main management theory of ZenTao Project Management Software is based on Scrum, an internationally popular agile management methodology. Results-oriented and operable, Scrum is very suitable for the fast sprint development of software development projects. However, Scrum only defines the core management framework. There are still many details and processes needing to be extended by the teams. On the basis of following the management methods of Scrum and with the consideration of the current domestic R&D status, ZenTao integrates the functions, such as bug management, test case management, release management and document management and completely covers the entire life cycle of software R&D projects. In ZenTao, the concepts of product, project and test are clearly defined. Product team, development team and testing team coordinate and check with each other while they are separated. With the interaction through requirements, tasks and bugs between the three teams, qualified products are ultimately made within the project.
4. Why choose ZenTao Project Management Software
===============================================
* ZenTao is a professional R&D project management software, beyond comparison with any other simple project management software.
* Precise and pragmatic management theory, which will help companies achieve fast and agile development.
* Complete functions: you dont need to integrate several systems together, like mantisbt + trac + testlink.
* Open source codes and flexible extension mechanism, convenient for uses and secondary development of companies.
* Underlying framework and front-end UI framework developed independently: robust and stable with beautiful interface and friendly interaction.
* Perfect community mechanism: you can get timely technical support and help.
* Zero input: you have no risk for choosing ZenTao compared with other commercial software of tens of thousands of dollars.
* Various deployments supported, either private deployment or cloud services.
5. Function lists of ZenTao Project Management Software
======================================================
* Product management: including products, requirements, plans, releases and roadmaps;
* Project management: including projects, tasks, teams, versions and burn-down charts;
* Quality management: including bus, test cases, test tasks and test results;
* Document management: including product document library, project document library and user-defined document library;
* Affair management: including to-do management and personal affairs management like my tasks, my bugs, my requirement and my projects;
* Organization management: including department, users, groups and authorities;
* Statistics function: various statistical statements;
* Search function: powerful search functions to help you find the data you need.
* Extension mechanism:extensible nearly anywhere in ZenTao;
* API mechanism, visible API: convenient for integration with other systems.
6. Website
==========
Our website is: [www.zentao.pm](http://www.zentao.pm)

View File

@@ -1 +1 @@
8.2.stable
2.3.stable

45
bin/build.php Normal file
View File

@@ -0,0 +1,45 @@
<?php
/**
1. 修改zentaophp中的version number打tag。
2. 修改ZenTaoPMS中的version
config.php中的version.
install中的version。
3. 修改升级程序。(版本列表。)
4. 打包ZenTaoPMS。
5. 合并目录。
6. 修改www/index.php中的包含路径。
7. 导出新的数据库。 grep -v '\-\-' /mnt/c/zentao.sql |grep -v ^$ |sed "s/DROP/\-\- DROP/" >zentao.sql
8. zip包。
9. windows包。
10. 上传文件。
11. 撰写升级声明。
*/
$phpURL = 'http://zentaophp.googlecode.com/svn/tags/';
$pmsURL = 'http://ZenTaoPMS.googlecode.com/svn/tags/';
$phpTag = getLatestTag($phpURL);
$pmsTag = getLatestTag($pmsURL);
$phpTagURL = $phpURL . $phpTag;
$pmsTagURL = $pmsURL . $pmsTag;
echo $phpTag . "'\t" . $pmsTag . "\n";
chdir('../release/');
echo `svn export $phpTagURL`;
echo `svn export $pmsTagURL`;
/* Get the latest tag under a url. */
function getLatestTag($url)
{
$lines = file($url);
$latestTag = '';
foreach($lines as $line)
{
if(strpos($line, '<li>') !== false) $latestTag = $line;
}
$latestTag = explode('"', $latestTag);
$latestTag = $latestTag[1];
return $latestTag;
}

108
bin/check.php Executable file
View File

@@ -0,0 +1,108 @@
<?php
/**
* This file is used to check the language items and actions.
*/
/* Define an emtpty control class as the base class of every module. */
class control {}
/* set module root path and included the resource of group module. */
$moduleRoot = '../module/';
include $moduleRoot . '/group/lang/resource.php';
$whiteList[] = 'api-getsessionid';
$whiteList[] = 'bug-buildtemplates';
$whiteList[] = 'bug-exportdata';
$whiteList[] = 'company-create';
$whiteList[] = 'company-delete';
$whiteList[] = 'file-buildform';
$whiteList[] = 'file-printfiles';
$whiteList[] = 'file-export2csv';
$whiteList[] = 'file-export2xml';
$whiteList[] = 'file-export2html';
$whiteList[] = 'file-senddownheader';
$whiteList[] = 'help-field';
$whiteList[] = 'index-testext';
$whiteList[] = 'productplan-commonaction';
$whiteList[] = 'project-managechilds';
$whiteList[] = 'project-tips';
$whiteList[] = 'release-commonaction';
$whiteList[] = 'task-commonaction';
$whiteList[] = 'user-login';
$whiteList[] = 'user-deny';
$whiteList[] = 'user-logout';
$whiteList[] = 'mail-set';
$whiteList[] = 'mail-save';
$whiteList[] = 'svn-run';
/* checking actions of every module. */
echo '-------------action checking-----------------' . "\n";
foreach(glob($moduleRoot . '*') as $modulePath)
{
$moduleName = basename($modulePath);
if(strpos('install|upgrade|convert|common|misc|editor', $moduleName) !== false) continue;
$controlFile = $modulePath . '/control.php';
if(file_exists($controlFile))
{
include $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)
{
$methodName = $method->name;
if(in_array($moduleName . '-' . strtolower($method->name), $whiteList)) continue;
$exits = false;
foreach($lang->resource->$moduleName as $key => $label)
{
if(strtolower($methodName) == strtolower($key)) $exits = true;
}
if(!$exits) echo $moduleName . "\t" . $methodName . " not in the list. \n";
}
}
}
}
}
/* checking actions of every module. */
echo '-------------lang checking-----------------' . "\n";
include '../config/config.php';
foreach(glob($moduleRoot . '*') as $modulePath)
{
unset($lang);
$moduleName = basename($modulePath);
$mainLangFile = $modulePath . '/lang/zh-cn.php';
if(!file_exists($mainLangFile)) continue;
$mainLines = file($mainLangFile);
foreach($config->langs as $langKey => $langName)
{
if($langKey == 'zh-cn' or $langKey == 'zh-tw') continue;
$langFile = $modulePath . '/lang/' . $langKey . '.php';
if(!file_exists($langFile)) continue;
$lines = file($langFile);
foreach($mainLines as $lineNO => $line)
{
if(strpos($line, '$lang') === false)
{
//if($line != $lines[$lineNO]) echo $moduleName . ' ' . $langKey . ' ' . $lineNO . "\n";
}
else
{
list($mainKey, $mainValue) = explode('=', $line);
list($key, $value) = explode('=', $lines[$lineNO]);
if(trim($mainKey) != trim($key))
{
$key = trim($key);
echo "$moduleName $langKey $mainKey $key " . ($lineNO + 1) . "\n";
break;
}
}
}
}
}
?>

0
tools/cn2tw.php → bin/cn2tw.php Executable file → Normal file
View File

49
bin/computeburn.php Executable file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env php
<?php
include dirname(dirname(__FILE__)) . '/lib/api/api.class.php';
$config->zentao->root = ""; // 禅道访问的完整路径包括后面的斜线。比如http://pms.zentao.net/
$config->zentao->account = ""; // 可以访问禅道的帐号需要有超级model调用接口的访问权限。
$config->zentao->password = ""; // 密码。
class computeburn
{
public $config; // the config var.
public $zentao; // the zentao client.
public function __construct($config)
{
$this->initConfig($config);
$this->initZenTao();
}
/* run. */
public function run()
{
$result = $this->zentao->fetchModel('project', 'computeburn');
if(empty($result)) return;
foreach($result as $burns)
{
echo $burns->project . "\t";
echo $burns->projectName . "\t";
echo $burns->date . "\t";
echo $burns->left . "\n";
}
}
/* Init the config. */
private function initConfig($config)
{
$this->config = $config;
}
/* Init the client of zentao api. */
private function initZenTao()
{
$this->zentao = new ztclient($this->config->zentao->root, $this->config->zentao->account, $this->config->zentao->password);
}
}
$computeburn = new computeburn($config);
$computeburn->run();
?>

18
bin/convertopt.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
/**
* This file is used to convert the old opt directory to ext.
*/
$modules = glob('../module/*');
foreach($modules as $module)
{
$modulePath = realpath($module) . '/';
$moduleOpt = $modulePath . 'opt';
$moduleExt = $modulePath . 'ext';
if(file_exists($moduleOpt))
{
echo "Processing $module ... ";
$result = @rename($moduleOpt, $moduleExt);
print($result ? ' done' : ' fail');
echo "\n";
}
}

0
tools/getallcommon.php → bin/getallcommon.php Executable file → Normal file
View File

77
bin/getbugs.php Executable file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env php
<?php
/* 包含http客户端类snoopy。在禅道lib/snoopy里面可以找到。*/
include dirname(dirname(__FILE__)) . '/lib/snoopy/snoopy.class.php';
/* 用来登录的地址,用户名和密码。*/
$zentaoRoot = "http://demo.zentao.net/"; // 请根据实际的情况进行修改。
$account = "demo";
$password = "123456";
$requestType = 'PATH_INFO'; // 可选值: GET|PATH_INFO。
/* 设置API地址。*/
if($requestType == 'GET')
{
/* API地址以GET方式为例。*/
$loginAPI = $zentaoRoot . "?m=user&f=login";
$sessionAPI = $zentaoRoot . "?m=api&f=getSessionID&t=json";
$myBugAPI = $zentaoRoot . "?m=my&f=bug&t=json";
$superMyBugAPI = $zentaoRoot . "?m=api&f=getModel&module=bug&methodName=getUserBugPairs&params=account=$account";
}
elseif($requestType == 'PATH_INFO')
{
/* API地址以PATH_INFO方式为例。*/
$loginAPI = $zentaoRoot . "user-login.json?a=1";
$sessionAPI = $zentaoRoot . "api-getsessionid.json?a=1";
$myBugAPI = $zentaoRoot . "my-bug.json?a=1";
$superMyBugAPI = $zentaoRoot . "api-getmodel-bug-getUserBugPairs-account=$account.json?a=1";
}
/* 获取session. */
$snoopy = new Snoopy;
$snoopy->fetch($sessionAPI);
$session = json_decode($snoopy->results);
$session = json_decode($session->data);
/*用户登录*/
$authHash = md5(md5($password) . $session->rand);
$submitVars["account"] = $account;
$submitVars["password"] = $authHash;
$snoopy->cookies[$session->sessionName] = $session->sessionID;
$snoopy->submit($loginAPI, $submitVars);
/* 直接调用my模块的bugs页面。*/
$snoopy->fetch($myBugAPI . "&$session->sessionName=$session->sessionID");
$result = json_decode($snoopy->results);
if($result->status == 'success' && md5($result->data) == $result->md5)
{
$bugs = json_decode($result->data)->bugs;
}
else
{
echo "called failed or transfered not complete.";
exit;
}
if($bugs)
{
foreach($bugs as $bug) echo $bug->id . "\t" . $bug->title . "\n";
}
else
{
echo 'no bugs' . "\n";
}
/* 通过超级model调用。*/
$snoopy->fetch($superMyBugAPI . "&$session->sessionName=$session->sessionID");
$result = json_decode($snoopy->results);
if(is_object($result))
{
foreach($result as $id=>$bug) echo $id . "\t" . $bug . "\n";
}
else
{
echo 'no bugs' . "\n";
}
?>

View File

@@ -1,107 +0,0 @@
@ECHO OFF
SET PATH=%systemRoot%;%systemRoot%\system32;%PATH%
SET lastDir=%cd%
SET baseDir=%~dp0
SET cronDir=%baseDir%cron\
set sysCron=%cronDir%sys.cron
:: get phpcli and pmsRoot
SET phpcli=%1
SET pmsRoot=%2
:input_php
IF "%phpcli%"=="" SET /P phpcli="Please input your php path:(example: c:\windows\php.exe)"
if "%phpcli%"=="" (
echo php path is error
goto input_php
)
if not exist %phpcli% (
echo php path is error
goto input_php
)
:input_url
IF "%pmsRoot%"=="" SET /P pmsRoot="Please input zentao url:(example: http://localhost or http://127.0.0.1:88)"
IF "%pmsRoot%"=="" (
echo zentao url is error
goto input_url
)
:: get pmsRoot
if "%pmsRoot:~-1%" == "/" SET pmsRoot=%pmsRoot:~0,-1%
:: get requestType
SET requestType= 'PATH_INFO'
for /f "tokens=3" %%f in ('find /c "'PATH_INFO'" "%baseDir%..\config\my.php"') do set count=%%f
if not defined count set count=1
if %count% == 0 SET requestType='GET'
:: create ztcli
SET ztcli= %phpcli% %baseDir%ztcli %%*
echo %ztcli% > %baseDir%ztcli.bat
echo ztcli.bat ok
:: create backup.bat
SET backup= %phpcli% %baseDir%php\backup.php
echo %backup% > %baseDir%backup.bat
echo backup.bat ok
:: create dailyreminder.bat
if %requestType% == 'PATH_INFO' (
SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/report-remind"
)else (
SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=report&f=remind"
)
echo %computeburn% > %baseDir%dailyreminder.bat
echo dailyreminder.bat ok
:: create computeburn.bat
if %requestType% == 'PATH_INFO' (
SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computeburn"
)else (
SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computeburn"
)
echo %computeburn% > %baseDir%computeburn.bat
echo computeburn.bat ok
:: create checkdb.bat
if %requestType% == 'PATH_INFO' (
SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/admin-checkdb"
)else (
SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=admin&f=checkdb"
)
echo %checkdb% > %baseDir%checkdb.bat
echo checkdb.bat ok
:: create syncsvn.bat
if %requestType% == 'PATH_INFO' (
SET syncsvn= %phpcli% %baseDir%ztcli "%pmsRoot%/svn-run"
)else (
SET syncsvn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=svn&f=run"
)
echo %syncsvn% > %baseDir%syncsvn.bat
echo syncsvn.bat ok
:: create syncgit.bat
if %requestType% == 'PATH_INFO' (
SET syncgit= %phpcli% %baseDir%ztcli "%pmsRoot%/git-run"
)else (
SET syncgit= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=git&f=run"
)
echo %syncgit% > %baseDir%syncgit.bat
echo syncgit.bat ok
:: create crond.bat
SET cron= %phpcli% %baseDir%php\crond.php
echo %cron% > %baseDir%crond.bat
echo crond.bat ok
:: create system cron.
if not exist %cronDir% md %cronDir%
echo # system cron. > %sysCron%
echo #min hour day month week command. >> %sysCron%
echo 0 1 * * * %baseDir%dailyreminder.bat # daily reminder. >> %sysCron%
echo 1 1 * * * %baseDir%backup.bat # backup database and file. >> %sysCron%
echo 1 23 * * * %baseDir%computeburn.bat # compute burndown chart. >> %sysCron%
echo 1-59/2 * * * * %baseDir%syncsvn.bat # sync subversion. >> %sysCron%
echo 1-59/2 * * * * %baseDir%syncgit.bat # sync git. >> %sysCron%
:: return 0 when success.
exit /b 0

View File

@@ -1,111 +0,0 @@
#!/bin/bash
# usage: ./init.sh /usr/bin/php http://localhost
phpcli=$1
pmsRoot=$2
basePath=$(cd "$(dirname "$0")"; pwd)
if [ ! -n "$1" ]; then
while :; do
echo "Please input your php path:(example: /usr/bin/php)"
read phpcli
if [ ! -f $phpcli ]; then
echo "php path is error";
elif [ "$phpcli"x != ""x ]; then
break;
fi
done
fi
if [ ! -n "$2" ]; then
while :; do
echo "Please input zentao url:(example: http://localhost:88/zentao or http://localhost)"
read pmsRoot
if [ -z "$pmsRoot" ]; then
echo "zentao url is error";
else
break;
fi
done
fi
pmsRoot=`echo "$pmsRoot" | sed 's/[/]$//g'`
cat $basePath/../config/my.php |awk '$1!~/^\/\//&& $1~/\$config\->requestType/{requestType = $0} END{print requestType}'| grep -c 'PATH_INFO' > ./init.tmp
if [ "`cat ./init.tmp`" != 0 ];then
requestType='PATH_INFO';
else
requestType='GET';
fi
rm ./init.tmp
# ztcli
ztcli="$phpcli $basePath/ztcli \$*"
echo $ztcli > $basePath/ztcli.sh
echo "ztcli.sh ok"
# backup database
backup="$phpcli $basePath/php/backup.php"
echo $backup > $basePath/backup.sh
echo "backup.sh ok"
# computeburn
if [ $requestType == 'PATH_INFO' ]; then
computeburn="$phpcli $basePath/ztcli '$pmsRoot/project-computeburn'";
else
computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computeburn'";
fi
echo $computeburn > $basePath/computeburn.sh
echo "computeburn.sh ok"
# daily remind
if [ $requestType == 'PATH_INFO' ]; then
checkdb="$phpcli $basePath/ztcli '$pmsRoot/report-remind'";
else
checkdb="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=report&f=remind'";
fi
echo $checkdb > $basePath/dailyreminder.sh
echo "dailyreminder.sh ok"
# check database
if [ $requestType == 'PATH_INFO' ]; then
checkdb="$phpcli $basePath/ztcli '$pmsRoot/admin-checkdb'";
else
checkdb="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=admin&f=checkdb'";
fi
echo $checkdb > $basePath/checkdb.sh
echo "checkdb.sh ok"
# syncsvn.
if [ $requestType == 'PATH_INFO' ]; then
syncsvn="$phpcli $basePath/ztcli '$pmsRoot/svn-run'";
else
syncsvn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=svn&f=run'";
fi
echo $syncsvn > $basePath/syncsvn.sh
echo "syncsvn.sh ok"
# syncgit.
if [ $requestType == 'PATH_INFO' ]; then
syncgit="$phpcli $basePath/ztcli '$pmsRoot/git-run'";
else
syncgit="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=git&f=run'";
fi
echo $syncgit > $basePath/syncgit.sh
echo "syncgit.sh ok"
# cron
if [ ! -d "$basePath/cron" ]; then
mkdir $basePath/cron
fi
echo "# system cron." > $basePath/cron/sys.cron
echo "#min hour day month week command." >> $basePath/cron/sys.cron
echo "0 1 * * * $basePath/dailyreminder.sh # dailyreminder." >> $basePath/cron/sys.cron
echo "1 1 * * * $basePath/backup.sh # backup database and file." >> $basePath/cron/sys.cron
echo "1 23 * * * $basePath/computeburn.sh # compute burndown chart." >> $basePath/cron/sys.cron
echo "1-59/2 * * * * $basePath/syncsvn.sh # sync subversion." >> $basePath/cron/sys.cron
echo "1-59/2 * * * * $basePath/syncgit.sh # sync git" >> $basePath/cron/sys.cron
cron="$phpcli $basePath/php/crond.php"
echo $cron > $basePath/cron.sh
echo "cron.sh ok"
chmod 755 $basePath/*.sh
exit 0

15
tools/initext.php → bin/initext.php Executable file → Normal file
View File

@@ -2,7 +2,7 @@
/**
* The control file of common module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @copyright Copyright 2009-2011 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chen congzhi <congzhi@cnezsoft.com>
* @package common
@@ -37,8 +37,6 @@ foreach($modules as $module)
$extControl = $extRoot . DIRECTORY_SEPARATOR . 'control';
$extModel = $extRoot . DIRECTORY_SEPARATOR . 'model';
$extView = $extRoot . DIRECTORY_SEPARATOR . 'view';
$extCSS = $extRoot . DIRECTORY_SEPARATOR . 'css';
$extJS = $extRoot . DIRECTORY_SEPARATOR . 'js';
$extConfig = $extRoot . DIRECTORY_SEPARATOR . 'config';
$extLang = $extRoot . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR;
@@ -47,26 +45,15 @@ foreach($modules as $module)
if(!file_exists($extControl)) mkdir($extControl, 0777);
if(!file_exists($extModel)) mkdir($extModel, 0777);
if(!file_exists($extView)) mkdir($extView, 0777);
if(!file_exists($extCSS)) mkdir($extCSS, 0777);
if(!file_exists($extJS)) mkdir($extJS, 0777);
if(!file_exists($extConfig)) mkdir($extConfig, 0777);
if(!file_exists($extLang)) mkdir($extLang, 0777);
/* Touch .gitkeep file. */
touch($extControl . '/.gitkeep');
touch($extModel . '/.gitkeep');
touch($extView . '/.gitkeep');
touch($extCSS . '/.gitkeep');
touch($extJS . '/.gitkeep');
touch($extConfig . '/.gitkeep');
/* 创建语言目录。*/
$langs = array_keys($config->langs);
foreach($langs as $lang)
{
$langPath = $extLang . $lang;
if(!file_exists($langPath)) mkdir($langPath, 0777);
touch($langPath . '/.gitkeep');
}
echo "init $module ... \n";

View File

@@ -1,58 +0,0 @@
<?php
/* Backup the db. */
error_reporting(E_ALL ^ E_NOTICE);
/* Include config.php and pclzip class. */
$pmsRoot = dirname(dirname(dirname(__FILE__)));
$myConfig = $pmsRoot . '/config/config.php';
$zipClass = $pmsRoot . '/lib/pclzip/pclzip.class.php';
$zdbClass = $pmsRoot . '/lib/zdb/zdb.class.php';
include $myConfig;
include $zipClass;
include $zdbClass;
/* Init the backupRoot and dest directory. */
$backupRoot = $pmsRoot . "/backup";
$destDir = $backupRoot . "/" . date('Ym');
if(!file_exists($backupRoot)) mkdir($backupRoot, 0777);
if(!file_exists($destDir)) mkdir($destDir, 0777);
/* Backup database. */
$dbRawFile = "db." . date('Ymd') . ".sql";
$dsn = "mysql:host={$config->db->host}; port={$config->db->port}; dbname={$config->db->name}";
$dbh = new PDO($dsn, $config->db->user, $config->db->password, array(PDO::ATTR_PERSISTENT => $config->db->persistant));
$dbh->exec("SET NAMES {$config->db->encoding}");
echo "Backuping database,";
$zdb = new zdb();
$return = $zdb->dump($dbRawFile);
if($return->result)
{
$dbZipFile = $destDir . "/" . str_replace("sql", "zip", $dbRawFile);
$archive = new pclzip($dbZipFile);
if($archive->create($dbRawFile))
{
unlink($dbRawFile);
echo " successfully saved to $dbZipFile\n";
}
else
{
die("Error : " . $archive->errorInfo(true));
}
}
else
{
echo "Failed to backup database!\n";
}
/* Backup the attachments. */
chdir(dirname(dirname(dirname(__FILE__))) . "/www");
if(!is_dir('data/upload')) die(" No files needed backup.\n");
echo "Backuping files,";
$attachFile = $destDir . "/" . "file." . date('Ymd', time()) . ".zip";
$archive = new pclzip($attachFile);
if($archive->create("data/upload", PCLZIP_OPT_REMOVE_PATH, "data")) die(" successfully saved to $attachFile\n");
die("Error : ".$archive->errorInfo(true));

View File

@@ -1,28 +0,0 @@
<?php
/* Get the yaml file and parse it. */
if(count($argv) != 2) die("please set the yaml file.\n");
$filename = $argv[1];
if(!is_file($filename)) die("the yaml file doesn't exit\n");
include '../../lib/spyc/spyc.class.php';
$extension = Spyc::YAMLLoadString(file_get_contents($filename));
/* Basic info checking. */
if(empty($extension['name'])) die("name field must be set\n");
if(empty($extension['code'])) die("code field must be set\n");
if(!preg_match('/^[a-zA-Z0-9_]{1}[a-zA-Z0-9_]{1,}[a-zA-Z0-9_]{1}$/', $extension['code'])) die("code shoulde be letter, nubmer and _\n");
if(!preg_match('/^(extension|patch|theme)$/', $extension['type'])) die("type shoulde be extension, patch or theme\n");
if(empty($extension['abstract'])) die("abstract field must be set\n");
/* desc and install fields checking. */
if(is_array($extension['desc'])) die("desc should be a string, please check your yaml synatax\n");
if(is_array($extension['install'])) die("install should be a string, please check your yaml synatax\n");
/* release checking. */
if(!is_array($extension['releases'])) die("releases should be set.\n");
foreach($extension['releases'] as $version => $release)
{
if(empty($release['zentaoversion'])) die("version $version should set the compatible zentao versions\n");
if(!preg_match('/^(free|share|opensource|business)$/', $release['charge'])) die("version $version's charge field shoulde be free, share, opensource or business\n");
if(empty($release['license'])) die("version $version 's license should be set\n");
if(empty($release['date']) ) die("version $version 's date field should be set\n");
}

View File

@@ -1,121 +0,0 @@
<?php
/**
* 禅道计划任务服务程序。
* The crond for zentao.
*
* @copyright Copyright 2009-2013 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author jinyong zhu <zhujinyong@cnezsoft.com>
* @package bin
* @version $Id$
* @link http://www.zentao.net
*/
/* Set pathes and timezone. */
$zentaoPath = dirname(dirname(dirname(__FILE__))) . "/";
$cronPath = $zentaoPath . 'bin/cron';
include $zentaoPath . 'config/config.php';
include $zentaoPath . 'lib/crontab/crontab.class.php';
date_default_timezone_set($config->timezone);
/* Parase crons. */
$crons = parseCron($cronPath);
$lastParsed = time();
printCrons($crons);
/* Start the cron demon. */
while(true)
{
/* If need parse again, re parse the cron files. */
if(needParseAgain($cronPath, $lastParsed))
{
echo "\ncron files changed, re parse them...";
$crons = parseCron($cronPath);
$lastParsed = time();
printCrons($crons);
}
$now = new datetime('now');
foreach($crons as $key => $cron)
{
if($now > $cron['time'])
{
$crons[$key]['time'] = $cron['cron']->getNextRunDate();
$output = array();
$log = '';
exec($cron['command'], $output, $return);
$time = $now->format('G:i:s');
foreach($output as $out) $log .= $out . "\n";
$log = "$time task " . ($key + 1) . " executed,\ncommand: $cron[command].\nreturn : $return.\noutput : $log\n";
echo $log;
logCron($log);
}
}
sleep(40);
}
/* Parse cron file. */
function parseCron($path)
{
chdir($path);
$crons = array();
$files = glob('*');
foreach($files as $file)
{
$rows = file($file);
foreach($rows as $row)
{
$row = preg_replace("/[ \t]+/", ' ', trim($row, " \t\n"));
$row = preg_replace("/#.*/", '', $row);
if($row)
{
preg_match_all('/(\S+\s+){5}|.*/', $row, $matchs);
if($matchs[0])
{
$cron = array();
$cron['schema'] = trim($matchs[0][0]);
$cron['command'] = trim($matchs[0][1]);
$cron['cron'] = CronExpression::factory($cron['schema']);
$cron['time'] = $cron['cron']->getNextRunDate();
$crons[] = $cron;
}
}
}
}
return $crons;
}
/* Print crons. */
function printCrons($crons)
{
echo "\n";
echo 'total ' . count($crons) . " tasks found.\n\n";
foreach($crons as $id => $cron)
{
echo ($id + 1) . "\t$cron[schema]\t$cron[command]\n";
}
}
/* Log cron results. */
function logCron($log)
{
$path = dirname(dirname(dirname(__FILE__))) . '/tmp/log/';
$file = $path . 'cron.' . date('Ymd') . '.log';
$fp = fopen($file, "a");
fwrite($fp, $log);
fclose ($fp);
}
/* Need parse cron files again? */
function needParseAgain($cronPath, $lastParsed)
{
clearstatcache();
chdir($cronPath);
$files = glob('*');
foreach($files as $file) if(filemtime($file) > $lastParsed) return true;
return false;
}

0
tools/preparetest.php → bin/preparetest.php Executable file → Normal file
View File

22
tools/syncext.php → bin/syncext.php Executable file → Normal file
View File

@@ -7,14 +7,10 @@
* @version $Id$
*/
//sudo pecl install channel://pecl.php.net/inotify-0.1.5
//extension=inotify.so" to php.ini
/* Get params from argvs. */
if(!isset($argv[1])) die("php syncext.php from target sleep\n");
if(!isset($argv[2])) die("php syncext.php from target sleep\n");
$from = $argv[1];
$target = isset($argv[2]) ? $argv[2] : '/home/z/zentaopms';
$target = $argv[2];
$sleep = isset($argv[3]) ? $argv[3] : 5;
/* sync files. */
@@ -43,7 +39,7 @@ function getFiles($dir, $exceptions = array())
foreach($entries as $entry)
{
if($entry == '.' or $entry == '..' or $entry == '.svn' or $entry == 'db') continue;
if($entry == '.' or $entry == '..' or $entry == '.svn') continue;
if(in_array($entry, $exceptions)) continue;
$fullEntry = $dir . $entry;
@@ -73,15 +69,13 @@ function syncFiles($files, $from, $target)
{
$from = realpath($from);
$target = realpath($target);
static $copied = array();
foreach($files as $file)
{
$relativePath = str_replace($from, '', $file);
$targetFile = $target . $relativePath;
$targetPath = dirname($targetFile);
/* If file not exists, remove the target. */
/* If file not exists, remove the targe. */
if(!is_file($file))
{
@unlink($targetFile);
@@ -89,12 +83,6 @@ function syncFiles($files, $from, $target)
}
if(!is_dir($targetPath)) mkdir($targetPath, 0755, true);
$ctime = filectime($file);
if(!isset($copied[$file]) or $copied[$file] != $ctime)
{
copy($file, $targetFile);
$copied[$file] = $ctime;
echo "$file copyed\n";
}
copy($file, $targetFile);
}
}

22
bin/tags.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
/* This file is used to crete a tag of subverion. */
$config->zentaophp->svnRoot = 'https://zentaophp.googlecode.com/svn/';
$config->zentaophp->svnTrunk = 'trunk/';
$config->zentaophp->svnTags = 'tags/';
$config->zentaopms->svnRoot = 'https://ZenTaoPMS.googlecode.com/svn/';
$config->zentaopms->svnTrunk = 'trunk/';
$config->zentaopms->svnTags = 'tags/';
if(count($argv) != 4) die(__FILE__ . " repo version releasetype:beta|alpa|stable\n");
$repo = $argv[1];
$version = $argv[2];
$release = $argv[3];
$sourceURL = $config->$repo->svnRoot . $config->$repo->svnTrunk;
$targetURL = $config->$repo->svnRoot . $config->$repo->svnTags . $repo . '_' . $version . '_' . $release . '_' . date('Ymd');
$svnCMD = "svn rm $targetURL -m 'remove it'; svn cp $sourceURL $targetURL -m 'tag $version of $repo'";
system($svnCMD);

72
bin/todo.php Executable file
View File

@@ -0,0 +1,72 @@
#!/usr/bin/env php
<?php
/* 包含http客户端类snoopy。在禅道lib/snoopy里面可以找到。*/
include dirname(dirname(__FILE__)) . '/lib/snoopy/snoopy.class.php';
/* 用来登录的地址,用户名和密码。*/
$zentaoRoot = "http://pms.easysoft.com/";
$account = ""; // 需要设置用户名和密码。
$password = "";
$requestType = "PATH_INFO"; // 禅道系统访问方式,请根据实际的配置进行修改。
if($account == '' and $password == '') die("Must set account and password.\n");
/* 设置API地址。*/
if($requestType == 'GET')
{
/* API地址以GET方式为例。*/
$loginAPI = $zentaoRoot . "?m=user&f=login";
$sessionAPI = $zentaoRoot . "?m=api&f=getSessionID&t=json";
$myTodoAPI = $zentaoRoot . "?m=my&f=todo&t=json";
}
elseif($requestType == 'PATH_INFO')
{
/* API地址以PATH_INFO方式为例。*/
$loginAPI = $zentaoRoot . "user-login.json?a=1";
$sessionAPI = $zentaoRoot . "api-getsessionid.json?a=1";
$myTodoAPI = $zentaoRoot . "my-todo.json?a=1";
}
/* 获取session。 */
$snoopy = new Snoopy;
$snoopy->fetch($sessionAPI);
$session = json_decode($snoopy->results);
$session = json_decode($session->data);
/*用户登录,加密验证。*/
$authHash = md5(md5($password) . $session->rand);
$submitVars["account"] = $account;
$submitVars["password"] = $authHash;
$snoopy->cookies[$session->sessionName] = $session->sessionID;
$snoopy->submit($loginAPI, $submitVars);
/* 直接调用my模块的todo页面。*/
$snoopy->fetch($myTodoAPI . "&$session->sessionName=$session->sessionID");
$result = json_decode($snoopy->results);
if($result->status == 'success' && md5($result->data) == $result->md5)
{
$todos = json_decode($result->data)->todos;
}
else
{
echo "called failed or transfered not complete.";
exit;
}
if($todos)
{
foreach($todos as $todo)
{
echo $todo->id . "\t" .
$todo->type . "\t" .
$todo->pri . "\t" .
$todo->name . "\t" .
$todo->status . "\n";
}
}
else
{
echo "no todos.\n";
}
?>

View File

@@ -1,17 +1,16 @@
#!/usr/bin/env php
<?php
/**
* 禅道系统命令行访问入口。使用方法http://www.zentao.net/help-read-78899.html
* The cli router file of zentaopms.
*
* @copyright Copyright 2009-2013 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @copyright Copyright 2009-2011 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bin
* @version $Id$
* @link http://www.zentao.net
* @link http://www.ZenTaoPMS.com
*/
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
//error_reporting(0);
define('IN_SHELL', true);
/* Judge the args. */
@@ -22,41 +21,21 @@ $request = parse_url(trim($argv[1]));
$_SERVER['HTTP_HOST'] = $request['host'];
/* Load the framework. */
chdir(dirname(dirname(__FILE__)));
include './framework/router.class.php';
include './framework/control.class.php';
include './framework/model.class.php';
include './framework/helper.class.php';
include './config/config.php';
/* Set the PATH_INFO variable. */
chdir(dirname(__FILE__));
include '../framework/router.class.php';
include '../framework/control.class.php';
include '../framework/model.class.php';
include '../framework/helper.class.php';
include '../config/config.php';
if($config->requestType == 'PATH_INFO')
{
$path = pathinfo($request['path']);
/* url like http://pms.zentao.net/zentao/my-todo.html, PATH_INFO is 'my-todo.html'. */
if(strpos($path['basename'], $config->requestFix))
{
$_SERVER['PATH_INFO'] = $path['basename'];
}
else
{
/* url like http://pms.zentao.net/zentao/my/, PATH_INFO is 'my'. */
if(is_dir('./module/' . $path['basename']))
{
$_SERVER['PATH_INFO'] = $path['basename'];
}
/* url like http://pms.zentao.net/zentao/, PATH_INFO is '/'. */
else
{
$_SERVER['PATH_INFO'] = '/';
}
}
$_SERVER['PATH_INFO'] = str_replace($config->webRoot, '', $request['path']);
}
else
{
parse_str($request['query'], $_GET);
$_SERVER['SCRIPT_NAME'] = $_SERVER['HTTP_HOST'] . 'index.php';
$_SERVER['SCRIPT_NAME'] = $_SERVER['PATH_INFO'] . 'index.php';
$_SERVER['REQUEST_URI'] = isset($request['query']) ? $request['query'] : '';
}

1
bin/ztcli.bat Normal file
View File

@@ -0,0 +1 @@
php ztcli %*

1
bin/ztcli.sh Executable file
View File

@@ -0,0 +1 @@
php ztcli $*

View File

@@ -1,3 +0,0 @@
zentaopms (7.1-1) unstable; urgency=low
* Initial release
-- Yidong Wang <yidong@cnezsoft.com>

View File

@@ -1,10 +0,0 @@
Package: zentaopms
Version: 6.1
Section: utils
Priority: optional
Architecture: all
Depends: apache2, libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, php5-cli, php5-common, php5-mysql, php5-json, php5-ldap, mysql-server
Recommends: php5-gd
Installed-Size: 512
Maintainer: [url=www.zentao.net]
Description: zentaopms

View File

@@ -1,7 +0,0 @@
lowVersion=`apache2 -v|awk '$3~/Apache/{print $3}'|awk -F '/' '{print ($2<2.4) ? 1 : 0}'`;
if [ $lowVersion -eq 1 ]; then
sed -i '/Require all granted/d' /etc/apache2/sites-enabled/zentaopms.conf
fi
echo "zentaopms has been successfully installed."
echo "Please run sudo apache2ctl restart and visit http://localhost/zentao."

View File

@@ -1,8 +0,0 @@
Alias /zentao /opt/zentao/www
<Directory /opt/zentao/www/>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>

View File

@@ -1,44 +0,0 @@
Name:zentaopms
Version:7.1.stable
Release:1
Summary:This is ZenTao PMS software.
Group:utils
License:ZPL
URL:http://www.zentao.net
Source0:%{name}-%{version}.tar.gz
BuildRoot:%{_tmppath}/%{name}-%{version}-root
BuildArch:noarch
Requires:httpd,php-cli,php,php-common,php-pdo,php-mysql,php-json,php-ldap,mysql
%description
%prep
%setup -c
%install
mkdir -p $RPM_BUILD_ROOT
chmod 777 -R %{_builddir}/%{name}-%{version}/opt/zentao/tmp/
chmod 777 -R %{_builddir}/%{name}-%{version}/opt/zentao/www/data
chmod 777 -R %{_builddir}/%{name}-%{version}/opt/zentao/config
chmod 777 %{_builddir}/%{name}-%{version}/opt/zentao/module
chmod 777 %{_builddir}/%{name}-%{version}/opt/zentao/www
chmod a+rx %{_builddir}/%{name}-%{version}/opt/zentao/bin/*
find %{_builddir}/%{name}-%{version}/opt/zentao/ -name ext |xargs chmod -R 777
cp -a %{_builddir}/%{name}-%{version}/* $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
/
%post
chcon -R --reference=/var/www/html/ /opt/zentao/
lowVersion=`httpd -v|awk '$3~/Apache/{print $3}'|awk -F '/' '{print ($2<2.4) ? 1 : 0}'`
if [ $lowVersion -eq 1 ]; then
sed -i '/Require all granted/d' /etc/httpd/conf.d/zentaopms.conf
fi
echo "zentaopms has been successfully installed."
echo "Please restart httpd and visit http://localhost/zentao."

18
build/sae/config.yaml Normal file
View File

@@ -0,0 +1,18 @@
name: zentao
version: 1
cron:
- description: cron test
url: project-computeburn-admin.html
schedule: every day of month 00:00
timezone: Beijing
handle:
- rewrite: if(!is_dir() && !is_file()) goto "index.php/%{REQUEST_URI}"
- compress: if(out_header["Content-Type"] ~ "text") compress
- compress: if(out_header["Content-Type"] ~ "javascript") compress
- expire: if(path ~ "\.js$") time 360000
- expire: if(path ~ "\.css$") time 360000
- expire: if(path ~ "\.gif$") time 360000
- expire: if(path ~ "\.png$") time 360000
- expire: if(path ~ "\.ico$") time 360000
- expire: if(path ~ "\.jpg$") time 360000

8
build/sae/savesql.php Normal file
View File

@@ -0,0 +1,8 @@
function saveSQL4SAE()
{
if(!class_exists('dao')) return;
global $app;
$log = date('Ymd H:i:s') . ": " . $app->getURI() . "; ";
foreach(dao::$querys as $query) $log .= $query . "; ";
sae_debug($log);
}

View File

@@ -0,0 +1,411 @@
<?php
/*
####################################################################
# Name: The Uniform Server Language System Array 1.1
# Developed By: The Uniform Server Development Team
# Modified Last By: Olajide Olaolorun (empirex)
# Web: http://www.uniformserver.com
####################################################################
*/
# Beta Feature, Currently For Debugging Only
#require_once 'array.php';
$US = array(
'title' => 'Uniform Server',
'apanel' => '管理面板',
'dev-team' => 'The Uniform Server Development Team',
//--------------------------------------------------------------------------------------------
// Source Code
//--------------------------------------------------------------------------------------------
'code-show' => '查看源代码',
'code-source' => '查看源代码',
'code-back' => '关闭查看',
//--------------------------------------------------------------------------------------------
// Navigation
//--------------------------------------------------------------------------------------------
// Basic
'nav-home' => '主页',
'nav-web' => 'Uniform Server Website',
'nav-secure' => '服务器安全性',
'nav-phpinfo' => 'PHP信息',
'nav-cgienv' => 'Perl环境',
'nav-status' => 'Apache运行状态',
'nav-info' => 'Apache信息',
'nav-update' => '检查更新',
// Server Control
'nav-start' => '服务器控制面板',
// Server Control - Service
'nav-uservers' => '卸载服务',
'nav-rapaches' => '重新启动Apache服务',
'nav-rmysqls' => '重新启动MySQL服务',
// Server Control - Standard Program
'nav-sserver' => '关闭所有服务',
'nav-rmysql' => '运行MySQL',
'nav-smysql' => '关闭MySQL',
// 配置s
'nav-config' => '配置',
'nav-aconfig' => 'Apache 配置',
'nav-pconfig' => 'PHP 配置',
'nav-vhost' => '管理虚拟机',
'nav-apsetup' => '管理面板配置',
'nav-psetup' => 'Private Server 配置',
'nav-sslpsetup' => 'Private Secure Server Config',
'nav-mqsetup' => 'MySQL Server 配置',
// Tools Navigation
'nav-tools' => '工具',
'nav-pma' => 'phpMyAdmin',
'nav-elog' => '错误日志查看器',
'nav-u2w' => 'windows到unix转换器',
'nav-smig' => 'Server Migration',
'nav-key' => '服务器私钥和证书生成',
'nav-mysqlrestore' => '重置MySQL密码',
// Plugins Navigation
'nav-plugins' => '插件管理',
'nav-pear' => '安装Pear',
'nav-eaccelerator' => 'eAccelerator控制面板',
// Misc Navigation
'nav-misc' => '其他杂项',
'nav-sup' => '在线支持',
// Documentation
'nav-docs1' => '文档',
'nav-sdoc' => '本机文档',
'nav-docs2' => '在线文档',
'nav-udoc' => '用户指南',
'nav-wiki' => 'WIKI',
'nav-phdoc' => 'PHP文档',
'nav-mydoc' => 'MySQL文档',
'nav-pedoc' => 'Perl文档',
// Languages
'nav-langs' => 'Languages',
//--------------------------------------------------------------------------------------------
// Home
//--------------------------------------------------------------------------------------------
'main-head' => '管理面板'. $us_apanel_version .'',
'main-text' => '
欢迎使用 Uniform Server '. $us_version .'!. <br />
您现在访问的是管理面板通过它你可以控制你的Apache、PHP、MySQL服务。虽然我们一直持续的为它增加新的功能改进并修复Bug但它是稳定并且功能完整的使用起来也非常的简单友好。
<br />
如果发现了Bug请反馈给我们<a href="http://forum.uniformserver.com/" target="_forum">forum</a>.
<br />
<br />
鸣谢:
<br />
<a href="http://www.uniformserver.com/" target="_home">Uniform Server开发团队</a>',
'main-secure' => '系统安全检查列表',
'main-text-0' => '修改管理面板的用户名和密码<a href="apsetup.php">点击这里</a>',
'main-text-1' => 'Change the username/password for the server <a href="psetup.php">点击这里</a>',
'main-text-2' => 'Change the root password for mysql by editing <a href="mqsetup.php">点击这里</a>',
'main-text-3' => 'Run the <a href="security.php">Security Console</a> and see if everything is OK.',
'main-text-4' => 'Change the username/password for the SSL server <a href="sslpsetup.php">点击这里</a>',
//--------------------------------------------------------------------------------------------
// Update
//--------------------------------------------------------------------------------------------
'update-head' => 'Uniform Server Version Check',
'update-check' => 'Checking Version...',
'update-notfound' => '
Version file could not be found on the Uniform Server!
<br />
Or
<br />
The Unifrom Server is off-line!
<br />
Or
<br />
You are not connected to the Internet!
<br />',
'update-true' => '
Installed version of the Uniform Server is the latest one.
<br />
You don\'t need to update it.
<br />',
'update-false' => 'A Newer version of the Uniform Server is available!',
'update-new' => 'New Version',
'update-yours' => 'Installed Version',
'update-get' => 'You can get the newer version from our website by clicking the link below.',
//--------------------------------------------------------------------------------------------
// Server Control - Standard program
//--------------------------------------------------------------------------------------------
'server-stop-head1' => 'Stop Servers',
'server-stop-head2' => 'Stopping servers',
'server-stop-txt1' => 'This script will stop Apache and MySQL servers',
'server-stop-txt2' => 'The Servers are stopping please wait for a beep to confirm!',
'server-stop-txt3' => 'Thank you for using <a href="http://www.uniformserver.com/">The Uniform Server</a>.',
'server-confirm-button' => 'Confirm',
'start-mysql-head1' => 'Start MySQL Server',
'start-mysql-head2' => 'Starting the MySQL server.',
'start-mysql-txt1' => 'This script will start the MySQL server.',
'start-mysql-txt2' => 'MySQL server already running.',
'start-mysql-txt3' => 'The MySQL server was started you can continue using the server.',
'start-mysql-button' => 'Start MySQL Server',
'stop-mysql-head1' => 'Stop MySQL Server',
'stop-mysql-head2' => 'Stopping the MySQL server.',
'stop-mysql-txt1' => 'This script will stop the MySQL server.',
'stop-mysql-txt2' => 'The MySQL server was stopped.',
'stop-mysql-txt3' => 'MySQL server not running.',
'stop-mysql-button' => 'Stop MySQL Server',
//--------------------------------------------------------------------------------------------
// Server Control - Services
//--------------------------------------------------------------------------------------------
'service-apache-head1' => 'Restart Apache Service',
'service-apache-head2' => 'Restarting Apache service',
'service-apache-txt1' => 'This script will restart the Apache service.',
'service-apache-txt2' => 'It will take a some time',
'service-apache-txt3' => 'The Apache service is restarting please wait <br /> Between 2-10 seconds!' ,
'service-apache-txt4' => 'Apanel will reload to reflect any server configuration changes.',
'service-mysql-head1' => 'Restart MySQL Service',
'service-mysql-head2' => 'The MySQL service was restarted.',
'service-mysql-txt1' => 'This script will restart the MySQL service.',
'service-mysql-txt2' => 'It will take some time',
'service-mysql-txt3' => 'The MySQL service was restarted you can continue using the server.',
'service-confirm-button' => 'Confirm',
//--------------------------------------------------------------------------------------------
// Apache 配置
//--------------------------------------------------------------------------------------------
'aconfig-head' => 'Apache 配置',
'aconfig-conf' => 'Configure Apache',
'aconfig-sname' => 'Server Name',
'aconfig-wemail' => 'Server Admin Email',
'aconfig-difiles' => 'Directory Index Files',
'aconfig-ssi' => 'Server Side Includes',
'aconfig-ssig' => 'Server Signature',
'aconfig-listen' => 'Listen',
'aconfig-text-0' => 'something',
'aconfig-text-1' => '
The changes have been successfully saved. <br /> Changes will take effect after server restart!',
'aconfig-save' => 'Save',
'aconfig-module' => 'At the moment PHP is loaded as Apache module.',
'aconfig-cgi' => 'At the moment PHP scripts are executed though Apache CGI interface.',
'aconfig-help' => '?',
//--------------------------------------------------------------------------------------------
// PHP 配置
//--------------------------------------------------------------------------------------------
'pconfig-head' => 'PHP 配置',
'pconfig-conf' => 'Configure PHP',
'pconfig-smode' => 'Safe Mode',
'pconfig-rg' => 'Register Globals',
'pconfig-mtexec' => 'Maximum Script Execute Time (s.)',
'pconfig-mmexec' => 'Maximum Memory Amount (MB)',
'pconfig-ssig' => 'Show PHP In Server Signature',
'pconfig-perror' => 'Print Errors',
'pconfig-mpsize' => 'Maximum Post Size',
'pconfig-musize' => 'Maximum Upload Size',
'pconfig-text-0' => 'something',
'pconfig-text-1' => '
The changes have been successfully saved. <br /> Changes will take effect after server restart!',
'pconfig-save' => 'Save',
'pconfig-module' => 'At the moment PHP is loaded as Apache module.',
'pconfig-cgi' => 'At the moment PHP scripts are executed though Apache CGI interface.',
'pconfig-help' => '?',
//--------------------------------------------------------------------------------------------
// VHost Manager
//--------------------------------------------------------------------------------------------
'vhost-head' => 'Virtual Host',
'vhost-setup' => 'Virtual Host Setup',
'vhost-settings' => 'Virtual Host Settings',
'vhost-text-0' => 'You have',
'vhost-text-1' => 'hosts in your httpd.conf file:',
'vhost-text-2' => 'Error in hosts file:',
'vhost-text-3' => 'All hostnames exist in hosts file!',
'vhost-new' => '
Use this new and cool tool to add more virtual hosts to your server without having to edit
the httpd.conf file yourself.',
'vhost-new-ex' => '(ex. newhost.localhost)',
'vhost-name' => 'Name:',
'vhost-path' => 'Path to DocumentRoot:',
'vhost-path-ex' => '(ex. c:/www/newhost)',
'vhost-opt' => 'Optional additions:',
'vhost-opt-ex' => '(ex. error_log etc.)',
'vhost-dne' => 'does not exist',
'vhost-make' => 'Create VHost',
'vhost-error-1' => 'Error in path to your hosts-file!',
'vhost-error-2' => 'Error in path to your httpd.conf!',
'vhost-text-4' => 'Safe_mode is On, so restart Apache manually!',
'vhost-credit' => 'Script By Sukos',
//--------------------------------------------------------------------------------------------
// Error Log Viewer
//--------------------------------------------------------------------------------------------
'elog-viewer-head1' => 'Error Log Viewer',
'elog-viewer-head2' => 'Viewing Error Log File',
//--------------------------------------------------------------------------------------------
// Win to Unix Converter
//--------------------------------------------------------------------------------------------
'w2u-head1' => 'Windows to Unix Converter',
'w2u-head2' => 'Convert Windows Perl Files',
'w2u-head3' => 'Converted Windows Perl Files',
'w2u-txt1' => 'If you have problems executing your cgi scripts on Unix.<br />
This program will convert cgi scripts from Windows to Unix format Dec(#10#13=>#13).<br>Hex 0D0A to 0A',
'w2u-txt2' => 'Instruction: <br />After execution you can pick up scripts ready for execution
on a Unix machine from the \\cgi-bin-unix\\ directory.<br />',
'w2u-txt3' => 'Files converted: <br />They are located in folder \\cgi-bin-unix\\ ',
'w2u-convert-button' => 'Convert',
//--------------------------------------------------------------------------------------------
// Server Certificate and Key Generation
//--------------------------------------------------------------------------------------------
'cert-head1' => 'Server Certificate and Key Generation',
'cert-head2' => 'Verify Generation',
'cert-head3' => 'Unable to run Certificate and Key Generation.',
'cert-head4' => 'Certificate and Key Generation Complete.',
'cert-txt1' => 'Click on Generate! and follow instructions.',
'cert-txt2' => 'Services are not allowed to interact with the desktop. <br />You need to run this script manually:',
'cert-txt3' => 'Alternatively use UniTray.',
'cert-txt4' => 'Cirtificate location:',
'cert-txt5' => 'Key location:',
'cert-confirm-button' => 'Generate',
//--------------------------------------------------------------------------------------------
// MySQL restore password
//--------------------------------------------------------------------------------------------
'mysql-head1' => 'MySQL restore password',
'mysql-head2' => 'Verify Restore',
'mysql-head3' => 'MySQL password restored.',
'mysql-txt1' => 'Click on Restore! Restore will take several seconds.',
'mysql-txt2' => 'Password restored you can continue using the server..',
'mysql-confirm-button' => 'Restore MySQL Password',
//--------------------------------------------------------------------------------------------
// Server Security Console
//--------------------------------------------------------------------------------------------
'secure1-head' => 'Security Alert!',
'secure1-sub' => 'Possible Attack',
'secure1-text-0' => 'IP ADDRESS is not 127.0.0.1, but',
'secure1-text-1' => 'Note: HTTP_REFERER is',
'secure1-text-2' => 'To disable this warning set $unisecure to 0 in: /home/admin/www/includes/config.inc.php',
//--------------------------------------------------------------------------------------------
// Admin Panel Setup
//--------------------------------------------------------------------------------------------
'apsetup-head' => 'Admin Panel 配置',
'apsetup-sub-0' => 'User Management',
'apsetup-text-0' => 'Setup the username and password for the Admin Panel here. Please note that you might have
to activate this feature in the /home/admin/www/.htaccess file.',
'apsetup-user' => 'Username',
'apsetup-pass' => 'Password',
'apsetup-change' => 'Change',
'apsetup-success' => 'The Admin Panel username/password has been changed to the new values:',
//--------------------------------------------------------------------------------------------
// Private Server Setup
//--------------------------------------------------------------------------------------------
'psetup-head' => 'Private Server 配置',
'psetup-sub-0' => 'User Management',
'psetup-text-0' => 'Setup the username and password for your Private Server here. Please note that you might have
to activate this feature in the /www/.htaccess file.',
'psetup-user' => 'Username',
'psetup-pass' => 'Password',
'psetup-change' => 'Change',
'psetup-success' => 'Your Private Server username/password has been changed to the new values:',
//--------------------------------------------------------------------------------------------
// Private Secure Server Setup (SSL)
//--------------------------------------------------------------------------------------------
'sslpsetup-head' => 'Private Secure Server 配置 (SSL)',
'sslpsetup-sub-0' => 'User Management',
'sslpsetup-text-0' => 'Setup the username and password for your Private Secure Server here. Please note that you might have
to activate this feature in the /ssl/.htaccess file.',
'sslpsetup-user' => 'Username',
'sslpsetup-pass' => 'Password',
'sslpsetup-change' => 'Change',
'sslpsetup-success' => 'Your Private Secure Server username/password has been changed to the new values:',
//--------------------------------------------------------------------------------------------
// MySQL Setup
//--------------------------------------------------------------------------------------------
'mqsetup-head' => 'MySQL Server 配置',
'mqsetup-sub-0' => 'User Management',
'mqsetup-text-0' => 'Setup the MySQL password here. After changing the MySQL password, please note that you <b>
must shutdown the server using the Stop.bat</b> file and then start the server over again.',
'mqsetup-pass' => 'MySQL Password',
'mqsetup-change' => 'Change',
'mqsetup-success' => 'Your MySQL password has been changed to the new value:',
//--------------------------------------------------------------------------------------------
// Server Security Center
//--------------------------------------------------------------------------------------------
'secure-head' => 'Security Center',
'secure-sub-0' => 'User Management Security',
'secure-sub-1' => 'Server Security',
'secure-text-0' => 'This part of the security center will check all user management settings to make sure that
everything is set. It will tell you if something needs to be changed.',
'secure-text-1' => 'SECURITY MSG',
'secure-text-2' => 'STATUS',
'secure-text-3' => 'Admin Panel',
'secure-text-X' => 'If the username/password is still set to root, then you probably need to change this
by clicking the UNSECURE link.',
'secure-text-sslX' => 'Unsecure indicates you do not have a server certificate or key. Create new ones by clicking the UNSECURE link.',
'secure-secure' => 'SECURE',
'secure-unsecure' => 'UNSECURE',
'secure-text-7' => 'If the password is still set to root, then you probably need to change this by clicking the UNSECURE link.',
'secure-text-8' => 'This part of the security center will check and make sure the server settings are appropriate and set corectly.',
'secure-text-9' => 'PHP Safe Mode',
'secure-text-10' => 'This checks to see if PHP is running in SAFE MODE. Now, PHP does not have to run in SAFE MODE, but
if you want the extra security, you can set it by clicking on the UNSECURE link.',
'secure-text-p' => 'Personal Server',
'secure-text-sslp' => 'Personal Secure Server (SSL)',
'secure-text-sslcertp' => 'Server Certificate and Key (SSL)',
'secure-text-s' => 'MySQL Server',
'secure-text-11' => 'Admin Panel Access',
'secure-text-12' => 'Server Access',
'secure-text-12ssl' => 'Server Access (SSL)',
'secure-text-13' => 'While this is another feature that is not throughly important as other features are in place against
outside access to the Admin Panel, this checks to see if your Admin Panel is secured using the Auth method. Please change this
by editing the '.$us_apanel.'/.htaccess file.',
'secure-text-14' => 'If you are running your server in Production Mode, Skip this one. If not and you would like to
add more security to the server by blocking it using the Auth method, then change this in by editing the '.$us_www.'/.htaccess file.',
'secure-text-14ssl' => 'If you are running your server in Production Mode, Skip this one. If not and you would like to
add more security to the server by blocking it using the Auth method, then change this in by editing the '.$us_ssl.'/.htaccess file.',
'secure-view' => 'Local View',
'secure-look' => 'Due to the fact that some PC\'s have a different hostname set rather than localhost, we use the IP method here. This
checks to make sure that you are viewing the Admin Panel (this) from local.',
);
# Beta Feature, Currently For Debugging Only
#array2table($US, true);
?>

View File

@@ -0,0 +1,7 @@
Options +FollowSymLinks +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ /zentao/index.php/$1 [L]
</IfModule>

View File

@@ -0,0 +1,14 @@
使用注意事项:
1. 不能解压缩到含有中文和空格的路径中。
2. 启动:
2.1 双击运行start.exe。 软件会有一个提示,然后缩放到桌面的右下角,为一个蓝色的图标。
2.2 左键单击该图标,然后选择第一个菜单,"启动Apache和MySQL进程"。
2.3 如果想开机自动运行则可以选择“将apache和mysql安装为服务运行”。
3. 访问: http://localhost/zentao/ 管理用户admin密码 123456
如果你下载的88端口的包请使用http://localhost:88/zentao来访问。
4. 数据库的用户名和密码为root root
5. apache的配置文件在usr/local/apache2/conf/httpd.conf
6. mysql的数据库文件在usr/local/mysql/data/zentao
7. zentao的程序文件在home/zentao/
8. 如何备份:将整个禅道目录备份即可。

View File

@@ -0,0 +1,165 @@
[Config]
ID=UniTrayController1
ImageList=menu_icons.dat
ServiceGlyphRunning=2
ServiceGlyphPaused=18
ServiceGlyphStopped=18
;TrayIconAllRunning=9
;TrayIconSomeRunning=10
;TrayIconNoneRunning=11
AboutHeader=UniTray UniServer V5-Nano
AboutVersion=V5.0
;TrayIcon=tray_image_1.dat
TrayIcon=zentao.dat
[AboutText]
UniTray is a small tray icon for the Uniform Server. The main system, Aestan Tray Icon was developed by Onno Broekmans using Borland Delphi for another server and as since then being licensed under the Creative Commons for Public Domain.
UniTray packs most of the functionality that Admin Panel provides into a single Tray Icon! UniTray is fully customisable allowing you to tailor it to your own requirements.
[Variables]
;Type: prompt; Name: PUserName; PromptCaption: "Uniform Server"; PromptText: "Please enter the name of the user whose credentials you want to change/add:"; DefaultValue: "Guest"
; The next line contains the declaration of the %USRoot% variable; it should
; point to the root directory of the Uniform Server package
; Gets the root path as specified on the command line
Type: commandline; Name: top; ParamName: "ustop"
Type: static; Name: USRoot; Value: "%top%"; Flags: ispath
Type: static; Name: LocalRoot; Value: "%top%\usr\local"
Type: static; Name: UsrRoot; Value: "%top%\usr"
Type: static; Name: ServerRoot; Value: "%top%\www"
Type: static; Name: PHP; Value: "%top%\usr\local\php"
Type: static; Name: ServerCon; Value: "%top%\unicon"
Type: static; Name: ServerConMain; Value: "%top%\unicon\main"
Type: static; Name: UniTray; Value: "%top%\unicon\tray_menu"
[Menu.Left.Settings]
AutoLineReduction=no
AutoHotKeys=no
BarVisible=yes
BarPictureHorzAlignment=center
BarPictureOffsetX=0
BarPictureOffsetY=0
BarPicturePicture=menu_image_left.dat
BarPictureTransparent=no
BarPictureVertAlignment=middle
BarBorder=clNone
BarSide=left
BarSpace=0
BarWidth=50
SeparatorsAlignment=center
[Menu.Right.Settings]
AutoLineReduction=no
AutoHotKeys=no
BarVisible=yes
BarPictureHorzAlignment=center
BarPictureOffsetX=0
BarPictureOffsetY=0
BarPicturePicture=menu_image_right.dat
BarPictureTransparent=no
BarPictureVertAlignment=middle
BarBorder=clNone
BarSide=left
BarSpace=0
BarWidth=50
SeparatorsAlignment=center
[DoubleClickAction]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 1";
;=== LEFT MENU ============
[Menu.Left]
Type: item; Caption: "<22><><EFBFBD><EFBFBD>Apache<68><65>MySQL<51><4C><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\start_servers.php 7";ShowCmd: hidden; Glyph: 9
Type: item; Caption: "ֹͣApache<68><65>MySQL<51><4C><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 7";ShowCmd: hidden; Glyph: 11
Type: separator
Type: item; Caption: "<22><>װApache<68><65>MySQLΪ<4C><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_install_run.php 7";ShowCmd: hidden; Glyph: 0
Type: item; Caption: "ֹͣApache<68><65>MySQL<51><4C><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php 7";ShowCmd: hidden; Glyph: 1
Type: separator
Type: item; Caption: "<22><><EFBFBD><EFBFBD>UniServer<65><72><EFBFBD><EFBFBD>״̬"; Action: multi; Actions: ServerStatus; Glyph: 14
Type: submenu; Caption: "Apache<68><65>MySQL<51>߼<EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD>"; SubMenu: Individual_unicontrol; Glyph: 3
Type: submenu; Caption: "Apache<68><65>MySQL<51><4C>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>־"; SubMenu: ServerInfo; Glyph: 14
Type: submenu; Caption: "Apache<68><65>MySQL<51><4C>PHP<48><50><EFBFBD><EFBFBD>"; SubMenu: Advanced; Glyph: 7
Type: separator
Type: item; Caption: "<22><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 8";ShowCmd: hidden; Glyph: 4
Type: item; Caption: "<22><><EFBFBD><EFBFBD><EFBFBD>ٷ<EFBFBD><D9B7><EFBFBD>վ"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 9";ShowCmd: hidden; Glyph: 4
Type: separator
Type: item; Caption: "<22><><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 1";ShowCmd: hidden; Glyph: 4
Type: item; Caption: "<22><><EFBFBD><EFBFBD>phpMyAdmin"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 2";ShowCmd: hidden; Glyph: 4
Type: item; Caption: "<22><><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ҳ"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 3";ShowCmd: hidden; Glyph: 4
Type: separator
Type: item; Caption: "<22><><EFBFBD>ؼ<EFBFBD><D8BC>ز˵<D8B2>"; Action: readconfig; Glyph: 15
Type: item; Caption: "UniServer<65><72><EFBFBD><EFBFBD>"; Action: run; FileName: "%ServerCon%\docs\Run.bat"; ShowCmd: hidden; Glyph: 18
Type: item; Caption: "<22><><EFBFBD><EFBFBD>UniServer"; Action: about; Glyph: 14
Type: separator
Type: item; Caption: "<22>˳<EFBFBD>"; Action: exit; Glyph: 16
[Individual_unicontrol]
Type: item; Caption: "<22><><EFBFBD><EFBFBD>Apache<68><65><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\start_servers.php 1"; Glyph: 9
Type: item; Caption: "ֹͣApache<68><65><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 1"; Glyph: 11
Type: separator
Type: item; Caption: "<22><><EFBFBD><EFBFBD>MySQL<51><4C><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\start_servers.php 2"; Glyph: 9
Type: item; Caption: "ֹͣMySQL<51><4C><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 2"; Glyph: 11
Type: separator
Type: item; Caption: "<22><>װApacheΪ<65><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_install_run.php 1"; Glyph: 0
Type: item; Caption: "ֹͣApache<68><65><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php 1"; Glyph: 1
Type: separator
Type: item; Caption: "<22><>װMySQLΪ<4C><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_install_run.php 2"; Glyph: 0
Type: item; Caption: "ֹͣMySQL<51><4C><EFBFBD>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php 2"; Glyph: 1
;=== RIGHT MENU ============
[Menu.Right]
Type: item; Caption: "<22>˳<EFBFBD>"; Action: exit; Glyph: 16
;=== COMMON LEFT RIGHT =======
[Advanced]
Type: item; Caption: "<22><><EFBFBD><EFBFBD>Apache<68><65><EFBFBD><EFBFBD>"; Action: multi; Actions: ApacheSyntaxCheck; Glyph: 14
Type: item; Caption: "<22>޸<EFBFBD>Apache<68><65><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\apache2\conf\httpd.conf"; Glyph: 7
Type: separator
Type: item; Caption: "<22>ָ<EFBFBD>MySQL<51><4C><EFBFBD><EFBFBD>"; Action: run; FileName: "%ServerCon%\restore_mysql_password\Run_restore.bat"; Glyph: 9
Type: item; Caption: "<22>޸<EFBFBD>MySQL<51><4C><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\mysql\my.ini"; Glyph: 7
Type: separator
Type: item; Caption: "<22>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>php.ini"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\php\php.ini_production_nano"; Glyph: 7
Type: item; Caption: "<22>޸Ŀ<DEB8><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>php.ini"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\php\php.ini_delvelopment_nano"; Glyph: 7
Type: separator
Type: item; Caption: "<22>л<EFBFBD>php<68><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%ServerCon%\php_dev_production\Switch_production.bat"; Parameters: " pro"; Glyph: 9
Type: item; Caption: "<22>л<EFBFBD>php<68><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; Action: shellexecute; FileName: "%ServerCon%\php_dev_production\Switch_Development.bat"; Parameters: " dev"; Glyph: 9
;Type: separator
;Type: item; Caption: "Start Portable Cron"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\start_servers.php 16"; Glyph: 9
;Type: item; Caption: "Stop Portable Cron"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 16"; Glyph: 11
; Server information and Logs
[ServerInfo]
Type: item; Caption: "Apache<68><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 5";ShowCmd: hidden; Glyph: 4
Type: item; Caption: "Apache<68><65><EFBFBD><EFBFBD>״̬"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 6";ShowCmd: hidden; Glyph: 4
Type: item; Caption: "PHP<48><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %UniTray%\unitray_info.php 7";ShowCmd: hidden; Glyph: 4
Type: separator
Type: item; Caption: "Apache<68><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\apache2\logs\error.log"; Glyph: 18
Type: item; Caption: "Apache<68><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\apache2\logs\access.log"; Glyph: 18
;Type: separator
;Type: item; Caption: "Apache SSL Error Log"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\apache2\logs\error_ssl.log"; Glyph: 18
;Type: item; Caption: "Apache SSL Access Log"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\apache2\logs\access_ssl.log"; Glyph: 18
Type: separator
Type: item; Caption: "MySQL<51><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־"; Action: shellexecute; FileName: "%Windows%\Notepad.exe"; Parameters: "%LocalRoot%\mysql\data\mysql.err"; Glyph: 18
[ServerStatus]
Action: run; FileName: "%ServerConMain%\server_status.bat"
[ApacheSyntaxCheck]
Action: run; FileName: "%ServerConMain%\apache_syntax_check.bat"

View File

@@ -0,0 +1,98 @@
<?php
/*
###############################################################################
# Name: unitray_info.php
# Developed By: The Uniform Server Development Team
# Modified Last By: Mike Gleaves (Ric)
# Unitray Support file
# Displays server information. Ports read from configuration files
# V1.0 3-12-2009
###############################################################################
*/
//error_reporting(0); // Disable PHP errors and warnings
// Comment to Enable for testing
chdir(dirname(__FILE__)); // Change wd to this files location
include_once "../main/includes/config.inc.php";
include_once "../main/includes/functions.php";
run_location_tracker(); // Have servers moved if moved update configuration
print"\n";
//=== If no parameters passed use defaults from config.inc.php
if($argc == 2){ // Was a parameter passed
$information = $argv[1] ; // yes:
}
else{
exit; // no: Give up
}
$mysql_port = get_mysql_port();
$apache_port = get_apache_port();
$ssl_port = get_apache_ssl_port();
//=== Display Admin Panel in browser ==========================================
if($information == 1){
$command = "start http://localhost:$apache_port/apanel/"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display phpMyAdmin in browser ==========================================
if($information == 2){
$command = "start http://localhost:$apache_port/apanel/phpmyadmin/"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display WWW Root in browser ==============================================
if($information == 3){
$command = "start http://localhost:$apache_port/"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display SSL Root in browser ==============================================
if($information == 4){
$command = "start https://localhost:$ssl_port/"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display Apache Server Information in browser ============================
if($information == 5){
$command = "start http://localhost:$apache_port/server-info"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display Apache Server Status in browser =================================
if($information == 6){
$command = "start http://localhost:$apache_port/server-status"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display PHP Info in browser =================================
if($information == 7){
$command = "start http://localhost:$apache_port/apanel/phpinfo.php"; // display index page
exec($command,$dummy,$return); // run command
exit;
}
//=== Display ZenTao browser =================================
if($information == 8){
$command = "start http://localhost:$apache_port/zentao/"; //
exec($command,$dummy,$return); // run command
exit;
}
//=== Display ZenTao site browser =================================
if($information == 9){
$command = "start http://www.ZenTaoPMS.com/"; //
exec($command,$dummy,$return); // run command
exit;
}
exit;
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -4,25 +4,19 @@
*
* Don't modify this file directly, copy the item to my.php and change it.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @copyright Copyright 2009-2011 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package config
* @version $Id: config.php 5068 2013-07-08 02:41:22Z wyd621@gmail.com $
* @version $Id$
* @link http://www.zentao.net
*/
/* Judge class config and function getWebRoot exists or not, make sure php shells can work. */
if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* Basic settings. */
$config = new config();
$config->version = '8.2'; // The version of zentaopms. Don't change it.
$config->charset = 'UTF-8'; // The charset of zentaopms.
$config->cookieLife = time() + 2592000; // The cookie life time.
$config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php
$config->webRoot = ''; // The root path of the pms.
$config->checkVersion = true; // Auto check for new version or not.
$config->version = '2.3'; // The version of zentaopms. Don't change it.
$config->encoding = 'UTF-8'; // The encoding of znetaopms.
$config->cookieLife = time() + 2592000; // The cookie life time.
$config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php
$config->webRoot = ''; // The root path of the pms.
/* The request settings. */
$config->requestType = 'PATH_INFO'; // The request type: PATH_INFO|GET, if PATH_INFO, must use url rewrite.
@@ -32,44 +26,19 @@ $config->moduleVar = 'm'; // requestType=GET: the module var nam
$config->methodVar = 'f'; // requestType=GET: the method var name.
$config->viewVar = 't'; // requestType=GET: the view var name.
$config->sessionVar = 'sid'; // requestType=GET: the session var name.
$config->allowedTags = '<p><span><h1><h2><h3><h4><h5><em><u><strong><br><ol><ul><li><img><a><b><font><hr><pre><div><table><td><th><tr><tbody><embed><style>';
$config->accountRule = '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|';
/* Supported views. */
$config->views = ',html,json,mhtml,';
$config->views = ',html,json,';
/* Set the wide window size and timeout(ms) and duplicate interval time(s). */
$config->wideSize = 1400;
$config->timeout = 30000;
$config->duplicateTime = 60;
/* Set the wide window size. */
$config->wideSize = 1250;
/* Supported languages. */
$config->langs['zh-cn'] = '简体';
$config->langs['zh-tw'] = '繁體';
$config->langs['zh-cn'] = '中文简体';
$config->langs['zh-tw'] = '中文繁體';
$config->langs['en'] = 'English';
$config->productCommonList['en'][0] = 'Product';
$config->productCommonList['en'][1] = 'Project';
$config->projectCommonList['en'][0] = 'Project';
$config->projectCommonList['en'][1] = 'Sprint';
$config->productCommonList['zh-cn'][0] = '产品';
$config->productCommonList['zh-cn'][1] = '项目';
$config->projectCommonList['zh-cn'][0] = '项目';
$config->projectCommonList['zh-cn'][1] = '迭代';
$config->productCommonList['zh-tw'][0] = '產品';
$config->productCommonList['zh-tw'][1] = '項目';
$config->projectCommonList['zh-tw'][0] = '項目';
$config->projectCommonList['zh-tw'][1] = '迭代';
/* Supported charsets. */
$config->charsets['zh-cn']['utf-8'] = 'UTF-8';
$config->charsets['zh-cn']['gbk'] = 'GBK';
$config->charsets['zh-tw']['utf-8'] = 'UTF-8';
$config->charsets['zh-tw']['big5'] = 'BIG5';
$config->charsets['en']['utf-8'] = 'UTF-8';
/* Default settings. */
$config->default = new stdclass();
$config->default->view = 'html'; // Default view.
$config->default->lang = 'en'; // Default language.
$config->default->theme = 'default'; // Default theme.
@@ -77,18 +46,10 @@ $config->default->module = 'index'; // Default module.
$config->default->method = 'index'; // Default method.
/* Upload settings. */
$config->file = new stdclass();
$config->file->dangers = 'php,php3,php4,phtml,php5,jsp,py,rb,asp,asa,cer,cdx,aspl'; // Dangerous files.
$config->file->dangers = 'php,jsp,py,rb,asp,'; // Dangerous files.
$config->file->maxSize = 1024 * 1024; // Max size.
/* IP white list settings.*/
$config->ipWhiteList = '*';
/* View type settings. */
$config->devicePrefix['mhtml'] = 'm.';
/* Master database settings. */
$config->db = new stdclass();
$config->db->persistant = false; // Pconnect or not.
$config->db->driver = 'mysql'; // Must be MySQL. Don't support other database server yet.
$config->db->encoding = 'UTF8'; // Encoding of database.
@@ -97,98 +58,57 @@ $config->db->strictMode = false; // Turn off the strict mode of MySQL.
//$config->db->bufferQuery = true; // PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
/* Slave database settings. */
$config->slaveDB = new stdclass();
$config->slaveDB->persistant = false;
$config->slaveDB->driver = 'mysql';
$config->slaveDB->encoding = 'UTF8';
$config->slaveDB->strictMode = false;
$config->slaveDB->checkCentOS= true;
/* Framework config. */
$config->framework = new stdclass();
$config->framework->jsWithPrefix = false;
$config->framework->autoRepairTable = true;
$config->framework->logDays = 14;
$config->framework->purifier = true;
$config->framework->autoLang = false;
/* Include the custom config file. */
$configRoot = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$myConfig = $configRoot . 'my.php';
$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php';
if(file_exists($myConfig)) include $myConfig;
/* Set default table prefix. */
if(!isset($config->db->prefix)) $config->db->prefix = 'zt_';
/* Define the tables. */
define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
define('TABLE_DEPT', '`' . $config->db->prefix . 'dept`');
define('TABLE_CONFIG', '`' . $config->db->prefix . 'config`');
define('TABLE_USER', '`' . $config->db->prefix . 'user`');
define('TABLE_TODO', '`' . $config->db->prefix . 'todo`');
define('TABLE_GROUP', '`' . $config->db->prefix . 'group`');
define('TABLE_GROUPPRIV', '`' . $config->db->prefix . 'grouppriv`');
define('TABLE_USERGROUP', '`' . $config->db->prefix . 'usergroup`');
define('TABLE_USERQUERY', '`' . $config->db->prefix . 'userquery`');
define('TABLE_USERCONTACT', '`' . $config->db->prefix . 'usercontact`');
define('TABLE_COMPANY', $config->db->prefix . 'company');
define('TABLE_DEPT', $config->db->prefix . 'dept');
define('TABLE_CONFIG', $config->db->prefix . 'config');
define('TABLE_USER', $config->db->prefix . 'user');
define('TABLE_TODO', $config->db->prefix . 'todo');
define('TABLE_GROUP', $config->db->prefix . 'group');
define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv');
define('TABLE_USERGROUP', $config->db->prefix . 'userGroup');
define('TABLE_USERQUERY', $config->db->prefix . 'userQuery');
define('TABLE_BUG', '`' . $config->db->prefix . 'bug`');
define('TABLE_CASE', '`' . $config->db->prefix . 'case`');
define('TABLE_CASESTEP', '`' . $config->db->prefix . 'casestep`');
define('TABLE_TESTTASK', '`' . $config->db->prefix . 'testtask`');
define('TABLE_TESTRUN', '`' . $config->db->prefix . 'testrun`');
define('TABLE_TESTRESULT', '`' . $config->db->prefix . 'testresult`');
define('TABLE_USERTPL', '`' . $config->db->prefix . 'usertpl`');
define('TABLE_BUG', $config->db->prefix . 'bug');
define('TABLE_CASE', $config->db->prefix . 'case');
define('TABLE_CASESTEP', $config->db->prefix . 'caseStep');
define('TABLE_TESTTASK', $config->db->prefix . 'testTask');
define('TABLE_TESTRUN', $config->db->prefix . 'testRun');
define('TABLE_TESTRESULT', $config->db->prefix . 'testResult');
define('TABLE_USERTPL', $config->db->prefix . 'userTPL');
define('TABLE_PRODUCT', '`' . $config->db->prefix . 'product`');
define('TABLE_BRANCH', '`' . $config->db->prefix . 'branch`');
define('TABLE_STORY', '`' . $config->db->prefix . 'story`');
define('TABLE_STORYSPEC', '`' . $config->db->prefix . 'storyspec`');
define('TABLE_STORYSTAGE', '`' . $config->db->prefix . 'storystage`');
define('TABLE_PRODUCTPLAN', '`' . $config->db->prefix . 'productplan`');
define('TABLE_RELEASE', '`' . $config->db->prefix . 'release`');
define('TABLE_PRODUCT', $config->db->prefix . 'product');
define('TABLE_STORY', $config->db->prefix . 'story');
define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec');
define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan');
define('TABLE_RELEASE', $config->db->prefix . 'release');
define('TABLE_PROJECT', '`' . $config->db->prefix . 'project`');
define('TABLE_TASK', '`' . $config->db->prefix . 'task`');
define('TABLE_TEAM', '`' . $config->db->prefix . 'team`');
define('TABLE_PROJECTPRODUCT','`' . $config->db->prefix . 'projectproduct`');
define('TABLE_PROJECTSTORY', '`' . $config->db->prefix . 'projectstory`');
define('TABLE_TASKESTIMATE', '`' . $config->db->prefix . 'taskestimate`');
define('TABLE_EFFORT', '`' . $config->db->prefix . 'effort`');
define('TABLE_BURN', '`' . $config->db->prefix . 'burn`');
define('TABLE_BUILD', '`' . $config->db->prefix . 'build`');
define('TABLE_PROJECT', $config->db->prefix . 'project');
define('TABLE_TASK', $config->db->prefix . 'task');
define('TABLE_TEAM', $config->db->prefix . 'team');
define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct');
define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory');
define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate');
define('TABLE_EFFORT', $config->db->prefix . 'effort');
define('TABLE_BURN', $config->db->prefix . 'burn');
define('TABLE_BUILD', $config->db->prefix . 'build');
define('TABLE_DOCLIB', '`' . $config->db->prefix . 'doclib`');
define('TABLE_DOC', '`' . $config->db->prefix . 'doc`');
define('TABLE_DOCLIB', $config->db->prefix . 'docLib');
define('TABLE_DOC', $config->db->prefix . 'doc');
define('TABLE_MODULE', '`' . $config->db->prefix . 'module`');
define('TABLE_ACTION', '`' . $config->db->prefix . 'action`');
define('TABLE_FILE', '`' . $config->db->prefix . 'file`');
define('TABLE_HISTORY', '`' . $config->db->prefix . 'history`');
define('TABLE_EXTENSION', '`' . $config->db->prefix . 'extension`');
define('TABLE_CRON', '`' . $config->db->prefix . 'cron`');
define('TABLE_MAILQUEUE', '`' . $config->db->prefix . 'mailqueue`');
define('TABLE_BLOCK', '`' . $config->db->prefix . 'block`');
if(!defined('TABLE_LANG')) define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');
$config->objectTables['product'] = TABLE_PRODUCT;
$config->objectTables['story'] = TABLE_STORY;
$config->objectTables['productplan'] = TABLE_PRODUCTPLAN;
$config->objectTables['release'] = TABLE_RELEASE;
$config->objectTables['project'] = TABLE_PROJECT;
$config->objectTables['task'] = TABLE_TASK;
$config->objectTables['build'] = TABLE_BUILD;
$config->objectTables['bug'] = TABLE_BUG;
$config->objectTables['case'] = TABLE_CASE;
$config->objectTables['testcase'] = TABLE_CASE;
$config->objectTables['testtask'] = TABLE_TESTTASK;
$config->objectTables['user'] = TABLE_USER;
$config->objectTables['doc'] = TABLE_DOC;
$config->objectTables['doclib'] = TABLE_DOCLIB;
$config->objectTables['todo'] = TABLE_TODO;
$config->objectTables['custom'] = TABLE_LANG;
$config->objectTables['branch'] = TABLE_BRANCH;
/* Include extension config files. */
$extConfigFiles = glob($configRoot . 'ext/*.php');
if($extConfigFiles) foreach($extConfigFiles as $extConfigFile) include $extConfigFile;
define('TABLE_MODULE', $config->db->prefix . 'module');
define('TABLE_ACTION', $config->db->prefix . 'action');
define('TABLE_FILE', $config->db->prefix . 'file');
define('TABLE_HISTORY', $config->db->prefix . 'history');
define('TABLE_EXTENSION', $config->db->prefix . 'extension');

View File

@@ -1,312 +0,0 @@
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(1, 'user', 20, ',0,', 0, 'azhi', 'logout', '2012-06-05 09:24:52', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(2, 'user', 1, ',0,', 0, 'admin', 'login', '2012-06-05 09:25:00', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(3, 'user', 1, ',0,', 0, 'admin', 'logout', '2012-06-05 09:51:10', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(4, 'user', 2, ',0,', 0, 'productManager', 'login', '2012-06-05 09:51:33', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(5, 'user', 2, ',0,', 0, 'productManager', 'logout', '2012-06-05 09:53:05', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(6, 'user', 1, ',0,', 0, 'admin', 'login', '2012-06-05 09:53:10', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(7, 'user', 1, ',0,', 0, 'admin', 'logout', '2012-06-05 09:53:52', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(8, 'user', 2, ',0,', 0, 'productManager', 'login', '2012-06-05 09:54:07', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(9, 'product', 1, ',1,', 0, 'productManager', 'opened', '2012-06-05 09:57:07', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(10, 'productplan', 1, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:02:49', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(11, 'story', 1, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:09:49', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(12, 'story', 2, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:16:37', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(13, 'story', 3, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:18:10', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(14, 'story', 3, ',1,', 0, 'productManager', 'changed', '2012-06-05 10:19:06', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(15, 'story', 4, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:20:16', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(16, 'story', 5, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:21:39', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(17, 'story', 6, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:23:11', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(18, 'story', 7, ',1,', 0, 'productManager', 'opened', '2012-06-05 10:24:19', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(19, 'story', 1, ',1,', 0, 'productManager', 'reviewed', '2012-06-05 10:25:19', '', 'Pass');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(20, 'story', 2, ',1,', 0, 'productManager', 'reviewed', '2012-06-05 10:25:33', '', 'Pass');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(21, 'story', 3, ',1,', 0, 'productManager', 'reviewed', '2012-06-05 10:25:38', '', 'Pass');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(22, 'story', 4, ',1,', 0, 'productManager', 'reviewed', '2012-06-05 10:25:42', '', 'Pass');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(23, 'user', 2, ',0,', 0, 'productManager', 'logout', '2012-06-05 10:26:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(24, 'user', 3, ',0,', 0, 'projectManager', 'login', '2012-06-05 10:26:38', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(25, 'project', 1, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:28:36', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(26, 'story', 4, ',1,', 1, 'projectManager', 'linked2project', '2012-06-05 10:31:02', '', '1');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(27, 'story', 3, ',1,', 1, 'projectManager', 'linked2project', '2012-06-05 10:31:02', '', '1');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(28, 'story', 2, ',1,', 1, 'projectManager', 'linked2project', '2012-06-05 10:31:02', '', '1');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(29, 'story', 1, ',1,', 1, 'projectManager', 'linked2project', '2012-06-05 10:31:02', '', '1');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(30, 'task', 1, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:32:03', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(31, 'task', 2, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:32:23', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(32, 'task', 3, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:33:01', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(33, 'task', 4, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:33:21', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(34, 'task', 5, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:33:44', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(35, 'task', 6, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:33:59', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(36, 'task', 7, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:34:25', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(37, 'task', 8, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:34:45', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(38, 'task', 9, ',1,', 1, 'projectManager', 'opened', '2012-06-05 10:35:01', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(39, 'user', 3, ',0,', 0, 'projectManager', 'logout', '2012-06-05 10:37:30', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(40, 'user', 4, ',0,', 0, 'dev1', 'login', '2012-06-05 10:37:40', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(41, 'task', 1, ',1,', 1, 'dev1', 'started', '2012-06-05 10:37:54', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(42, 'task', 1, ',1,', 1, 'dev1', 'finished', '2012-06-05 10:38:00', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(43, 'task', 8, ',1,', 1, 'dev1', 'finished', '2012-06-05 10:39:14', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(44, 'task', 9, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(45, 'task', 8, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(46, 'task', 7, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(47, 'task', 6, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(48, 'task', 5, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(49, 'task', 4, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(50, 'task', 3, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(51, 'task', 2, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(52, 'task', 1, ',1,', 1, 'dev1', 'edited', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(53, 'user', 4, ',0,', 0, 'dev1', 'logout', '2012-06-05 10:41:50', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(54, 'user', 5, ',0,', 0, 'dev2', 'login', '2012-06-05 10:41:56', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(55, 'task', 4, ',1,', 1, 'dev2', 'edited', '2012-06-05 10:42:56', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(56, 'task', 3, ',1,', 1, 'dev2', 'edited', '2012-06-05 10:42:57', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(57, 'user', 5, ',0,', 0, 'dev2', 'logout', '2012-06-05 10:43:02', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(58, 'user', 6, ',0,', 0, 'dev3', 'login', '2012-06-05 10:43:07', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(59, 'task', 6, ',1,', 1, 'dev3', 'edited', '2012-06-05 10:43:32', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(60, 'task', 5, ',1,', 1, 'dev3', 'edited', '2012-06-05 10:43:32', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(61, 'user', 6, ',0,', 0, 'dev3', 'logout', '2012-06-05 10:43:42', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(62, 'user', 3, ',0,', 0, 'projectManager', 'login', '2012-06-05 10:44:05', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(63, 'user', 3, ',0,', 0, 'projectManager', 'logout', '2012-06-05 10:50:03', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(64, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 10:50:09', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(65, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 10:50:14', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(66, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 10:50:23', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(67, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 10:50:32', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(68, 'user', 1, ',0,', 0, 'admin', 'login', '2012-06-05 10:50:36', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(69, 'user', 1, ',0,', 0, 'admin', 'logout', '2012-06-05 10:50:53', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(70, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 10:51:01', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(71, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 10:51:33', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(72, 'user', 7, ',0,', 0, 'tester1', 'login', '2012-06-05 10:51:38', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(73, 'bug', 1, ',1,', 1, 'tester1', 'opened', '2012-06-05 10:56:11', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(74, 'bug', 2, ',1,', 1, 'tester1', 'opened', '2012-06-05 10:57:11', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(75, 'user', 7, ',0,', 0, 'tester1', 'logout', '2012-06-05 10:57:13', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(76, 'user', 8, ',0,', 0, 'tester2', 'login', '2012-06-05 10:57:24', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(77, 'bug', 3, ',1,', 1, 'tester2', 'opened', '2012-06-05 10:58:22', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(78, 'user', 8, ',0,', 0, 'tester2', 'logout', '2012-06-05 10:58:39', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(79, 'user', 9, ',0,', 0, 'tester3', 'login', '2012-06-05 10:58:46', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(80, 'bug', 4, ',1,', 1, 'tester3', 'opened', '2012-06-05 11:00:19', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(81, 'case', 1, ',1,', 0, 'tester3', 'opened', '2012-06-05 11:02:18', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(82, 'case', 1, ',1,', 0, 'tester3', 'edited', '2012-06-05 11:02:47', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(83, 'user', 9, ',0,', 0, 'tester3', 'logout', '2012-06-05 11:02:48', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(84, 'user', 7, ',0,', 0, 'tester1', 'login', '2012-06-05 11:02:56', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(85, 'case', 2, ',1,', 0, 'tester1', 'opened', '2012-06-05 11:03:28', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(86, 'case', 3, ',1,', 0, 'tester1', 'opened', '2012-06-05 11:03:54', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(87, 'user', 7, ',0,', 0, 'tester1', 'logout', '2012-06-05 11:04:00', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(88, 'user', 8, ',0,', 0, 'tester2', 'login', '2012-06-05 11:04:10', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(89, 'case', 4, ',1,', 0, 'tester2', 'opened', '2012-06-05 11:04:48', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(90, 'user', 8, ',0,', 0, 'tester2', 'logout', '2012-06-05 11:04:52', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(91, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 11:04:58', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(92, 'testtask', 1, ',1,', 1, 'testManager', 'opened', '2012-06-05 11:07:41', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(93, 'testtask', 1, ',1,', 1, 'testManager', 'edited', '2012-06-05 11:07:52', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(94, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 11:08:10', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(95, 'user', 1, ',0,', 0, 'admin', 'login', '2012-06-05 11:08:15', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(96, 'user', 1, ',0,', 0, 'admin', 'logout', '2012-06-05 11:08:23', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(97, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 11:08:35', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(98, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 11:08:55', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(99, 'user', 7, ',0,', 0, 'tester1', 'login', '2012-06-05 11:08:59', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(100, 'user', 7, ',0,', 0, 'tester1', 'logout', '2012-06-05 11:09:52', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(101, 'user', 1, ',0,', 0, 'admin', 'login', '2012-06-05 11:09:54', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(102, 'user', 1, ',0,', 0, 'admin', 'logout', '2012-06-05 11:10:38', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(103, 'user', 10, ',0,', 0, 'testManager', 'login', '2012-06-05 11:10:42', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(104, 'user', 10, ',0,', 0, 'testManager', 'logout', '2012-06-05 11:11:13', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(105, 'user', 3, ',0,', 0, 'projectManager', 'login', '2012-06-05 11:11:16', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(106, 'build', 1, ',1,', 1, 'projectManager', 'opened', '2012-06-05 11:11:45', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(107, 'project', 2, ',1,', 2, 'projectManager', 'opened', '2012-06-05 11:12:28', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(108, 'user', 3, ',0,', 0, 'projectManager', 'logout', '2012-06-05 11:14:40', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(109, 'user', 2, ',0,', 0, 'productManager', 'login', '2012-06-05 11:14:43', '', '');
INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, `actor`, `action`, `date`, `comment`, `extra`) VALUES(110, 'product', 2, ',2,', 0, 'productManager', 'opened', '2012-06-05 11:15:20', '', '');
INSERT INTO `zt_bug` (`id`, `product`, `module`, `project`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `confirmed`, `activatedCount`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(1, 1, 8, 1, 1, 1, 1, 0, 0, '首页页面问题', '', 3, 0, 'interface', '', '', '', '', '<p>[步骤]进入首页</p>\r\n<p>[结果]出现乱码&nbsp;&nbsp;&nbsp;&nbsp;</p>\r\n<p>[期望]正常显示</p>', 'active', 0, 0, '', 'tester1', '2012-06-05 10:56:11', 'trunk', 'dev1', '2012-06-05 10:56:11', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, '', 0, 1, 0, '', '0000-00-00 00:00:00', '0');
INSERT INTO `zt_bug` (`id`, `product`, `module`, `project`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `confirmed`, `activatedCount`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(2, 1, 9, 1, 2, 1, 4, 0, 0, '新闻中心页面问题', '', 3, 0, 'codeerror', '', '', '', '', '<p>[步骤]进入新闻中心</p>\r\n<p>[结果]页面出现乱码</p>\r\n<p>[期望]正常显示</p>', 'active', 0, 0, '', 'tester1', '2012-06-05 10:57:11', 'trunk', 'dev2', '2012-06-05 10:57:11', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, '', 0, 1, 0, '', '0000-00-00 00:00:00', '0');
INSERT INTO `zt_bug` (`id`, `product`, `module`, `project`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `confirmed`, `activatedCount`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(3, 1, 10, 1, 3, 2, 6, 0, 0, '成果展示页面问题', '', 3, 0, 'codeerror', '', '', '', '', '<p>[步骤]进入成果展示&nbsp;&nbsp;&nbsp;&nbsp;</p>\r\n<p>[结果]乱码</p>\r\n<p>[期望]正常显示</p>', 'active', 0, 0, '', 'tester2', '2012-06-05 10:58:22', 'trunk', 'dev3', '2012-06-05 10:58:22', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, '', 0, 1, 0, '', '0000-00-00 00:00:00', '0');
INSERT INTO `zt_bug` (`id`, `product`, `module`, `project`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `confirmed`, `activatedCount`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(4, 1, 11, 1, 4, 1, 9, 0, 0, '售后服务页面问题', '', 3, 0, 'codeerror', '', '', '', '', '<p>[步骤]进入售后服务</p>\r\n<p>[结果]乱码</p>\r\n<p>[期望]正常显示</p>', 'active', 0, 0, '', 'tester3', '2012-06-05 11:00:19', 'trunk', 'dev1', '2012-06-05 11:00:19', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', 0, '', 0, 1, 0, '', '0000-00-00 00:00:00', '0');
INSERT INTO `zt_build` (`id`, `product`, `project`, `name`, `scmPath`, `filePath`, `date`, `stories`, `bugs`, `builder`, `desc`, `deleted`) VALUES(1, 1, 1, '第一期版本', '', '', '2012-06-05', '3,2,1,4', '', 'projectManager', '', '0');
INSERT INTO `zt_burn` (`project`, `date`, `left`, `consumed`) VALUES(1, '2012-06-05', 0, 38);
INSERT INTO `zt_case` (`id`, `product`, `module`, `path`, `story`, `storyVersion`, `title`, `precondition`, `keywords`, `pri`, `type`, `stage`, `howRun`, `scriptedBy`, `scriptedDate`, `scriptStatus`, `scriptLocation`, `status`, `frequency`, `order`, `openedBy`, `openedDate`, `lastEditedBy`, `lastEditedDate`, `version`, `linkCase`, `fromBug`, `deleted`, `lastRunner`, `lastRunDate`, `lastRunResult`) VALUES(1, 1, 0, 0, 4, 1, '售后服务的测试用例', '', '', 1, 'feature', 'feature', '', '', '0000-00-00', '', '', 'normal', '1', 0, 'tester3', '2012-06-05 11:02:18', 'tester3', '2012-06-05 11:02:46', 1, '', 0, '0', 'testManager', '2012-06-05 11:11:00', 'pass');
INSERT INTO `zt_case` (`id`, `product`, `module`, `path`, `story`, `storyVersion`, `title`, `precondition`, `keywords`, `pri`, `type`, `stage`, `howRun`, `scriptedBy`, `scriptedDate`, `scriptStatus`, `scriptLocation`, `status`, `frequency`, `order`, `openedBy`, `openedDate`, `lastEditedBy`, `lastEditedDate`, `version`, `linkCase`, `fromBug`, `deleted`, `lastRunner`, `lastRunDate`, `lastRunResult`) VALUES(2, 1, 0, 0, 1, 1, '首页的测试用例', '', '', 3, 'feature', '', '', '', '0000-00-00', '', '', 'normal', '1', 0, 'tester1', '2012-06-05 11:03:28', '', '0000-00-00 00:00:00', 1, '', 0, '0', 'testManager', '2012-06-05 11:11:05', 'pass');
INSERT INTO `zt_case` (`id`, `product`, `module`, `path`, `story`, `storyVersion`, `title`, `precondition`, `keywords`, `pri`, `type`, `stage`, `howRun`, `scriptedBy`, `scriptedDate`, `scriptStatus`, `scriptLocation`, `status`, `frequency`, `order`, `openedBy`, `openedDate`, `lastEditedBy`, `lastEditedDate`, `version`, `linkCase`, `fromBug`, `deleted`, `lastRunner`, `lastRunDate`, `lastRunResult`) VALUES(3, 1, 0, 0, 2, 1, '新闻中心的测试用例', '', '', 3, 'feature', 'feature', '', '', '0000-00-00', '', '', 'normal', '1', 0, 'tester1', '2012-06-05 11:03:54', '', '0000-00-00 00:00:00', 1, '', 0, '0', 'testManager', '2012-06-05 11:11:07', 'pass');
INSERT INTO `zt_case` (`id`, `product`, `module`, `path`, `story`, `storyVersion`, `title`, `precondition`, `keywords`, `pri`, `type`, `stage`, `howRun`, `scriptedBy`, `scriptedDate`, `scriptStatus`, `scriptLocation`, `status`, `frequency`, `order`, `openedBy`, `openedDate`, `lastEditedBy`, `lastEditedDate`, `version`, `linkCase`, `fromBug`, `deleted`, `lastRunner`, `lastRunDate`, `lastRunResult`) VALUES(4, 1, 0, 0, 3, 2, '成果展示测试用例', '', '', 3, 'feature', 'feature', '', '', '0000-00-00', '', '', 'normal', '1', 0, 'tester2', '2012-06-05 11:04:48', '', '0000-00-00 00:00:00', 1, '', 0, '0', 'testManager', '2012-06-05 11:11:08', 'pass');
INSERT INTO `zt_casestep` (`id`, `case`, `version`, `desc`, `expect`) VALUES(1, 1, 1, '进入首页', '正常显示');
INSERT INTO `zt_casestep` (`id`, `case`, `version`, `desc`, `expect`) VALUES(2, 2, 1, '进入首页', '正常显示');
INSERT INTO `zt_casestep` (`id`, `case`, `version`, `desc`, `expect`) VALUES(3, 3, 1, '进入新闻中心', '正常显示');
INSERT INTO `zt_casestep` (`id`, `case`, `version`, `desc`, `expect`) VALUES(4, 4, 1, '进入成果展示', '正常显示');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(1, '经理', 0, ',1,', 1, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(2, '开发', 0, ',2,', 1, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(3, '测试', 0, ',3,', 1, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(4, '市场', 0, ',4,', 1, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(5, '产品', 1, ',1,5,', 2, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(6, '项目', 1, ',1,6,', 2, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(7, '编程', 2, ',2,7,', 2, 0, '', '', '');
INSERT INTO `zt_dept` (`id`, `name`, `parent`, `path`, `grade`, `order`, `position`, `function`, `manager`) VALUES(8, '美工', 2, ',2,8,', 2, 0, '', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(1, 14, 'version', '1', '2', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(2, 14, 'spec', '&nbsp;作为一名本公司的用户,我希望可以在成果展示看到该公司网站的企业新闻,这样可以方便我进行了解该公司的产品并进行购买。&nbsp;<br />', '&nbsp;作为一名本公司的用户,我希望可以在成果展示看到该公司网站的吹产品,这样可以方便我进行了解该公司的产品并进行购买。&nbsp;<br />', '001- <del>作为一名本公司的用户,我希望可以在成果展示看到该公司网站的企业新闻,这样可以方便我进行了解该公司的产品并进行购买。<br /></del>\n001+ <ins>作为一名本公司的用户,我希望可以在成果展示看到该公司网站的吹产品,这样可以方便我进行了解该公司的产品并进行购买。<br /></ins>');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(3, 41, 'consumed', '0', '1', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(4, 41, 'status', 'wait', 'doing', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(6, 42, 'consumed', '1', '7', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(7, 42, 'left', '10', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(8, 42, 'assignedTo', 'dev1', 'projectManager', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(9, 42, 'status', 'doing', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(10, 42, 'finishedBy', '', 'dev1', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(11, 42, 'finishedDate', '', '2012-06-05 10:38:00', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(13, 43, 'consumed', '0', '6', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(14, 43, 'left', '8', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(15, 43, 'assignedTo', 'dev1', 'projectManager', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(16, 43, 'status', 'wait', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(17, 43, 'finishedBy', '', 'dev1', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(18, 43, 'finishedDate', '', '2012-06-05 10:39:14', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(20, 44, 'canceledDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(21, 45, 'canceledDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(22, 46, 'canceledDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(23, 47, 'closedDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(24, 48, 'closedDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(25, 49, 'closedDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(26, 50, 'closedDate', '2012-06-05 10:41:12', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(27, 51, 'status', 'wait', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(28, 51, 'consumed', '0', '8', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(29, 51, 'left', '10', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(30, 51, 'finishedBy', '', 'dev1', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(31, 51, 'finishedDate', '', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(32, 52, 'finishedDate', '2012-06-05 10:38:00', '2012-06-05 10:41:20', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(33, 55, 'status', 'closed', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(34, 55, 'consumed', '0', '5', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(35, 55, 'left', '8', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(36, 55, 'finishedBy', '', 'dev2', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(37, 55, 'closedBy', 'dev1', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(38, 55, 'closedReason', 'done', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(39, 55, 'finishedDate', '', '2012-06-05 10:42:56', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(40, 55, 'closedDate', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(41, 56, 'status', 'closed', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(42, 56, 'consumed', '0', '8', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(43, 56, 'left', '8', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(44, 56, 'finishedBy', '', 'dev2', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(45, 56, 'closedBy', 'dev1', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(46, 56, 'closedReason', 'done', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(47, 56, 'finishedDate', '', '2012-06-05 10:42:56', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(48, 56, 'closedDate', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(49, 59, 'status', 'closed', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(50, 59, 'consumed', '0', '5', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(51, 59, 'left', '8', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(52, 59, 'finishedBy', 'dev1', 'dev3', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(53, 59, 'closedBy', 'dev1', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(54, 59, 'closedReason', 'done', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(55, 59, 'finishedDate', '', '2012-06-05 10:43:32', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(56, 59, 'closedDate', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(57, 60, 'status', 'closed', 'done', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(58, 60, 'consumed', '0', '5', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(59, 60, 'left', '8', '0', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(60, 60, 'finishedBy', 'dev1', 'dev3', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(61, 60, 'closedBy', 'dev1', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(62, 60, 'closedReason', 'done', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(63, 60, 'finishedDate', '', '2012-06-05 10:43:32', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(64, 60, 'closedDate', '2012-06-05 10:41:20', '', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(65, 82, 'title', '首页的测试用例', '售后服务的测试用例', '001- <del>首页的测试用例</del>\n001+ <ins>售后服务的测试用例</ins>');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(66, 82, 'story', '1', '4', '');
INSERT INTO `zt_history` (`id`, `action`, `field`, `old`, `new`, `diff`) VALUES(67, 93, 'build', '', 'trunk', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(1, 1, '首页', 0, ',1,', 1, 10, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(2, 1, '新闻中心', 0, ',2,', 1, 20, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(3, 1, '成果展示', 0, ',3,', 1, 30, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(4, 1, '售后服务', 0, ',4,', 1, 40, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(5, 1, '诚聘英才', 0, ',5,', 1, 50, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(6, 1, '合作洽谈', 0, ',6,', 1, 60, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(7, 1, '关于我们', 0, ',7,', 1, 70, 'story', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(8, 1, '首页', 0, ',8,', 1, 10, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(9, 1, '新闻中心', 0, ',9,', 1, 20, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(10, 1, '成果展示', 0, ',10,', 1, 30, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(11, 1, '售后服务', 0, ',11,', 1, 40, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(12, 1, '诚聘英才', 0, ',12,', 1, 50, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(13, 1, '合作洽谈', 0, ',13,', 1, 60, 'bug', '');
INSERT INTO `zt_module` (`id`, `root`, `name`, `parent`, `path`, `grade`, `order`, `type`, `owner`) VALUES(14, 1, '关于我们', 0, ',14,', 1, 70, 'bug', '');
INSERT INTO `zt_product` (`id`, `name`, `code`, `status`, `desc`, `PO`, `QD`, `RD`, `acl`, `whitelist`, `createdBy`, `createdDate`, `order`, `deleted`) VALUES(1, '公司企业网站建设', 'companyWebsite', 'normal', '建立公司企业网站,可以更好对外展示。<br />', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 09:57:07', '5', '0');
INSERT INTO `zt_product` (`id`, `name`, `code`, `status`, `desc`, `PO`, `QD`, `RD`, `acl`, `whitelist`, `createdBy`, `createdDate`, `order`, `createdVersion`, `deleted`) VALUES(2, '企业内部工时管理系统', 'workhourManage', 'normal', '', 'productManager', 'testManager', 'productManager', 'open', '', 'productManager', '2012-06-05 11:15:20', '10', '5.2.1', '0');
INSERT INTO `zt_productplan` (`id`, `product`, `title`, `desc`, `begin`, `end`, `deleted`) VALUES(1, 1, '1.0版本', '开发出企业网站1.0版本。<br />', '2000-01-01', '2015-01-01', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
INSERT INTO `zt_projectproduct` (`project`, `product`) VALUES(1, 1);
INSERT INTO `zt_projectproduct` (`project`, `product`) VALUES(2, 1);
INSERT INTO `zt_projectstory` (`project`, `product`, `story`, `version`) VALUES(1, 1, 4, 1);
INSERT INTO `zt_projectstory` (`project`, `product`, `story`, `version`) VALUES(1, 1, 3, 2);
INSERT INTO `zt_projectstory` (`project`, `product`, `story`, `version`) VALUES(1, 1, 2, 1);
INSERT INTO `zt_projectstory` (`project`, `product`, `story`, `version`) VALUES(1, 1, 1, 1);
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(1, 1, 1, 1, 'po', 0, '首页设计和开发', '', '', 1, 1, 'active', 'developed', '', 'productManager', '2012-06-05 10:09:49', 'productManager', '0000-00-00 00:00:00', 'productManager', '2012-06-05 10:25:19', 'productManager, ', '2012-06-05', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(2, 1, 2, 1, 'po', 0, '新闻中心的设计和开发。', '', '', 1, 1, 'active', 'developed', '', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:25:33', 'productManager, ', '2012-06-05', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(3, 1, 3, 1, 'po', 0, '成果展示的设计和开发', '', '', 1, 0, 'active', 'developed', '', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:25:38', 'productManager, ', '2012-06-05', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 2, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(4, 1, 4, 1, 'po', 0, '售后服务的设计和开发', '', '', 1, 1, 'active', 'projected', '', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:25:42', 'productManager, ', '2012-06-05', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(5, 1, 5, 1, 'po', 0, '诚聘英才的设计和开发', '', '', 1, 1, 'draft', 'planned', '', 'productManager', '2012-06-05 10:21:39', 'productManager', '2012-06-05 10:21:39', '', '0000-00-00 00:00:00', '', '0000-00-00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(6, 1, 6, 1, 'po', 0, '合作洽谈的设计和开发', '', '', 1, 1, 'draft', 'planned', '', 'productManager', '2012-06-05 10:23:11', 'productManager', '2012-06-05 10:23:11', '', '0000-00-00 00:00:00', '', '0000-00-00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_story` (`id`, `product`, `module`, `plan`, `source`, `fromBug`, `title`, `keywords`, `type`, `pri`, `estimate`, `status`, `stage`, `mailto`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `lastEditedBy`, `lastEditedDate`, `reviewedBy`, `reviewedDate`, `closedBy`, `closedDate`, `closedReason`, `toBug`, `childStories`, `linkStories`, `duplicateStory`, `version`, `deleted`) VALUES(7, 1, 7, 1, 'po', 0, '关于我们的设计和开发', '', '', 1, 1, 'draft', 'planned', '', 'productManager', '2012-06-05 10:24:19', 'productManager', '2012-06-05 10:24:19', '', '0000-00-00 00:00:00', '', '0000-00-00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(1, 1, '首页设计和开发', '作为一名本公司的用户,我希望可以在首页看到该公司网站的基本内容,例如最新动态、部分成果展示、联系信息、工商信息等。<br />', '开发并通过验收<br />');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(2, 1, '新闻中心的设计和开发。', '作为一名本公司的用户,我希望可以在新闻中心看到该公司网站的企业新闻,这样可以通过新闻了解企业的最新动态。<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(3, 1, '成果展示的设计和开发', '&nbsp;作为一名本公司的用户,我希望可以在成果展示看到该公司网站的企业新闻,这样可以方便我进行了解该公司的产品并进行购买。&nbsp;<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(3, 2, '成果展示的设计和开发', '&nbsp;作为一名本公司的用户,我希望可以在成果展示看到该公司网站的吹产品,这样可以方便我进行了解该公司的产品并进行购买。&nbsp;<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(4, 1, '售后服务的设计和开发', '作为一名本公司的用户,我希望可以在售后服务看到该公司网站的售后服务,这样可以方便我联系该公司来解决我的问题。&nbsp;<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(5, 1, '诚聘英才的设计和开发', '作为一名求职者,我希望可以在诚聘英才里看到该公司的招聘信息,这样可以方便我应聘该公司。&nbsp;<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(6, 1, '合作洽谈的设计和开发', '作为一名合作商,我希望可以在合作洽谈里看到该公司对外的合作内容,这样可以方便我和该公司进行合作洽谈。&nbsp;<br />', '');
INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES(7, 1, '关于我们的设计和开发', '我希望可以在关于我们里看到该公司的基本信息,这样可以方便我了解该公司。<br />', '');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(1, 1, 1, 1, 0, '首页页面的设计', 'design', 1, 10, 7, 0, '0000-00-00', 'done', '', '首页页面的设计<br />', 'projectManager', '2012-06-05 10:32:03', 'projectManager', '2012-06-05 10:41:20', 'dev1', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev1', '2012-06-05 10:41:20', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(2, 1, 1, 1, 0, '首页的开发', 'devel', 1, 10, 8, 0, '0000-00-00', 'done', '', '首页的开发<br />', 'projectManager', '2012-06-05 10:32:23', 'dev1', '2012-06-05 10:41:20', 'dev1', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev1', '2012-06-05 10:41:20', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(3, 1, 2, 1, 0, '新闻中心的设计', 'design', 1, 8, 8, 0, '0000-00-00', 'done', '', '新闻中心的设计<br />', 'projectManager', '2012-06-05 10:33:01', 'dev2', '2012-06-05 10:42:56', 'dev2', '2012-06-05 10:42:56', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev2', '2012-06-05 10:42:56', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(4, 1, 2, 1, 0, '新闻中心的开发', 'devel', 1, 8, 5, 0, '0000-00-00', 'done', '', '新闻中心的开发<br />', 'projectManager', '2012-06-05 10:33:21', 'dev2', '2012-06-05 10:42:56', 'dev2', '2012-06-05 10:42:56', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev2', '2012-06-05 10:42:56', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(5, 1, 3, 2, 0, '成果展示的设计', 'design', 1, 8, 5, 0, '0000-00-00', 'done', '', '成果展示的设计<br />', 'projectManager', '2012-06-05 10:33:44', 'dev3', '2012-06-05 10:43:32', 'dev3', '2012-06-05 10:43:32', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev3', '2012-06-05 10:43:32', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(6, 1, 3, 2, 0, '成果展示的开发', 'devel', 1, 8, 5, 0, '0000-00-00', 'done', '', '成果展示的开发<br />', 'projectManager', '2012-06-05 10:33:59', 'dev3', '2012-06-05 10:43:32', 'dev3', '2012-06-05 10:43:32', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 'dev3', '2012-06-05 10:43:32', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(7, 1, 4, 1, 0, '售后服务的设计', 'design', 1, 8, 0, 8, '0000-00-00', 'cancel', '', '售后服务的设计<br />', 'projectManager', '2012-06-05 10:34:25', 'projectManager', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', 'dev1', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', '', 'dev1', '2012-06-05 10:41:20', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(8, 1, 4, 1, 0, '售后服务的开发', 'devel', 1, 8, 6, 0, '0000-00-00', 'cancel', '', '售后服务的开发<br />', 'projectManager', '2012-06-05 10:34:45', 'projectManager', '2012-06-05 10:41:20', 'dev1', '0000-00-00 00:00:00', 'dev1', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', '', 'dev1', '2012-06-05 10:41:20', '0');
INSERT INTO `zt_task` (`id`, `project`, `story`, `storyVersion`, `fromBug`, `name`, `type`, `pri`, `estimate`, `consumed`, `left`, `deadline`, `status`, `mailto`, `desc`, `openedBy`, `openedDate`, `assignedTo`, `assignedDate`, `finishedBy`, `finishedDate`, `canceledBy`, `canceledDate`, `closedBy`, `closedDate`, `closedReason`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES(9, 1, 4, 1, 0, '售后服务的开发', 'devel', 1, 8, 0, 8, '0000-00-00', 'cancel', '', '售后服务的开发<br />', 'projectManager', '2012-06-05 10:35:01', 'projectManager', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', 'dev1', '2012-06-05 10:41:20', '', '0000-00-00 00:00:00', '', 'dev1', '2012-06-05 10:41:20', '0');
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'dev3', '研发', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'productManager', '产品经理', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'tester2', '测试', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'tester1', '测试', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'projectManager', '项目经理', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'tester2', '测试', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'tester1', '测试', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'dev3', '研发', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'dev2', '研发', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'dev1', '研发', '2013-02-20', 365, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'dev1', '研发', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'dev2', '研发', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'projectManager', '项目经理', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(1, 'testManager', '测试主管', '2013-02-20', 184, 7);
INSERT INTO `zt_team` (`project`, `account`, `role`, `join`, `days`, `hours`) VALUES(2, 'productManager', '产品经理', '2013-02-20', 365, 7);
INSERT INTO `zt_testresult` (`id`, `run`, `case`, `version`, `caseResult`, `stepResults`, `lastRunner`, `date`) VALUES(1, 4, 1, 1, 'pass', 'a:1:{i:1;a:2:{s:6:"result";s:4:"pass";s:4:"real";s:0:"";}}', 'testManager', '2012-06-05 11:11:00');
INSERT INTO `zt_testresult` (`id`, `run`, `case`, `version`, `caseResult`, `stepResults`, `lastRunner`, `date`) VALUES(2, 3, 2, 1, 'pass', 'a:1:{i:2;a:2:{s:6:"result";s:4:"pass";s:4:"real";s:0:"";}}', 'testManager', '2012-06-05 11:11:05');
INSERT INTO `zt_testresult` (`id`, `run`, `case`, `version`, `caseResult`, `stepResults`, `lastRunner`, `date`) VALUES(3, 2, 3, 1, 'pass', 'a:1:{i:3;a:2:{s:6:"result";s:4:"pass";s:4:"real";s:0:"";}}', 'testManager', '2012-06-05 11:11:07');
INSERT INTO `zt_testresult` (`id`, `run`, `case`, `version`, `caseResult`, `stepResults`, `lastRunner`, `date`) VALUES(4, 1, 4, 1, 'pass', 'a:1:{i:4;a:2:{s:6:"result";s:4:"pass";s:4:"real";s:0:"";}}', 'testManager', '2012-06-05 11:11:08');
INSERT INTO `zt_testrun` (`id`, `task`, `case`, `version`, `assignedTo`, `lastRunner`, `lastRunDate`, `lastRunResult`, `status`) VALUES(1, 1, 4, 1, '', 'testManager', '2012-06-05 11:11:08', 'pass', 'done');
INSERT INTO `zt_testrun` (`id`, `task`, `case`, `version`, `assignedTo`, `lastRunner`, `lastRunDate`, `lastRunResult`, `status`) VALUES(2, 1, 3, 1, '', 'testManager', '2012-06-05 11:11:07', 'pass', 'done');
INSERT INTO `zt_testrun` (`id`, `task`, `case`, `version`, `assignedTo`, `lastRunner`, `lastRunDate`, `lastRunResult`, `status`) VALUES(3, 1, 2, 1, '', 'testManager', '2012-06-05 11:11:05', 'pass', 'done');
INSERT INTO `zt_testrun` (`id`, `task`, `case`, `version`, `assignedTo`, `lastRunner`, `lastRunDate`, `lastRunResult`, `status`) VALUES(4, 1, 1, 1, '', 'testManager', '2012-06-05 11:11:00', 'pass', 'done');
INSERT INTO `zt_testtask` (`id`, `name`, `product`, `project`, `build`, `owner`, `begin`, `end`, `desc`, `status`, `deleted`) VALUES(1, '企业网站第一期测试任务', 1, 1, 'trunk', 'testManager', '2012-06-05', '2013-06-21', '', 'wait', '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(2, 5, 'productManager', 'e10adc3949ba59abbe56e057f20f883e', 'po', '产品经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338866083, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(3, 6, 'projectManager', 'e10adc3949ba59abbe56e057f20f883e', 'pm', '项目经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865876, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(4, 2, 'dev1', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338863860, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(5, 2, 'dev2', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864116, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(6, 2, 'dev3', 'e10adc3949ba59abbe56e057f20f883e', 'dev', '开发丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338864187, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(7, 3, 'tester1', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试甲', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 3, '192.168.0.8', 1338865739, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(8, 3, 'tester2', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试乙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 2, '192.168.0.8', 1338865450, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(9, 3, 'tester3', 'e10adc3949ba59abbe56e057f20f883e', 'qa', '测试丙', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 1, '192.168.0.8', 1338865125, '0');
INSERT INTO `zt_user` (`id`, `dept`, `account`, `password`, `role`, `realname`, `nickname`, `commiter`, `avatar`, `birthday`, `gender`, `email`, `skype`, `qq`, `yahoo`, `gtalk`, `wangwang`, `mobile`, `phone`, `address`, `zipcode`, `join`, `visits`, `ip`, `last`, `deleted`) VALUES(10, 1, 'testManager', 'e10adc3949ba59abbe56e057f20f883e', 'qd', '测试经理', '', '', '', '0000-00-00', 'm', '', '', '', '', '', '', '', '', '', '', '0000-00-00', 6, '192.168.0.8', 1338865842, '0');
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('productManager', 5);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('projectManager', 4);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('dev1', 2);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('dev2', 2);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('dev3', 2);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('tester3', 3);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('tester2', 3);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('tester1', 3);
INSERT INTO `zt_usergroup` (`account`, `group`) VALUES('testManager', 8);

View File

@@ -1,17 +0,0 @@
ALTER TABLE `zt_bug` ADD `toStory` MEDIUMINT( 8 ) NOT NULL DEFAULT '0' AFTER `toTask` ;
ALTER TABLE `zt_testResult` ADD `lastRunner` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `stepResults` ;
ALTER TABLE `zt_testRun` ADD `lastRunner` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `assignedTo` ;
ALTER TABLE `zt_case` ADD `lastRunner` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `deleted` ;
-- adjust the working hours.
ALTER TABLE `zt_project` ADD `days` SMALLINT UNSIGNED NOT NULL AFTER `end`;
ALTER TABLE `zt_team` CHANGE `joinDate` `join` DATE NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `zt_team` CHANGE `workingHour` `hours` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `zt_team` ADD `days` SMALLINT UNSIGNED NOT NULL AFTER `join` ;
ALTER TABLE `zt_case` CHANGE `lastRun` `lastRunDate` DATETIME NOT NULL ,
CHANGE `lastResult` `lastRunResult` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_testRun` CHANGE `lastRun` `lastRunDate` DATETIME NOT NULL ,
CHANGE `lastResult` `lastRunResult` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
update `zt_task` set `storyVersion` = 1 WHERE `storyVersion` = 0;

View File

@@ -1,26 +0,0 @@
-- fix the error of gender. add commiter field.
ALTER TABLE `zt_user` CHANGE `gendar` `gender` ENUM( 'f', 'm' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'f' ;
ALTER TABLE `zt_user` ADD `commiter` VARCHAR( 100 ) NOT NULL AFTER `nickname` ;
-- fix the error of objectType.
UPDATE `zt_action` SET `objectType` = 'product' WHERE `objectType` = '`product`';
UPDATE `zt_action` SET `objectType` = 'productplan' WHERE `objectType` = '`productPlan`';
UPDATE `zt_action` SET `objectType` = 'project' WHERE `objectType` = '`project`';
UPDATE `zt_action` SET `objectType` = 'story' WHERE `objectType` = '`story`';
UPDATE `zt_action` SET `objectType` = 'task' WHERE `objectType` = '`task`';
UPDATE `zt_action` SET `objectType` = 'bug' WHERE `objectType` = '`bug`';
UPDATE `zt_action` SET `objectType` = 'case' WHERE `objectType` = '`case`';
UPDATE `zt_action` SET `objectType` = 'build' WHERE `objectType` = '`build`';
UPDATE `zt_action` SET `objectType` = 'release' WHERE `objectType` = '`release`';
UPDATE `zt_action` SET `objectType` = 'user' WHERE `objectType` = '`user`';
UPDATE `zt_action` SET `objectType` = 'doc' WHERE `objectType` = '`doc`';
UPDATE `zt_action` SET `objectType` = 'doclib' WHERE `objectType` = '`doclib`';
UPDATE `zt_action` SET `objectType` = 'testtask' WHERE `objectType` = '`testtask`';
UPDATE `zt_action` SET `objectType` = 'todo' WHERE `objectType` = '`todo`';
UPDATE `zt_bug` SET `os` = 'andriod' WHERE `os` = 'adriod';
-- add stories and bugs to release and build table.
ALTER TABLE `zt_release` ADD `stories` TEXT NOT NULL AFTER `date` ;
ALTER TABLE `zt_release` ADD `bugs` TEXT NOT NULL AFTER `stories` ;
ALTER TABLE `zt_build` ADD `stories` TEXT NOT NULL AFTER `date` ,
ADD `bugs` TEXT NOT NULL AFTER `stories` ;

View File

@@ -1,4 +0,0 @@
UPDATE `zt_story` SET `source` = 'customer' WHERE `source` = 'custom';
ALTER TABLE `zt_action` CHANGE `product` `product` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `zt_history` CHANGE `diff` `diff` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
ALTER TABLE `zt_project` ADD `order` SMALLINT UNSIGNED NOT NULL AFTER `whitelist` ;

View File

@@ -1,10 +0,0 @@
ALTER TABLE `zt_task` ADD `estStarted` DATE NOT NULL AFTER `assignedDate` ,
ADD `realStarted` DATE NOT NULL AFTER `estStarted`;
ALTER TABLE `zt_config` ADD `module` VARCHAR( 30 ) NOT NULL AFTER `owner` ;
update zt_config set module = 'common';
update zt_config set company = 1 where `key` = 'sn';
delete from zt_config where `key` = 'version' and owner = 'system';
ALTER TABLE `zt_config` CHANGE `value` `value` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_config` ADD UNIQUE `unique` (`company` , `owner` , `module` , `section` , `key`);
ALTER TABLE `zt_task` ADD `module` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `project` ;

View File

@@ -1,33 +0,0 @@
# zt-task table.
ALTER TABLE `zt_task` ADD INDEX ( `project` );
ALTER TABLE `zt_task` ADD INDEX ( `status` );
# product table.
ALTER TABLE `zt_product` ADD INDEX ( `order` );
# projectProduct table.
ALTER TABLE `zt_projectProduct` DROP PRIMARY KEY;
ALTER TABLE `zt_projectProduct` ADD INDEX ( `product` );
ALTER TABLE `zt_projectProduct` ADD INDEX ( `project` );
# zt_team
ALTER TABLE `zt_team` ADD INDEX ( `project` );
# zt_module
ALTER TABLE `zt_module` ADD INDEX ( `root` );
ALTER TABLE `zt_module` ADD INDEX ( `type` );
# zt_user
ALTER TABLE `zt_user` DROP INDEX `company`;
ALTER TABLE `zt_user` ADD INDEX ( `company` );
ALTER TABLE `zt_user` ADD INDEX ( `dept` );
# zt_action
ALTER TABLE `zt_action` ADD INDEX ( `date` );
# zt_history
ALTER TABLE `zt_history` ADD INDEX ( `action` );
# zt_file
ALTER TABLE `zt_file` ADD INDEX ( `objectType` );
ALTER TABLE `zt_file` ADD INDEX ( `objectID` );

View File

View File

@@ -1,27 +0,0 @@
ALTER TABLE `zt_user` ADD `fails` TINYINT( 5 ) NOT NULL DEFAULT '0' AFTER `last` ,
ADD `locked` DATE NOT NULL DEFAULT '0000-00-00' AFTER `fails`;
ALTER TABLE `zt_user` CHANGE `locked` `locked` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `zt_case` CHANGE `pri` `pri` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '3';
ALTER TABLE `zt_action` ADD `read` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
UPDATE `zt_action` SET `read` = '1';
CREATE TABLE IF NOT EXISTS `zt_webapp` (
`id` mediumint(9) NOT NULL auto_increment,
`company` mediumint(8) unsigned NOT NULL default '0',
`appid` mediumint(9) NOT NULL,
`module` mediumint(9) NOT NULL,
`name` varchar(100) NOT NULL,
`author` varchar(30) NOT NULL,
`url` varchar(100) NOT NULL,
`icon` varchar(100) NOT NULL,
`target` varchar(50) NOT NULL,
`size` varchar(20) NOT NULL,
`desc` text NOT NULL,
`addedBy` char(30) NOT NULL,
`addedDate` datetime NOT NULL,
`addType` varchar(20) NOT NULL default 'system',
`views` mediumint(9) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

View File

@@ -1 +0,0 @@
ALTER TABLE `zt_user` CHANGE `msn` `skype` CHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

View File

@@ -1,15 +0,0 @@
ALTER TABLE `zt_testTask` ADD `pri` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `owner`;
ALTER TABLE `zt_user` ADD `role` CHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `password`;
ALTER TABLE `zt_product` CHANGE `QM` `QD` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_project` CHANGE `QM` `QD` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CHANGE `RM` `RD` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `zt_product` CHANGE `RM` `RD` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
CREATE TABLE IF NOT EXISTS `zt_userContact` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`company` mediumint(8) unsigned NOT NULL,
`account` char(30) NOT NULL,
`listName` varchar(60) NOT NULL,
`userList` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@@ -1,41 +0,0 @@
ALTER TABLE `zt_build` CHANGE `desc` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_group` ADD `role` CHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_taskEstimate` CHANGE `estimater` `account` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `zt_taskEstimate` ADD `consumed` TINYINT( 3 ) UNSIGNED NOT NULL AFTER `estimate`;
UPDATE `zt_group` SET `role` = 'guest' WHERE `name` = 'guest';
ALTER TABLE `zt_taskEstimate` CHANGE `estimate` `left` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `zt_taskEstimate` CHANGE `date` `date` DATETIME NOT NULL;
ALTER TABLE `zt_taskEstimate` CHANGE `left` `left` FLOAT UNSIGNED NOT NULL DEFAULT '0', CHANGE `consumed` `consumed` FLOAT UNSIGNED NOT NULL;
UPDATE `zt_config` SET `company` = 0 WHERE `key` = 'version';
DELETE FROM `zt_config` WHERE `company` = 1 AND `key` = 'sn';
UPDATE `zt_config` SET `company` = 1 WHERE `key` = 'sn';
UPDATE `zt_config` SET `section` = 'global' WHERE `key` = 'flow';
UPDATE `zt_project` SET `status` = 'doing' WHERE `status` = '';
ALTER TABLE `zt_testTask` ADD `report` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `desc`;
ALTER TABLE `zt_project` CHANGE `type` `type` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'sprint';
-- 2013-1-21 change the priv of todo mark method instead finish method.
UPDATE `zt_groupPriv` SET method='finish' WHERE module='todo' AND method='mark';
ALTER TABLE `zt_taskEstimate` CHANGE `date` `date` DATE NOT NULL;
DELETE FROM `zt_groupPriv` WHERE `module` = 'webapp' and `method` = 'index';
INSERT INTO `zt_groupPriv` (`company` , `group` , `module` , `method` ) VALUES
('1', '1', 'webapp', 'index'),
('1', '2', 'webapp', 'index'),
('1', '3', 'webapp', 'index'),
('1', '4', 'webapp', 'index'),
('1', '5', 'webapp', 'index'),
('1', '6', 'webapp', 'index'),
('1', '7', 'webapp', 'index'),
('1', '8', 'webapp', 'index'),
('1', '9', 'webapp', 'index'),
('1', '10', 'webapp', 'index'),
('1', '11', 'webapp', 'index');
ALTER TABLE `zt_webapp` ADD `abstract` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `size` ;
ALTER TABLE `zt_webapp` CHANGE `url` `url` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
UPDATE `zt_groupPriv` set method='finish' where module='todo' and method='mark';
ALTER TABLE `zt_taskEstimate` ADD `work` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

View File

@@ -1 +0,0 @@
ALTER TABLE `zt_module` CHANGE `order` `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0';

View File

@@ -1,49 +0,0 @@
ALTER TABLE `zt_project` ADD `openedVersion` varchar(20) COLLATE 'utf8_general_ci' NOT NULL AFTER `openedDate`;
ALTER TABLE `zt_product` ADD `createdVersion` varchar(20) COLLATE 'utf8_general_ci' NOT NULL AFTER `createdDate`;
ALTER TABLE `zt_product` DROP `order`;
ALTER TABLE `zt_project` DROP `order`;
ALTER TABLE `zt_story` CHANGE `reviewedBy` `reviewedBy` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_build` DROP INDEX `name`;
ALTER TABLE `zt_project` DROP INDEX `company` , ADD INDEX `project` ( `type` , `parent` , `begin` , `end` , `status` , `statge` , `pri` );
ALTER TABLE `zt_user` DROP INDEX `company`;
ALTER TABLE `zt_action` DROP `company`;
ALTER TABLE `zt_bug` DROP `company`;
ALTER TABLE `zt_build` DROP `company`;
ALTER TABLE `zt_burn` DROP `company`;
ALTER TABLE `zt_case` DROP `company`;
ALTER TABLE `zt_caseStep` DROP `company`;
ALTER TABLE `zt_dept` DROP `company`;
ALTER TABLE `zt_doc` DROP `company`;
ALTER TABLE `zt_docLib` DROP `company`;
ALTER TABLE `zt_extension` DROP `company`;
ALTER TABLE `zt_effort` DROP `company`;
ALTER TABLE `zt_file` DROP `company`;
ALTER TABLE `zt_group` DROP `company`;
ALTER TABLE `zt_history` DROP `company`;
ALTER TABLE `zt_module` DROP `company`;
ALTER TABLE `zt_product` DROP `company`;
ALTER TABLE `zt_productPlan` DROP `company`;
ALTER TABLE `zt_project` DROP `company`;
ALTER TABLE `zt_projectProduct` DROP `company`;
ALTER TABLE `zt_projectStory` DROP `company`;
ALTER TABLE `zt_release` DROP `company`;
ALTER TABLE `zt_story` DROP `company`;
ALTER TABLE `zt_storySpec` DROP `company`;
ALTER TABLE `zt_task` DROP `company`;
ALTER TABLE `zt_taskEstimate` DROP `company`;
ALTER TABLE `zt_team` DROP `company`;
ALTER TABLE `zt_testResult` DROP `company`;
ALTER TABLE `zt_testRun` DROP `company`;
ALTER TABLE `zt_testTask` DROP `company`;
ALTER TABLE `zt_todo` DROP `company`;
ALTER TABLE `zt_user` DROP `company`;
ALTER TABLE `zt_userContact` DROP `company`;
ALTER TABLE `zt_userGroup` DROP `company`;
ALTER TABLE `zt_userQuery` DROP `company`;
ALTER TABLE `zt_userTPL` DROP `company`;
ALTER TABLE `zt_webapp` DROP `company`;

View File

@@ -1,4 +0,0 @@
ALTER TABLE `zt_extension` ADD `depends` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `installedTime` ;
ALTER TABLE `zt_extension` CHANGE `zentaoVersion` `zentaoCompatible` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zt_company` DROP `pms`;
ALTER TABLE `zt_bug` ADD `plan` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `project`;

View File

@@ -1,11 +0,0 @@
CREATE TABLE IF NOT EXISTS `zt_lang` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`lang` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`section` varchar(30) NOT NULL,
`key` varchar(60) NOT NULL,
`value` text NOT NULL,
`system` enum('0','1') NOT NULL default '1',
PRIMARY KEY (`id`),
UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@@ -1 +0,0 @@
ALTER TABLE `zt_project` DROP `goal`;

View File

@@ -1,6 +0,0 @@
ALTER TABLE `zt_task` DROP `statusCustom`;
ALTER TABLE `zt_story` CHANGE `status` `status` enum('','changed','active','draft','closed') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `estimate`;
ALTER TABLE `zt_story` CHANGE `stage` `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `status`;
ALTER TABLE `zt_testTask` CHANGE `status` `status` enum('blocked','doing','wait','done') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `report`;
ALTER TABLE `zt_todo` CHANGE `status` `status` enum('wait','doing','done') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `desc`;
ALTER TABLE `zt_team` CHANGE `hours` `hours` float(2,1) unsigned NOT NULL DEFAULT '0' AFTER `days`;

View File

@@ -1,6 +0,0 @@
ALTER TABLE `zt_story` CHANGE `status` `status` enum('','changed','active','draft','closed') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `estimate`;
ALTER TABLE `zt_story` CHANGE `stage` `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `status`;
ALTER TABLE `zt_testtask` CHANGE `status` `status` enum('blocked','doing','wait','done') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `report`;
ALTER TABLE `zt_todo` CHANGE `status` `status` enum('wait','doing','done') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `desc`;
ALTER TABLE `zt_team` CHANGE `hours` `hours` float(2,1) unsigned NOT NULL DEFAULT '0' AFTER `days`;
ALTER TABLE `zt_bug` ADD `testtask` mediumint(8) unsigned NOT NULL AFTER `result`;

View File

@@ -1 +0,0 @@
ALTER TABLE `zt_task` CHANGE `status` `status` enum('wait','doing','done','pause','cancel','closed') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'wait' AFTER `deadline`;

View File

@@ -1,42 +0,0 @@
DROP TABLE IF EXISTS `zt_cron`;
CREATE TABLE `zt_cron` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`m` varchar(20) NOT NULL,
`h` varchar(20) NOT NULL,
`dom` varchar(20) NOT NULL,
`mon` varchar(20) NOT NULL,
`dow` varchar(20) NOT NULL,
`command` text NOT NULL,
`remark` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`buildin` tinyint(1) NOT NULL DEFAULT '0',
`status` varchar(20) NOT NULL,
`lastTime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
TRUNCATE `zt_cron`;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('30', '23', '*', '*', '*', 'moduleName=project&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('0', '1', '*', '*', '*', 'moduleName=report&methodName=remind', '每日任务提醒', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=svn&methodName=run', '同步SVN', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=git&methodName=run', '同步GIT', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('30', '0', '*', '*', '*', 'moduleName=backup&methodName=backup', '备份数据和附件', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('*/5', '*', '*', '*', '*', 'moduleName=mail&methodName=asyncSend', '异步发信', 'zentao', 1, 'normal', '0000-00-00 00:00:00');
DROP TABLE IF EXISTS `zt_mailqueue`;
CREATE TABLE `zt_mailqueue` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`toList` varchar(255) NOT NULL,
`ccList` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`body` text NOT NULL,
`addedBy` char(30) NOT NULL,
`addedDate` datetime NOT NULL,
`sendTime` datetime NOT NULL,
`status` varchar(10) NOT NULL DEFAULT 'wait',
`failReason` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@@ -1,3 +0,0 @@
ALTER TABLE `zt_product` ADD `order` mediumint unsigned NOT NULL AFTER `createdVersion`;
ALTER TABLE `zt_project` ADD `order` mediumint unsigned NOT NULL AFTER `whitelist`;
ALTER TABLE `zt_group` ADD `acl` text COLLATE 'utf8_general_ci' NOT NULL;

View File

@@ -1,2 +0,0 @@
UPDATE `zt_grouppriv` SET `method`='productSummary' WHERE `method`='productInfo' AND `module`='report';
UPDATE `zt_grouppriv` SET `method`='bugCreate' WHERE `method`='bugSummary' AND `module`='report';

View File

@@ -1,32 +0,0 @@
ALTER TABLE `zt_action` CHANGE `extra` `extra` text COLLATE 'utf8_general_ci' NOT NULL AFTER `comment`;
ALTER TABLE `zt_release` ADD `leftBugs` text COLLATE 'utf8_general_ci' NOT NULL AFTER `bugs`;
ALTER TABLE `zt_release` ADD `status` varchar(20) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'normal' AFTER `desc`;
ALTER TABLE `zt_product` ADD `type` varchar(30) COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'normal' AFTER `code`;
ALTER TABLE `zt_projectproduct` ADD `branch` mediumint(8) unsigned NOT NULL;
ALTER TABLE `zt_productplan` ADD `branch` mediumint(8) unsigned NOT NULL AFTER `product`;
ALTER TABLE `zt_build` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `product`;
ALTER TABLE `zt_release` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `product`;
ALTER TABLE `zt_bug` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `product`;
ALTER TABLE `zt_case` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `product`;
ALTER TABLE `zt_module` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `root`;
ALTER TABLE `zt_story` ADD `branch` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `product`;
CREATE TABLE IF NOT EXISTS `zt_branch` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_storystage` (
`story` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`stage` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_story` ADD INDEX `product` (`product`, `module`, `type`, `pri`), DROP INDEX `product`;
ALTER TABLE `zt_story` CHANGE `plan` `plan` text COLLATE 'utf8_general_ci' NOT NULL AFTER `module`;
UPDATE `zt_story` SET `plan`='' WHERE `plan`='0';
ALTER TABLE `zt_release` DROP INDEX `name`;
ALTER TABLE `zt_user` ADD `ranzhi` char(30) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `locked`;

View File

@@ -1,2 +0,0 @@
ALTER TABLE `zt_story` CHANGE `plan` `plan` text COLLATE 'utf8_general_ci' NOT NULL AFTER `module`;
UPDATE `zt_story` SET `plan`='' WHERE `plan`='0';

View File

@@ -1,26 +0,0 @@
ALTER TABLE `zt_action` ADD INDEX `action` (`objectID`, `product`, `project`, `action`, `date`);
ALTER TABLE `zt_branch` ADD INDEX `product` (`product`);
ALTER TABLE `zt_bug` ADD INDEX `bug` (`product`,`module`,`project`,`assignedTo`);
ALTER TABLE `zt_build` ADD INDEX `build` (`product`, `project`);
ALTER TABLE `zt_case` ADD INDEX `case` (`product`, `module`, `story`);
ALTER TABLE `zt_cron` ADD INDEX `lastTime` (`lastTime`);
ALTER TABLE `zt_dept` ADD INDEX `dept` (`parent`, `path`);
ALTER TABLE `zt_doc` ADD INDEX `doc` (`product`, `project`);
ALTER TABLE `zt_extension` ADD INDEX `extension` (`name`, `installedTime`), DROP INDEX `name`, DROP INDEX `addedTime`;
ALTER TABLE `zt_file` ADD INDEX `file` (`objectType`, `objectID`), DROP INDEX `objectType`, DROP INDEX `objectID`;
ALTER TABLE `zt_mailqueue` ADD INDEX `sendTime` (`sendTime`);
ALTER TABLE `zt_module` ADD INDEX `module` (`root`, `type`, `path`), DROP INDEX `root`, DROP INDEX `type`;
ALTER TABLE `zt_product` ADD INDEX `order` (`order`);
ALTER TABLE `zt_productplan` ADD INDEX `plan` (`product`, `end`);
ALTER TABLE `zt_project` ADD INDEX `project` (`parent`, `begin`, `end`, `status`, `order`), DROP INDEX `project`;
ALTER TABLE `zt_release` ADD INDEX `build` (`build`);
ALTER TABLE `zt_story` ADD INDEX `story` (`product`, `module`, `status`, `assignedTo`), DROP INDEX `status`, DROP INDEX `product`;
ALTER TABLE `zt_storystage` ADD INDEX `story` (`story`);
ALTER TABLE `zt_task` ADD INDEX `task` (`project`, `module`, `story`, `assignedTo`), DROP INDEX `project`, DROP INDEX `type`, DROP INDEX `status`;
ALTER TABLE `zt_testresult` ADD INDEX `testresult` (`case`, `version`, `run`), DROP INDEX `run`, DROP INDEX `case`;
ALTER TABLE `zt_testtask` ADD INDEX `build` (`build`);
ALTER TABLE `zt_todo` ADD INDEX `todo` (`account`, `date`), DROP INDEX `user`;
ALTER TABLE `zt_user` ADD INDEX `user` (`dept`, `email`, `commiter`), DROP INDEX `dept`;
ALTER TABLE `zt_usercontact` ADD INDEX `account` (`account`);
ALTER TABLE `zt_userquery` ADD INDEX `query` (`account`, `module`), DROP INDEX `account`, DROP INDEX `module`;
ALTER TABLE `zt_testtask` ADD `mailto` varchar(255) COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `end`;

View File

@@ -1,21 +0,0 @@
ALTER TABLE `zt_module` ADD `short` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `owner`;
ALTER TABLE `zt_usertpl` ADD `public` enum('0','1') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0';
CREATE TABLE `zt_block` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`module` varchar(20) NOT NULL,
`title` varchar(100) NOT NULL,
`source` varchar(20) NOT NULL,
`block` varchar(20) NOT NULL,
`params` text NOT NULL,
`order` tinyint(3) unsigned NOT NULL DEFAULT '0',
`grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `accountModuleOrder` (`account`,`module`,`order`),
KEY `block` (`account`,`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_task` ADD `color` char(7) COLLATE 'utf8_general_ci' NOT NULL AFTER `status`;
ALTER TABLE `zt_story` ADD `color` char(7) COLLATE 'utf8_general_ci' NOT NULL AFTER `status`;
ALTER TABLE `zt_bug` ADD `color` char(7) COLLATE 'utf8_general_ci' NOT NULL AFTER `status`;
ALTER TABLE `zt_case` ADD `color` char(7) COLLATE 'utf8_general_ci' NOT NULL AFTER `status`;

View File

@@ -1,28 +0,0 @@
ALTER TABLE `zt_extension` DROP INDEX `name`;
ALTER TABLE `zt_extension` DROP INDEX `addedTime`;
ALTER TABLE `zt_extension` ADD INDEX `extension` (`name`, `installedTime`);
ALTER TABLE `zt_file` DROP INDEX `objectType`;
ALTER TABLE `zt_file` DROP INDEX `objectID`;
ALTER TABLE `zt_file` ADD INDEX `file` (`objectType`, `objectID`);
ALTER TABLE `zt_module` DROP INDEX `root`;
ALTER TABLE `zt_module` DROP INDEX `type`;
ALTER TABLE `zt_module` ADD INDEX `module` (`root`, `type`, `path`);
ALTER TABLE `zt_project` DROP INDEX `project`;
ALTER TABLE `zt_project` ADD INDEX `project` (`parent`, `begin`, `end`, `status`, `order`);
ALTER TABLE `zt_story` DROP INDEX `status`;
ALTER TABLE `zt_story` DROP INDEX `product`;
ALTER TABLE `zt_story` ADD INDEX `story` (`product`, `module`, `status`, `assignedTo`);
ALTER TABLE `zt_task` DROP INDEX `project`;;
ALTER TABLE `zt_task` DROP INDEX `type`;
ALTER TABLE `zt_task` DROP INDEX `status`;
ALTER TABLE `zt_task` ADD INDEX `task` (`project`, `module`, `story`, `assignedTo`);
ALTER TABLE `zt_testresult` DROP INDEX `run`;
ALTER TABLE `zt_testresult` DROP INDEX `case`;
ALTER TABLE `zt_testresult` ADD INDEX `testresult` (`case`, `version`, `run`);
ALTER TABLE `zt_todo` DROP INDEX `user`;
ALTER TABLE `zt_todo` ADD INDEX `todo` (`account`, `date`);
ALTER TABLE `zt_user` DROP INDEX `dept`;
ALTER TABLE `zt_user` ADD INDEX `user` (`dept`, `email`, `commiter`);
ALTER TABLE `zt_userquery` DROP INDEX `account`;
ALTER TABLE `zt_userquery` DROP INDEX `module`;
ALTER TABLE `zt_userquery` ADD INDEX `query` (`account`, `module`);

View File

@@ -1,16 +0,0 @@
RENAME TABLE `zt_casestep` TO `zt_caseStep`;
RENAME TABLE `zt_doclib` TO `zt_docLib`;
RENAME TABLE `zt_grouppriv` TO `zt_groupPriv`;
RENAME TABLE `zt_productplan` TO `zt_productPlan`;
RENAME TABLE `zt_projectproduct` TO `zt_projectProduct`;
RENAME TABLE `zt_projectstory` TO `zt_projectStory`;
RENAME TABLE `zt_relationoftasks` TO `zt_relationOfTasks`;
RENAME TABLE `zt_storyspec` TO `zt_storySpec`;
RENAME TABLE `zt_taskestimate` TO `zt_taskEstimate`;
RENAME TABLE `zt_testresult` TO `zt_testResult`;
RENAME TABLE `zt_testrun` TO `zt_testRun`;
RENAME TABLE `zt_testtask` TO `zt_testTask`;
RENAME TABLE `zt_usercontact` TO `zt_userContact`;
RENAME TABLE `zt_usergroup` TO `zt_userGroup`;
RENAME TABLE `zt_userquery` TO `zt_userQuery`;
RENAME TABLE `zt_usertpl` TO `zt_userTPL`;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
[InternetShortcut]
URL=http://www.zentao.net/help-read-79236.html
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

View File

@@ -1,5 +0,0 @@
[InternetShortcut]
URL=http://www.zentao.net/help-read-79236.html
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

View File

@@ -1,36 +1,45 @@
1. system required
zentao needs apache, php(>5.2) and mysql.
2. install the allinone package on windows
We have build an allinone package for windows systems. This package comes from the xampp project which is a great AMP tool.
2.1 download our .exe package.
2.2 double click the .exe and extract it into c:\xampp or d:\xampp, keep it under the root directory.
2.3 start zentao
cd c:\xampp, there'is control panel tools. double click it, it will stay on the tray menu at the bottom of the window.
click the zentao icon, then the menu will show, you can choose the "start zentao", waiting for a moment.
Then you can visit zentao through http://localhost/zentao/
3. install the allinone package on linux
We also build an allinone package for linux systems from the xampp tool.
3.1 download our .7z package, and save it to /opt/
3.2 cd /opt/ and chmod a+rx *.7z and then execute the 7z file, which will self extrct.
3.3 after extract, the directory should be /opt/lampp
3.4 cd /opt/lampp, and execute sudo ./start or sudo ./start88 to start apache in 88 port and mysql in 3308 port.
3.5 then you can visit zentao through http://localhost/zentao/
4. install the source code.
4.1 install one AMP package. you can install other AMP package. Make sure the version of apache, php and mysql meets the needs of zetnao.
4.2 download our zip package.
4.3 unpack it.
after download our zip package, save it to the apache's htdocs path and unpack it to zentaopms. make sure the zentaopms path can be
visited through browse.
4.4 start the installation
open your browser and visit the zentaopms path, for example http://192.168.1.1/zentaopms/, then the install wizard will launch, you can install it
step by step.
1. system required
zentao needs apache, php(>5.2) and mysql.
2. how to install on windows
2.1 use uniserver package on windows.
uniserver is a very good AMP package. please see http://www.uniformserver.com/
We have bind zentao to uniserver, so you can only download our .exe package, unpack it, then you can use zentao now.
2.1.1 download our .exe package.
2.1.2 unpack it.
after download the package, save it to a path(no space), for example c:\
then double click the exe file, it will be extracted to c:\zentao
2.1.3 start zentao
cd c:\zentao, there'is a start.exe. double click it, it will stay on the tray menu at the bottom of the window.
click on the blue one icon, then the menu will show, you can choose the "start apache and mysql", waiting for a moment.
Then you can visit zentao through http://localhost/zentao/
2.1.4 the admin account and password.
the default admin account is 'admin' and password is '123456'. the root password of mysql is 'root';
2.2 install from the sourcecode on windows, linux or freebsd.
2.2.1 install one AMP package.
you can install other AMP package. Make sure the version of apache, php and mysql meets the needs of zetnao.
2.2.2 download our zip package.
2.2.3 unpack it.
after download our zip package, save it to the apache's htdocs path and unpack it to zentaopms. make sure the zentaopms path can be
visited through browse.
2.2.4 start the installation
open your browser and visit the zentaopms path, for example http://192.168.1.1/zentaopms/, then the install wizard will launch, you can install it
step by step.

View File

@@ -1,205 +0,0 @@
Z PUBLIC LICENSE 1.2
许可
Z PUBLIC LICENSE 由青岛易软天创网络科技有限公司www.cnezsoft.com起草简称ZPL协议。
任何人均可使用该协议来发布开源软件,并可对下面协议正文中以下划线标注的空白部分做相应修改,
除此之外的任何内容不得做任何修改。青岛易软天创网络科技有限公司拥有对该协议条款的最终解释权。
前言:
禅道项目管理软件(以下简称该软件)由 青岛易软天创网络科技有限公司www.cnezsoft.com开发以下简称我。我依法拥有该软件的所有版权。
本着共享开放的角度,我以开放源代码的形式发布该软件。您可以在遵守该协议的前提下使用该软件。
自您安装该软件开始,您和我之间的合同关系自动成立。除非您停止使用该软件或与我有签署额外合同,
您须认真遵循该授权协议约定的每一条款。
我的联系方式:
联系人:徐先生
电话: 4006-8899-23
Email co@cnezsoft.com
QQ 1492153927
地址: 青岛开发区井冈山路东方银座 C座 1106
约定:
下述条款中所指该软件的标志包括如下方面:
该软件源代码及文档中关于该软件的版权提示、文字、图片和链接。
该软件运行时界面上呈现出来的有关该软件的文字、图片和链接。
不包括如下方面:
该软件提供的演示数据中关于该软件的文字、图片和链接。
一、免责
该软件是以开放源代码的方式发行,您使用该软件无需任何费用,因此在使用该软件前,您须知晓:
1.1 我没有对该软件提供任何技术支持的义务,您可联系我购买商业的技术支持。
1.2 我对因使用该软件而产生直接或间接的任何问题不负任何责任。
1.3 开源不等于免费,开源不等于无版权,开源软件的发展需要您我共同的努力。
二、自用该软件
2.1 您个人或您就职的公司(组织)可自由使用该软件,我不对您或您就职公司(组织)的性质做任何限制。
2.2 您可以在您个人或您就职公司(组织)任意数量的电脑上运行该软件,我不对电脑的数量做任何限制。
2.3 您可以对该软件源代码进行修改以适应您个人或您所在公司(组织)使用的要求,您做的改动无需对外发布。
2.4 您个人或您就职公司(组织)使用该软件时,必须保留该软件的所有标志,不得以任何方式隐藏或遮掩任一标志。
三、为用户定制
3.1 您可以使用该软件为您的用户部署各种形式的应用,我不对应用的性质做任何限制。
3.2 您可以使用该软件为您的用户部署任意数量的应用,我不对应用的数量做任何限制。
3.3 您可以对该软件源代码进行修改以适应您的用户的要求,您做的改动无需对外发布。
3.4 您对该软件源代码所做的修改可以源代码或二进制的方式提供给您的用户。
3.5 您使用该软件为您的任一用户部署的任一应用都必须保留该软件所有的标志。
3.6 您使用该软件为您的任一用户部署的任一应用都不得以任何方式隐藏或遮掩该软件任一标志。
四、提供在线服务
4.1 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务及该服务用户的性质做任何限制。
4.2 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务的用户数量做任何限制。
4.3 您可以对该软件源代码进行修改以适应在线服务的要求,您做的改动无需对外发布。
4.4 您使用该软件搭建在线服务时,必须以明确的方式告知您的用户该服务是基于该软件搭建的。
4.5 您使用该软件搭建在线服务为您的任一用户部署的任一应用必须保留该软件所有的标志。
4.6 您使用该软件搭建在线服务为您的任一用户部署的任一应用不得以任何方式隐藏或遮掩该软件任一标志。
4.7 您使用该软件搭建在线服务时,不得为您的用户提供去除、隐藏或遮掩该软件任一标志的功能。
五、无改动发布或集成该软件
5.1 我欢迎并感谢您将该软件发布在您的个人网站、企业官网或者其他的第三方网站。
5.2 我欢迎并感谢您将该软件集成在其他系统中一起发布,比如云服务镜像、操作系统发行版等。
5.3 您在发布或者集成该软件的时候,不得对该软件源码做任何改动。
5.4 您在发布或者集成该软件的时候,须保留该软件的所有标志。
六、发布基于该软件的衍生作品
6.1 我欢迎并感谢您为该软件开发衍生作品。
6.2 您开发的衍生作品中涉及到对该软件源代码改动的地方,须遵循如下条款:
6.2.1 如修改了该软件的源代码,须依据本协议发布修改后的源代码。
6.2.2 如修改了该软件的源代码,须保留代码里面该软件原有的所有标志。
6.2.3 您可以在代码中追加您自己的标志。
6.2.4 您可以对您开发的衍生作品进行收费。
6.2.5 第三方的用户可在遵循6.2所有条款下可继续在您开发的衍生作品基础上进行修改并发布。
6.3 您开发的衍生作品中独立于本软件开发的代码,可以源代码或二进制的方式进行发布,可免费或收费发布。
6.4 您开发的衍生作品不得以任何方式去除、隐藏或遮掩该软件的任一标志。
七、发布基于该软件API的应用
7.1 我欢迎并感谢您为该软件开发基于API的各种应用比如客户端软件等。
7.2 您基于该软件API机制开发的应用可以源代码或者二进制的方式进行发布我对此没有任何限制。
7.3 您基于该软件API机制开发的应用授权协议可以自行约定我对此没有任何限制。
7.4 您基于该软件API机制开发的应用可以免费或者收费发布我对此没有任何限制。
八、授权例外
如果上述条款无法满足您使用该软件的要求,可联系我签署额外的合同以获得更灵活的授权许可。
九、合同约束
9.1 如果您违反了该协议的任一条款,该授权协议将自动终止,我保留通过法律手段追究责任的权利。
Z PUBLIC LICENSE 1.2
Authorization
Z PUBLIC LICENSE, also known as ZPL Agreement, is drafted by QingDao Nature Easy Soft Network Technology Co,LTD. (,www.cnezsoft.com).
Anyone can use the agreement to publish open source software, and modify the blank underlined part of the following text of the agreement accordingly.
No other text of the agreement shall be changed. QingDao Nature Easy Soft Network Technology Co,LTD has the final authority to interpret the terms of the agreement.
Preface
ZenTaoPMS (Hereinafter referred to as "the software") developed by Nature EasySoft Network Tecnology Co.ltd, QingDao, China (www.cnezsoft.com) (hereinafter referred to I). I'm entitled to all copyright of the software.
The software is released as open source software. You are authorized to use the software as long as you are in compliance with this agreement.
By installation of the software, you agree that a contractual relationship between you and me is automatically established.
You are obliged to fully comply with all the terms of this agreement unless you choose to stop using the software or you have signed additional contracts with me.
My Contact:
Contact: Mr. Xu
Phone: 4006-8899-23
Email: co@cnezsoft.com
QQ: 1492153927
Address: Qingdao Development Zone, the Oriental Kenzo C 1106
We agree:
Indications of the software include:
Notes, texts, pictures and links showing copyright attribution of the software in the source code and related documentation.
and texts, picture and links on the interface of the software when running.
Excluding
texts, picture and links on the interface of the demo versions of the software.
1. Disclaimer
The software is an open-source software, so you are authorized to use the software without paying a fee. Before you start to use it, please note:
1.1 I do not have any obligation to provide technical support for the software. You can contact me to purchase technical support service.
1.2 I'm not responsible for any liability caused by your using the software directly or indirectly.
1.3 Open source software does not mean it's free of charge, neither does it mean the software does not enjoy copyright.
2. For personal use
2.1 You or your company/organization are authorized to use the software for your internal use for both commercial and non-commercial purposes..
2.2 You or your company/organization are authorized to run the software on any number of computers.
2.3 You or your company/organization are authorized to modify the source code of the software to meet your requirements. You do not need to release the modified codes.
2.4 You or your company/organization must keep all the indications of the software when using it. None of the indications can be removed, hidden or obscured in any way.
3. For customized software
3.1 You are authorized to use the software to deploy various forms of application for your users in any way you like.
3.2 You are authorized to use the software to deploy any number of applications for your users.
3.3 You are authorized to modify the source code to meet your user's requirements without releasing the modified codes.
3.4 You are authorized to provide the modified codes to your users in either source code form or binary.
3.5 You must keep all the indications of the software when providing applications to your users.
3.6 None of the indications of the software may be removed, hidden or obscured in any way when you provide applications to your users.
4. Online service
4.1 You are authorized to use the software to build your online service for your users in any way you like.
4.2 You are authorized to use the software to build your online service for any number of your users.
4.3 You are authorized to modify the source codes of the software to meet your user's requirements on online service without releasing the modified codes.
4.4 You must notify your users clearly that your service is based on the software when you use it to build your online service.
4.5 You must keep all the indications of the software when providing online service to your users.
4.6 You must keep all the indications of the software in any application you make for your users. None of the indications can be hidden or obscured in any way.
4.7 You are forbidden from assisting your users by providing tools for your users to remove, hide or obscure any indication of the software when you use the software to build your online service.
5. Publish or integrate the software without modification
5.1 You are authorized to publish the software on your personal sites, corporate official website or other third-party sites.
5.2 You are authorized to integrate the software with other systems, such as cloud virtual machine images, operating system images and so on.
5.3 Do not modify the source code of the software when you publish or integrate it.
5.4 All indications of the software must be kept the same when you publish or integrate the software.
6. Publish derived work based on the software
6.1 You are authorized to develop derived work based on the software.
6.2 The modified codes of the software in your derived work must follow the following terms:
6.2.1 The source codes must be released if you make any modification to the software.
6.2.2 All indications of the software must be kept the same.
6.2.3 You are entitled to add your indications to the modified codes.
6.2.4 You are entitled to charge fees for the derived work you developed based on the software.
6.2.5 You agree to authorize third party users to modify and release the derived work in compliance with 6.2.
6.3 If the codes of the work are independently developed by yourself, You are authorized to release the work in either source code form or binary. You are entitled to charge your users or make it free.
6.4 None of the indications of the software can be removed, hidden or obscured in any way in the derived work you developed.
7. Publish applications based on API of the software
7.1 You are authorized to develop your applications based on the API of the software, for example, client software.
7.2 You are authorized to publish applications you developed based on the API in either source code form or binary.
7.3 You are authorized to use your own license to release applications you developed based on the API.
7.4 You are entitled to release applications you developed based on the API either free or with a charge.
8. Exceptions
If the terms above do not meet your requirements when using the software, please contact me for a more flexible license.
9. Termination
9.1 Violation of any of the terms of the agreement will result in immediate termination of this license. I reserve all rights to take legal actions in case of dispute.

View File

@@ -1,14 +1,14 @@
ZenTaoPMS is a scrum management system which is licensed under LGPLV3.
zentaopms is a scrum management system which is licensed under LGPLV3.
The key feature of ZenTaoPMS:
The key feature of zentaopms:
1. Product management(product backlog)
1. product management(product backlog)
story management
plan management
release management
2. Project management(sprint backlog)
2. project management(sprint backlog)
task management
team management
@@ -21,9 +21,9 @@ The key feature of ZenTaoPMS:
test case management
test task management
4. Document management
5. User management
6. Todo feature
4. document management
5. user management
6. todo feature
The English version site of ZenTaoPMS is http://www.zentao.net/en/
The English demo site of ZenTaoPMS is http://demo.zentao.net/
the english version site of zentaopms is http://en.zentao.net
the english demo site of zentaopms is http://endemo.zentao.net.

View File

@@ -1,22 +1,26 @@
禅道项目管理软件在开发过程中,得到了众多朋友的支持,在此表示感谢。
下面是不完全名单如有遗漏烦请告知chunsheng#cnezsoft.com
感谢各位购买禅道产品或者服务的客户,有您的支持,禅道会越走越坚定,越来越踏实;
感谢之前所有参与或帮助过BugFree1.x的朋友们有你们陪着一路走来才有了禅道今天的发展尤其感谢原来的版主 Mr.lee希望有机会再合作
感谢BugFree2.x项目的团队,和你们的分歧,最终促使我来做一款真正的项目管理软件,而非仅仅微软的复制品
感谢原阿里巴巴的同事梅坚先生是你将scrum介绍到了中国雅虎正是那时我开始了解学习scrum
感谢原阿里巴巴的同事史峰先生,感谢你在禅道项目设计初期提出的很多建议
感谢我的好朋友李玉鹏,感谢我们之间心有灵犀的讨论,确定了禅道很多的设计方案
感谢原阿里巴巴的其他同事们,禅道很多想法正是和你们工作时碰撞产生的火花
感谢普加网青岛普加智能信息有限公司www.pujia.com在禅道前期开发过程中给予的大力支持;
感谢whjmyu, sophia, 21bird, 云飞扬对禅道项目的贡献,谢谢你们的辛勤付出;
感谢各位贡献QQ群的群主们有了你们的QQ群我们才有更好的沟通交流的地方
感谢众多网友积极给予的建议和反馈,有你们的参与,禅道会越来越好;
感谢ELING(QQ:467303906)设计了精美的Logo感谢蓝虎魄(QQ:649009995)设计了禅道1.0正式版的界面感谢catouse设计的最新版本的界面
感谢公司成立以来曾一起共事过的朋友,虽然我们不再是同事,但感谢你们在禅道最困难的时候对禅道的付出
感谢我们现在一起共事的同事,感谢您的不离不弃,一起坚守,相信我们一起努力,会赢得一片属于自己的自由璀璨的天空;
王春生 青岛易软天创网络科技有限公司
2012-10-8
鸣谢
禅道项目管理软件在开发过程中,得到了众多朋友的支持,在此表示感谢。
下面是不完全名单如有遗漏烦请告知chunsheng@cnezsoft.com
感谢之前所有参与或帮助过BugFree1.x的朋友们,有你们陪着一路走来,才有了禅道今天的发展,尤其感谢原来的版主 Mr.lee希望有机会再合作
感谢BugFree2.x项目的团队和你们的分歧最终促使我来做一款真正的项目管理软件而非仅仅微软的复制品
感谢原阿里巴巴的同事梅坚先生,是你将scrum介绍到了中国雅虎正是那时我开始了解学习scrum
感谢原阿里巴巴的同事史峰先生,感谢你在禅道项目设计初期提出的很多建议
感谢我的好朋友李玉鹏,感谢我们之间心有灵犀的讨论,确定了禅道很多的设计方案
感谢原阿里巴巴的其他同事们,禅道的很多想法正是和你们工作时碰撞产生的火花;
感谢普加网青岛普加智能信息有限公司www.pujia.com在禅道前期开发过程中给予的大力支持;
感谢whjmyu, sophia, 21bird, 云飞扬对禅道项目的贡献,谢谢你们的辛勤付出;
感谢sunlei热心的回答网友的问题再次感谢;
感谢众多网友积极给予的建议和反馈,有你们的参与,禅道会越来越好
感谢ELING(QQ:467303906)设计了精美的Logo感谢蓝虎魄(QQ:649009995)设计了禅道1.0正式版的界面
感谢我的家人对我的理解和支持!
感谢fujialudi感谢你们大半年来对禅道付出的心血和汗水!
代表禅道所有的用户感谢大頭,感谢创意可米(厦门)网络科技有限公司对禅道的战略投资! www.comemind.com
恰是面朝大海春暖花开的日子禅道2011年的征程已经开始了加油!
王春生 青岛易软天创网络科技有限公司
2011-3-13 于青岛开发区

View File

@@ -1,14 +1,8 @@
禅道项目管理软件使用了很多第三方的开源类库,在此向“巨人们 ”表示敬意!
禅道项目管理软件使用到的第三方类库列表
CSS框架 YUI 3 beta 中的 CSS套件包括basic.css, reset.css, font.css和grid.css。官方网站http://developer.yahoo.com/yui/3/
JS框架 JQUERY 1.3版本。官方网站http://www.jquery.com
JQUER插件alert chosen colorize flot jquerytools sparkline treetable validation autocomplete colorbox datepicker reverseorder tablesorter treeview
编辑器kindeditor
MAIL类 phpmailer 5.1,官方网站: http://phpmailer.sourceforge.net
HTTP类 snoopy 官方网站http://snoopy.sourceforge.net/
CSS框架 YUI 3 beta 中的 CSS套件包括basic.css, reset.css, font.css和grid.css。官方网站http://developer.yahoo.com/yui/3/
JS框架 JQUERY 1.3版本。官方网站http://www.jquery.com
JQUER插件autocomplete colorbox colorize incsearch tablesorter treeview table2csv datepicker alert reverseorder treetable
MAIL类 phpmailer 5.1,官方网站: http://phpmailer.sourceforge.net
HTTP类 snoopy 官方网站http://snoopy.sourceforge.net/
报表框架 fushioncharts free 官方网站http://www.fusioncharts.com/free/
zip压缩pclzip
yaml类spyc

View File

@@ -1 +1,9 @@
Please see http://pms.zentao.net/product/
多语言(英语,中文繁体,日语,韩语,德语,法语)
文档管理功能
源代码集成
讨论管理
反馈管理
任务功能细化
首页细化
更多列表,请访问 http://pms.ZenTaoPMS.com/product.html

View File

@@ -1 +1 @@
升级,请参考 http://www.zentao.net/book/zentaopmshelp/41.html
升级,请参考 http://www.zentao.net/article-view-78960.html

View File

@@ -1,5 +0,0 @@
[InternetShortcut]
URL=http://www.zentao.net/video-browse.html
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

View File

@@ -1,829 +0,0 @@
<?php
/**
* ZenTaoPHP的baseControl类。
* The baseControl class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*/
/**
* baseControl基类.
* The base class of control.
*
* @package framework
*/
class baseControl
{
/**
* 全局对象 $app。
* The global $app object.
*
* @var object
* @access public
*/
public $app;
/**
* 应用名称 $appName
* The global $appName.
*
* @var string
* @access public
*/
public $appName;
/**
* 全局对象 $config。
* The global $config object.
*
* @var object
* @access public
*/
public $config;
/**
* 全局对象 $lang。
* The global $lang object.
*
* @var object
* @access public
*/
public $lang;
/**
* 全局对象 $dbh数据库连接句柄。
* The global $dbh object, the database connection handler.
*
* @var object
* @access public
*/
public $dbh;
/**
* $dao对象实现sql的拼装和执行。
* The $dao object, used to join sql and excute sql.
*
* @var object
* @access public
*/
public $dao;
/**
* $post对象用户可以通过$this->post->key来引用$_POST变量。
* The $post object, useer can access a post var by $this->post->key.
*
* @var ojbect
* @access public
*/
public $post;
/**
* $get对象用户可以通过$this->get->key来引用$_GET变量。
* The $get object, useer can access a get var by $this->get->key.
*
* @var ojbect
* @access public
*/
public $get;
/**
* $session对象用户可以通过$this->session->key来引用$_SESSION变量。
* The $session object, useer can access a session var by $this->session->key.
*
* @var ojbect
* @access public
*/
public $session;
/**
* $server对象用户可以通过$this->server->key来引用$_SERVER变量。
* The $server object, useer can access a server var by $this->server->key.
*
* @var ojbect
* @access public
*/
public $server;
/**
* $cookie对象用户可以通过$this->cookie->key来引用$_COOKIE变量。
* The $cookie object, useer can access a cookie var by $this->cookie->key.
*
* @var ojbect
* @access public
*/
public $cookie;
/**
* 当前模块的名称。
* The name of current module.
*
* @var string
* @access public
*/
public $moduleName;
/**
* $view用于存放从control传到view视图的数据。
* The vars assigned to the view page.
*
* @var object
* @access public
*/
public $view;
/**
* 视图的类型比如html, json。
* The type of the view, such html, json.
*
* @var string
* @access public
*/
public $viewType;
/**
* 输出到浏览器的内容。
* The content to display.
*
* @var string
* @access public
*/
public $output;
/**
* 客户端设备。
* The client device.
*
* @var string
* @access public
*/
public $clientDevice;
/**
* 不同设备下视图文件的前缀。
* The prefix of view file for mobile or PC.
*
* @var string
* @access public
*/
public $devicePrefix;
/**
* 构造方法。
*
* 1. 将全局变量设为baseControl类的成员变量方便baseControl的派生类调用
* 2. 设置当前模块读取该模块的model类
* 3. 初始化$view视图类。
*
* The construct function.
*
* 1. global the global vars, refer them by the class member such as $this->app.
* 2. set the pathes of current module, and load it's model class.
* 3. auto assign the $lang and $config to the view.
*
* @param string $moduleName
* @param string $methodName
* @param string $appName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '', $appName = '')
{
/*
* 将全局变量设为baseControl类的成员变量方便baseControl的派生类调用。
* Global the globals, and refer them as a class member.
*/
global $app, $config, $lang, $dbh, $common;
$this->app = $app;
$this->config = $config;
$this->lang = $lang;
$this->dbh = $dbh;
$this->viewType = $this->app->getViewType();
$this->appName = $appName ? $appName : $this->app->getAppName();
/**
* 设置当前模块读取该模块的model类。
* Load the model file auto.
*/
$this->setModuleName($moduleName);
$this->setMethodName($methodName);
$this->loadModel($this->moduleName, $appName);
/**
* 如果客户端是手机的话视图文件增加m.前缀。
* If the clent is mobile, add m. as prefix for view file.
*/
$this->setClientDevice();
$this->setDevicePrefix();
/**
* 初始化$view视图类。
* Init the view vars.
*/
$this->view = new stdclass();
$this->view->app = $app;
$this->view->lang = $lang;
$this->view->config = $config;
$this->view->common = $common;
$this->view->title = '';
/**
* 设置超级变量,从$app引用过来。
* Set super vars.
*/
$this->setSuperVars();
}
//-------------------- Model相关方法(Model related methods) --------------------//
/*
* 设置模块名。
* Set the module name.
*
* @param string $moduleName 模块名,如果为空,则从$app中获取. The module name, if empty, get it from $app.
* @access public
* @return void
*/
public function setModuleName($moduleName = '')
{
$this->moduleName = $moduleName ? strtolower($moduleName) : $this->app->getModuleName();
}
/**
* set the method name.
* 设置方法名。
*
* @param string $methodName 方法名,如果为空,则从$app中获取。The method name, if empty, get it from $app.
* @access public
* @return void
*/
public function setMethodName($methodName = '')
{
$this->methodName = $methodName ? strtolower($methodName) : $this->app->getMethodName();
}
/**
* 加载指定模块的model文件。
* Load the model file of one module.
*
* @param string $moduleName 模块名如果为空使用当前模块。The module name, if empty, use current module's name.
* @param string $appName The app name, if empty, use current app's name.
* @access public
* @return object|bool 如果没有model文件返回false否则返回model对象。If no model file, return false, else return the model object.
*/
public function loadModel($moduleName = '', $appName = '')
{
if(empty($moduleName)) $moduleName = $this->moduleName;
if(empty($appName)) $appName = $this->appName;
$modelFile = helper::setModelFile($moduleName, $appName);
/**
* 如果没有model文件尝试加载config配置信息。
* If no model file, try load config.
*/
if(!helper::import($modelFile))
{
$this->app->loadConfig($moduleName, $appName, false);
$this->app->loadLang($moduleName, $appName);
$this->dao = new dao();
return false;
}
/**
* 如果没有扩展文件model类名是$moduleName + 'model'如果有扩展还需要增加ext前缀。
* If no extension file, model class name is $moduleName + 'model', else with 'ext' as the prefix.
*/
$modelClass = class_exists('ext' . $appName . $moduleName. 'model') ? 'ext' . $appName . $moduleName . 'model' : $appName . $moduleName . 'model';
if(!class_exists($modelClass))
{
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
}
/**
* 初始化model对象在control对象中可以通过$this->$moduleName来引用。同时将dao对象赋为control对象的成员变量方便引用。
* Init the model object thus you can try $this->$moduleName to access it. Also assign the $dao object as a member of control object.
*/
$this->$moduleName = new $modelClass($appName);
$this->dao = $this->$moduleName->dao;
return $this->$moduleName;
}
/**
* 设置超级全局变量,方便直接引用。
* Set the super vars.
*
* @access public
* @return void
*/
public function setSuperVars()
{
$this->post = $this->app->post;
$this->get = $this->app->get;
$this->server = $this->app->server;
$this->session = $this->app->session;
$this->cookie = $this->app->cookie;
$this->global = $this->app->global;
}
/**
* 设置客户端的设备类型。
* Set client device.
*
* @access public
* @return void
*/
public function setClientDevice()
{
$this->clientDevice = $this->app->clientDevice;
}
/**
* 如果客户端是手机的话视图文件增加m.前缀。
* If the clent is mobile, add m. as prefix for view file.
*
* @access public
* @return void
*/
public function setDevicePrefix()
{
$this->devicePrefix = zget($this->config->devicePrefix, $this->viewType, '');
}
//-------------------- 视图相关方法(View related methods) --------------------//
/**
* 设置视图文件:主视图文件,扩展视图文件, 站点扩展视图文件,以及钩子脚本。
* Set view files: the main file, extension view file, site extension view file and hook files.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access public
* @return string the view file
*/
public function setViewFile($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
$viewExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'view');
$viewType = $this->viewType == 'mhtml' ? 'html' : $this->viewType;
$mainViewFile = $modulePath . 'view' . DS . $this->devicePrefix . $methodName . '.' . $viewType . '.php';
$commonExtViewFile = $viewExtPath['common'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$siteExtViewFile = empty($viewExtPath['site']) ? '' : $viewExtPath['site'] . $this->devicePrefix . $methodName . ".{$viewType}.php";
$viewFile = file_exists($commonExtViewFile) ? $commonExtViewFile : $mainViewFile;
$viewFile = (!empty($siteExtViewFile) and file_exists($siteExtViewFile)) ? $siteExtViewFile : $viewFile;
if(!is_file($viewFile)) $this->app->triggerError("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
$commonExtHookFiles = glob($viewExtPath['common'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
$siteExtHookFiles = empty($viewExtPath['site']) ? '' : glob($viewExtPath['site'] . $this->devicePrefix . $methodName . ".*.{$viewType}.hook.php");
$extHookFiles = array_merge((array) $commonExtHookFiles, (array) $siteExtHookFiles);
if(!empty($extHookFiles)) return array('viewFile' => $viewFile, 'hookFiles' => $extHookFiles);
return $viewFile;
}
/**
* 获取某一个视图文件的扩展。
* Get the extension file of an view.
*
* @param string $viewFile
* @access public
* @return string|bool If extension view file exists, return the path. Else return fasle.
*/
public function getExtViewFile($viewFile)
{
/**
* 首先找sitecode下的扩展文件如果没有再找ext下的扩展文件。
* Find extViewFile in ext/_$siteCode/view first, then try ext/view/.
*/
if($this->config->site->code)
{
$extPath = dirname(dirname(realpath($viewFile))) . "/ext/_{$this->config->site->code}/view";
$extViewFile = $extPath . basename($viewFile);
if(file_exists($extViewFile))
{
helper::cd($extPath);
return $extViewFile;
}
}
$extPath = dirname(dirname(realpath($viewFile))) . '/ext/view/';
$extViewFile = $extPath . basename($viewFile);
if(file_exists($extViewFile))
{
helper::cd($extPath);
return $extViewFile;
}
return false;
}
/**
* 获取适用于当前方法的css该模块公用的css + 当前方法的css + 扩展的css。
* Get css codes applied to current method: module common css + method css + extension css.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return string
*/
public function getCSS($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
$cssExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'css') ;
$cssMethodExt = $cssExtPath['common'] . $methodName . DS;
$cssCommonExt = $cssExtPath['common'] . 'common' . DS;
$css = '';
$mainCssFile = $modulePath . 'css' . DS . $this->devicePrefix . 'common.css';
$methodCssFile = $modulePath . 'css' . DS . $this->devicePrefix . $methodName . '.css';
if(file_exists($mainCssFile)) $css .= file_get_contents($mainCssFile);
if(is_file($methodCssFile)) $css .= file_get_contents($methodCssFile);
$cssExtFiles = glob($cssCommonExt . $this->devicePrefix . '*.css');
if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile);
$cssExtFiles = glob($cssMethodExt . $this->devicePrefix . '*.css');
if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile);
if(!empty($cssExtPath['site']))
{
$cssMethodExt = $cssExtPath['site'] . $methodName . DS;
$cssCommonExt = $cssExtPath['site'] . 'common' . DS;
$cssExtFiles = glob($cssCommonExt . $this->devicePrefix . '*.css');
if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile);
$cssExtFiles = glob($cssMethodExt . $this->devicePrefix . '*.css');
if(!empty($cssExtFiles) and is_array($cssExtFiles)) foreach($cssExtFiles as $cssFile) $css .= file_get_contents($cssFile);
}
return $css;
}
/**
* 获取适用于当前方法的js该模块公用的js + 当前方法的js + 扩展的js。
* Get js codes applied to current method: module common js + method js + extension js.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return string
*/
public function getJS($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($this->appName, $moduleName);
$jsExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'js');
$jsMethodExt = $jsExtPath['common'] . $methodName . DS;
$jsCommonExt = $jsExtPath['common'] . 'common' . DS;
$js = '';
$mainJsFile = $modulePath . 'js' . DS . $this->devicePrefix . 'common.js';
$methodJsFile = $modulePath . 'js' . DS . $this->devicePrefix . $methodName . '.js';
if(file_exists($mainJsFile)) $js .= file_get_contents($mainJsFile);
if(is_file($methodJsFile)) $js .= file_get_contents($methodJsFile);
$jsExtFiles = glob($jsCommonExt . $this->devicePrefix . '*.js');
if(!empty($jsExtFiles) and is_array($jsExtFiles)) foreach($jsExtFiles as $jsFile) $js .= file_get_contents($jsFile);
$jsExtFiles = glob($jsMethodExt . $this->devicePrefix . '*.js');
if(!empty($jsExtFiles) and is_array($jsExtFiles)) foreach($jsExtFiles as $jsFile) $js .= file_get_contents($jsFile);
if(!empty($jsExtPath['site']))
{
$jsMethodExt = $jsExtPath['site'] . $methodName . DS;
$jsCommonExt = $jsExtPath['site'] . 'common' . DS;
$jsExtFiles = glob($jsCommonExt . $this->devicePrefix . '*.js');
if(!empty($jsExtFiles) and is_array($jsExtFiles)) foreach($jsExtFiles as $jsFile) $js .= file_get_contents($jsFile);
$jsExtFiles = glob($jsMethodExt . $this->devicePrefix . '*.js');
if(!empty($jsExtFiles) and is_array($jsExtFiles)) foreach($jsExtFiles as $jsFile) $js .= file_get_contents($jsFile);
}
return $js;
}
/**
* 向$view传递一个变量。
* Assign one var to the view vars.
*
* @param string $name the name.
* @param mixed $value the value.
* @access public
* @return void
*/
public function assign($name, $value)
{
$this->view->$name = $value;
}
/**
* 清空$output。
* Clear the output.
*
* @access public
* @return void
*/
public function clear()
{
$this->output = '';
}
/**
* 渲染视图文件。
* Parse view file.
*
* @param string $moduleName module name, if empty, use current module.
* @param string $methodName method name, if empty, use current method.
* @access public
* @return string the parsed result.
*/
public function parse($moduleName = '', $methodName = '')
{
if(empty($moduleName)) $moduleName = $this->moduleName;
if(empty($methodName)) $methodName = $this->methodName;
if($this->viewType == 'json') $this->parseJSON($moduleName, $methodName);
if($this->viewType != 'json') $this->parseDefault($moduleName, $methodName);
return $this->output;
}
/**
* 渲染json格式。
* Parse json format.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access public
* @return void
*/
public function parseJSON($moduleName, $methodName)
{
unset($this->view->app);
unset($this->view->config);
unset($this->view->lang);
unset($this->view->header);
unset($this->view->position);
unset($this->view->moduleTree);
unset($this->view->common);
unset($this->view->pager->app);
unset($this->view->pager->lang);
$output['status'] = is_object($this->view) ? 'success' : 'fail';
$output['data'] = json_encode($this->view);
$output['md5'] = md5(json_encode($this->view));
$this->output = json_encode($output);
}
/**
* 默认渲染方法适用于viewType = html的时候。
* Default parse method when viewType != json, like html.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access public
* @return void
*/
public function parseDefault($moduleName, $methodName)
{
/**
* 设置视图文件。(PHP7有一个bug不能直接$viewFile = $this->setViewFile())。
* Set viewFile. (Can't assign $viewFile = $this->setViewFile() directly because one php7's bug.)
*/
$results = $this->setViewFile($moduleName, $methodName);
$viewFile = $results;
if(is_array($results)) extract($results);
/**
* 获得当前页面的CSS和JS。
* Get css and js codes for current method.
*/
$css = $this->getCSS($moduleName, $methodName);
$js = $this->getJS($moduleName, $methodName);
if($css) $this->view->pageCSS = $css;
if($js) $this->view->pageJS = $js;
/**
* 切换到视图文件所在的目录以保证视图文件里面的include语句能够正常运行。
* Change the dir to the view file to keep the relative pathes work.
*/
$currentPWD = getcwd();
chdir(dirname($viewFile));
/**
* 使用extract安定ob方法渲染$viewFile里面的代码。
* Use extract and ob functions to eval the codes in $viewFile.
*/
extract((array)$this->view);
ob_start();
include $viewFile;
if(isset($hookFiles)) foreach($hookFiles as $hookFile) if(file_exists($hookFile)) include $hookFile;
$this->output .= ob_get_contents();
ob_end_clean();
/**
* 渲染完毕后,再切换回之前的路径。
* At the end, chang the dir to the previous.
*/
chdir($currentPWD);
}
/**
* 获取一个方法的输出内容,这样我们可以在一个方法里获取其他模块方法的内容。
* 如果模块名为空,则调用该模块、该方法;如果设置了模块名,调用指定模块指定方法。
*
* Get the output of one module's one method as a string, thus in one module's method, can fetch other module's content.
* If the module name is empty, then use the current module and method. If set, use the user defined module and method.
*
* @param string $moduleName module name.
* @param string $methodName method name.
* @param array $params params.
* @access public
* @return string the parsed html.
*/
public function fetch($moduleName = '', $methodName = '', $params = array(), $appName = '')
{
if($moduleName == '') $moduleName = $this->moduleName;
if($methodName == '') $methodName = $this->methodName;
if($appName == '') $appName = $this->appName;
if($moduleName == $this->moduleName and $methodName == $this->methodName)
{
$this->parse($moduleName, $methodName);
return $this->output;
}
/**
* 设置引用的文件和路径。
* Set the pathes and files to included.
**/
$modulePath = $this->app->getModulePath($appName, $moduleName);
$moduleControlFile = $modulePath . 'control.php';
$actionExtPath = $this->app->getModuleExtPath($appName, $moduleName, 'control');
$commonActionExtFile = $actionExtPath['common'] . strtolower($methodName) . '.php';
$file2Included = file_exists($commonActionExtFile) ? $commonActionExtFile : $moduleControlFile;
if(!empty($actionExtPath['site']))
{
$siteActionExtFile = $actionExtPath['site'] . strtolower($methodName) . '.php';
$file2Included = file_exists($siteActionExtFile) ? $siteActionExtFile : $file2Included;
}
/**
* 加载控制器文件。
* Load the control file.
*/
if(!is_file($file2Included)) $this->app->triggerError("The control file $file2Included not found", __FILE__, __LINE__, $exit = true);
$currentPWD = getcwd();
chdir(dirname($file2Included));
if($moduleName != $this->moduleName) helper::import($file2Included);
/**
* 设置调用的类名。
* Set the name of the class to be called.
*/
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
if(!class_exists($className)) $this->app->triggerError(" The class $className not found", __FILE__, __LINE__, $exit = true);
/**
* 解析参数创建模块control对象。
* Parse the params, create the $module control object.
*/
if(!is_array($params)) parse_str($params, $params);
$module = new $className($moduleName, $methodName, $appName);
/**
* 调用对应方法使用ob方法获取输出内容。
* Call the method and use ob function to get the output.
*/
ob_start();
call_user_func_array(array($module, $methodName), $params);
$output = ob_get_contents();
ob_end_clean();
/**
* 返回内容。
* Return the content.
*/
unset($module);
chdir($currentPWD);
return $output;
}
/**
* 向浏览器输出内容。
* Print the content of the view.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access public
* @return void
*/
public function display($moduleName = '', $methodName = '')
{
if(empty($this->output)) $this->parse($moduleName, $methodName);
echo $this->output;
}
/**
* 直接输出data数据通常用于ajax请求中。
* Send data directly, for ajax requests.
*
* @param misc $data
* @param string $type
* @access public
* @return void
*/
public function send($data, $type = 'json')
{
if($type != 'json') die();
$data = (array) $data;
if(helper::isAjaxRequest()) print(json_encode($data)) and die(helper::removeUTF8Bom(ob_get_clean()));
/**
* 响应非ajax的请求。
* Response request not ajax.
*/
if(isset($data['result']) and $data['result'] == 'success')
{
if(!empty($data['message'])) echo js::alert($data['message']);
$locate = isset($data['locate']) ? $data['locate'] : (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
if(!empty($locate)) die(js::locate($locate));
die(isset($data['message']) ? $data['message'] : 'success');
}
if(isset($data['result']) and $data['result'] == 'fail')
{
if(!empty($data['message']))
{
$message = json_decode(json_encode((array)$data['message']));
foreach((array)$message as $item => $errors) $message->$item = implode(',', $errors);
echo js::alert(strip_tags(implode(" ", (array) $message)));
die(js::locate('back'));
}
die('fail');
}
}
/**
* 创建一个模块方法的链接。
* Create a link to one method of one module.
*
* @param string $moduleName module name
* @param string $methodName method name
* @param string|array $vars the params passed, can be array(key=>value) or key1=value1&key2=value2
* @param string $viewType the view type
* @access public
* @return string the link string.
*/
public function createLink($moduleName, $methodName = 'index', $vars = array(), $viewType = '', $onlybody = false)
{
if(empty($moduleName)) $moduleName = $this->moduleName;
return helper::createLink($moduleName, $methodName, $vars, $viewType, $onlybody);
}
/**
* 创建当前模块的一个方法链接。
* Create a link to the inner method of current module.
*
* @param string $methodName method name
* @param string|array $vars the params passed, can be array(key=>value) or key1=value1&key2=value2
* @param string $viewType the view type
* @access public
* @return string the link string.
*/
public function inlink($methodName = 'index', $vars = array(), $viewType = '', $onlybody = false)
{
return helper::createLink($this->moduleName, $methodName, $vars, $viewType, $onlybody);
}
/**
* 重定向到另一个页面。
* Location to another page.
*
* @param string $url the target url.
* @access public
* @return void
*/
public function locate($url)
{
header("location: $url");
exit;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,290 +0,0 @@
<?php
/**
* ZenTaoPHP的baseModel类。
* The baseModel class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*/
/**
* baseModel基类。
* The base class of model.
*
* @package framework
*/
class baseModel
{
/**
* 全局对象$app。
* The global $app object.
*
* @var object
* @access public
*/
public $app;
/**
* 应用名称$appName。
* The global appName.
*
* @var string
* @access public
*/
public $appName;
/**
* 全局对象$config。
* The global $config object.
*
* @var object
* @access public
*/
public $config;
/**
* 全局对象$lang。
* The global $lang object.
*
* @var object
* @access public
*/
public $lang;
/**
* 全局对象$dbh数据库连接句柄。
* The global $dbh object, the database connection handler.
*
* @var object
* @access public
*/
public $dbh;
/**
* $dao对象用于访问或者更新数据库。
* The $dao object, used to access or update database.
*
* @var object
* @access public
*/
public $dao;
/**
* $post对象用于访问$_POST变量。
* The $post object, used to access the $_POST var.
*
* @var ojbect
* @access public
*/
public $post;
/**
* $get对象用于访问$_GET变量。
* The $get object, used to access the $_GET var.
*
* @var ojbect
* @access public
*/
public $get;
/**
* $session对象用于访问$_SESSION变量。
* The $session object, used to access the $_SESSION var.
*
* @var ojbect
* @access public
*/
public $session;
/**
* $server对象用于访问$_SERVER变量。
* The $server object, used to access the $_SERVER var.
*
* @var ojbect
* @access public
*/
public $server;
/**
* $cookie对象用于访问$_COOKIE变量。
* The $cookie object, used to access the $_COOKIE var.
*
* @var ojbect
* @access public
*/
public $cookie;
/**
* $global对象用于访问$_GLOBAL变量。
* The $global object, used to access the $_GLOBAL var.
*
* @var ojbect
* @access public
*/
public $global;
/**
* 构造方法。
* 1. 将全局变量设为model类的成员变量方便model的派生类调用
* 2. 设置$config, $lang, $dbh, $dao。
*
* The construct function.
* 1. global the global vars, refer them by the class member such as $this->app.
* 2. set the pathes, config, lang of current module
*
* @param string $appName
* @access public
* @return void
*/
public function __construct($appName = '')
{
global $app, $config, $lang, $dbh;
$this->app = $app;
$this->config = $config;
$this->lang = $lang;
$this->dbh = $dbh;
$this->appName = empty($appName) ? $this->app->getAppName() : $appName;
$moduleName = $this->getModuleName();
$this->app->loadLang($moduleName, $this->appName);
$this->app->loadConfig($moduleName, $this->appName, $exitIfNone = false);
$this->loadDAO();
$this->setSuperVars();
}
/**
* 获取该model的模块名而不是用户请求的模块名。
*
* 这个方法通过去掉该model类名的'ext'和'model'字符串,来获取当前模块名。
* 不要使用$app->getModuleName(),因为其返回的是用户请求的模块名。
* 另一个model可以通过loadModel()加载进来,与请求的模块名不一致。
*
* Get the module name of this model. Not the module user visiting.
*
* This method replace the 'ext' and 'model' string from the model class name, thus get the module name.
* Not using $app->getModuleName() because it return the module user is visiting. But one module can be
* loaded by loadModel() so we must get the module name of this model.
*
* @access public
* @return string the module name.
*/
public function getModuleName()
{
$parentClass = get_parent_class($this);
$selfClass = get_class($this);
$className = $parentClass == 'model' ? $selfClass : $parentClass;
if($className == 'extensionModel') return 'extension';
return strtolower(str_ireplace(array('ext', 'Model'), '', $className));
}
/**
* 设置全局超级变量。
* Set the super vars.
*
* @access public
* @return void
*/
public function setSuperVars()
{
$this->post = $this->app->post;
$this->get = $this->app->get;
$this->server = $this->app->server;
$this->cookie = $this->app->cookie;
$this->session = $this->app->session;
$this->global = $this->app->global;
}
/**
* 加载一个模块的model。加载完成后使用$this->$moduleName来访问这个model对象。
* 比如loadModel('user')引入user模块的model实例对象可以通过$this->user来访问它。
*
* Load the model of one module. After loaded, can use $this->$moduleName to visit the model object.
*
* @param string $moduleName
* @access public
* @return object|bool the model object or false if model file not exists.
*/
public function loadModel($moduleName, $appName = '')
{
if(empty($moduleName)) return false;
if(empty($appName)) $appName = $this->appName;
$modelFile = helper::setModelFile($moduleName, $appName);
if(!helper::import($modelFile)) return false;
$modelClass = class_exists('ext' . $appName . $moduleName. 'model') ? 'ext' . $appName . $moduleName . 'model' : $appName . $moduleName . 'model';
if(!class_exists($modelClass))
{
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
}
$this->$moduleName = new $modelClass($appName);
return $this->$moduleName;
}
/**
* 加载model的class扩展。
* Load extension class of a model. Saved to $moduleName/ext/model/class/$extensionName.class.php.
*
* @param string $extensionName
* @param string $moduleName
* @access public
* @return void
*/
public function loadExtension($extensionName, $moduleName = '')
{
if(empty($extensionName)) return false;
/* Set extenson name and extension file. */
$extensionName = strtolower($extensionName);
$moduleName = $moduleName ? $moduleName : $this->getModuleName();
$moduleExtPath = $this->app->getModuleExtPath($this->appName, $moduleName, 'model');
if(!empty($moduleExtPath['site']))$extensionFile = $moduleExtPath['site'] . 'class/' . $extensionName . '.class.php';
if(!isset($extensionFile) or !file_exists($extensionFile)) $extensionFile = $moduleExtPath['common'] . 'class/' . $extensionName . '.class.php';
/* Try to import parent model file auto and then import the extension file. */
if(!class_exists($moduleName . 'Model')) helper::import($this->app->getModulePath($this->appName, $moduleName) . 'model.php');
if(!helper::import($extensionFile)) return false;
/* Set the extension class name. */
$extensionClass = $extensionName . ucfirst($moduleName);
if(!class_exists($extensionClass)) return false;
/* Create an instance of the extension class and return it. */
$extensionObject = new $extensionClass;
$extensionClass = str_replace('Model', '', $extensionClass);
$this->$extensionClass = $extensionObject;
return $extensionObject;
}
/**
* 加载DAO。
* Load DAO.
*
* @access public
* @return void
*/
public function loadDAO()
{
$this->dao = $this->app->loadClass('dao');
}
/**
* 删除记录
* Delete one record.
*
* @param string $table the table name
* @param string $id the id value of the record to be deleted
* @access public
* @return void
*/
public function delete($table, $id)
{
$this->dao->delete()->from($table)->where('id')->eq($id)->exec();
}
}

File diff suppressed because it is too large Load Diff

561
framework/control.class.php Normal file → Executable file
View File

@@ -1,23 +1,570 @@
<?php
/**
* ZenTaoPHP的control类。
* The control class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*/
/**
* control基类继承与baseControl所有模块的control类都派生于它。
* The base class of control extends baseControl.
*
* The base class of control.
*
* @package framework
*/
include dirname(__FILE__) . '/base/control.class.php';
class control extends baseControl
class control
{
/**
* The global $app object.
*
* @var object
* @access protected
*/
protected $app;
/**
* The global $config object.
*
* @var object
* @access protected
*/
protected $config;
/**
* The global $lang object.
*
* @var object
* @access protected
*/
protected $lang;
/**
* The global $dbh object, the database connection handler.
*
* @var object
* @access protected
*/
protected $dbh;
/**
* The $dao object, used to access or update database.
*
* @var object
* @access protected
*/
public $dao;
/**
* The $post object, used to access the $_POST var.
*
* @var ojbect
* @access public
*/
public $post;
/**
* The $get object, used to access the $_GET var.
*
* @var ojbect
* @access public
*/
public $get;
/**
* The $session object, used to access the $_SESSION var.
*
* @var ojbect
* @access public
*/
public $session;
/**
* The $server object, used to access the $_SERVER var.
*
* @var ojbect
* @access public
*/
public $server;
/**
* The $cookie object, used to access the $_COOKIE var.
*
* @var ojbect
* @access public
*/
public $cookie;
/**
* The $global object, used to access the $_GLOBAL var.
*
* @var ojbect
* @access public
*/
public $global;
/**
* The name of current module.
*
* @var string
* @access protected
*/
protected $moduleName;
/**
* The vars assigned to the view page.
*
* @var object
* @access public
*/
public $view;
/**
* The type of the view, such html, json.
*
* @var string
* @access private
*/
private $viewType;
/**
* The content to display.
*
* @var string
* @access private
*/
private $output;
/**
* The directory seperator.
*
* @var string
* @access protected
*/
protected $pathFix;
/**
* The construct function.
*
* 1. global the global vars, refer them by the class member such as $this->app.
* 2. set the pathes of current module, and load it's mode class.
* 3. auto assign the $lang and $config to the view.
*
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
/* Global the globals, and refer them to the class member. */
global $app, $config, $lang, $dbh;
$this->app = $app;
$this->config = $config;
$this->lang = $lang;
$this->dbh = $dbh;
$this->pathFix = $this->app->getPathFix();
$this->viewType = $this->app->getViewType();
$this->setModuleName($moduleName);
$this->setMethodName($methodName);
/* Load the model file auto. */
$this->loadModel();
/* Assign them to the view. */
$this->assign('app', $app);
$this->assign('lang', $lang);
$this->assign('config', $config);
$this->setSuperVars();
}
//-------------------- Model related methods --------------------//
/* Set the module name.
*
* @param string $moduleName The module name, if empty, get it from $app.
* @access private
* @return void
*/
private function setModuleName($moduleName = '')
{
$this->moduleName = $moduleName ? strtolower($moduleName) : $this->app->getModuleName();
}
/* Set the method name.
*
* @param string $methodName The method name, if empty, get it from $app.
* @access private
* @return void
*/
private function setMethodName($methodName = '')
{
$this->methodName = $methodName ? strtolower($methodName) : $this->app->getMethodName();
}
/**
* Load the model file of one module.
*
* @param string $methodName The method name, if empty, use current module's name.
* @access public
* @return object|bool If no model file, return false. Else return the model object.
*/
public function loadModel($moduleName = '')
{
if(empty($moduleName)) $moduleName = $this->moduleName;
$modelFile = helper::setModelFile($moduleName);
/* If no model file, try load config. */
if(!helper::import($modelFile))
{
$this->app->loadConfig($moduleName, false);
$this->app->loadLang($moduleName);
$this->dao = new dao();
return false;
}
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
if(!class_exists($modelClass)) $this->app->error(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
$this->$moduleName = new $modelClass();
$this->dao = $this->$moduleName->dao;
return $this->$moduleName;
}
/**
* Set the super vars.
*
* @access protected
* @return void
*/
protected function setSuperVars()
{
$this->post = $this->app->post;
$this->get = $this->app->get;
$this->server = $this->app->server;
$this->session = $this->app->session;
$this->cookie = $this->app->cookie;
$this->global = $this->app->global;
}
//-------------------- View related methods --------------------//
/**
* Set the view file, thus can use fetch other module's page.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access private
* @return string the view file
*/
private function setViewFile($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($moduleName);
$viewExtPath = $this->app->getModuleExtPath($moduleName, 'view');
/* The main view file, extension view file and hook file. */
$mainViewFile = $modulePath . 'view' . $this->pathFix . $methodName . '.' . $this->viewType . '.php';
$extViewFile = $viewExtPath . $methodName . ".{$this->viewType}.php";
$extHookFiles = glob($viewExtPath . $methodName . "*.{$this->viewType}.hook.php");
$viewFile = file_exists($extViewFile) ? $extViewFile : $mainViewFile;
if(!is_file($viewFile)) $this->app->error("the view file $viewFile not found", __FILE__, __LINE__, $exit = true);
if(!empty($extHookFiles)) return array('viewFile' => $viewFile, 'hookFiles' => $extHookFiles);
return $viewFile;
}
/**
* Get the extension file of an view.
*
* @param string $viewFile
* @access public
* @return string|bool If extension view file exists, return the path. Else return fasle.
*/
public function getExtViewFile($viewFile)
{
$extPath = dirname(dirname(realpath($viewFile))) . '/ext/view/';
$extViewFile = $extPath . basename($viewFile);
if(file_exists($extViewFile))
{
helper::cd($extPath);
return $extViewFile;
}
return false;
}
/**
* Get css code for a method.
*
* @param string $moduleName
* @param string $methodName
* @access private
* @return string
*/
private function getCSS($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($moduleName);
$cssExtPath = $this->app->getModuleExtPath($moduleName, 'css') . $methodName . $this->pathFix;
$css = '';
$mainCssFile = $modulePath . 'css' . $this->pathFix . 'common.css';
$methodCssFile = $modulePath . 'css' . $this->pathFix . $methodName . '.css';
if(file_exists($mainCssFile)) $css .= file_get_contents($mainCssFile);
if(is_file($methodCssFile)) $css .= file_get_contents($methodCssFile);
foreach(glob($cssExtPath . '*.css') as $cssFile)
{
$css .= file_get_contents($cssFile);
}
return $css;
}
/**
* Get js code for a method.
*
* @param string $moduleName
* @param string $methodName
* @access private
* @return string
*/
private function getJS($moduleName, $methodName)
{
$moduleName = strtolower(trim($moduleName));
$methodName = strtolower(trim($methodName));
$modulePath = $this->app->getModulePath($moduleName);
$jsExtPath = $this->app->getModuleExtPath($moduleName, 'js') . $methodName . $this->pathFix;
$js = '';
$mainJsFile = $modulePath . 'js' . $this->pathFix . 'common.js';
$methodJsFile = $modulePath . 'js' . $this->pathFix . $methodName . '.js';
if(file_exists($mainJsFile)) $js .= file_get_contents($mainJsFile);
if(is_file($methodJsFile)) $js .= file_get_contents($methodJsFile);
foreach(glob($jsExtPath . '*.js') as $jsFile)
{
$js .= file_get_contents($jsFile);
}
return $js;
}
/**
* Assign one var to the view vars.
*
* @param string $name the name.
* @param mixed $value the value.
* @access public
* @return void
*/
public function assign($name, $value)
{
$this->view->$name = $value;
}
/**
* Clear the output.
*
* @access public
* @return void
*/
public function clear()
{
$this->output = '';
}
/**
* Parse view file.
*
* @param string $moduleName module name, if empty, use current module.
* @param string $methodName method name, if empty, use current method.
* @access public
* @return string the parsed result.
*/
public function parse($moduleName = '', $methodName = '')
{
if(empty($moduleName)) $moduleName = $this->moduleName;
if(empty($methodName)) $methodName = $this->methodName;
if($this->viewType == 'json')
{
$this->parseJSON($moduleName, $methodName);
}
else
{
$this->parseDefault($moduleName, $methodName);
}
return $this->output;
}
/**
* Parse json format.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access private
* @return void
*/
private function parseJSON($moduleName, $methodName)
{
unset($this->view->app);
unset($this->view->config);
unset($this->view->lang);
unset($this->view->pager);
unset($this->view->header);
unset($this->view->position);
unset($this->view->moduleTree);
$output['status'] = is_object($this->view) ? 'success' : 'fail';
$output['data'] = json_encode($this->view);
$output['md5'] = md5(json_encode($this->view));
$this->output = json_encode($output);
}
/**
* Parse default html format.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access private
* @return void
*/
private function parseDefault($moduleName, $methodName)
{
/* Set the view file. */
$viewFile = $this->setViewFile($moduleName, $methodName);
if(is_array($viewFile)) extract($viewFile);
/* Get css and js. */
$css = $this->getCSS($moduleName, $methodName);
$js = $this->getJS($moduleName, $methodName);
if($css) $this->view->pageCss = $css;
if($js) $this->view->pageJS = $js;
/* Change the dir to the view file to keep the relative pathes work. */
$currentPWD = getcwd();
chdir(dirname($viewFile));
extract((array)$this->view);
ob_start();
include $viewFile;
if(isset($hookFiles)) foreach($hookFiles as $hookFile) include $hookFile;
$this->output .= ob_get_contents();
ob_end_clean();
/* At the end, chang the dir to the previous. */
chdir($currentPWD);
}
/**
* Get the output of one module's one method as a string, thus in one module's method, can fetch other module's content.
*
* If the module name is empty, then use the current module and method. If set, use the user defined module and method.
*
* @param string $moduleName module name.
* @param string $methodName method name.
* @param array $params params.
* @access public
* @return string the parsed html.
*/
public function fetch($moduleName = '', $methodName = '', $params = array())
{
if($moduleName == '') $moduleName = $this->moduleName;
if($methodName == '') $methodName = $this->methodName;
if($moduleName == $this->moduleName and $methodName == $this->methodName)
{
$this->parse($moduleName, $methodName);
return $this->output;
}
/* Set the pathes and files to included. */
$modulePath = $this->app->getModulePath($moduleName);
$moduleControlFile = $modulePath . 'control.php';
$actionExtFile = $this->app->getModuleExtPath($moduleName, 'control') . strtolower($methodName) . '.php';
$file2Included = file_exists($actionExtFile) ? $actionExtFile : $moduleControlFile;
/* Load the control file. */
if(!is_file($file2Included)) $this->app->error("The control file $file2Included not found", __FILE__, __LINE__, $exit = true);
$currentPWD = getcwd();
chdir(dirname($file2Included));
if($moduleName != $this->moduleName) helper::import($file2Included);
/* Set the name of the class to be called. */
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
if(!class_exists($className)) $this->app->error(" The class $className not found", __FILE__, __LINE__, $exit = true);
/* Parse the params, create the $module control object. */
if(!is_array($params)) parse_str($params, $params);
$module = new $className($moduleName, $methodName);
/* Call the method and use ob function to get the output. */
ob_start();
call_user_func_array(array($module, $methodName), $params);
$output = ob_get_contents();
ob_end_clean();
/* Return the content. */
unset($module);
chdir($currentPWD);
return $output;
}
/**
* Print the content of the view.
*
* @param string $moduleName module name
* @param string $methodName method name
* @access public
* @return void
*/
public function display($moduleName = '', $methodName = '')
{
if(empty($this->output)) $this->parse($moduleName, $methodName);
echo $this->output;
}
/**
* Create a link to one method of one module.
*
* @param string $moduleName module name
* @param string $methodName method name
* @param string|array $vars the params passed, can be array(key=>value) or key1=value1&key2=value2
* @param string $viewType the view type
* @access public
* @return string the link string.
*/
public function createLink($moduleName, $methodName = 'index', $vars = array(), $viewType = '')
{
if(empty($moduleName)) $moduleName = $this->moduleName;
return helper::createLink($moduleName, $methodName, $vars, $viewType);
}
/**
* Create a link to the inner method of current module.
*
* @param string $methodName method name
* @param string|array $vars the params passed, can be array(key=>value) or key1=value1&key2=value2
* @param string $viewType the view type
* @access public
* @return string the link string.
*/
public function inlink($methodName = 'index', $vars = array(), $viewType = '')
{
return helper::createLink($this->moduleName, $methodName, $vars, $viewType);
}
/**
* Location to another page.
*
* @param string $url the target url.
* @access public
* @return void
*/
public function locate($url)
{
header("location: $url");
exit;
}
}

View File

@@ -1,9 +1,8 @@
<?php
/**
* ZenTaoPHP的helper类。
* The helper class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
@@ -12,48 +11,390 @@
*/
/**
* 该类实现了一些常用的方法
* The helper class, contains the tool functions.
*
* @package framework
*/
include dirname(__FILE__) . '/base/helper.class.php';
class helper extends baseHelper
class helper
{
public static function getViewType($source = false)
/**
* Set the member's value of one object.
* <code>
* <?php
* $lang->db->user = 'wwccss';
* helper::setMember('lang', 'db.user', 'chunsheng.wang');
* ?>
* </code>
* @param string $objName the var name of the object.
* @param string $key the key of the member, can be parent.child.
* @param mixed $value the value to be set.
* @static
* @access public
* @return bool
*/
static public function setMember($objName, $key, $value)
{
global $config, $app;
if($config->requestType != 'GET')
global $$objName;
if(!is_object($$objName) or empty($key)) return false;
$key = str_replace('.', '->', $key);
$value = serialize($value);
$code = ("\$${objName}->{$key}=unserialize(<<<EOT\n$value\nEOT\n);");
eval($code);
return true;
}
/**
* Create a link to a module's method.
*
* This method also mapped in control class to call conveniently.
* <code>
* <?php
* helper::createLink('hello', 'index', 'var1=value1&var2=value2');
* helper::createLink('hello', 'index', array('var1' => 'value1', 'var2' => 'value2');
* ?>
* </code>
* @param string $moduleName module name
* @param string $methodName method name
* @param string|array $vars the params passed to the method, can be array('key' => 'value') or key1=value1&key2=value2) or key1=value1&key2=value2
* @param string $viewType the view type
* @static
* @access public
* @return string the link string.
*/
static public function createLink($moduleName, $methodName = 'index', $vars = '', $viewType = '')
{
global $app, $config;
$link = $config->requestType == 'PATH_INFO' ? $config->webRoot : $_SERVER['PHP_SELF'];
/* Set the view type and vars. */
if(empty($viewType)) $viewType = $app->getViewType();
if(!is_array($vars)) parse_str($vars, $vars);
/* The PATH_INFO type. */
if($config->requestType == 'PATH_INFO')
{
$pathInfo = $app->getPathInfo();
if(!empty($pathInfo))
/* If the method equal the default method defined in the config file and the vars is empty, convert the link. */
if($methodName == $config->default->method and empty($vars))
{
$dotPos = strrpos($pathInfo, '.');
if($dotPos)
/* If the module also equal the default module, change index-index to index.html. */
if($moduleName == $config->default->module)
{
$viewType = substr($pathInfo, $dotPos + 1);
$link .= 'index.' . $viewType;
}
else
{
$config->default->view = $config->default->view == 'mhtml' ? 'html' : $config->default->view;
$link .= $moduleName . '/';
}
}
else
{
$link .= "$moduleName{$config->requestFix}$methodName";
if($config->pathType == 'full')
{
foreach($vars as $key => $value) $link .= "{$config->requestFix}$key{$config->requestFix}$value";
}
else
{
foreach($vars as $value) $link .= "{$config->requestFix}$value";
}
$link .= '.' . $viewType;
}
}
elseif($config->requestType == 'GET')
{
if(isset($_GET[$config->viewVar]))
$link .= "?{$config->moduleVar}=$moduleName&{$config->methodVar}=$methodName";
if($viewType != 'html') $link .= "&{$config->viewVar}=" . $viewType;
foreach($vars as $key => $value) $link .= "&$key=$value";
}
return $link;
}
/**
* Import a file instend of include or requie.
*
* @param string $file the file to be imported.
* @static
* @access public
* @return bool
*/
static public function import($file)
{
static $includedFiles = array();
if(!isset($includedFiles[$file]))
{
$return = include $file;
if(!$return) return false;
$includedFiles[$file] = true;
return true;
}
return true;
}
/**
* Set the model file of one module. If there's an extension file, merge it with the main model file.
*
* @param string $moduleName the module name
* @static
* @access public
* @return string the model file
*/
static public function setModelFile($moduleName)
{
global $app;
/* Set the main model file and extension path and files. */
$mainModelFile = $app->getModulePath($moduleName) . 'model.php';
$modelExtPath = $app->getModuleExtPath($moduleName, 'model');
$extFiles = helper::ls($modelExtPath, '.php');
/* If no extension file, return the main file directly. */
if(empty($extFiles)) return $mainModelFile;
/* Else, judge whether needed update or not .*/
$mergedModelFile = $app->getTmpRoot() . 'model' . $app->getPathFix() . $moduleName . '.php';
$needUpdate = false;
$lastTime = file_exists($mergedModelFile) ? filemtime($mergedModelFile) : 0;
foreach($extFiles as $extFile)
{
if(filemtime($extFile) > $lastTime)
{
$viewType = $_GET[$config->viewVar];
}
else
{
/* Set default view when url has not module name. such as only domain. */
$config->default->view = ($config->default->view == 'mhtml' and isset($_GET[$config->moduleVar])) ? 'html' : $config->default->view;
$needUpdate = true;
break;
}
}
if($source and isset($viewType)) return $viewType;
if(filemtime($mainModelFile) > $lastTime) $needUpdate = true;
if(isset($viewType) and strpos($config->views, ',' . $viewType . ',') === false) $viewType = $config->default->view;
return isset($viewType) ? $viewType : $config->default->view;
/* If need'nt update, return the cache file. */
if(!$needUpdate) return $mergedModelFile;
/* Update the cache file. */
if($needUpdate)
{
$modelClass = $moduleName . 'Model';
$extModelClass = 'ext' . $modelClass;
$modelLines = trim(file_get_contents($mainModelFile));
$modelLines = rtrim($modelLines, '?>'); // To make sure the last end tag is removed.
$modelLines .= "class $extModelClass extends $modelClass {\n";
/* Cycle all the extension files. */
foreach($extFiles as $extFile)
{
$extLines = trim(file_get_contents($extFile));
if(strpos($extLines, '<?php') !== false) $extLines = ltrim($extLines, '<?php');
if(strpos($extLines, '?>') !== false) $extLines = rtrim($extLines, '?>');
$modelLines .= $extLines . "\n";
}
/* Create the merged model file. */
$modelLines .= "}";
file_put_contents($mergedModelFile, $modelLines);
return $mergedModelFile;
}
}
/**
* Create the in('a', 'b') string.
*
* @param string|array $ids the id lists, can be a array or a string with ids joined with comma.
* @static
* @access public
* @return string the string like IN('a', 'b').
*/
static public function dbIN($ids)
{
if(is_array($ids)) return "IN ('" . join("','", $ids) . "')";
return "IN ('" . str_replace(',', "','", str_replace(' ', '',$ids)) . "')";
}
/**
* Create safe base64 encoded string for the framework.
*
* @param string $string the string to encode.
* @static
* @access public
* @return string encoded string.
*/
static public function safe64Encode($string)
{
return strtr(base64_encode($string), '/', '.');
}
/**
* Decode the string encoded by safe64Encode.
*
* @param string $string the string to decode
* @static
* @access public
* @return string decoded string.
*/
static public function safe64Decode($string)
{
return base64_decode(strtr($string, '.', '/'));
}
/**
* Compute the diff days of two date.
*
* @param date $date1 the first date.
* @param date $date2 the sencode date.
* @access public
* @return int the diff of the two days.
*/
static public function diffDate($date1, $date2)
{
return round((strtotime($date1) - strtotime($date2)) / 86400, 0);
}
/**
* Get now time use the DT_DATETIME1 constant defined in the lang file.
*
* @access public
* @return datetime now
*/
static public function now()
{
return date(DT_DATETIME1);
}
/**
* Get today according to the DT_DATE1 constant defined in the lang file.
*
* @access public
* @return date today
*/
static public function today()
{
return date(DT_DATE1);
}
/**
* Judge a date is zero or not.
*
* @access public
* @return bool
*/
static public function isZeroDate($date)
{
return substr($date, 0, 4) == '0000';
}
/**
* Get files match the pattern under one directory.
*
* @access public
* @return array the files match the pattern
*/
static public function ls($dir, $pattern = '')
{
$files = array();
$dir = realpath($dir);
if(is_dir($dir))
{
if($dh = opendir($dir))
{
while(($file = readdir($dh)) !== false)
{
if(strpos($file, $pattern) !== false) $files[] = $dir . DIRECTORY_SEPARATOR . $file;
}
closedir($dh);
}
}
return $files;
}
/**
* Change directory.
*
* @param string $path
* @static
* @access public
* @return void
*/
static function cd($path = '')
{
static $cwd = '';
if($path)
{
$cwd = getcwd();
chdir($path);
}
else
{
chdir($cwd);
}
}
}
/**
* The short alias of helper::createLink() method.
*
* @param string $methodName the method name
* @param string|array $vars the params passed to the method, can be array('key' => 'value') or key1=value1&key2=value2)
* @param string $viewType
* @return string the link string.
*/
function inLink($methodName = 'index', $vars = '', $viewType = '')
{
global $app;
return helper::createLink($app->getModuleName(), $methodName, $vars, $viewType);
}
/**
* Static cycle a array
*
* @param array $items the array to be cycled.
* @return mixed
*/
function cycle($items)
{
static $i = 0;
if(!is_array($items)) $items = explode(',', $items);
if(!isset($items[$i])) $i = 0;
return $items[$i++];
}
/**
* Get current microtime.
*
* @access protected
* @return float current time.
*/
function getTime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
/**
* Save the sql.
*
* @access protected
* @return void
*/
function saveSQL()
{
if(!class_exists('dao')) return;
global $app;
$sqlLog = $app->getLogRoot() . 'sql.' . date('Ymd') . '.log';
$fh = @fopen($sqlLog, 'a');
if(!$fh) return false;
fwrite($fh, date('Ymd H:i:s') . ": " . $app->getURI() . "\n");
foreach(dao::$querys as $query) fwrite($fh, " $query\n");
fwrite($fh, "\n");
fclose($fh);
}
/**
* dump a var.
*
* @param mixed $var
* @access public
* @return void
*/
function a($var)
{
echo "<xmp class='a-left'>";
print_r($var);
echo "</xmp>";
}

208
framework/model.class.php Normal file → Executable file
View File

@@ -1,6 +1,5 @@
<?php
/**
* ZenTaoPHP的model类。
* The model class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
@@ -12,16 +11,194 @@
*/
/**
* model基类。
* The base class of model.
*
* @package framework
*/
include dirname(__FILE__) . '/base/model.class.php';
class model extends baseModel
class model
{
/**
* 删除记录
* The global $app object.
*
* @var object
* @access protected
*/
protected $app;
/**
* The global $config object.
*
* @var object
* @access protected
*/
protected $config;
/**
* The global $lang object.
*
* @var object
* @access protected
*/
protected $lang;
/**
* The global $dbh object, the database connection handler.
*
* @var object
* @access protected
*/
protected $dbh;
/**
* The $dao object, used to access or update database.
*
* @var object
* @access protected
*/
public $dao;
/**
* The $post object, used to access the $_POST var.
*
* @var ojbect
* @access public
*/
public $post;
/**
* The $get object, used to access the $_GET var.
*
* @var ojbect
* @access public
*/
public $get;
/**
* The $sesion object, used to access the $_SESSION var.
*
* @var ojbect
* @access public
*/
public $session;
/**
* The $server object, used to access the $_SERVER var.
*
* @var ojbect
* @access public
*/
public $server;
/**
* The $cookie object, used to access the $_COOKIE var.
*
* @var ojbect
* @access public
*/
public $cookie;
/**
* The $global object, used to access the $_GLOBAL var.
*
* @var ojbect
* @access public
*/
public $global;
/**
* The construct function.
*
* 1. global the global vars, refer them by the class member such as $this->app.
* 2. set the pathes, config, lang of current module
*
* @access public
* @return void
*/
public function __construct()
{
global $app, $config, $lang, $dbh;
$this->app = $app;
$this->config = $config;
$this->lang = $lang;
$this->dbh = $dbh;
$moduleName = $this->getModuleName();
$this->app->loadLang($moduleName, $exit = false);
$this->app->loadConfig($moduleName, $exit = false);
$this->loadDAO();
$this->setSuperVars();
}
/**
* Get the module name of this model. Not the module user visiting.
*
* This method replace the 'ext' and 'model' string from the model class name, thus get the module name.
* Not useing $app->getModuleName() because it return the module user is visiting. But one module can be
* loaded by loadModel() so we must get the module name of thie model.
*
* @access protected
* @return string the module name.
*/
protected function getModuleName()
{
$parentClass = get_parent_class($this);
$selfClass = get_class($this);
$className = $parentClass == 'model' ? $selfClass : $parentClass;
if($className == 'extensionModel') return 'extension';
return strtolower(str_ireplace(array('ext', 'Model'), '', $className));
}
/**
* Set the super vars.
*
* @access protected
* @return void
*/
protected function setSuperVars()
{
$this->post = $this->app->post;
$this->get = $this->app->get;
$this->server = $this->app->server;
$this->cookie = $this->app->cookie;
$this->session = $this->app->session;
$this->global = $this->app->global;
}
/**
* Load the model of one module. After loaded, can use $this->modulename to visit the model object.
*
* @param string $moduleName
* @access public
* @return object|bool the model object or false if model file not exists.
*/
public function loadModel($moduleName)
{
if(empty($moduleName)) return false;
$modelFile = helper::setModelFile($moduleName);
if(!helper::import($modelFile)) return false;
$modelClass = class_exists('ext' . $moduleName. 'model') ? 'ext' . $moduleName . 'model' : $moduleName . 'model';
if(!class_exists($modelClass)) $this->app->error(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
$this->$moduleName = new $modelClass();
return $this->$moduleName;
}
//-------------------- DAO related method s--------------------//
/**
* Load DAO.
*
* @access private
* @return void
*/
private function loadDAO()
{
$this->dao = $this->app->loadClass('dao');
}
/**
* Delete one record.
*
* @param string $table the table name
@@ -32,7 +209,24 @@ class model extends baseModel
public function delete($table, $id)
{
$this->dao->update($table)->set('deleted')->eq(1)->where('id')->eq($id)->exec();
$object = ltrim(strstr(trim($table, '`'), '_'), '_');
$object = str_replace($this->config->db->prefix, '', $table);
$this->loadModel('action')->create($object, $id, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
}
}
/**
* Undelete an record.
*
* @param int $actionID
* @access public
* @return void
*/
public function undelete($actionID)
{
$action = $this->loadModel('action')->getById($actionID);
if($action->action != 'deleted') return;
$table = $this->config->action->objectTables[$action->objectType];
$this->dao->update($table)->set('deleted')->eq(0)->where('id')->eq($action->objectID)->exec();
$this->dao->update(TABLE_ACTION)->set('extra')->eq(ACTIONMODEL::BE_UNDELETED)->where('id')->eq($actionID)->exec();
$this->action->create($action->objectType, $action->objectID, 'undeleted');
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
value1.1
value2
3
Array
(
[0] => 1
[1] => 2
[2] => 3
)
stdClass Object
(
[key1] => value2.1
)

View File

@@ -1,6 +0,0 @@
Mary
20
stdClass Object
(
[postcode] => 10000
)

View File

@@ -1,2 +0,0 @@
/
/zentao/

View File

@@ -1,8 +0,0 @@
http://localhost webRoot is /
http://localhost/ webRoot is /
http://localhost/my/ webRoot is /
http://localhost/my-todo.html webRoot is /
http://localhost/index.php?m=my&f=index webRoot is /
http://localhost/zentao/my/ webRoot is /zentao/
http://localhost/zentao/my-todo.html webRoot is /zentao/
http://localhost/zentao/index.php?m=my&f=index webRoot is /zentao/

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env php
<?php
<<<TC
title: testing the setMember method.
TC;
/* Include the helper class. */
include '../../helper.class.php';
/* Create two objects named obj and obj2. */
$obj = new stdclass();
$obj->key1 = 'value1';
$obj2 = new stdclass();
$obj2->key1 = 'value2.1';
helper::setMember('obj', 'key1', 'value1.1'); // overide the exists key.
helper::setMember('obj', 'key2', 'value2'); // add a new key.
helper::setMember('obj', 'key3', 3); // set an int value.
helper::setMember('obj', 'key4', array(1, 2, 3)); // set an array value.
helper::setMember('obj', 'key5', $obj2); // set an object value.
echo $obj->key1 . "\n";
echo $obj->key2 . "\n";
echo $obj->key3 . "\n";
print_r($obj->key4);
print_r($obj->key5);

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env php
<?php
<<<TC
title: testing the setMember method with multi level.
TC;
/* Include the helper class. */
include '../../helper.class.php';
/* Create two objects named obj and obj2. */
$obj = new stdclass();
$obj->user = new stdclass();
$obj->user->name = 'Tom';
helper::setMember('obj', 'user.name', 'Mary'); // overide the exists key.
helper::setMember('obj', 'user.age', 20); // add a child key to an existing key.
helper::setMember('obj', 'home.address', new stdclass()); // add a child key even the parent doesn't exist.
helper::setMember('obj', 'home.address.postcode', '10000'); // three level.
echo $obj->user->name . "\n";
echo $obj->user->age . "\n";
print_r($obj->home->address);

View File

@@ -1,17 +0,0 @@
#!/usr/bin/env php
<?php
<<<TC
title: testing the getWebRoot method.
TC;
/* Include the helper class. */
include '../../helper.class.php';
/* Create two objects named obj and obj2. */
$_SERVER['SCRIPT_NAME'] = '/index.php';
$webRoot = getWebRoot();
echo $webRoot . "\n";
$_SERVER['SCRIPT_NAME'] = '/zentao/index.php';
$webRoot = getWebRoot();
echo $webRoot . "\n";

View File

@@ -1,43 +0,0 @@
#!/usr/bin/env php
<?php
<<<TC
title: testing the getWebRoot method.
TC;
/* Include the helper class. */
include '../../helper.class.php';
/* Create two objects named obj and obj2. */
define('IN_SHELL', true);
$_SERVER['argv'][1] = 'http://localhost';
$webRoot = getWebRoot();
echo 'http://localhost webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/';
$webRoot = getWebRoot();
echo 'http://localhost/ webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/my/';
$webRoot = getWebRoot();
echo 'http://localhost/my/ webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/my-todo.html';
$webRoot = getWebRoot();
echo 'http://localhost/my-todo.html webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/index.php?m=my&f=index';
$webRoot = getWebRoot();
echo 'http://localhost/index.php?m=my&f=index webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/zentao/my/';
$webRoot = getWebRoot();
echo 'http://localhost/zentao/my/ webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/zentao/my-todo.html';
$webRoot = getWebRoot();
echo 'http://localhost/zentao/my-todo.html webRoot is ' . $webRoot . "\n";
$_SERVER['argv'][1] = 'http://localhost/zentao/index.php?m=my&f=index';
$webRoot = getWebRoot();
echo 'http://localhost/zentao/index.php?m=my&f=index webRoot is ' . $webRoot . "\n";

View File

@@ -2,11 +2,11 @@
/**
* The api library of zentaopms.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @copyright Copyright 2009-2011 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package API
* @version $Id: api.class.php 4132 2013-01-18 02:30:05Z wwccss $
* @version $Id$
* @link http://www.zentao.net
*/
class ztclient
@@ -50,7 +50,7 @@ class ztclient
*/
private function getRemoteConfig()
{
$url = $this->zentao->root . 'index.php?mode=getconfig';
$url = $this->zentao->root . '/index.php?mode=getconfig';
$this->agent->fetchText($url);
$config = json_decode($this->agent->results);
return $config;

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More