diff --git a/tags/zentaopms_1.1_stable_20100706/Makefile b/tags/zentaopms_1.1_stable_20100706/Makefile deleted file mode 100644 index 4ed7e2af96..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -VERSION=$(shell head -n 1 VERSION) - -all: tgz - -clean: - rm -fr zentaopms - rm -fr *.tar.gz - rm -fr *.zip -tgz: - mkdir -p zentaopms/lib - mkdir -p zentaopms/db - mkdir -p zentaopms/bin - mkdir -p zentaopms/config - cp -fr db zentaopms/ - cp -fr doc/* zentaopms/ - cp -fr lib/ zentaopms/ - cp -fr config/config.php zentaopms/config/ - cp -fr www zentaopms/ - cp -fr module zentaopms/ - cp bin/ztc* zentaopms/bin - cp bin/computeburn.php zentaopms/bin - cp bin/getbugs.php zentaopms/bin - cp bin/initopt.php zentaopms/bin - cp bin/todo.php zentaopms/bin - chmod a+rx zentaopms/bin/* - cp -fr framework zentaopms/ - cp -fr lib/* zentaopms/lib/ - find zentaopms -name .svn |xargs rm -fr - find zentaopms -name tests |xargs rm -fr - mkdir -p zentaopms/tmp/cache - mkdir -p zentaopms/tmp/log - chmod 777 -R zentaopms/tmp/ - chmod 777 zentaopms/www/data - chmod 777 zentaopms/config - find zentaopms -name .svn |xargs rm -fr - rm -fr zentaopms/framework/tests - rm -fr zentaopms/www/data/* - rm -fr zentaopms/www/bugfree - zip -r -9 ZenTaoPMS.$(VERSION).zip zentaopms - rm -fr zentaopms -zentaopmsdoc: - phpdoc -d config,lib,module,www -t zentaozentaopms -o HTML:frames:phphtmllib -ti ZenTaoPMSAPIοֲ -s on -pp on -i *test* - phpdoc -d config,lib,module,www -t zentaozentaopms.chm -o chm:default:default -ti ZenTaoPMSAPIοֲ -s on -pp on -i *test* diff --git a/tags/zentaopms_1.1_stable_20100706/VERSION b/tags/zentaopms_1.1_stable_20100706/VERSION deleted file mode 100644 index 2a8e676101..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.1.stable diff --git a/tags/zentaopms_1.1_stable_20100706/bin/build.php b/tags/zentaopms_1.1_stable_20100706/bin/build.php deleted file mode 100644 index ceb57a1d27..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/build.php +++ /dev/null @@ -1,13 +0,0 @@ -1. 修改zentaophp中的version number,打tag。 -2. 修改zentaoms中的version - config.php中的version. - install中的version。 -3. 修改升级程序。(版本列表。) -4. 打包zentaoms。 -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. 撰写升级声明。 diff --git a/tags/zentaopms_1.1_stable_20100706/bin/computeburn.php b/tags/zentaopms_1.1_stable_20100706/bin/computeburn.php deleted file mode 100755 index abb732ed0e..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/computeburn.php +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env php -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); - -/* 直接调用project模块的burn页面。*/ -$snoopy->fetch($burnAPI . "&$session->sessionName=$session->sessionID"); -$burns = $snoopy->results; -if($burns) -{ - if(strpos($burns, 'script') === false) - { - echo $burns; - } - else - { - echo "No priviledge.\n"; - } -} -else -{ - echo "no projects.\n"; -} -?> diff --git a/tags/zentaopms_1.1_stable_20100706/bin/copylang.php b/tags/zentaopms_1.1_stable_20100706/bin/copylang.php deleted file mode 100755 index 8f7d1a34ce..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/copylang.php +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env php - diff --git a/tags/zentaopms_1.1_stable_20100706/bin/exportactions.php b/tags/zentaopms_1.1_stable_20100706/bin/exportactions.php deleted file mode 100755 index 3bf58bdd0b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/exportactions.php +++ /dev/null @@ -1,29 +0,0 @@ -getMethods(); - foreach($methods as $method) - { - $methodRef = new ReflectionMethod($method->class, $method->name); - if($methodRef->isPublic() and strpos($method->name, '__') === false) - { - echo "\$lang['action']['$moduleName']['$method->name'] = '$method->name';\n"; - } - } - echo "\n"; - } - } -} -?> diff --git a/tags/zentaopms_1.1_stable_20100706/bin/getbugs.php b/tags/zentaopms_1.1_stable_20100706/bin/getbugs.php deleted file mode 100755 index acc3cb2779..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/getbugs.php +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env php -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"; -} -?> diff --git a/tags/zentaopms_1.1_stable_20100706/bin/initopt.php b/tags/zentaopms_1.1_stable_20100706/bin/initopt.php deleted file mode 100644 index 6da40d1446..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/initopt.php +++ /dev/null @@ -1,77 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chen congzhi - * @package common - * @version $Id$ - * @link http://www.zentaoms.com - */ -include '../config/config.php'; - -if(!isset($argv[1])) -{ - die("Please input the directory path of 'module'! For example, c:\zentao\home\zentao\module\ \n"); -} - -$modules = array(); -$moduleRoot = $argv[1]; - -if(is_dir($moduleRoot)) -{ - if($dh = opendir($moduleRoot)) - { - while($module = readdir($dh)) - { - if(strpos(basename($module), '.') === false) $modules[] = $module; - } - closedir($dh); - } -} -else -{ - die("The module you input does not exist. \n"); -} - -foreach($modules as $module) -{ - /* 设定各个目录。*/ - $optRoot = $moduleRoot . DIRECTORY_SEPARATOR. $module . DIRECTORY_SEPARATOR . 'opt'; - $optControl = $optRoot . DIRECTORY_SEPARATOR . 'control'; - $optModel = $optRoot . DIRECTORY_SEPARATOR . 'model'; - $optView = $optRoot . DIRECTORY_SEPARATOR . 'view'; - $optConfig = $optRoot . DIRECTORY_SEPARATOR . 'config'; - $optLang = $optRoot . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR; - - /* 建立各个扩展目录 */ - if(!file_exists($optRoot)) mkdir($optRoot, 0777); - if(!file_exists($optControl)) mkdir($optControl, 0777); - if(!file_exists($optModel)) mkdir($optModel, 0777); - if(!file_exists($optView)) mkdir($optView, 0777); - if(!file_exists($optConfig)) mkdir($optConfig, 0777); - if(!file_exists($optLang)) mkdir($optLang, 0777); - - /* 创建语言目录。*/ - $langs = array_keys($config->langs); - foreach($langs as $lang) - { - $langPath = $optLang . $lang; - if(!file_exists($langPath)) mkdir($langPath, 0777); - } - - echo "init $module ... \n"; -} diff --git a/tags/zentaopms_1.1_stable_20100706/bin/todo.php b/tags/zentaopms_1.1_stable_20100706/bin/todo.php deleted file mode 100755 index b4f22e4bff..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/todo.php +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env php -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"; -} -?> diff --git a/tags/zentaopms_1.1_stable_20100706/bin/ztcli b/tags/zentaopms_1.1_stable_20100706/bin/ztcli deleted file mode 100755 index a3fc2143ed..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/ztcli +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env php -. - * - * @copyright Copyright: 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package ZenTaoPMS - * @version $Id$ - * @link http://www.zentaoms.com - */ -error_reporting(0); -define('IN_SHELL', true); - -/* 获取命令参数。 */ -if($argc != 2) -{ - die('Usage: ' . basename(__FILE__) . " \n"); -} - -/* 包含必须的类文件。*/ -chdir(dirname(__FILE__)); -include '../framework/router.class.php'; -include '../framework/control.class.php'; -include '../framework/model.class.php'; -include '../framework/helper.class.php'; - -/* 实例化路由对象,并加载配置,连接到数据库。*/ -$app = router::createApp('pms', dirname(dirname(__FILE__))); -$config = $app->loadConfig('common'); -$app->setDebug(); -$dbh = $app->connectDB(); - -/* 将输入的参数解析成对于的变量。*/ -$request = parse_url(trim($argv[1])); -$_SERVER['HTTP_HOST'] = $request['host']; -$_SERVER['PATH_INFO'] = str_replace($config->webRoot, '', $request['path']); -$_SERVER['REQUEST_URI'] = isset($request['query']) ? $request['query'] : ''; -if(isset($request['query'])) parse_str($request['query'], $_GET); - -/* 设置时区。*/ -$app->setTimezone(); - -/* 设置终端使用的语言,并加载共用的模块。*/ -$app->setClientLang('zh-cn'); -$lang = $app->loadLang('common'); -$common = $app->loadCommon(); - -/* 加载相应的lib文件,并设置超全局变量的引用。*/ -$app->loadClass('front', $static = true); -$app->loadClass('filter', $static = true); -$app->setSuperVars(); - -/* 解析请求,加载模块。*/ -$app->parseRequest(); -$app->loadModule(); diff --git a/tags/zentaopms_1.1_stable_20100706/bin/ztcli.bat b/tags/zentaopms_1.1_stable_20100706/bin/ztcli.bat deleted file mode 100644 index 68635d88b4..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/ztcli.bat +++ /dev/null @@ -1 +0,0 @@ -php ztcli %* diff --git a/tags/zentaopms_1.1_stable_20100706/bin/ztcli.sh b/tags/zentaopms_1.1_stable_20100706/bin/ztcli.sh deleted file mode 100755 index cdeb151459..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/bin/ztcli.sh +++ /dev/null @@ -1 +0,0 @@ -php ztcli $* diff --git a/tags/zentaopms_1.1_stable_20100706/config/config.php b/tags/zentaopms_1.1_stable_20100706/config/config.php deleted file mode 100644 index ec4d964f32..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/config/config.php +++ /dev/null @@ -1,110 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 ൺ촴Ƽ޹˾(www.cnezsoft.com) - * @author Chunsheng Wang - * @package ZenTaoMS - * @version $Id$ - * @link http://www.zentaoms.com - */ -/* 趨*/ -$config->version = '1.1'; // 汾ţ޸ġ -$config->encoding = 'UTF-8'; // վı롣 -$config->cookiePath = '/'; // cookieЧ· -$config->cookieLife = time() + 2592000; // cookieڡ -$config->timezone = 'Asia/Shanghai'; // ʱãϸб http://www.php.net/manual/en/timezones.php - -/* ʽá*/ -$config->requestType = 'PATH_INFO'; // λȡǰϢѡֵPATH_INFO|GET -$config->pathType = 'clean'; // requestType=PATH_INFO: urlĸʽѡֵΪfull|cleanfullʽвƣcleanֻȡֵ -$config->requestFix = '-'; // requestType=PATH_INFO: urlķָѡֵΪбߡšʽSEO -$config->moduleVar = 'm'; // requestType=GET: ģ -$config->methodVar = 'f'; // requestType=GET: -$config->viewVar = 't'; // requestType=GET: ģ -$config->sessionVar = 'sid'; // requestType=GET: session - -/* ͼ⡣*/ -$config->views = ',html,json,csv,'; // ֵ֧ͼб -$config->themes = 'default,blue'; // ֵ֧б - -/* ֵ֧б*/ -$config->langs['zh-cn'] = 'Chinese Simplified'; - -/* Ĭϲ趨*/ -$config->default->view = 'html'; // Ĭϵͼʽ -$config->default->lang = 'zh-cn'; // Ĭϵԡ -$config->default->theme = 'default'; // Ĭϵ⡣ -$config->default->module = 'index'; // Ĭϵģ顣ûָģʱظģ顣 -$config->default->method = 'index'; // Ĭϵķûָָķʱø÷ - -/* ϴ趨*/ -$config->file->dangers = 'php,jsp,py,rb,asp,'; // ϴļб -$config->file->maxSize = 1024 * 1024; // ϴļСλΪֽڡ - -/* ݿ趨*/ -$config->db->persistant = false; // Ƿ򿪳־ӡ -$config->db->driver = 'mysql'; // pdoͣĿǰʱֻ֧mysql -$config->db->dao = true; // ǷʹDAO -$config->db->encoding = 'UTF8'; // ݿı롣 -$config->db->strictMode = false; // رMySQLϸģʽ - -/* ͨȫֱ*/ -$config->super2OBJ = true; - -/* Զļ*/ -$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php'; -if(file_exists($myConfig)) include $myConfig; -if(!isset($config->db->prefix)) $config->db->prefix = 'zt_'; - -/* ݱĶ塣*/ -define('TABLE_COMPANY', $config->db->prefix . 'company'); -define('TABLE_DEPT', $config->db->prefix . 'dept'); -define('TABLE_CONFIG', $config->db->prefix . 'config'); -define('TABLE_USER', $config->db->prefix . 'user'); -define('TABLE_TODO', $config->db->prefix . 'todo'); -define('TABLE_GROUP', $config->db->prefix . 'group'); -define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv'); -define('TABLE_USERGROUP', $config->db->prefix . 'userGroup'); -define('TABLE_USERQUERY', $config->db->prefix . 'userQuery'); - -define('TABLE_BUG', $config->db->prefix . 'bug'); -define('TABLE_CASE', $config->db->prefix . 'case'); -define('TABLE_CASESTEP', $config->db->prefix . 'caseStep'); -define('TABLE_TESTTASK', $config->db->prefix . 'testTask'); -define('TABLE_TESTRUN', $config->db->prefix . 'testRun'); -define('TABLE_TESTRESULT', $config->db->prefix . 'testResult'); - -define('TABLE_PRODUCT', $config->db->prefix . 'product'); -define('TABLE_STORY', $config->db->prefix . 'story'); -define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec'); -define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan'); -define('TABLE_RELEASE', $config->db->prefix . 'release'); - -define('TABLE_PROJECT', $config->db->prefix . 'project'); -define('TABLE_TASK', $config->db->prefix . 'task'); -define('TABLE_TEAM', $config->db->prefix . 'team'); -define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct'); -define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory'); -define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate'); -define('TABLE_EFFORT', $config->db->prefix . 'effort'); -define('TABLE_BURN', $config->db->prefix . 'burn'); -define('TABLE_BUILD', $config->db->prefix . 'build'); - -define('TABLE_MODULE', $config->db->prefix . 'module'); -define('TABLE_ACTION', $config->db->prefix . 'action'); -define('TABLE_FILE', $config->db->prefix . 'file'); -define('TABLE_HISTORY', $config->db->prefix . 'history'); diff --git a/tags/zentaopms_1.1_stable_20100706/db/update0.1.sql b/tags/zentaopms_1.1_stable_20100706/db/update0.1.sql deleted file mode 100644 index 23556d395e..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update0.1.sql +++ /dev/null @@ -1,152 +0,0 @@ --- story优先级的默认值。 -ALTER TABLE `zt_story` CHANGE `pri` `pri` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '3' - --- 修改project code字段的长度。 -ALTER TABLE `zt_project` CHANGE `code` `code` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL - --- task 暂时增加left字段: - ALTER TABLE `zt_task` ADD `left` tinyINT(3) NOT NULL AFTER `consumed` - --- 修改日期字段 -ALTER TABLE `zt_bug` CHANGE `openedDate` `openedDate` DATETIME NOT NULL , -CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL , -CHANGE `resolvedDate` `resolvedDate` DATETIME NOT NULL , -CHANGE `closedDate` `closedDate` DATETIME NOT NULL , -CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL - -RENAME TABLE `zentao`.`zt_division` TO `zentao`.`zt_dept` ; -ALTER TABLE `zt_user` CHANGE `division` `dept` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0' - - --- 0.2版本: --- --- 修改task表name字段的长度。 --- 修改task表的时间的类型,可以是浮点数。 -ALTER TABLE `zt_task` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL , -CHANGE `consumed` `consumed` FLOAT UNSIGNED NOT NULL , -CHANGE `left` `left` FLOAT UNSIGNED NOT NULL - --- todo表 - -CREATE TABLE IF NOT EXISTS `zt_todo` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `account` char(30) NOT NULL, - `date` date NOT NULL default '0000-00-00', - `begin` smallint(4) unsigned zerofill NOT NULL, - `end` smallint(4) unsigned zerofill NOT NULL, - `type` char(10) NOT NULL, - `idvalue` mediumint(8) unsigned NOT NULL default '0', - `pri` tinyint(3) unsigned NOT NULL, - `name` char(90) NOT NULL, - `desc` char(255) NOT NULL default '', - `status` enum('wait','doing','done') NOT NULL default 'wait', - PRIMARY KEY (`id`), - KEY `user` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- 更新product, project表中的company字段: -update zt_product set company = 1; -update zt_project set company = 1; - - -- 更新story字段里面的estimate字段: -ALTER TABLE `zt_story` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL - --- 还是使用datetime字段。 -ALTER TABLE `zt_story` CHANGE `openedDate` `openedDate` DATETIME NOT NULL , -CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL , -CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL , -CHANGE `closedDate` `closedDate` DATETIME NOT NULL - --- 增加diff字段。 -ALTER TABLE `zt_history` ADD `diff` TEXT NOT NULL - --- 10.27 -ALTER TABLE `zt_todo` CHANGE `desc` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL -ALTER TABLE `zt_task` CHANGE `name` `name` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL - -ALTER TABLE `zt_task` CHANGE `estimate` `estimate` FLOAT UNSIGNED NOT NULL , -CHANGE `consumed` `consumed` FLOAT UNSIGNED NOT NULL , -CHANGE `left` `left` FLOAT UNSIGNED NOT NULL - - --- 11.2 todo表增加private字段: -ALTER TABLE `zt_todo` ADD `private` BOOL NOT NULL - --- 11.4 增加消耗表。 -CREATE TABLE IF NOT EXISTS `zt_burn` ( - `project` mediumint(8) unsigned NOT NULL, - `date` date NOT NULL, - `left` float NOT NULL, - `consumed` float NOT NULL, - PRIMARY KEY (`project`,`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- 11.5 project status字段更改。 -ALTER TABLE `zt_project` CHANGE `status` `status` VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL - --- 11.10. - -ALTER TABLE `zt_bug` CHANGE `openedDate` `openedDate` DATETIME NOT NULL , -CHANGE `assignedDate` `assignedDate` DATETIME NOT NULL , -CHANGE `resolvedDate` `resolvedDate` DATETIME NOT NULL , -CHANGE `closedDate` `closedDate` DATETIME NOT NULL , -CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL - --- 11.12 - -ALTER TABLE `zt_bug` ADD `duplicateBug` MEDIUMINT UNSIGNED NOT NULL AFTER `closedDate` , -ADD `linkBug` VARCHAR( 255 ) NOT NULL AFTER `duplicateBug` , -ADD `case` MEDIUMINT UNSIGNED NOT NULL AFTER `linkBug` , -ADD `result` MEDIUMINT UNSIGNED NOT NULL AFTER `case` - --- 11.13 -ALTER TABLE `zt_case` CHANGE `openedDate` `openedDate` DATETIME NOT NULL , -CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL - --- 11.16 -ALTER TABLE `zt_file` CHANGE `addedDate` `addedDate` DATETIME NOT NULL; -ALTER TABLE `zt_file` ADD `title` CHAR( 90 ) NOT NULL AFTER `file`; -ALTER TABLE `zt_file` ADD `objectType` CHAR( 10 ) NOT NULL AFTER `size` , -ADD `objectID` MEDIUMINT NOT NULL AFTER `objectType` ; - -ALTER TABLE `zt_file` CHANGE `file` `pathname` CHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `zt_file` CHANGE `type` `extension` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; - -ALTER TABLE `zt_task` CHANGE `status` `status` ENUM( 'wait', 'doing', 'done', 'cancel' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait' - -ALTER TABLE `zt_todo` CHANGE `name` `name` CHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL - - --- 12.10 新增productPlan表。 -CREATE TABLE `zentao`.`zt_productPlan` ( - `id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `product` MEDIUMINT UNSIGNED NOT NULL , - `title` VARCHAR( 90 ) NOT NULL , - `desc` VARCHAR( 255 ) NOT NULL , - `begin` DATE NOT NULL , - `end` DATE NOT NULL -) ENGINE = MYISAM ; - --- 将zt_story中的release改为plan。 -ALTER TABLE `zt_story` CHANGE `replease` `plan` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0' - --- 12.11 修改case表。 - -ALTER TABLE `zt_case` CHANGE `type` `type` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1', -CHANGE `status` `status` CHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1', -CHANGE `openedDate` `openedDate` DATETIME NOT NULL , -CHANGE `lastEditedDate` `lastEditedDate` DATETIME NOT NULL - -ALTER TABLE `zt_case` CHANGE `title` `title` CHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL - --- 12.28 zt_task字段增加自定义排序字段。 -ALTER TABLE `zt_task` ADD `statusCustom` TINYINT UNSIGNED NOT NULL AFTER `status` , -ADD INDEX ( statusCustom ); -update zt_task set statusCustom = locate(status, 'wait,doing,done,cancel') - --- 增加类型字段。-- -ALTER TABLE `zt_task` ADD `type` VARCHAR( 20 ) NOT NULL AFTER `name` , -ADD INDEX ( TYPE ) - --- todo 增加状态-- -ALTER TABLE `zt_todo` CHANGE `status` `status` CHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'wait' diff --git a/tags/zentaopms_1.1_stable_20100706/db/update0.3.sql b/tags/zentaopms_1.1_stable_20100706/db/update0.3.sql deleted file mode 100644 index 3e34b220ea..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update0.3.sql +++ /dev/null @@ -1,35 +0,0 @@ --- 20100114: 重新修改build的结构。 -DROP TABLE IF EXISTS `zt_build`; -CREATE TABLE IF NOT EXISTS `zt_build` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `product` mediumint(8) unsigned NOT NULL default '0', - `project` mediumint(8) unsigned NOT NULL default '0', - `name` char(30) NOT NULL default '', - `scmPath` char(255) NOT NULL, - `filePath` char(255) NOT NULL, - `date` date NOT NULL, - `builder` char(30) NOT NULL default '', - `desc` char(255) NOT NULL default '', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- 20100115: 重新修改release的结构。 -DROP TABLE IF EXISTS `zt_release`; -CREATE TABLE IF NOT EXISTS `zt_release` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `product` mediumint(8) unsigned NOT NULL default '0', - `build` mediumint(8) unsigned NOT NULL, - `name` char(30) NOT NULL default '', - `date` date NOT NULL, - `desc` text NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- 20100115: fix bug 14 -ALTER TABLE `zt_productPlan` CHANGE `title` `title` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , -CHANGE `desc` `desc` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; - --- 20100125 user表增加status字段。 -ALTER TABLE `zt_user` ADD `status` VARCHAR( 30 ) NOT NULL DEFAULT 'active', -ADD INDEX ( STATUS ) diff --git a/tags/zentaopms_1.1_stable_20100706/db/update0.4.sql b/tags/zentaopms_1.1_stable_20100706/db/update0.4.sql deleted file mode 100644 index ba344d1287..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update0.4.sql +++ /dev/null @@ -1,114 +0,0 @@ --- 20100128 修改user表中ip字段的默认值,解决install失败的问题。 -ALTER TABLE `zt_user` CHANGE `ip` `ip` CHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; - --- 20100128: 调整casestep表。 -ALTER TABLE `zt_caseStep` CHANGE `caseVersion` `version` SMALLINT( 3 ) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `zt_caseStep` CHANGE `step` `desc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; -ALTER TABLE `zt_caseStep` CHANGE `expect` `expect` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; -ALTER TABLE `zt_caseStep` ADD INDEX ( `case` , `version` ) ; - --- 20100128 转换case中的step字段 -update zt_case set version = 1 where version = 0; -insert into zt_caseStep select '', id,version,steps, '' from zt_case; -ALTER TABLE `zt_case` DROP `steps`; - -DROP TABLE `zt_testPlan`; -CREATE TABLE IF NOT EXISTS `zt_testTask` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `name` char(90) NOT NULL, - `product` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL default '0', - `build` char(30) NOT NULL, - `begin` date NOT NULL, - `end` date NOT NULL, - `desc` text NOT NULL, - `status` char(30) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -DROP TABLE `zt_planCase`; -CREATE TABLE IF NOT EXISTS `zt_testRun` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `task` mediumint(8) unsigned NOT NULL default '0', - `case` mediumint(8) unsigned NOT NULL default '0', - `version` tinyint(3) unsigned NOT NULL default '0', - `assignedTo` char(30) NOT NULL default '', - `lastRun` datetime NOT NULL, - `lastResult` char(30) NOT NULL, - `status` char(30) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `task` (`task`,`case`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -DROP TABLE `zt_caseResult`; -DROP TABLE `zt_resultStep`; -CREATE TABLE IF NOT EXISTS `zt_testResult` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `run` mediumint(8) unsigned NOT NULL, - `case` mediumint(8) unsigned NOT NULL, - `version` smallint(5) unsigned NOT NULL, - `caseResult` char(30) NOT NULL, - `stepResults` text NOT NULL, - `date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `run` (`run`), - KEY `case` (`case`,`version`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; - --- 20100204 adjust the story. -ALTER TABLE `zt_story` DROP `attatchment`; -ALTER TABLE `zt_story` CHANGE `version` `version` SMALLINT NOT NULL DEFAULT '1'; -ALTER TABLE `zt_story` ADD `closedReason` VARCHAR( 30 ) NOT NULL AFTER `closedDate`; -ALTER TABLE `zt_story` ADD `stage` VARCHAR( 30 ) NOT NULL AFTER `status`; -ALTER TABLE `zt_story` ADD `reviewedBy` VARCHAR( 30 ) NOT NULL AFTER `lastEditedDate`; -ALTER TABLE `zt_story` ADD `reviewedDate` DATETIME NOT NULL AFTER `reviewedBy`; -UPDATE zt_story SET version = 1 WHERE version = 0; -UPDATE zt_story SET status = 'closed', closedReason = 'done', stage='released', closedBy = lastEditedBy, closedDate = lastEditedDate, assignedTo = 'closed' WHERE status = 'done'; -UPDATE zt_story SET status = 'draft' WHERE status = 'wait'; -UPDATE zt_story SET status = 'active' WHERE status = 'doing'; -ALTER TABLE `zt_story` CHANGE `bug` `fromBug` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `zt_story` ADD `toBug` MEDIUMINT NOT NULL AFTER `closedReason`; -ALTER TABLE `zt_story` ADD `childStories` VARCHAR( 255 ) NOT NULL AFTER `toBug` , -ADD `linkStories` VARCHAR( 255 ) NOT NULL AFTER `childStories`; -ALTER TABLE `zt_story` ADD `duplicateStory` MEDIUMINT UNSIGNED NOT NULL AFTER `linkStories`; - -CREATE TABLE IF NOT EXISTS `zt_storySpec` ( - `story` mediumint(9) NOT NULL, - `version` smallint(6) NOT NULL, - `title` VARCHAR( 90 ) NOT NULL, - `spec` text NOT NULL, - UNIQUE KEY `story` (`story`,`version`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO zt_storySpec select id,version,title,spec FROM zt_story; -ALTER TABLE `zt_story` DROP `spec`; -ALTER TABLE `zt_file` ADD `extra` VARCHAR( 255 ) NOT NULL ; -update `zt_file` set extra = 1 where objectType = 'story'; - -ALTER TABLE `zt_bug` ADD `storyVersion` SMALLINT NOT NULL DEFAULT '1' AFTER `story`; -ALTER TABLE `zt_bug` ADD `caseVersion` SMALLINT NOT NULL DEFAULT '1' AFTER `case`; -ALTER TABLE `zt_bug` DROP `field1` , -DROP `field2` , -DROP `feild3` ; - -ALTER TABLE `zt_case` DROP `field1` , -DROP `field2` , -DROP `feidl3` ; -ALTER TABLE `zt_case` ADD `storyVersion` SMALLINT NOT NULL DEFAULT '1' AFTER `story`; -ALTER TABLE `zt_projectStory` ADD `version` SMALLINT NOT NULL DEFAULT '1'; -ALTER TABLE `zt_task` ADD `storyVersion` SMALLINT NOT NULL DEFAULT '1' AFTER `story`; - --- delete releation. -DROP TABLE `zt_releation`; - --- 20100208 adjust action table. -ALTER TABLE `zt_action` ADD `extra` VARCHAR( 255 ) NOT NULL; -UPDATE zt_action SET extra = substr( ACTION , 13 ) , ACTION = 'Resolved' WHERE ACTION LIKE 'Resolved%'; - ---20100210 adjust the reviewedDate -ALTER TABLE `zt_story` CHANGE `reviewedDate` `reviewedDate` DATE NOT NULL; - ---20100220 action: convert the date from timestamp to datetime -ALTER TABLE `zt_action` ADD `datetmp` VARCHAR( 255 ) NOT NULL AFTER `date`; -UPDATE zt_action SET datetmp = FROM_UNIXTIME( date ) ; -ALTER TABLE `zt_action` DROP `date`; -ALTER TABLE `zt_action` CHANGE `datetmp` `date` DATETIME NOT NULL; diff --git a/tags/zentaopms_1.1_stable_20100706/db/update0.5.sql b/tags/zentaopms_1.1_stable_20100706/db/update0.5.sql deleted file mode 100644 index bf097cb097..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update0.5.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `zt_task` ADD `deadline` DATE NOT NULL AFTER `left` ; -ALTER TABLE `zt_bug` CHANGE `openedBuild` `openedBuild` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL diff --git a/tags/zentaopms_1.1_stable_20100706/db/update0.6.sql b/tags/zentaopms_1.1_stable_20100706/db/update0.6.sql deleted file mode 100644 index c79460bcd8..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update0.6.sql +++ /dev/null @@ -1,27 +0,0 @@ --- 2010-03-20 adjust bug table. -ALTER TABLE `zt_bug` ADD `pri` TINYINT UNSIGNED NOT NULL AFTER `severity` ; -ALTER TABLE `zt_bug` ADD `keywords` VARCHAR( 255 ) NOT NULL AFTER `title` ; -ALTER TABLE `zt_case` ADD `keywords` VARCHAR( 255 ) NOT NULL AFTER `title` ; -ALTER TABLE `zt_case` ADD `stage` VARCHAR( 255 ) NOT NULL AFTER `type` ; -ALTER TABLE `zt_case` ADD `howRun` VARCHAR( 30 ) NOT NULL AFTER `stage` , -ADD `scriptedBy` VARCHAR( 30 ) NOT NULL AFTER `howRun` , -ADD `scriptedDate` DATE NOT NULL AFTER `scriptedBy` , -ADD `scriptStatus` VARCHAR( 30 ) NOT NULL AFTER `scriptedDate` , -ADD `scriptLocation` VARCHAR( 255 ) NOT NULL AFTER `scriptStatus`, -ADD `linkCase` VARCHAR( 255 ) NOT NULL AFTER `version` ; - --- 2010-03-27 fix bug 43 -update zt_projectStory,zt_story set zt_projectStory.product=zt_story.product where zt_projectStory.story=zt_story.id; - --- 2010-03-27 add keywords to story. -ALTER TABLE `zt_story` ADD `keywords` VARCHAR( 255 ) NOT NULL AFTER `title` ; - --- 2010-03-29 add fields of project. -ALTER TABLE `zt_project` ADD `acl` ENUM( 'open', 'private', 'custom' ) NOT NULL DEFAULT 'open', -ADD `whitelist` VARCHAR( 255 ) NOT NULL ; - --- 2010-03-29 adjust the field length. -ALTER TABLE `zt_project` CHANGE `name` `name` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , -CHANGE `code` `code` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `zt_product` CHANGE `name` `name` VARCHAR( 90 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , -CHANGE `code` `code` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL diff --git a/tags/zentaopms_1.1_stable_20100706/db/update1.0.1.sql b/tags/zentaopms_1.1_stable_20100706/db/update1.0.1.sql deleted file mode 100644 index bb0f75b302..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update1.0.1.sql +++ /dev/null @@ -1,17 +0,0 @@ --- 2010-07-01 task table. -ALTER TABLE `zt_task` ADD `mailto` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' AFTER `statusCustom`; - ---2010-07-05 userquery table. -CREATE TABLE IF NOT EXISTS `zt_userQuery` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `account` char(30) NOT NULL, - `module` varchar(30) NOT NULL, - `title` varchar(90) NOT NULL, - `form` text NOT NULL, - `sql` text NOT NULL, - PRIMARY KEY (`id`), - KEY `company` (`company`), - KEY `account` (`account`), - KEY `module` (`module`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/tags/zentaopms_1.1_stable_20100706/db/update1.0.beta.sql b/tags/zentaopms_1.1_stable_20100706/db/update1.0.beta.sql deleted file mode 100644 index 347c76b928..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update1.0.beta.sql +++ /dev/null @@ -1,68 +0,0 @@ --- 2010-04-06 bug table. -ALTER TABLE `zt_bug` ADD `deleted` ENUM( "0", "1" ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_build` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_case` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_company` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_file` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_product` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_productPlan` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_project` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_release` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_story` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_task` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_testTask` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; -ALTER TABLE `zt_user` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0'; - --- user table. -UPDATE zt_user SET deleted = '1' WHERE STATUS = 'delete'; -ALTER TABLE `zt_user` DROP `status`; -INSERT INTO zt_action(`company`, `objecttype`, `objectID`, `actor`, action, `date`, `comment` , `extra`) SELECT `company`, 'user', `id`, 'system', 'deleted', now( ) , '', 1 FROM zt_user WHERE zt_user.deleted ='1'; - --- company fields. -ALTER TABLE `zt_action` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_bug` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_bug` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_build` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_build` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_burn` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ; -ALTER TABLE `zt_burn` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_case` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_case` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_caseStep` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_caseStep` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_effort` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_effort` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_groupPriv` ADD `company` MEDIUMINT NOT NULL FIRST ; -ALTER TABLE `zt_groupPriv` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_history` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_history` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_module` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_module` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_productPlan` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_productPlan` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_projectProduct` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ; -ALTER TABLE `zt_projectProduct` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_projectStory` ADD `company` MEDIUMINT NOT NULL FIRST ; -ALTER TABLE `zt_projectStory` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_release` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_release` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_story` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_story` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_storySpec` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ; -ALTER TABLE `zt_storySpec` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_task` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_task` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_taskEstimate` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_taskEstimate` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_team` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ; -ALTER TABLE `zt_team` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_testResult` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_testResult` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_testRun` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_testRun` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_testTask` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ; -ALTER TABLE `zt_testTask` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_todo` ADD `company` MEDIUMINT NOT NULL AFTER `id` ; -ALTER TABLE `zt_todo` ADD INDEX ( `company` ) ; -ALTER TABLE `zt_userGroup` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ; -ALTER TABLE `zt_userGroup` ADD INDEX ( `company` ) ; diff --git a/tags/zentaopms_1.1_stable_20100706/db/update1.0.rc1.sql b/tags/zentaopms_1.1_stable_20100706/db/update1.0.rc1.sql deleted file mode 100644 index ebe161effb..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/update1.0.rc1.sql +++ /dev/null @@ -1,2 +0,0 @@ --- 2010-04-24 product status field. -UPDATE zt_product SET status='normal'; diff --git a/tags/zentaopms_1.1_stable_20100706/db/zentao.sql b/tags/zentaopms_1.1_stable_20100706/db/zentao.sql deleted file mode 100644 index de0bd9ab9f..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/db/zentao.sql +++ /dev/null @@ -1,1138 +0,0 @@ --- DROP TABLE IF EXISTS `zt_action`; -CREATE TABLE IF NOT EXISTS `zt_action` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `objectType` varchar(30) NOT NULL default '', - `objectID` mediumint(8) unsigned NOT NULL default '0', - `actor` varchar(30) NOT NULL default '', - `action` varchar(30) NOT NULL default '', - `date` datetime NOT NULL, - `comment` text NOT NULL, - `extra` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_bug`; -CREATE TABLE IF NOT EXISTS `zt_bug` ( - `id` mediumint(8) NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `module` mediumint(8) unsigned NOT NULL default '0', - `project` mediumint(8) unsigned NOT NULL default '0', - `story` mediumint(8) unsigned NOT NULL default '0', - `storyVersion` smallint(6) NOT NULL default '1', - `task` mediumint(8) unsigned NOT NULL default '0', - `title` varchar(150) NOT NULL default '', - `keywords` varchar(255) NOT NULL, - `severity` tinyint(4) NOT NULL default '0', - `pri` tinyint(3) unsigned NOT NULL, - `type` varchar(30) NOT NULL default '', - `os` varchar(30) NOT NULL default '', - `browser` varchar(30) NOT NULL default '', - `hardware` varchar(30) NOT NULL, - `found` varchar(30) NOT NULL default '', - `steps` text NOT NULL, - `status` enum('active','resolved','closed') NOT NULL default 'active', - `mailto` varchar(255) NOT NULL default '', - `openedBy` varchar(30) NOT NULL default '', - `openedDate` datetime NOT NULL, - `openedBuild` varchar(255) NOT NULL, - `assignedTo` varchar(30) NOT NULL default '', - `assignedDate` datetime NOT NULL, - `resolvedBy` varchar(30) NOT NULL default '', - `resolution` varchar(30) NOT NULL default '', - `resolvedBuild` varchar(30) NOT NULL default '', - `resolvedDate` datetime NOT NULL, - `closedBy` varchar(30) NOT NULL default '', - `closedDate` datetime NOT NULL, - `duplicateBug` mediumint(8) unsigned NOT NULL, - `linkBug` varchar(255) NOT NULL, - `case` mediumint(8) unsigned NOT NULL, - `caseVersion` smallint(6) NOT NULL default '1', - `result` mediumint(8) unsigned NOT NULL, - `lastEditedBy` varchar(30) NOT NULL default '', - `lastEditedDate` datetime NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_build`; -CREATE TABLE IF NOT EXISTS `zt_build` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `project` mediumint(8) unsigned NOT NULL default '0', - `name` char(30) NOT NULL default '', - `scmPath` char(255) NOT NULL, - `filePath` char(255) NOT NULL, - `date` date NOT NULL, - `builder` char(30) NOT NULL default '', - `desc` char(255) NOT NULL default '', - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_burn`; -CREATE TABLE IF NOT EXISTS `zt_burn` ( - `company` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL, - `date` date NOT NULL, - `left` float NOT NULL, - `consumed` float NOT NULL, - PRIMARY KEY (`project`,`date`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_case`; -CREATE TABLE IF NOT EXISTS `zt_case` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `module` mediumint(8) unsigned NOT NULL default '0', - `path` mediumint(8) unsigned NOT NULL default '0', - `story` mediumint(30) unsigned NOT NULL default '0', - `storyVersion` smallint(6) NOT NULL default '1', - `title` char(90) NOT NULL, - `keywords` varchar(255) NOT NULL, - `pri` tinyint(3) unsigned NOT NULL default '0', - `type` char(30) NOT NULL default '1', - `stage` varchar(255) NOT NULL, - `howRun` varchar(30) NOT NULL, - `scriptedBy` varchar(30) NOT NULL, - `scriptedDate` date NOT NULL, - `scriptStatus` varchar(30) NOT NULL, - `scriptLocation` varchar(255) NOT NULL, - `status` char(30) NOT NULL default '1', - `frequency` enum('1','2','3') NOT NULL default '1', - `order` tinyint(30) unsigned NOT NULL default '0', - `openedBy` char(30) NOT NULL default '', - `openedDate` datetime NOT NULL, - `lastEditedBy` char(30) NOT NULL default '', - `lastEditedDate` datetime NOT NULL, - `version` tinyint(3) unsigned NOT NULL default '0', - `linkCase` varchar(255) NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_caseStep`; -CREATE TABLE IF NOT EXISTS `zt_caseStep` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `case` mediumint(8) unsigned NOT NULL default '0', - `version` smallint(3) unsigned NOT NULL default '0', - `desc` text NOT NULL, - `expect` text NOT NULL, - PRIMARY KEY (`id`), - KEY `case` (`case`,`version`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_company`; -CREATE TABLE IF NOT EXISTS `zt_company` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `name` char(120) default NULL, - `phone` char(20) default NULL, - `fax` char(20) default NULL, - `address` char(120) default NULL, - `zipcode` char(10) default NULL, - `website` char(120) default NULL, - `backyard` char(120) default NULL, - `pms` char(120) default NULL, - `guest` enum('1','0') NOT NULL default '0', - `admins` char(255) default NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `pms` (`pms`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_config`; -CREATE TABLE IF NOT EXISTS `zt_config` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `owner` char(30) NOT NULL default '', - `section` char(30) NOT NULL default '', - `key` char(30) NOT NULL default '', - `value` char(255) NOT NULL default '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_dept`; -CREATE TABLE IF NOT EXISTS `zt_dept` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `name` char(30) NOT NULL default '', - `parent` mediumint(8) unsigned NOT NULL default '0', - `path` char(255) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `order` tinyint(3) unsigned NOT NULL default '0', - `position` char(30) NOT NULL default '', - `function` char(255) NOT NULL default '', - `manager` char(30) NOT NULL default '', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_effort`; -CREATE TABLE IF NOT EXISTS `zt_effort` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `user` char(30) NOT NULL default '', - `todo` enum('1','0') NOT NULL default '1', - `date` date NOT NULL default '0000-00-00', - `begin` datetime NOT NULL default '0000-00-00 00:00:00', - `end` datetime NOT NULL default '0000-00-00 00:00:00', - `type` enum('1','2','3') NOT NULL default '1', - `idvalue` mediumint(8) unsigned NOT NULL default '0', - `name` char(30) NOT NULL default '', - `desc` char(255) NOT NULL default '', - `status` enum('1','2','3') NOT NULL default '1', - PRIMARY KEY (`id`), - KEY `user` (`user`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_file`; -CREATE TABLE IF NOT EXISTS `zt_file` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `pathname` char(50) NOT NULL, - `title` char(90) NOT NULL, - `extension` char(30) NOT NULL, - `size` mediumint(8) unsigned NOT NULL default '0', - `objectType` char(30) NOT NULL, - `objectID` mediumint(9) NOT NULL, - `addedBy` char(30) NOT NULL default '', - `addedDate` datetime NOT NULL, - `downloads` mediumint(8) unsigned NOT NULL default '0', - `extra` varchar(255) NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_group`; -CREATE TABLE IF NOT EXISTS `zt_group` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `name` char(30) NOT NULL, - `desc` char(255) NOT NULL default '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_groupPriv`; -CREATE TABLE IF NOT EXISTS `zt_groupPriv` ( - `company` mediumint(9) NOT NULL, - `group` mediumint(8) unsigned NOT NULL default '0', - `module` char(30) NOT NULL default '', - `method` char(30) NOT NULL default '', - UNIQUE KEY `group` (`group`,`module`,`method`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_history`; -CREATE TABLE IF NOT EXISTS `zt_history` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `action` mediumint(8) unsigned NOT NULL default '0', - `field` varchar(30) NOT NULL default '', - `old` text NOT NULL, - `new` text NOT NULL, - `diff` text NOT NULL, - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_module`; -CREATE TABLE IF NOT EXISTS `zt_module` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `name` char(30) NOT NULL default '', - `parent` mediumint(8) unsigned NOT NULL default '0', - `path` char(255) NOT NULL default '', - `grade` tinyint(3) unsigned NOT NULL default '0', - `order` tinyint(3) unsigned NOT NULL default '0', - `view` char(30) NOT NULL default '', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_product`; -CREATE TABLE IF NOT EXISTS `zt_product` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `name` varchar(90) NOT NULL, - `code` varchar(45) NOT NULL, - `order` tinyint(3) unsigned NOT NULL default '0', - `status` varchar(30) NOT NULL default '', - `desc` text NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_productPlan`; -CREATE TABLE IF NOT EXISTS `zt_productPlan` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL, - `title` varchar(90) NOT NULL, - `desc` varchar(255) NOT NULL, - `begin` date NOT NULL, - `end` date NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_project`; -CREATE TABLE IF NOT EXISTS `zt_project` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `isCat` enum('1','0') NOT NULL default '0', - `catID` mediumint(8) unsigned NOT NULL, - `type` enum('sprint','project') NOT NULL default 'sprint', - `parent` mediumint(8) unsigned NOT NULL default '0', - `name` varchar(90) NOT NULL, - `code` varchar(45) NOT NULL, - `begin` date NOT NULL, - `end` date NOT NULL, - `status` varchar(10) NOT NULL, - `statge` enum('1','2','3','4','5') NOT NULL default '1', - `pri` enum('1','2','3','4') NOT NULL default '1', - `desc` text NOT NULL, - `goal` text NOT NULL, - `openedBy` varchar(30) NOT NULL default '', - `openedDate` int(10) unsigned NOT NULL default '0', - `closedBy` varchar(30) NOT NULL default '', - `closedDate` int(10) unsigned NOT NULL default '0', - `canceledBy` varchar(30) NOT NULL default '', - `canceledDate` int(10) unsigned NOT NULL default '0', - `PO` varchar(30) NOT NULL default '', - `PM` varchar(30) NOT NULL default '', - `QM` varchar(30) NOT NULL default '', - `team` varchar(30) NOT NULL, - `acl` enum('open','private','custom') NOT NULL default 'open', - `whitelist` varchar(255) NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`,`type`,`parent`,`begin`,`end`,`status`,`statge`,`pri`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_projectProduct`; -CREATE TABLE IF NOT EXISTS `zt_projectProduct` ( - `company` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL, - PRIMARY KEY (`project`,`product`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_projectStory`; -CREATE TABLE IF NOT EXISTS `zt_projectStory` ( - `company` mediumint(9) NOT NULL, - `project` mediumint(8) unsigned NOT NULL default '0', - `product` mediumint(8) unsigned NOT NULL, - `story` mediumint(8) unsigned NOT NULL default '0', - `version` smallint(6) NOT NULL default '1', - UNIQUE KEY `project` (`project`,`story`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_release`; -CREATE TABLE IF NOT EXISTS `zt_release` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `build` mediumint(8) unsigned NOT NULL, - `name` char(30) NOT NULL default '', - `date` date NOT NULL, - `desc` text NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_story`; -CREATE TABLE IF NOT EXISTS `zt_story` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `product` mediumint(8) unsigned NOT NULL default '0', - `module` mediumint(8) unsigned NOT NULL default '0', - `plan` mediumint(8) unsigned NOT NULL default '0', - `fromBug` mediumint(8) unsigned NOT NULL default '0', - `title` varchar(90) NOT NULL default '', - `keywords` varchar(255) NOT NULL, - `type` varchar(30) NOT NULL default '', - `pri` tinyint(3) unsigned NOT NULL default '3', - `estimate` float unsigned NOT NULL, - `status` varchar(30) NOT NULL default '', - `stage` varchar(30) NOT NULL, - `mailto` varchar(255) NOT NULL default '', - `openedBy` varchar(30) NOT NULL default '', - `openedDate` datetime NOT NULL, - `assignedTo` varchar(30) NOT NULL default '', - `assignedDate` datetime NOT NULL, - `lastEditedBy` varchar(30) NOT NULL default '', - `lastEditedDate` datetime NOT NULL, - `reviewedBy` varchar(30) NOT NULL, - `reviewedDate` date NOT NULL, - `closedBy` varchar(30) NOT NULL default '', - `closedDate` datetime NOT NULL, - `closedReason` varchar(30) NOT NULL, - `toBug` mediumint(9) NOT NULL, - `childStories` varchar(255) NOT NULL, - `linkStories` varchar(255) NOT NULL, - `duplicateStory` mediumint(8) unsigned NOT NULL, - `version` smallint(6) NOT NULL default '1', - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `product` (`product`,`module`,`plan`,`type`,`pri`), - KEY `status` (`status`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_storySpec`; -CREATE TABLE IF NOT EXISTS `zt_storySpec` ( - `company` mediumint(8) unsigned NOT NULL, - `story` mediumint(9) NOT NULL, - `version` smallint(6) NOT NULL, - `title` varchar(90) NOT NULL, - `spec` text NOT NULL, - UNIQUE KEY `story` (`story`,`version`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_task`; -CREATE TABLE IF NOT EXISTS `zt_task` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL default '0', - `story` mediumint(8) unsigned NOT NULL default '0', - `storyVersion` smallint(6) NOT NULL default '1', - `name` varchar(90) NOT NULL, - `type` varchar(20) NOT NULL, - `pri` tinyint(3) unsigned NOT NULL default '0', - `owner` char(30) NOT NULL default '', - `estimate` float unsigned NOT NULL, - `consumed` float unsigned NOT NULL, - `left` float unsigned NOT NULL, - `deadline` date NOT NULL, - `status` enum('wait','doing','done','cancel') NOT NULL default 'wait', - `statusCustom` tinyint(3) unsigned NOT NULL, - `mailto` varchar(255) NOT NULL default '', - `desc` text NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `statusOrder` (`statusCustom`), - KEY `type` (`type`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_taskEstimate`; -CREATE TABLE IF NOT EXISTS `zt_taskEstimate` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `task` mediumint(8) unsigned NOT NULL default '0', - `date` int(10) unsigned NOT NULL default '0', - `estimate` tinyint(3) unsigned NOT NULL default '0', - `estimater` char(30) NOT NULL default '', - PRIMARY KEY (`id`), - KEY `task` (`task`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_team`; -CREATE TABLE IF NOT EXISTS `zt_team` ( - `company` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL default '0', - `account` char(30) NOT NULL default '', - `role` char(30) NOT NULL default '', - `joinDate` date NOT NULL default '0000-00-00', - `workingHour` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`project`,`account`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_testResult`; -CREATE TABLE IF NOT EXISTS `zt_testResult` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `run` mediumint(8) unsigned NOT NULL, - `case` mediumint(8) unsigned NOT NULL, - `version` smallint(5) unsigned NOT NULL, - `caseResult` char(30) NOT NULL, - `stepResults` text NOT NULL, - `date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `run` (`run`), - KEY `case` (`case`,`version`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_testRun`; -CREATE TABLE IF NOT EXISTS `zt_testRun` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `task` mediumint(8) unsigned NOT NULL default '0', - `case` mediumint(8) unsigned NOT NULL default '0', - `version` tinyint(3) unsigned NOT NULL default '0', - `assignedTo` char(30) NOT NULL default '', - `lastRun` datetime NOT NULL, - `lastResult` char(30) NOT NULL, - `status` char(30) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `task` (`task`,`case`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_testTask`; -CREATE TABLE IF NOT EXISTS `zt_testTask` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL, - `name` char(90) NOT NULL, - `product` mediumint(8) unsigned NOT NULL, - `project` mediumint(8) unsigned NOT NULL default '0', - `build` char(30) NOT NULL, - `begin` date NOT NULL, - `end` date NOT NULL, - `desc` text NOT NULL, - `status` char(30) NOT NULL, - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_todo`; -CREATE TABLE IF NOT EXISTS `zt_todo` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(9) NOT NULL, - `account` char(30) NOT NULL, - `date` date NOT NULL default '0000-00-00', - `begin` smallint(4) unsigned zerofill NOT NULL, - `end` smallint(4) unsigned zerofill NOT NULL, - `type` char(10) NOT NULL, - `idvalue` mediumint(8) unsigned NOT NULL default '0', - `pri` tinyint(3) unsigned NOT NULL, - `name` char(150) NOT NULL, - `desc` text NOT NULL, - `status` char(20) NOT NULL default '', - `private` tinyint(1) NOT NULL, - PRIMARY KEY (`id`), - KEY `user` (`account`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_user`; -CREATE TABLE IF NOT EXISTS `zt_user` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `dept` mediumint(8) unsigned NOT NULL default '0', - `account` char(30) NOT NULL default '', - `password` char(32) NOT NULL default '', - `realname` char(30) NOT NULL default '', - `nickname` char(60) NOT NULL default '', - `avatar` char(30) NOT NULL default '', - `birthyear` smallint(5) unsigned NOT NULL default '0', - `birthday` date NOT NULL default '0000-00-00', - `gendar` enum('f','m') NOT NULL default 'f', - `email` char(90) NOT NULL default '', - `msn` char(90) NOT NULL default '', - `qq` char(20) NOT NULL default '', - `yahoo` char(90) NOT NULL default '', - `gtalk` char(90) NOT NULL default '', - `wangwang` char(90) NOT NULL default '', - `mobile` char(11) NOT NULL default '', - `phone` char(20) NOT NULL default '', - `address` char(120) NOT NULL default '', - `zipcode` char(10) NOT NULL default '', - `join` date NOT NULL default '0000-00-00', - `visits` mediumint(8) unsigned NOT NULL default '0', - `ip` char(15) NOT NULL default '', - `last` int(10) unsigned NOT NULL default '0', - `deleted` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account` (`account`), - KEY `company` (`company`,`dept`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_userGroup`; -CREATE TABLE IF NOT EXISTS `zt_userGroup` ( - `company` mediumint(8) unsigned NOT NULL, - `account` char(30) NOT NULL default '', - `group` mediumint(8) unsigned NOT NULL default '0', - UNIQUE KEY `account` (`account`,`group`), - KEY `company` (`company`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; --- DROP TABLE IF EXISTS `zt_userQuery`; -CREATE TABLE IF NOT EXISTS `zt_userQuery` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `company` mediumint(8) unsigned NOT NULL default '0', - `account` char(30) NOT NULL, - `module` varchar(30) NOT NULL, - `title` varchar(90) NOT NULL, - `form` text NOT NULL, - `sql` text NOT NULL, - PRIMARY KEY (`id`), - KEY `company` (`company`), - KEY `account` (`account`), - KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -INSERT INTO `zt_group` (`id`, `company`, `name`, `desc`) VALUES -(1, 0, 'ADMIN', 'for administrator.'), -(2, 0, 'PO', 'for product owners.'), -(3, 0, 'DEV', 'for developers.'), -(4, 0, 'QA', 'for testers.'), -(5, 0, 'PM', 'for project managers.'); - -INSERT INTO `zt_groupPriv` (`company`, `group`, `module`, `method`) VALUES -(0, 1, 'file', 'export2CSV'), -(0, 1, 'file', 'download'), -(0, 1, 'api', 'getModel'), -(0, 1, 'admin', 'index'), -(0, 1, 'search', 'deleteQuery'), -(0, 1, 'search', 'saveQuery'), -(0, 1, 'search', 'buildQuery'), -(0, 1, 'search', 'buildForm'), -(0, 1, 'tree', 'ajaxGetOptionMenu'), -(0, 1, 'tree', 'delete'), -(0, 1, 'tree', 'edit'), -(0, 1, 'tree', 'manageChild'), -(0, 1, 'tree', 'updateOrder'), -(0, 1, 'tree', 'browse'), -(0, 1, 'user', 'profile'), -(0, 1, 'user', 'project'), -(0, 1, 'user', 'bug'), -(0, 1, 'user', 'task'), -(0, 1, 'user', 'todo'), -(0, 1, 'user', 'delete'), -(0, 1, 'user', 'edit'), -(0, 1, 'user', 'view'), -(0, 1, 'user', 'create'), -(0, 1, 'group', 'manageMember'), -(0, 1, 'group', 'managePriv'), -(0, 1, 'group', 'delete'), -(0, 1, 'group', 'copy'), -(0, 1, 'group', 'edit'), -(0, 1, 'group', 'create'), -(0, 1, 'group', 'browse'), -(0, 1, 'dept', 'delete'), -(0, 1, 'dept', 'manageChild'), -(0, 1, 'dept', 'updateOrder'), -(0, 1, 'dept', 'browse'), -(0, 1, 'company', 'edit'), -(0, 1, 'company', 'browse'), -(0, 1, 'company', 'index'), -(0, 1, 'testtask', 'results'), -(0, 1, 'testtask', 'runcase'), -(0, 1, 'testtask', 'unlinkcase'), -(0, 1, 'testtask', 'linkcase'), -(0, 1, 'testtask', 'batchAssign'), -(0, 1, 'testtask', 'delete'), -(0, 1, 'testtask', 'edit'), -(0, 1, 'testtask', 'cases'), -(0, 1, 'testtask', 'view'), -(0, 1, 'testtask', 'browse'), -(0, 1, 'testtask', 'create'), -(0, 1, 'testtask', 'index'), -(0, 1, 'testcase', 'confirmStoryChange'), -(0, 1, 'testcase', 'delete'), -(0, 1, 'testcase', 'edit'), -(0, 1, 'testcase', 'view'), -(0, 1, 'testcase', 'create'), -(0, 1, 'testcase', 'browse'), -(0, 1, 'testcase', 'index'), -(0, 1, 'bug', 'ajaxGetUserBugs'), -(0, 1, 'bug', 'delete'), -(0, 1, 'bug', 'confirmStoryChange'), -(0, 1, 'bug', 'report'), -(0, 1, 'bug', 'close'), -(0, 1, 'bug', 'activate'), -(0, 1, 'bug', 'resolve'), -(0, 1, 'bug', 'edit'), -(0, 1, 'bug', 'view'), -(0, 1, 'bug', 'create'), -(0, 1, 'bug', 'browse'), -(0, 1, 'bug', 'index'), -(0, 1, 'qa', 'index'), -(0, 1, 'build', 'ajaxGetProjectBuilds'), -(0, 1, 'build', 'ajaxGetProductBuilds'), -(0, 1, 'build', 'view'), -(0, 1, 'build', 'delete'), -(0, 1, 'build', 'edit'), -(0, 1, 'build', 'create'), -(0, 1, 'task', 'ajaxGetProjectTasks'), -(0, 1, 'task', 'ajaxGetUserTasks'), -(0, 1, 'task', 'confirmStoryChange'), -(0, 1, 'task', 'view'), -(0, 1, 'task', 'delete'), -(0, 1, 'task', 'edit'), -(0, 1, 'task', 'create'), -(0, 1, 'project', 'unlinkStory'), -(0, 1, 'project', 'linkStory'), -(0, 1, 'project', 'unlinkMember'), -(0, 1, 'project', 'manageMembers'), -(0, 1, 'project', 'manageProducts'), -(0, 1, 'project', 'team'), -(0, 1, 'project', 'burnData'), -(0, 1, 'project', 'computeBurn'), -(0, 1, 'project', 'burn'), -(0, 1, 'project', 'bug'), -(0, 1, 'project', 'build'), -(0, 1, 'project', 'story'), -(0, 1, 'project', 'importtask'), -(0, 1, 'project', 'grouptask'), -(0, 1, 'project', 'task'), -(0, 1, 'project', 'delete'), -(0, 1, 'project', 'edit'), -(0, 1, 'project', 'create'), -(0, 1, 'project', 'browse'), -(0, 1, 'project', 'view'), -(0, 1, 'project', 'index'), -(0, 1, 'release', 'view'), -(0, 1, 'release', 'delete'), -(0, 1, 'release', 'edit'), -(0, 1, 'release', 'create'), -(0, 1, 'release', 'browse'), -(0, 1, 'productplan', 'unlinkStory'), -(0, 1, 'productplan', 'linkStory'), -(0, 1, 'productplan', 'view'), -(0, 1, 'productplan', 'delete'), -(0, 1, 'productplan', 'edit'), -(0, 1, 'productplan', 'create'), -(0, 1, 'productplan', 'browse'), -(0, 1, 'story', 'ajaxGetProductStories'), -(0, 1, 'story', 'ajaxGetProjectStories'), -(0, 1, 'story', 'tasks'), -(0, 1, 'story', 'activate'), -(0, 1, 'story', 'close'), -(0, 1, 'story', 'review'), -(0, 1, 'story', 'change'), -(0, 1, 'story', 'view'), -(0, 1, 'story', 'delete'), -(0, 1, 'story', 'edit'), -(0, 1, 'story', 'create'), -(0, 1, 'product', 'ajaxGetPlans'), -(0, 1, 'product', 'ajaxGetProjects'), -(0, 1, 'product', 'roadmap'), -(0, 1, 'product', 'delete'), -(0, 1, 'product', 'edit'), -(0, 1, 'product', 'view'), -(0, 1, 'product', 'create'), -(0, 1, 'product', 'browse'), -(0, 1, 'product', 'index'), -(0, 1, 'todo', 'import2Today'), -(0, 1, 'todo', 'mark'), -(0, 1, 'todo', 'delete'), -(0, 1, 'todo', 'view'), -(0, 1, 'todo', 'edit'), -(0, 1, 'todo', 'create'), -(0, 1, 'my', 'editProfile'), -(0, 1, 'my', 'profile'), -(0, 1, 'my', 'project'), -(0, 1, 'my', 'story'), -(0, 1, 'my', 'bug'), -(0, 1, 'my', 'task'), -(0, 2, 'file', 'download'), -(0, 2, 'search', 'deleteQuery'), -(0, 2, 'search', 'saveQuery'), -(0, 2, 'search', 'buildQuery'), -(0, 2, 'search', 'buildForm'), -(0, 2, 'tree', 'ajaxGetOptionMenu'), -(0, 2, 'tree', 'delete'), -(0, 2, 'tree', 'edit'), -(0, 2, 'tree', 'manageChild'), -(0, 2, 'tree', 'updateOrder'), -(0, 2, 'tree', 'browse'), -(0, 2, 'user', 'profile'), -(0, 2, 'user', 'project'), -(0, 2, 'user', 'bug'), -(0, 2, 'user', 'task'), -(0, 2, 'user', 'todo'), -(0, 2, 'user', 'view'), -(0, 2, 'company', 'browse'), -(0, 2, 'company', 'index'), -(0, 2, 'testtask', 'results'), -(0, 2, 'testtask', 'cases'), -(0, 2, 'testtask', 'view'), -(0, 2, 'testtask', 'browse'), -(0, 2, 'testtask', 'index'), -(0, 2, 'testcase', 'edit'), -(0, 2, 'testcase', 'view'), -(0, 2, 'testcase', 'create'), -(0, 2, 'testcase', 'browse'), -(0, 2, 'testcase', 'index'), -(0, 2, 'bug', 'ajaxGetUserBugs'), -(0, 2, 'bug', 'report'), -(0, 2, 'bug', 'close'), -(0, 2, 'bug', 'activate'), -(0, 2, 'bug', 'resolve'), -(0, 2, 'bug', 'edit'), -(0, 2, 'bug', 'view'), -(0, 2, 'bug', 'create'), -(0, 2, 'bug', 'browse'), -(0, 2, 'bug', 'index'), -(0, 2, 'qa', 'index'), -(0, 2, 'build', 'ajaxGetProjectBuilds'), -(0, 2, 'build', 'ajaxGetProductBuilds'), -(0, 2, 'build', 'view'), -(0, 2, 'build', 'delete'), -(0, 2, 'build', 'edit'), -(0, 2, 'build', 'create'), -(0, 2, 'task', 'ajaxGetProjectTasks'), -(0, 2, 'task', 'ajaxGetUserTasks'), -(0, 2, 'task', 'view'), -(0, 2, 'task', 'edit'), -(0, 2, 'task', 'create'), -(0, 2, 'project', 'unlinkStory'), -(0, 2, 'project', 'linkStory'), -(0, 2, 'project', 'manageProducts'), -(0, 2, 'project', 'team'), -(0, 2, 'project', 'burnData'), -(0, 2, 'project', 'burn'), -(0, 2, 'project', 'bug'), -(0, 2, 'project', 'build'), -(0, 2, 'project', 'story'), -(0, 2, 'project', 'grouptask'), -(0, 2, 'project', 'task'), -(0, 2, 'project', 'browse'), -(0, 2, 'project', 'view'), -(0, 2, 'project', 'index'), -(0, 2, 'release', 'view'), -(0, 2, 'release', 'delete'), -(0, 2, 'release', 'edit'), -(0, 2, 'release', 'create'), -(0, 2, 'release', 'browse'), -(0, 2, 'productplan', 'unlinkStory'), -(0, 2, 'productplan', 'linkStory'), -(0, 2, 'productplan', 'view'), -(0, 2, 'productplan', 'delete'), -(0, 2, 'productplan', 'edit'), -(0, 2, 'productplan', 'create'), -(0, 2, 'productplan', 'browse'), -(0, 2, 'story', 'ajaxGetProductStories'), -(0, 2, 'story', 'ajaxGetProjectStories'), -(0, 2, 'story', 'tasks'), -(0, 2, 'story', 'activate'), -(0, 2, 'story', 'close'), -(0, 2, 'story', 'review'), -(0, 2, 'story', 'change'), -(0, 2, 'story', 'view'), -(0, 2, 'story', 'delete'), -(0, 2, 'story', 'edit'), -(0, 2, 'story', 'create'), -(0, 2, 'product', 'ajaxGetPlans'), -(0, 2, 'product', 'ajaxGetProjects'), -(0, 2, 'product', 'roadmap'), -(0, 2, 'product', 'delete'), -(0, 2, 'product', 'edit'), -(0, 2, 'product', 'view'), -(0, 2, 'product', 'create'), -(0, 2, 'product', 'browse'), -(0, 2, 'product', 'index'), -(0, 2, 'todo', 'import2Today'), -(0, 2, 'todo', 'mark'), -(0, 2, 'todo', 'delete'), -(0, 2, 'todo', 'view'), -(0, 2, 'todo', 'edit'), -(0, 2, 'todo', 'create'), -(0, 2, 'my', 'editProfile'), -(0, 2, 'my', 'profile'), -(0, 2, 'my', 'project'), -(0, 2, 'my', 'story'), -(0, 2, 'my', 'bug'), -(0, 3, 'project', 'view'), -(0, 3, 'project', 'browse'), -(0, 3, 'my', 'bug'), -(0, 3, 'my', 'task'), -(0, 3, 'my', 'story'), -(0, 3, 'my', 'todo'), -(0, 3, 'my', 'index'), -(0, 3, 'index', 'index'), -(0, 3, 'testtask', 'view'), -(0, 3, 'testtask', 'browse'), -(0, 3, 'todo', 'mark'), -(0, 3, 'product', 'index'), -(0, 3, 'todo', 'delete'), -(0, 3, 'product', 'browse'), -(0, 3, 'todo', 'import2Today'), -(0, 3, 'product', 'view'), -(0, 3, 'product', 'ajaxGetProjects'), -(0, 3, 'product', 'roadmap'), -(0, 3, 'search', 'deleteQuery'), -(0, 3, 'user', 'bug'), -(0, 3, 'search', 'buildQuery'), -(0, 3, 'file', 'download'), -(0, 3, 'user', 'task'), -(0, 3, 'user', 'profile'), -(0, 3, 'user', 'todo'), -(0, 3, 'search', 'buildForm'), -(0, 3, 'search', 'saveQuery'), -(0, 3, 'user', 'project'), -(0, 3, 'project', 'story'), -(0, 3, 'company', 'browse'), -(0, 3, 'user', 'view'), -(0, 3, 'testtask', 'cases'), -(0, 3, 'testtask', 'results'), -(0, 3, 'company', 'index'), -(0, 3, 'story', 'review'), -(0, 3, 'story', 'change'), -(0, 3, 'story', 'view'), -(0, 3, 'product', 'ajaxGetPlans'), -(0, 3, 'story', 'create'), -(0, 3, 'story', 'edit'), -(0, 3, 'project', 'bug'), -(0, 3, 'task', 'edit'), -(0, 3, 'task', 'view'), -(0, 3, 'task', 'ajaxGetUserTasks'), -(0, 3, 'task', 'confirmStoryChange'), -(0, 3, 'project', 'burnData'), -(0, 3, 'task', 'create'), -(0, 3, 'project', 'burn'), -(0, 3, 'task', 'ajaxGetProjectTasks'), -(0, 3, 'project', 'build'), -(0, 3, 'project', 'team'), -(0, 3, 'project', 'task'), -(0, 3, 'project', 'grouptask'), -(0, 3, 'build', 'create'), -(0, 3, 'build', 'edit'), -(0, 3, 'release', 'view'), -(0, 3, 'release', 'browse'), -(0, 3, 'story', 'activate'), -(0, 3, 'project', 'index'), -(0, 3, 'productplan', 'browse'), -(0, 3, 'story', 'tasks'), -(0, 3, 'productplan', 'view'), -(0, 3, 'story', 'close'), -(0, 3, 'story', 'ajaxGetProjectStories'), -(0, 3, 'story', 'ajaxGetProductStories'), -(0, 3, 'bug', 'browse'), -(0, 3, 'bug', 'index'), -(0, 3, 'build', 'ajaxGetProductBuilds'), -(0, 3, 'build', 'view'), -(0, 3, 'qa', 'index'), -(0, 3, 'build', 'ajaxGetProjectBuilds'), -(0, 3, 'my', 'editProfile'), -(0, 3, 'my', 'profile'), -(0, 3, 'todo', 'edit'), -(0, 3, 'my', 'project'), -(0, 3, 'todo', 'create'), -(0, 3, 'todo', 'view'), -(0, 3, 'bug', 'report'), -(0, 3, 'bug', 'activate'), -(0, 3, 'bug', 'resolve'), -(0, 3, 'bug', 'edit'), -(0, 3, 'bug', 'ajaxGetUserBugs'), -(0, 3, 'bug', 'view'), -(0, 3, 'bug', 'create'), -(0, 3, 'bug', 'close'), -(0, 3, 'testcase', 'browse'), -(0, 4, 'file', 'download'), -(0, 4, 'search', 'deleteQuery'), -(0, 4, 'search', 'saveQuery'), -(0, 4, 'search', 'buildQuery'), -(0, 4, 'search', 'buildForm'), -(0, 4, 'tree', 'ajaxGetOptionMenu'), -(0, 4, 'tree', 'delete'), -(0, 4, 'tree', 'edit'), -(0, 4, 'tree', 'manageChild'), -(0, 4, 'tree', 'updateOrder'), -(0, 4, 'tree', 'browse'), -(0, 4, 'user', 'profile'), -(0, 4, 'user', 'project'), -(0, 4, 'user', 'bug'), -(0, 4, 'user', 'task'), -(0, 4, 'user', 'todo'), -(0, 4, 'user', 'view'), -(0, 4, 'company', 'browse'), -(0, 4, 'company', 'index'), -(0, 4, 'testtask', 'results'), -(0, 4, 'testtask', 'runcase'), -(0, 4, 'testtask', 'unlinkcase'), -(0, 4, 'testtask', 'linkcase'), -(0, 4, 'testtask', 'batchAssign'), -(0, 4, 'testtask', 'delete'), -(0, 4, 'testtask', 'edit'), -(0, 4, 'testtask', 'view'), -(0, 4, 'testtask', 'browse'), -(0, 4, 'testtask', 'create'), -(0, 4, 'testtask', 'index'), -(0, 4, 'testcase', 'confirmStoryChange'), -(0, 4, 'testcase', 'delete'), -(0, 4, 'testcase', 'edit'), -(0, 4, 'testcase', 'view'), -(0, 4, 'testcase', 'create'), -(0, 4, 'testcase', 'browse'), -(0, 4, 'testcase', 'index'), -(0, 4, 'bug', 'ajaxGetUserBugs'), -(0, 4, 'bug', 'delete'), -(0, 4, 'bug', 'confirmStoryChange'), -(0, 4, 'bug', 'report'), -(0, 4, 'bug', 'close'), -(0, 4, 'bug', 'activate'), -(0, 4, 'bug', 'resolve'), -(0, 4, 'bug', 'edit'), -(0, 4, 'bug', 'view'), -(0, 4, 'bug', 'create'), -(0, 4, 'bug', 'browse'), -(0, 4, 'bug', 'index'), -(0, 4, 'qa', 'index'), -(0, 4, 'build', 'ajaxGetProjectBuilds'), -(0, 4, 'build', 'ajaxGetProductBuilds'), -(0, 4, 'build', 'view'), -(0, 4, 'build', 'delete'), -(0, 4, 'build', 'edit'), -(0, 4, 'build', 'create'), -(0, 4, 'task', 'ajaxGetProjectTasks'), -(0, 4, 'task', 'ajaxGetUserTasks'), -(0, 4, 'task', 'view'), -(0, 4, 'task', 'edit'), -(0, 4, 'task', 'create'), -(0, 4, 'project', 'team'), -(0, 4, 'project', 'burnData'), -(0, 4, 'project', 'burn'), -(0, 4, 'project', 'bug'), -(0, 4, 'project', 'build'), -(0, 4, 'project', 'story'), -(0, 4, 'project', 'grouptask'), -(0, 4, 'project', 'task'), -(0, 4, 'project', 'browse'), -(0, 4, 'project', 'view'), -(0, 4, 'project', 'index'), -(0, 4, 'release', 'view'), -(0, 4, 'release', 'browse'), -(0, 4, 'productplan', 'view'), -(0, 4, 'productplan', 'browse'), -(0, 4, 'story', 'ajaxGetProductStories'), -(0, 4, 'story', 'ajaxGetProjectStories'), -(0, 4, 'story', 'tasks'), -(0, 4, 'story', 'activate'), -(0, 4, 'story', 'close'), -(0, 4, 'story', 'review'), -(0, 4, 'story', 'change'), -(0, 4, 'story', 'view'), -(0, 4, 'story', 'edit'), -(0, 4, 'story', 'create'), -(0, 4, 'product', 'ajaxGetPlans'), -(0, 4, 'product', 'ajaxGetProjects'), -(0, 4, 'product', 'roadmap'), -(0, 4, 'product', 'view'), -(0, 4, 'product', 'browse'), -(0, 4, 'product', 'index'), -(0, 4, 'todo', 'import2Today'), -(0, 4, 'todo', 'mark'), -(0, 4, 'todo', 'delete'), -(0, 4, 'todo', 'view'), -(0, 4, 'todo', 'edit'), -(0, 4, 'todo', 'create'), -(0, 4, 'my', 'editProfile'), -(0, 4, 'my', 'profile'), -(0, 4, 'my', 'project'), -(0, 4, 'my', 'story'), -(0, 4, 'my', 'bug'), -(0, 5, 'testcase', 'edit'), -(0, 5, 'project', 'view'), -(0, 5, 'project', 'browse'), -(0, 5, 'my', 'bug'), -(0, 5, 'my', 'task'), -(0, 5, 'my', 'story'), -(0, 5, 'my', 'todo'), -(0, 5, 'my', 'index'), -(0, 5, 'index', 'index'), -(0, 5, 'testtask', 'browse'), -(0, 5, 'testtask', 'index'), -(0, 5, 'todo', 'mark'), -(0, 5, 'product', 'index'), -(0, 5, 'todo', 'delete'), -(0, 5, 'product', 'browse'), -(0, 5, 'todo', 'import2Today'), -(0, 5, 'product', 'ajaxGetProjects'), -(0, 5, 'product', 'view'), -(0, 5, 'product', 'ajaxGetPlans'), -(0, 5, 'product', 'roadmap'), -(0, 5, 'search', 'deleteQuery'), -(0, 5, 'user', 'bug'), -(0, 5, 'search', 'buildQuery'), -(0, 5, 'file', 'download'), -(0, 5, 'user', 'task'), -(0, 5, 'user', 'profile'), -(0, 5, 'user', 'todo'), -(0, 5, 'search', 'buildForm'), -(0, 5, 'search', 'saveQuery'), -(0, 5, 'user', 'project'), -(0, 5, 'project', 'delete'), -(0, 5, 'company', 'browse'), -(0, 5, 'user', 'view'), -(0, 5, 'testtask', 'view'), -(0, 5, 'testtask', 'results'), -(0, 5, 'testtask', 'cases'), -(0, 5, 'company', 'index'), -(0, 5, 'story', 'activate'), -(0, 5, 'story', 'close'), -(0, 5, 'story', 'review'), -(0, 5, 'story', 'create'), -(0, 5, 'story', 'view'), -(0, 5, 'story', 'edit'), -(0, 5, 'story', 'change'), -(0, 5, 'project', 'grouptask'), -(0, 5, 'project', 'team'), -(0, 5, 'project', 'importtask'), -(0, 5, 'project', 'burnData'), -(0, 5, 'project', 'burn'), -(0, 5, 'project', 'story'), -(0, 5, 'task', 'edit'), -(0, 5, 'task', 'delete'), -(0, 5, 'task', 'confirmStoryChange'), -(0, 5, 'task', 'view'), -(0, 5, 'project', 'bug'), -(0, 5, 'project', 'manageMembers'), -(0, 5, 'project', 'unlinkMember'), -(0, 5, 'project', 'build'), -(0, 5, 'project', 'unlinkStory'), -(0, 5, 'project', 'linkStory'), -(0, 5, 'task', 'create'), -(0, 5, 'task', 'ajaxGetUserTasks'), -(0, 5, 'project', 'task'), -(0, 5, 'project', 'manageProducts'), -(0, 5, 'project', 'create'), -(0, 5, 'project', 'edit'), -(0, 5, 'build', 'create'), -(0, 5, 'build', 'edit'), -(0, 5, 'task', 'ajaxGetProjectTasks'), -(0, 5, 'build', 'delete'), -(0, 5, 'release', 'view'), -(0, 5, 'release', 'browse'), -(0, 5, 'story', 'ajaxGetProjectStories'), -(0, 5, 'project', 'index'), -(0, 5, 'productplan', 'linkStory'), -(0, 5, 'story', 'ajaxGetProductStories'), -(0, 5, 'productplan', 'unlinkStory'), -(0, 5, 'story', 'tasks'), -(0, 5, 'productplan', 'browse'), -(0, 5, 'productplan', 'view'), -(0, 5, 'bug', 'browse'), -(0, 5, 'bug', 'index'), -(0, 5, 'build', 'ajaxGetProductBuilds'), -(0, 5, 'build', 'view'), -(0, 5, 'qa', 'index'), -(0, 5, 'build', 'ajaxGetProjectBuilds'), -(0, 5, 'my', 'editProfile'), -(0, 5, 'my', 'profile'), -(0, 5, 'todo', 'edit'), -(0, 5, 'my', 'project'), -(0, 5, 'todo', 'create'), -(0, 5, 'todo', 'view'), -(0, 5, 'bug', 'report'), -(0, 5, 'bug', 'activate'), -(0, 5, 'bug', 'resolve'), -(0, 5, 'bug', 'edit'), -(0, 5, 'bug', 'ajaxGetUserBugs'), -(0, 5, 'bug', 'view'), -(0, 5, 'bug', 'create'), -(0, 5, 'bug', 'close'), -(0, 5, 'testcase', 'browse'), -(0, 1, 'my', 'todo'), -(0, 1, 'my', 'index'), -(0, 1, 'index', 'index'), -(0, 2, 'my', 'task'), -(0, 2, 'my', 'todo'), -(0, 2, 'my', 'index'), -(0, 2, 'index', 'index'), -(0, 3, 'testtask', 'index'), -(0, 3, 'testcase', 'view'), -(0, 3, 'testcase', 'index'), -(0, 4, 'my', 'task'), -(0, 4, 'my', 'todo'), -(0, 4, 'my', 'index'), -(0, 4, 'index', 'index'), -(0, 5, 'testcase', 'view'), -(0, 5, 'testcase', 'index'), -(0, 1, 'misc', 'ping'), -(0, 1, 'action', 'trash'), -(0, 1, 'action', 'undelete'), -(0, 2, 'file', 'export2CSV'), -(0, 2, 'misc', 'ping'), -(0, 3, 'file', 'export2CSV'), -(0, 3, 'misc', 'ping'), -(0, 4, 'file', 'export2CSV'), -(0, 4, 'misc', 'ping'), -(0, 5, 'file', 'export2CSV'), -(0, 5, 'misc', 'ping'), -(0, 5, 'action', 'trash'), -(0, 5, 'action', 'undelete'); diff --git a/tags/zentaopms_1.1_stable_20100706/doc/CHANGELOG b/tags/zentaopms_1.1_stable_20100706/doc/CHANGELOG deleted file mode 100644 index 3260435a9e..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/CHANGELOG +++ /dev/null @@ -1,156 +0,0 @@ -2010-07-06 1.1 发布 - -完成的功能列表: - story# 255 json接口增加状态码和签名验证 - story# 258 支持$account:$password@pms方式的验证 - story# 257 用户验证支持加密验证 - story# 256 用户验证支持get方式 - story# 254 增加禅道运行系统配置的接口 - story# 241 批量建立模块的opt目录 - story# 240 转换程序代码格式为unix格式 - story# 261 完善软件包里面的changelog等文件 - story# 214 增加common模块扩展的功能 - story# 250 统一调整视图赋值方式 - story# 249 将dao中的oncaseof改为beginIF - - story# 147 增加保存查询功能 - story# 239 搜索查询表单增加重置按钮 - - story# 251 新建资源时,不列出已经删除的资源 - story# 234 记住用户上次选择的产品 - story# 235 记住用户上次选择的项目 - story# 136 任务相应的变化email通知相应人员 - story# 236 未经审核的需求再次变更时,不应当修改指派给字段 - story# 228 bug统计报表增加全选和反选按钮 - story# 178 新增任务时,可以指派给多人 - -修复的bug列表: - bug# 118 当一个模块含有model扩展时,修改主体的model.php无效 - bug# 117 bin/computeburn.php包含snoopy类时,应当使用绝对路径 - bug# 115 如果某一个模块的model.php最后一行是?>;,并且有扩展,会出错 - bug# 112 我的地盘中,“之前未完”的TodoID错位 - bug# 100 win7下面IE8页面滚动条出现故障 - bug# 96 变更需求页面,选择“由谁评审”,在需求展示页面对应的是“指派给” - bug# 92 为分组选择成员时,备选列表中不应该出现已经被删除的用户 - bug# 91 创建Bug时,“当前指派”列表中出现了已经被删除的用户 - -2010-06-04 1.0.1 发布 - - 本期修复的bug如下: - 85 添加新用户时,“加入日期”无法选择2009年5月份以前的日期 - 87 分解任务之后,无法在项目任务列表中展示 - 88 虚拟主机上面禁用glob函数之后,框架报错 - 89 创建任务是,点击“同需求”按钮,会把需求id带入。 - 90 当build重复添加的时候,系统没有提示 - 93 存在安全漏洞(跨站脚本、未加密的传输)详见附件 - 94 任务已经结束,但仍然显示延期 - 95 创建需求时,没有发送email给审核者 - 101 安装时访问更新api,超时会有警告 - 102 需要确认需求变更的bug,如果标题太长,确认链接无法显示 - 103 当某一个项目的燃烧图数据超过21天时,数据显示有误 - 104 用户详情页面不应该显示昵称字段 - 105 common模块根据HTTP_HOST变量查找公司是有误 - 107 计算燃尽图数据时,将已经删除的任务也计算在内了 - 108 如果bug标题中有英文的单引号,编辑该bug,英文单引号后面的字符全部消失 - 110 项目视图中的任务列表,按照需求分组的时候,会有waring信息 - -2010-05-03 1.0 正式版发布 - - 修复Bug - 正式推出全新的操作界面。 - 若干小功能的改进。 - -2010-04-28 1.0 rc2 发布。 - - 本期改进主要集中在界面方面,同时修改了很多的bug - -2010-04-19 1.0 rc1 发布。 - - 完善了删除机制。 - 完善了多公司的支持。 - 完善了界面的UI。 - 增加了列表的导出csv功能。 - -2010-04-01 1.0 beta发布。 - - 完善了禅道软件的扩展机制。文档请参考:http://www.zentao.cn/node78847.html - 完善了需求变更处理流程。 - 完成了bugfree2的转换程序。 - 需求,bug,用例增加了关键词字段。 - 项目增加了权限设置。 - 其他若干地方改进和bug fix。 - -2010-03-10 0.6 beta发布。 - - STORY #146 搜索时可以指定空值 - STORY #140 当维护某一个模块的子模块时,可以在中间插入模块并自动计算顺序 - STORY #127 创建bug时,影响版本可以选择多个 - STORY #148 实现bugfree2X版本的BUG图表统计 - STORY #142 任务列表增加分组展示功能 - STORY #098 日期字段使用js的控件来选取 - STORY #047 todo和bug之间的联动 - STORY #139 产品视图增加模块删除功能 - STORY #085 新建任务的时候,完善用户列表 - STORY #046 todo和项目任务状态的联动 - STORY #157 必填项给予说明 - STORY #143 任务增加附件功能 - STORY #138 产品视图增加模块编辑功能 - STORY #111 任务增加起止时间字段 - STORY #080 display方法提供直接转换为xml或者json的功能 - STORY #159 新增任务的时候,可以查看选中需求的内容 - -2010-02-22 0.5 beta发布。 - - 本版本主要完善了需求的处理流程,测试用例的管理和执行以及相应的界面调整。同时完成了bugfree1.x版本的转换工具。 - - #031 需求完善审核流程 - #126 创建需求时,可以指定是否需要走评审 - #128 需求评审时,可以手工指定评审日期 - #131 当评审结果为关闭且原因为已完成或延期时,评审结果应该为pass - #125 延期的需求需要能够重新激活 - #045 当需求有细分任务的时候,自动调整对应需求的所处的阶段 - #023 需求相应的变动可以抄送给相关人员 - #129 需求列表页面增加变更、评审、关闭的操作链接 - #117 需求搜索时,可以按照计划进行搜索 - #118 调整需求详情的显示界面 - #119 调整任务详情的界面 - #113 优化action的显示 - #121 测试用例可以按照步骤来进行填写 - #106 test run管理 - #105 test task管理 - #104 test suite管理 - #124 执行用例的时候,增加全部步骤通过功能 - #026 开发bugfree1.x到pms的转换工具 - -2010-01-26 0.4 beta发布。 - - 1. 项目增加了build功能。 - 2. 产品增加了发布和路线图功能。 - 3. Bug管理增加了对build的支持。 - 4. 新增了升级功能。 - 5. 我的地盘中增加了“我的需求”功能。 - 6. 需求增加了搜索功能,完善了bug和case的搜索功能。 - 7. 需求增加了上传附件功能。 - 8. 调整了bug的显示和编辑界面,使之更加合理清晰。 - 9. 完善了后台分组管理的界面。 - 10. 修复了之前版本的若干bug。 - -2010-01-03 0.3 beta发布 - - 产品管理:提供了产品的增删改,产品的模块管理,需求管理,计划管理 - 项目管理:提供了项目的增删改,关联产品,关联需求,团队管理,任务管理 - 测试管理:提供了完成的Bug跟踪流程(功能同BugFree)和基本的测试用例管理。 - 组织管理:提供了用户的增删改,分组管理和权限管理。 - 我的地盘:提供了todo管理、我的任务、我的bug、我的项目等功能。 - -2009-10-06 0.1 alpha发布。 - - 增加了QA视图,目前主要完成了Bug的基本管理。 - 增加了组织视图,可以用来维护公司的组织结构。 - 增加了我的地盘,可以非常方便的看到参加的项目,所有指派给我的任务及相关的bug。 - 完善了权限管理。 - 部分提升了用户的体验。 - 基于ZenTaoPHP1.2版本架构。 - -2009-09-10 0.02 alpha发布。 -2009-07-30 0.01 alpha发布。 diff --git a/tags/zentaopms_1.1_stable_20100706/doc/COPYING b/tags/zentaopms_1.1_stable_20100706/doc/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/tags/zentaopms_1.1_stable_20100706/doc/COPYING.LESSER b/tags/zentaopms_1.1_stable_20100706/doc/COPYING.LESSER deleted file mode 100644 index fc8a5de7ed..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/COPYING.LESSER +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/tags/zentaopms_1.1_stable_20100706/doc/INSTALL b/tags/zentaopms_1.1_stable_20100706/doc/INSTALL deleted file mode 100644 index 8c7d6e7679..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/INSTALL +++ /dev/null @@ -1 +0,0 @@ -安装,请访问 http://www.zentaoms.com/node78950.html diff --git a/tags/zentaopms_1.1_stable_20100706/doc/README b/tags/zentaopms_1.1_stable_20100706/doc/README deleted file mode 100644 index 4971559c59..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/README +++ /dev/null @@ -1,44 +0,0 @@ -一、什么是禅道项目管理软件 - -禅道项目管理软件(ZenTaoPMS)是一款国产的,基于LGPL协议,开源免费的项目管理软件,它集产品管理、项目管理、测试管理于一体,同时还包含了事务管理、组织管理等诸多功能,是中小型企业项目管理的首选。官方网站:www.zentaoms.com - -禅道项目管理软件使用PHP + MySQL开发,基于自主的PHP开发框架──ZenTaoPHP而成。第三方开发者或者企业可以非常方便的开发插件或者进行定制。 - -禅道在手,项目无忧! - -禅道项目管理软件由青岛易软天创网络科技有限公司(http://www.cnezsoft.com)开发。 - -二、禅道的含义 - -Zen是“禅”的意思,Tao是“道”的意思。ZenTao合意为禅与道。这个名称是我在读《编程之禅》和《编程之道》的时候受到启发,决定采用这个比较有中国味道的名字。 - -三、禅道项目管理软件的来由: - -说到这个问题,要从BugFree谈起。自从04年发布BugFree以来到2007年,BugFree陆续发布了五六个版本,在Bug管理方面基本上已经完备。但这个时候产生了一些新的问题。很多网友拿着BugFree进行改动,改造为其他的管理系统。还经常有网友问,BugFree可以不可以加入项目管理的功能。我也一直在思考这些问题。后来我加入了阿里巴巴,在中国雅虎‘、阿里妈妈、淘宝三年的工作经历中,参加了大大小小的项目。也深为项目管理所困惑。于是就产生了做一个工具来解决项目管理的问题。 - -由于种种原因,我这个愿望在阿里巴巴并没有实现。说来也是一件幸事,这样我可以把它开源来发布。从今年初我就开始着手考虑这套管理软件的设计。整整花了半年的时间在考虑。7月份从阿里巴巴辞职之后,我开始有有了相对比较多的一点时间来进行这套系统的开发。同时也非常感谢现在的这家单位,为我开发禅道项目管理软件提供了大力的支持。 - -四、为什么还要做禅道项目管理软件: - -很多朋友会问,已经有很多的开源项目管理软件或者系统了,为什么还要自己做一个呢?主要原因是我认为现在的开源项目管理软件对这个问题解决的并不好,比如缺乏需求管理,bug管理等功能。而且很多开源的项目管理软件使用起来也不方便。 - -市场上也有很多商业的软件,但收费都不菲,而且也未必见得好用。 - -现在也有很多在线的项目管理服务,比如国外的basecamp,国内的易度,忙吧等。但我的观点,这些在线的项目管理软件功能有限,缺乏定制,访问速度无法保证,而且缺乏保密。 - -五、禅道项目管理软件的特点: - -集成了产品管理、项目管理、测试管理、人员管理、发布管理、事务管理等功能于一体。你只需要一个软件就可以完成项目管理的最核心的任务。 -开源免费,降低企业部署的成本。 -功能注重实效,使用方便,没有太多复杂的概念。我设计的理念是一个没有做过项目管理的人经过10分钟的培训可以使用它进行项目管理。:) -基于PHP+MySQL开发,企业自主改动方便。并且基于ZenTaoPHP框架,为第三方开发者的加入打下了坚实的基础。 -主要理念基于scrum,同时结合了PMP里面的很多概念。 -支持多公司,多项目,多产品,多团队的开发。 -灵活的权限设置。 -支持产品与项目之间的矩阵关系。 - -六、禅道项目管理软件需要您的帮助 - -禅道项目管理软件需要您的帮助,无论您是开发人员,抑或是项目经理,或者是产品经理,还是测试人员,又或者是开源爱好者,您都可以在禅道项目管理软件找到参与的地方。我们会以非常open的心态打造一个禅道项目管理软件的社区。我相信,禅道社区的成功,才是禅道项目管理软件的成功。 - -大家如果想加入,可以和我联系:chunsheng@cnezsoft.com diff --git a/tags/zentaopms_1.1_stable_20100706/doc/THANKS b/tags/zentaopms_1.1_stable_20100706/doc/THANKS deleted file mode 100644 index 3086214671..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/THANKS +++ /dev/null @@ -1,19 +0,0 @@ - 鸣谢 - -禅道项目管理软件在开发过程中,得到了众多朋友的支持,在此表示感谢。 -下面是不完全名单,如有遗漏,烦请告知,chunsheng@cnezsoft.com - -感谢之前所有参与或帮助过BugFree1.x的朋友们,有你们陪着一路走来,才有了禅道今天的发展,尤其感谢原来的版主 Mr.lee,希望有机会再合作; -感谢BugFree2.x项目的团队,和你们的分歧,最终促使我来做一款真正的项目管理软件,而非仅仅微软的复制品; -感谢原阿里巴巴的同事梅坚先生,是你将scrum介绍到了中国雅虎,正是那时我开始了解学习scrum; -感谢原阿里巴巴的同事史峰先生,感谢你在禅道项目设计初期提出的很多建议; -感谢我的好朋友李玉鹏,感谢我们之间心有灵犀的讨论,确定了禅道很多的设计方案; -感谢原阿里巴巴的其他同事们,禅道的很多想法正是和你们工作时碰撞产生的火花; -感谢普加网(青岛普加智能信息有限公司,www.pujia.com)在禅道前期开发过程中给予的大力支持; -感谢whjmyu, sophia, 21bird, 云飞扬对禅道项目的贡献,谢谢你们的辛勤付出; -感谢众多网友积极给予的建议和反馈,有你们的参与,禅道会越来越好; -感谢ELING(QQ:467303906)设计了精美的Logo,感谢蓝虎魄(QQ:649009995)设计了禅道1.0正式版的界面; -感谢我的家人对我的理解和支持! - - 王春生 青岛易软天创网络科技有限公司 - 2010-5-3 diff --git a/tags/zentaopms_1.1_stable_20100706/doc/THIRDPARTY b/tags/zentaopms_1.1_stable_20100706/doc/THIRDPARTY deleted file mode 100644 index a1d1ffb158..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/THIRDPARTY +++ /dev/null @@ -1,8 +0,0 @@ -禅道项目管理软件使用到的第三方类库列表 - -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/ diff --git a/tags/zentaopms_1.1_stable_20100706/doc/TODO b/tags/zentaopms_1.1_stable_20100706/doc/TODO deleted file mode 100644 index fd5736950c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/TODO +++ /dev/null @@ -1,9 +0,0 @@ - 多语言(英语,中文繁体,日语,韩语,德语,法语) - 文档管理功能 - 源代码集成 - 讨论管理 - 反馈管理 - 任务功能细化 - 首页细化 - - 更多列表,请访问 http://pms.zentaoms.com/product.html diff --git a/tags/zentaopms_1.1_stable_20100706/doc/UPGRADE b/tags/zentaopms_1.1_stable_20100706/doc/UPGRADE deleted file mode 100644 index b52364899b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/doc/UPGRADE +++ /dev/null @@ -1 +0,0 @@ -升级,请参考 http://www.zentaoms.com/node78960.html diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/front.class.php b/tags/zentaopms_1.1_stable_20100706/lib/front/front.class.php deleted file mode 100644 index 888e3124c8..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/front.class.php +++ /dev/null @@ -1,480 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package ZenTaoMS - * @version $Id$ - * @link http://www.zentaoms.com - */ -class html -{ - /** - * create tags like text - * - * @param string $href the link url. - * @param string $title the link title. - * @param string $target the target window - * @param string $misc other params. - */ - static public function a($href = '', $title = '', $target = "_self", $misc = '') - { - if(empty($title)) $title = $href; - if($target == '_self') return "$title\n"; - return "$title\n"; - } - - /** - * create tags like text - * - * @param string $mail the email address - * @param string $title the email title. - */ - static public function mailto($mail = '', $title = '') - { - if(empty($title)) $title = $mail; - return "$title"; - } - - /** - * create tags like "" - * - * @param string $name the name of the select tag. - * @param array $options the array to create select tag from. - * @param string $selectedItems the item(s) to be selected, can like item1,item2. - * @param string $attrib other params such as multiple, size and style. - */ - static public function select($name = '', $options = array(), $selectedItems = "", $attrib = "") - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - - /* The begin. */ - $id = $name; - if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); - $string = "\n"; - } - - /** - * create select with optgroup. - * - * @param string $name the name of the select tag. - * @param array $groups the option groups. - * @param string $selectedItems the item(s) to be selected, can like item1,item2. - * @param string $attrib other params such as multiple, size and style. - */ - static public function selectGroup($name = '', $groups = array(), $selectedItems = "", $attrib = "") - { - if(!is_array($groups) or empty($groups)) return false; - - /* The begin. */ - $id = $name; - if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); - $string = "\n"; - } - - /** - * Create tags like "" - * - * @param string $name the name of the radio tag. - * @param array $options the array to create radio tag from. - * @param string $checked the value to checked by default. - * @param string $attrib other attribs. - */ - static public function radio($name = '', $options = array(), $checked = '', $attrib = '') - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - - $string = ''; - foreach($options as $key => $value) - { - $string .= "" - * - * @param string $name the name of the checkbox tag. - * @param array $options the array to create checkbox tag from. - * @param string $checked the value to checked by default, can be item1,item2 - * @param string $attrib other attribs. - */ - static public function checkbox($name, $options, $checked = "", $attrib = "") - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - $string = ''; - $checked = ",$checked,"; - - foreach($options as $key => $value) - { - $key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。 - $string .= "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function input($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function hidden($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function password($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the textarea tag. - * @param string $value the default value of the textarea tag. - * @param string $attrib other attribs. - */ - static public function textarea($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "". - * - * @param string $name the name of the file name. - * @param string $attrib other attribs. - */ - static public function file($name, $attrib = "") - { - return "\n"; - } - - /** - * create submit button. - * - * @static - * @access public - * @return string the submit button tag. - */ - public static function submitButton($label = '', $misc = '') - { - if(empty($label)) - { - global $lang; - $label = $lang->save; - } - return " "; - } - - /** - * create reset button. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function resetButton() - { - global $lang; - return " "; - } - - /** - * create common button. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function commonButton($label = '', $misc = '') - { - return " "; - } - - /** - * create a button with a link. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function linkButton($label = '', $link = '', $misc = '') - { - return " "; - } - - /** - * create a export link. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function export2csv($label = '', $pluginTitle, $misc = '') - { - return "$label\n\n"; - } -} - -class js -{ - /* The start of javascript. */ - static private function start() - { - return << - - \n"; - } - - /* Show a alert box. */ - static public function alert($message = '') - { - return self::start() . "alert('" . $message . "')" . self::end(); - } - - /* 弹出错误。其中message可以是一条字符串,也可以是一维或者二维数组。*/ - static public function error($message) - { - $alertMessage = ''; - if(is_array($message)) - { - foreach($message as $item) - { - is_array($item) ? $alertMessage .= join('\n', $item) . '\n' : $alertMessage .= $item . '\n'; - } - } - else - { - $alertMessage = $message; - } - return self::alert($alertMessage); - } - - /** - * show a confirm box, press ok go to okURL, else go to cancleURL. - * - * @param string $message the text to be showed. - * @param string $okURL the url to go to when press 'ok'. - * @param string $cancleURL the url to go to when press 'cancle'. - * @param string $okTarget the target to go to when press 'ok'. - * @param string $cancleTarget the target to go to when press 'cancle'. - */ - static public function confirm($message = '', $okURL = '', $cancleURL = '', $okTarget = "self", $cancleTarget = "self", $Echo = true) - { - $js = self::start(); - - $confirmAction = ''; - if(strtolower($okURL) == "back") - { - $confirmAction = "history.back(-1);"; - } - elseif(!empty($okURL)) - { - $confirmAction = "$okTarget.location = '$okURL';"; - } - - $cancleAction = ''; - if(strtolower($cancleURL) == "back") - { - $cancleAction = "history.back(-1);"; - } - elseif(!empty($cancleURL)) - { - $cancleAction = "$cancleTarget.location = '$cancleURL';"; - } - - $js .= <<getViewType(); - $themeRoot = $app->getWebRoot() . 'theme/'; - $moduleName = $app->getModuleName(); - $methodName = $app->getMethodName(); - $clientLang = $app->getClientLang(); - $requiredFields = ''; - if(isset($config->$moduleName->$methodName->requiredFields)) $requiredFields = str_replace(' ', '', $config->$moduleName->$methodName->requiredFields); - $js = << -webRoot = '$config->webRoot'; -requestType = '$config->requestType'; -pathType = '$config->pathType'; -requestFix = '$config->requestFix'; -moduleVar = '$config->moduleVar'; -methodVar = '$config->methodVar'; -viewVar = '$config->viewVar'; -defaultView = '$defaultViewType'; -themeRoot = '$themeRoot'; -currentModule = '$moduleName'; -currentMethod = '$methodName'; -clientLang = '$clientLang'; -requiredFields = '$requiredFields'; -lblShowAll = '$lang->showAll'; -lblHideClosed = '$lang->hideClosed'; - - -EOT; - return $js; - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.expect b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.expect deleted file mode 100644 index d7d9f7377b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.expect +++ /dev/null @@ -1,21 +0,0 @@ -texta -textb -textc - -texta -textb -textc - -texta -textb -textc - -texta -textb -textc - -texta -textb -textc - -bool(false) diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.php b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.php deleted file mode 100644 index 1a2f900a76..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_checkbox.php +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env php - - * @version $Id$ - */ -include '../front.class.php'; - -$options['a'] = 'texta'; -$options['b'] = 'textb'; -$options['c'] = 'textc'; - -echo html::checkbox('checkbox', $options) . "\n"; -echo html::checkbox('checkbox', $options, 'a') . "\n"; -echo html::checkbox('checkbox', $options, 'a,b') . "\n"; -echo html::checkbox('checkbox', $options, 'ab') . "\n"; -echo html::checkbox('checkbox', $options, '', 'style="color:red"') . "\n"; -var_dump(html::checkbox('checkbox', array())); -<< diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.expect b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.expect deleted file mode 100644 index 6f4a26ff0f..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.expect +++ /dev/null @@ -1,13 +0,0 @@ -texta -textb -textc -texta -textb -textc -texta -textb -textc -texta -textb -textc -bool(false) diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.php b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.php deleted file mode 100644 index 612d083182..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_radio.php +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env php - - * @version $Id$ - */ -include '../front.class.php'; - -$options['a'] = 'texta'; -$options['b'] = 'textb'; -$options['c'] = 'textc'; - -echo html::radio('radio', $options); -echo html::radio('radio', $options, 'a'); -echo html::radio('radio', $options, 'a,b'); -echo html::radio('radio', $options, '', 'style="color:red"'); -var_dump(html::radio('radio', array())); -<< diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.expect b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.expect deleted file mode 100644 index a1ef188bb4..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.expect +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - -bool(false) diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.php b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.php deleted file mode 100644 index bbdef57b76..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_select.php +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env php - - * @version $Id$ - */ -include '../front.class.php'; - -$options['a'] = 'texta'; -$options['b'] = 'textb'; -$options['c'] = 'textc'; - -echo html::select('select', $options); -echo html::select('select[]', $options); -echo html::select('select', $options, 'a'); -echo html::select('select', $options, 'a,c'); -echo html::select('select', $options, 'ab'); -echo html::select('select', $options, '', 'style="color:red"'); -var_dump(html::select('select', array())); -<< diff --git a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_selectgroup.php b/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_selectgroup.php deleted file mode 100644 index ad226469fd..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/front/tests/html_selectgroup.php +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env php - - * @version $Id$ - */ -include '../front.class.php'; - -$groups['group1']['a'] = 'texta'; -$groups['group1']['b'] = 'textb'; -$groups['group2']['c'] = 'textc'; -$groups['group2']['d'] = 'textd'; - -echo html::selectgroup('select', $groups); -?> diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/LICENSE b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/LICENSE deleted file mode 100644 index 03851a3383..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/README b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/README deleted file mode 100644 index 2d79f38622..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/README +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************* -* The http://phpmailer.codeworxtech.com/ website now carries a few * -* advertisements through the Google Adsense network. Please visit * -* the advertiser sites and help us offset some of our costs. * -* Thanks .... * -********************************************************************/ - -PHPMailer -Full Featured Email Transfer Class for PHP -========================================== - -Version 5.0.0 (April 02, 2009) - -With the release of this version, we are initiating a new version numbering -system to differentiate from the PHP4 version of PHPMailer. - -Most notable in this release is fully object oriented code. - -We now have available the PHPDocumentor (phpdocs) documentation. This is -separate from the regular download to keep file sizes down. Please see the -download area of http://phpmailer.codeworxtech.com. - -We also have created a new test script (see /test_script) that you can use -right out of the box. Copy the /test_script folder directly to your server (in -the same structure ... with class.phpmailer.php and class.smtp.php in the -folder above it. Then launch the test script with: -http://www.yourdomain.com/phpmailer/test_script/index.php -from this one script, you can test your server settings for mail(), sendmail (or -qmail), and SMTP. This will email you a sample email (using contents.html for -the email body) and two attachments. One of the attachments is used as an inline -image to demonstrate how PHPMailer will automatically detect if attachments are -the same source as inline graphics and only include one version. Once you click -the Submit button, the results will be displayed including any SMTP debug -information and send status. We will also display a version of the script that -you can cut and paste to include in your projects. Enjoy! - -Version 2.3 (November 08, 2008) - -We have removed the /phpdoc from the downloads. All documentation is now on -the http://phpmailer.codeworxtech.com website. - -The phpunit.php has been updated to support PHP5. - -For all other changes and notes, please see the changelog. - -Donations are accepted at PayPal with our id "paypal@worxteam.com". - -Version 2.2 (July 15 2008) - -- see the changelog. - -Version 2.1 (June 04 2008) - -With this release, we are announcing that the development of PHPMailer for PHP5 -will be our focus from this date on. We have implemented all the enhancements -and fixes from the latest release of PHPMailer for PHP4. - -Far more important, though, is that this release of PHPMailer (v2.1) is -fully tested with E_STRICT error checking enabled. - -** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. - IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE - APPRECIATED. - -We have now added S/MIME functionality (ability to digitally sign emails). -BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. -The "Signed Emails" functionality adds the Sign method to pass the private key -filename and the password to read it, and then email will be sent with -content-type multipart/signed and with the digital signature attached. - -A quick note on E_STRICT: - -- In about half the test environments the development version was subjected - to, an error was thrown for the date() functions (used at line 1565 and 1569). - This is NOT a PHPMailer error, it is the result of an incorrectly configured - PHP5 installation. The fix is to modify your 'php.ini' file and include the - date.timezone = America/New York - directive, (for your own server timezone) -- If you do get this error, and are unable to access your php.ini file, there is - a workaround. In your PHP script, add - date_default_timezone_set('America/Toronto'); - - * do NOT try to use - $myVar = date_default_timezone_get(); - as a test, it will throw an error. - -We have also included more example files to show the use of "sendmail", "mail()", -"smtp", and "gmail". - -We are also looking for more programmers to join the volunteer development team. -If you have an interest in this, please let us know. - -Enjoy! - - -Version 2.1.0beta1 & beta2 - -please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS -INTENDED STRICTLY FOR TESTING - -** NOTE: - -As of November 2007, PHPMailer has a new project team headed by industry -veteran Andy Prevost (codeworxtech). The first release in more than two -years will focus on fixes, adding ease-of-use enhancements, provide -basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility -features. A new release is planned before year-end 2007 that will provide -full compatiblity with PHP4 and PHP5, as well as more bug fixes. - -We are looking for project developers to assist in restoring PHPMailer to -its leadership position. Our goals are to simplify use of PHPMailer, provide -good documentation and examples, and retain backward compatibility to level -1.7.3 standards. - -If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer -and indicate your interest. - -** - -http://phpmailer.sourceforge.net/ - -This software is licenced under the LGPL. Please read LICENSE for information on the -software availability and distribution. - -Class Features: -- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs -- Redundant SMTP servers -- Multipart/alternative emails for mail clients that do not read HTML email -- Support for 8bit, base64, binary, and quoted-printable encoding -- Uses the same methods as the very popular AspEmail active server (COM) component -- SMTP authentication -- Native language support -- Word wrap, and more! - -Why you might need it: - -Many PHP developers utilize email in their code. The only PHP function -that supports this is the mail() function. However, it does not expose -any of the popular features that many email clients use nowadays like -HTML-based emails and attachments. There are two proprietary -development tools out there that have all the functionality built into -easy to use classes: AspEmail(tm) and AspMail. Both of these -programs are COM components only available on Windows. They are also a -little pricey for smaller projects. - -Since I do Linux development I�ve missed these tools for my PHP coding. -So I built a version myself that implements the same methods (object -calls) that the Windows-based components do. It is open source and the -LGPL license allows you to place the class in your proprietary PHP -projects. - - -Installation: - -Copy class.phpmailer.php into your php.ini include_path. If you are -using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call -the PHPMailer SetLanguage method like so: - -// To load the Portuguese version -$mail->SetLanguage("br", "/optional/path/to/language/directory/"); - -That's it. You should now be ready to use PHPMailer! - - -A Simple Example: - -IsSMTP(); // set mailer to use SMTP -$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true; // turn on SMTP authentication -$mail->Username = "jswan"; // SMTP username -$mail->Password = "secret"; // SMTP password - -$mail->From = "from@example.com"; -$mail->FromName = "Mailer"; -$mail->AddAddress("josh@example.net", "Josh Adams"); -$mail->AddAddress("ellen@example.com"); // name is optional -$mail->AddReplyTo("info@example.com", "Information"); - -$mail->WordWrap = 50; // set word wrap to 50 characters -$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments -$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name -$mail->IsHTML(true); // set email format to HTML - -$mail->Subject = "Here is the subject"; -$mail->Body = "This is the HTML message body in bold!"; -$mail->AltBody = "This is the body in plain text for non-HTML mail clients"; - -if(!$mail->Send()) -{ - echo "Message could not be sent.

"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> - -CHANGELOG - -See ChangeLog.txt - -Download: http://sourceforge.net/project/showfiles.php?group_id=26031 - -Andy Prevost diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.pop3.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.pop3.php deleted file mode 100644 index f9fd3b2edb..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.pop3.php +++ /dev/null @@ -1,407 +0,0 @@ -pop_conn = 0; - $this->connected = false; - $this->error = null; - } - - /** - * Combination of public events - connect, login, disconnect - * @access public - * @param string $host - * @param integer $port - * @param integer $tval - * @param string $username - * @param string $password - */ - public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) { - $this->host = $host; - - // If no port value is passed, retrieve it - if ($port == false) { - $this->port = $this->POP3_PORT; - } else { - $this->port = $port; - } - - // If no port value is passed, retrieve it - if ($tval == false) { - $this->tval = $this->POP3_TIMEOUT; - } else { - $this->tval = $tval; - } - - $this->do_debug = $debug_level; - $this->username = $username; - $this->password = $password; - - // Refresh the error log - $this->error = null; - - // Connect - $result = $this->Connect($this->host, $this->port, $this->tval); - - if ($result) { - $login_result = $this->Login($this->username, $this->password); - - if ($login_result) { - $this->Disconnect(); - - return true; - } - - } - - // We need to disconnect regardless if the login succeeded - $this->Disconnect(); - - return false; - } - - /** - * Connect to the POP3 server - * @access public - * @param string $host - * @param integer $port - * @param integer $tval - * @return boolean - */ - public function Connect ($host, $port = false, $tval = 30) { - // Are we already connected? - if ($this->connected) { - return true; - } - - /* - On Windows this will raise a PHP Warning error if the hostname doesn't exist. - Rather than supress it with @fsockopen, let's capture it cleanly instead - */ - - set_error_handler(array(&$this, 'catchWarning')); - - // Connect to the POP3 server - $this->pop_conn = fsockopen($host, // POP3 Host - $port, // Port # - $errno, // Error Number - $errstr, // Error Message - $tval); // Timeout (seconds) - - // Restore the error handler - restore_error_handler(); - - // Does the Error Log now contain anything? - if ($this->error && $this->do_debug >= 1) { - $this->displayErrors(); - } - - // Did we connect? - if ($this->pop_conn == false) { - // It would appear not... - $this->error = array( - 'error' => "Failed to connect to server $host on port $port", - 'errno' => $errno, - 'errstr' => $errstr - ); - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - - return false; - } - - // Increase the stream time-out - - // Check for PHP 4.3.0 or later - if (version_compare(phpversion(), '5.0.0', 'ge')) { - stream_set_timeout($this->pop_conn, $tval, 0); - } else { - // Does not work on Windows - if (substr(PHP_OS, 0, 3) !== 'WIN') { - socket_set_timeout($this->pop_conn, $tval, 0); - } - } - - // Get the POP3 server response - $pop3_response = $this->getResponse(); - - // Check for the +OK - if ($this->checkResponse($pop3_response)) { - // The connection is established and the POP3 server is talking - $this->connected = true; - return true; - } - - } - - /** - * Login to the POP3 server (does not support APOP yet) - * @access public - * @param string $username - * @param string $password - * @return boolean - */ - public function Login ($username = '', $password = '') { - if ($this->connected == false) { - $this->error = 'Not connected to POP3 server'; - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - } - - if (empty($username)) { - $username = $this->username; - } - - if (empty($password)) { - $password = $this->password; - } - - $pop_username = "USER $username" . $this->CRLF; - $pop_password = "PASS $password" . $this->CRLF; - - // Send the Username - $this->sendString($pop_username); - $pop3_response = $this->getResponse(); - - if ($this->checkResponse($pop3_response)) { - // Send the Password - $this->sendString($pop_password); - $pop3_response = $this->getResponse(); - - if ($this->checkResponse($pop3_response)) { - return true; - } else { - return false; - } - } else { - return false; - } - } - - /** - * Disconnect from the POP3 server - * @access public - */ - public function Disconnect () { - $this->sendString('QUIT'); - - fclose($this->pop_conn); - } - - ///////////////////////////////////////////////// - // Private Methods - ///////////////////////////////////////////////// - - /** - * Get the socket response back. - * $size is the maximum number of bytes to retrieve - * @access private - * @param integer $size - * @return string - */ - private function getResponse ($size = 128) { - $pop3_response = fgets($this->pop_conn, $size); - - return $pop3_response; - } - - /** - * Send a string down the open socket connection to the POP3 server - * @access private - * @param string $string - * @return integer - */ - private function sendString ($string) { - $bytes_sent = fwrite($this->pop_conn, $string, strlen($string)); - - return $bytes_sent; - } - - /** - * Checks the POP3 server response for +OK or -ERR - * @access private - * @param string $string - * @return boolean - */ - private function checkResponse ($string) { - if (substr($string, 0, 3) !== '+OK') { - $this->error = array( - 'error' => "Server reported an error: $string", - 'errno' => 0, - 'errstr' => '' - ); - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - - return false; - } else { - return true; - } - - } - - /** - * If debug is enabled, display the error message array - * @access private - */ - private function displayErrors () { - echo '

';
-
-    foreach ($this->error as $single_error) {
-      print_r($single_error);
-    }
-
-    echo '
'; - } - - /** - * Takes over from PHP for the socket warning handler - * @access private - * @param integer $errno - * @param string $errstr - * @param string $errfile - * @param integer $errline - */ - private function catchWarning ($errno, $errstr, $errfile, $errline) { - $this->error[] = array( - 'error' => "Connecting to the POP3 server raised a PHP warning: ", - 'errno' => $errno, - 'errstr' => $errstr - ); - } - - // End of class -} -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.smtp.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.smtp.php deleted file mode 100644 index c2ca1cb3b8..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/class.smtp.php +++ /dev/null @@ -1,814 +0,0 @@ -smtp_conn = 0; - $this->error = null; - $this->helo_rply = null; - - $this->do_debug = 0; - } - - ///////////////////////////////////////////////// - // CONNECTION FUNCTIONS - ///////////////////////////////////////////////// - - /** - * Connect to the server specified on the port specified. - * If the port is not specified use the default SMTP_PORT. - * If tval is specified then a connection will try and be - * established with the server for that number of seconds. - * If tval is not specified the default is 30 seconds to - * try on the connection. - * - * SMTP CODE SUCCESS: 220 - * SMTP CODE FAILURE: 421 - * @access public - * @return bool - */ - public function Connect($host, $port = 0, $tval = 30) { - // set the error val to null so there is no confusion - $this->error = null; - - // make sure we are __not__ connected - if($this->connected()) { - // already connected, generate error - $this->error = array("error" => "Already connected to a server"); - return false; - } - - if(empty($port)) { - $port = $this->SMTP_PORT; - } - - // connect to the smtp server - $this->smtp_conn = @fsockopen($host, // the host of the server - $port, // the port to use - $errno, // error number if any - $errstr, // error message if any - $tval); // give up after ? secs - // verify we connected properly - if(empty($this->smtp_conn)) { - $this->error = array("error" => "Failed to connect to server", - "errno" => $errno, - "errstr" => $errstr); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '
'; - } - return false; - } - - // SMTP server can take longer to respond, give longer timeout for first read - // Windows does not have support for this timeout function - if(substr(PHP_OS, 0, 3) != "WIN") - socket_set_timeout($this->smtp_conn, $tval, 0); - - // get any announcement - $announce = $this->get_lines(); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '
'; - } - - return true; - } - - /** - * Initiate a TLS communication with the server. - * - * SMTP CODE 220 Ready to start TLS - * SMTP CODE 501 Syntax error (no parameters allowed) - * SMTP CODE 454 TLS not available due to temporary reason - * @access public - * @return bool success - */ - public function StartTLS() { - $this->error = null; # to avoid confusion - - if(!$this->connected()) { - $this->error = array("error" => "Called StartTLS() without being connected"); - return false; - } - - fputs($this->smtp_conn,"STARTTLS" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 220) { - $this->error = - array("error" => "STARTTLS not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Begin encrypted connection - if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { - return false; - } - - return true; - } - - /** - * Performs SMTP authentication. Must be run after running the - * Hello() method. Returns true if successfully authenticated. - * @access public - * @return bool - */ - public function Authenticate($username, $password) { - // Start authentication - fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 334) { - $this->error = - array("error" => "AUTH not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Send encoded username - fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 334) { - $this->error = - array("error" => "Username not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Send encoded password - fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 235) { - $this->error = - array("error" => "Password not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - return true; - } - - /** - * Returns true if connected to a server otherwise false - * @access public - * @return bool - */ - public function Connected() { - if(!empty($this->smtp_conn)) { - $sock_status = socket_get_status($this->smtp_conn); - if($sock_status["eof"]) { - // the socket is valid but we are not connected - if($this->do_debug >= 1) { - echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected"; - } - $this->Close(); - return false; - } - return true; // everything looks good - } - return false; - } - - /** - * Closes the socket and cleans up the state of the class. - * It is not considered good to use this function without - * first trying to use QUIT. - * @access public - * @return void - */ - public function Close() { - $this->error = null; // so there is no confusion - $this->helo_rply = null; - if(!empty($this->smtp_conn)) { - // close the connection and cleanup - fclose($this->smtp_conn); - $this->smtp_conn = 0; - } - } - - ///////////////////////////////////////////////// - // SMTP COMMANDS - ///////////////////////////////////////////////// - - /** - * Issues a data command and sends the msg_data to the server - * finializing the mail transaction. $msg_data is the message - * that is to be send with the headers. Each header needs to be - * on a single line followed by a with the message headers - * and the message body being seperated by and additional . - * - * Implements rfc 821: DATA - * - * SMTP CODE INTERMEDIATE: 354 - * [data] - * . - * SMTP CODE SUCCESS: 250 - * SMTP CODE FAILURE: 552,554,451,452 - * SMTP CODE FAILURE: 451,554 - * SMTP CODE ERROR : 500,501,503,421 - * @access public - * @return bool - */ - public function Data($msg_data) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Data() without being connected"); - return false; - } - - fputs($this->smtp_conn,"DATA" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 354) { - $this->error = - array("error" => "DATA command not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - /* the server is ready to accept data! - * according to rfc 821 we should not send more than 1000 - * including the CRLF - * characters on a single line so we will break the data up - * into lines by \r and/or \n then if needed we will break - * each of those into smaller lines to fit within the limit. - * in addition we will be looking for lines that start with - * a period '.' and append and additional period '.' to that - * line. NOTE: this does not count towards limit. - */ - - // normalize the line breaks so we know the explode works - $msg_data = str_replace("\r\n","\n",$msg_data); - $msg_data = str_replace("\r","\n",$msg_data); - $lines = explode("\n",$msg_data); - - /* we need to find a good way to determine is headers are - * in the msg_data or if it is a straight msg body - * currently I am assuming rfc 822 definitions of msg headers - * and if the first field of the first line (':' sperated) - * does not contain a space then it _should_ be a header - * and we can process all lines before a blank "" line as - * headers. - */ - - $field = substr($lines[0],0,strpos($lines[0],":")); - $in_headers = false; - if(!empty($field) && !strstr($field," ")) { - $in_headers = true; - } - - $max_line_length = 998; // used below; set here for ease in change - - while(list(,$line) = @each($lines)) { - $lines_out = null; - if($line == "" && $in_headers) { - $in_headers = false; - } - // ok we need to break this line up into several smaller lines - while(strlen($line) > $max_line_length) { - $pos = strrpos(substr($line,0,$max_line_length)," "); - - // Patch to fix DOS attack - if(!$pos) { - $pos = $max_line_length - 1; - $lines_out[] = substr($line,0,$pos); - $line = substr($line,$pos); - } else { - $lines_out[] = substr($line,0,$pos); - $line = substr($line,$pos + 1); - } - - /* if processing headers add a LWSP-char to the front of new line - * rfc 822 on long msg headers - */ - if($in_headers) { - $line = "\t" . $line; - } - } - $lines_out[] = $line; - - // send the lines to the server - while(list(,$line_out) = @each($lines_out)) { - if(strlen($line_out) > 0) - { - if(substr($line_out, 0, 1) == ".") { - $line_out = "." . $line_out; - } - } - fputs($this->smtp_conn,$line_out . $this->CRLF); - } - } - - // message data has been sent - fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 250) { - $this->error = - array("error" => "DATA not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * Sends the HELO command to the smtp server. - * This makes sure that we and the server are in - * the same known state. - * - * Implements from rfc 821: HELO - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE ERROR : 500, 501, 504, 421 - * @access public - * @return bool - */ - public function Hello($host = '') { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Hello() without being connected"); - return false; - } - - // if hostname for HELO was not specified send default - if(empty($host)) { - // determine appropriate default to send to server - $host = "localhost"; - } - - // Send extended hello first (RFC 2821) - if(!$this->SendHello("EHLO", $host)) { - if(!$this->SendHello("HELO", $host)) { - return false; - } - } - - return true; - } - - /** - * Sends a HELO/EHLO command. - * @access private - * @return bool - */ - private function SendHello($hello, $host) { - fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '
'; - } - - if($code != 250) { - $this->error = - array("error" => $hello . " not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - $this->helo_rply = $rply; - - return true; - } - - /** - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more Recipient - * commands may be called followed by a Data command. - * - * Implements rfc 821: MAIL FROM: - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE SUCCESS: 552,451,452 - * SMTP CODE SUCCESS: 500,501,421 - * @access public - * @return bool - */ - public function Mail($from) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Mail() without being connected"); - return false; - } - - $useVerp = ($this->do_verp ? "XVERP" : ""); - fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 250) { - $this->error = - array("error" => "MAIL not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * Sends the quit command to the server and then closes the socket - * if there is no error or the $close_on_error argument is true. - * - * Implements from rfc 821: QUIT - * - * SMTP CODE SUCCESS: 221 - * SMTP CODE ERROR : 500 - * @access public - * @return bool - */ - public function Quit($close_on_error = true) { - $this->error = null; // so there is no confusion - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Quit() without being connected"); - return false; - } - - // send the quit command to the server - fputs($this->smtp_conn,"quit" . $this->CRLF); - - // get any good-bye messages - $byemsg = $this->get_lines(); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '
'; - } - - $rval = true; - $e = null; - - $code = substr($byemsg,0,3); - if($code != 221) { - // use e as a tmp var cause Close will overwrite $this->error - $e = array("error" => "SMTP server rejected quit command", - "smtp_code" => $code, - "smtp_rply" => substr($byemsg,4)); - $rval = false; - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '
'; - } - } - - if(empty($e) || $close_on_error) { - $this->Close(); - } - - return $rval; - } - - /** - * Sends the command RCPT to the SMTP server with the TO: argument of $to. - * Returns true if the recipient was accepted false if it was rejected. - * - * Implements from rfc 821: RCPT TO: - * - * SMTP CODE SUCCESS: 250,251 - * SMTP CODE FAILURE: 550,551,552,553,450,451,452 - * SMTP CODE ERROR : 500,501,503,421 - * @access public - * @return bool - */ - public function Recipient($to) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Recipient() without being connected"); - return false; - } - - fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 250 && $code != 251) { - $this->error = - array("error" => "RCPT not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * Sends the RSET command to abort and transaction that is - * currently in progress. Returns true if successful false - * otherwise. - * - * Implements rfc 821: RSET - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE ERROR : 500,501,504,421 - * @access public - * @return bool - */ - public function Reset() { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Reset() without being connected"); - return false; - } - - fputs($this->smtp_conn,"RSET" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 250) { - $this->error = - array("error" => "RSET failed", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - return true; - } - - /** - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more Recipient - * commands may be called followed by a Data command. This command - * will send the message to the users terminal if they are logged - * in and send them an email. - * - * Implements rfc 821: SAML FROM: - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE SUCCESS: 552,451,452 - * SMTP CODE SUCCESS: 500,501,502,421 - * @access public - * @return bool - */ - public function SendAndMail($from) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called SendAndMail() without being connected"); - return false; - } - - fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 250) { - $this->error = - array("error" => "SAML not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * This is an optional command for SMTP that this class does not - * support. This method is here to make the RFC821 Definition - * complete for this class and __may__ be implimented in the future - * - * Implements from rfc 821: TURN - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE FAILURE: 502 - * SMTP CODE ERROR : 500, 503 - * @access public - * @return bool - */ - public function Turn() { - $this->error = array("error" => "This method, TURN, of the SMTP ". - "is not implemented"); - if($this->do_debug >= 1) { - echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '
'; - } - return false; - } - - /** - * Get the current error - * @access public - * @return array - */ - public function getError() { - return $this->error; - } - - ///////////////////////////////////////////////// - // INTERNAL FUNCTIONS - ///////////////////////////////////////////////// - - /** - * Read in as many lines as possible - * either before eof or socket timeout occurs on the operation. - * With SMTP we can tell if we have more lines to read if the - * 4th character is '-' symbol. If it is a space then we don't - * need to read anything else. - * @access private - * @return string - */ - private function get_lines() { - $data = ""; - while($str = @fgets($this->smtp_conn,515)) { - if($this->do_debug >= 4) { - echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '
'; - echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '
'; - } - $data .= $str; - if($this->do_debug >= 4) { - echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '
'; - } - // if 4th character is a space, we are done reading, break the loop - if(substr($str,3,1) == " ") { break; } - } - return $data; - } - -} - -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ar.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ar.php deleted file mode 100644 index b7c5057d0c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ar.php +++ /dev/null @@ -1,27 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP Error: لم نستطع تأكيد الهوية.'; -$PHPMAILER_LANG['connect_host'] = 'SMTP Error: لم نستطع الاتصال بمخدم SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: لم يتم قبول المعلومات .'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; -$PHPMAILER_LANG['execute'] = 'لم أستطع تنفيذ : '; -$PHPMAILER_LANG['file_access'] = 'لم نستطع الوصول للملف: '; -$PHPMAILER_LANG['file_open'] = 'File Error: لم نستطع فتح الملف: '; -$PHPMAILER_LANG['from_failed'] = 'البريد التالي لم نستطع ارسال البريد له : '; -$PHPMAILER_LANG['instantiate'] = 'لم نستطع توفير خدمة البريد.'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' mailer غير مدعوم.'; -//$PHPMAILER_LANG['provide_address'] = 'You must provide at least one recipient email address.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: الأخطاء التالية ' . - 'فشل في الارسال لكل من : '; -$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-br.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-br.php deleted file mode 100644 index 7d64ce4d4c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-br.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ca.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ca.php deleted file mode 100644 index 1127567dc8..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ca.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ch.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ch.php deleted file mode 100644 index 31ebd861cb..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ch.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-cz.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-cz.php deleted file mode 100644 index f9589ca19d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-cz.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-de.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-de.php deleted file mode 100644 index 165a86f4f7..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-de.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-dk.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-dk.php deleted file mode 100644 index 59b58c0fce..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-dk.php +++ /dev/null @@ -1,26 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; -$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; -$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; -$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; -$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; -$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; -$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; -$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-es.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-es.php deleted file mode 100644 index 0b6982509c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-es.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-et.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-et.php deleted file mode 100644 index cf61779b08..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-et.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fi.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fi.php deleted file mode 100644 index 6d7dccee51..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fi.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fo.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fo.php deleted file mode 100644 index 704c4772da..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fo.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fr.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fr.php deleted file mode 100644 index 52e9ae2b99..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-fr.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-hu.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-hu.php deleted file mode 100644 index a26648484b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-hu.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-it.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-it.php deleted file mode 100644 index 59bf4fb978..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-it.php +++ /dev/null @@ -1,27 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; -$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Data non accettati dal server.'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'Encoding set dei caratteri sconosciuto: '; -$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; -$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; -$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; -$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; -$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; -$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato errore: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ja.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ja.php deleted file mode 100644 index 66da1b6a1d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ja.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-nl.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-nl.php deleted file mode 100644 index 355dcdc499..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-nl.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-no.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-no.php deleted file mode 100644 index bf2f84ee9b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-no.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-pl.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-pl.php deleted file mode 100644 index e8bd5124d7..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-pl.php +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ro.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ro.php deleted file mode 100644 index 17cddb76b9..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ro.php +++ /dev/null @@ -1,27 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.'; -$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: '; -$PHPMAILER_LANG['execute'] = 'Nu pot executa: '; -$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: '; -$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: '; -$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: '; -$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; -$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).'; -$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ru.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ru.php deleted file mode 100644 index 295a56ef49..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-ru.php +++ /dev/null @@ -1,25 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; -$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: '; -$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; -$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; -$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: '; -$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; -$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.'; -$PHPMAILER_LANG['mailer_not_supported'] = ' - почтовый сервер не поддерживается.'; -$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-se.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-se.php deleted file mode 100644 index d459667f7d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-se.php +++ /dev/null @@ -1,26 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; -$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; -$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; -$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; -$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; -$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; -$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; -$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-tr.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-tr.php deleted file mode 100644 index 8a069d14d0..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-tr.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh.php deleted file mode 100644 index fef66f8cb1..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh.php +++ /dev/null @@ -1,26 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登錄失敗。'; -$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連接到 SMTP 主機。'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:數據不被接受。'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = '未知編碼: '; -$PHPMAILER_LANG['file_access'] = '無法訪問文件:'; -$PHPMAILER_LANG['file_open'] = '文件錯誤:無法打開文件:'; -$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; -$PHPMAILER_LANG['execute'] = '無法執行:'; -$PHPMAILER_LANG['instantiate'] = '未知函數調用。'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; -$PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:'; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh_cn.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh_cn.php deleted file mode 100644 index b188404359..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/language/phpmailer.lang-zh_cn.php +++ /dev/null @@ -1,26 +0,0 @@ - -*/ - -$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; -$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; -//$P$PHPMAILER_LANG['empty_message'] = 'Message body empty'; -$PHPMAILER_LANG['encoding'] = '未知编码: '; -$PHPMAILER_LANG['execute'] = '无法执行:'; -$PHPMAILER_LANG['file_access'] = '无法访问文件:'; -$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; -$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; -$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; -//$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; -$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; -$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/phpmailer.class.php b/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/phpmailer.class.php deleted file mode 100644 index 09479239bf..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/phpmailer/phpmailer.class.php +++ /dev/null @@ -1,2320 +0,0 @@ -exceptions = ($exceptions == true); - } - - /** - * Sets message type to HTML. - * @param bool $ishtml - * @return void - */ - public function IsHTML($ishtml = true) { - if ($ishtml) { - $this->ContentType = 'text/html'; - } else { - $this->ContentType = 'text/plain'; - } - } - - /** - * Sets Mailer to send message using SMTP. - * @return void - */ - public function IsSMTP() { - $this->Mailer = 'smtp'; - } - - /** - * Sets Mailer to send message using PHP mail() function. - * @return void - */ - public function IsMail() { - $this->Mailer = 'mail'; - } - - /** - * Sets Mailer to send message using the $Sendmail program. - * @return void - */ - public function IsSendmail() { - if (!stristr(ini_get('sendmail_path'), 'sendmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; - } - $this->Mailer = 'sendmail'; - } - - /** - * Sets Mailer to send message using the qmail MTA. - * @return void - */ - public function IsQmail() { - if (stristr(ini_get('sendmail_path'), 'qmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; - } - $this->Mailer = 'sendmail'; - } - - ///////////////////////////////////////////////// - // METHODS, RECIPIENTS - ///////////////////////////////////////////////// - - /** - * Adds a "To" address. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddAddress($address, $name = '') { - return $this->AddAnAddress('to', $address, $name); - } - - /** - * Adds a "Cc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddCC($address, $name = '') { - return $this->AddAnAddress('cc', $address, $name); - } - - /** - * Adds a "Bcc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddBCC($address, $name = '') { - return $this->AddAnAddress('bcc', $address, $name); - } - - /** - * Adds a "Reply-to" address. - * @param string $address - * @param string $name - * @return boolean - */ - public function AddReplyTo($address, $name = '') { - return $this->AddAnAddress('ReplyTo', $address, $name); - } - - /** - * Adds an address to one of the recipient arrays - * Addresses that have been added already return false, but do not throw exceptions - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - * @access private - */ - private function AddAnAddress($kind, $address, $name = '') { - if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) { - echo 'Invalid recipient array: ' . kind; - return false; - } - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!self::ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - echo $this->Lang('invalid_address').': '.$address; - return false; - } - if ($kind != 'ReplyTo') { - if (!isset($this->all_recipients[strtolower($address)])) { - array_push($this->$kind, array($address, $name)); - $this->all_recipients[strtolower($address)] = true; - return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); - return true; - } - } - return false; -} - -/** - * Set the From and FromName properties - * @param string $address - * @param string $name - * @return boolean - */ - public function SetFrom($address, $name = '',$auto=1) { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!self::ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - echo $this->Lang('invalid_address').': '.$address; - return false; - } - $this->From = $address; - $this->FromName = $name; - if ($auto) { - if (empty($this->ReplyTo)) { - $this->AddAnAddress('ReplyTo', $address, $name); - } - if (empty($this->Sender)) { - $this->Sender = $address; - } - } - return true; - } - - /** - * Check that a string looks roughly like an email address should - * Static so it can be used without instantiation - * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator - * Conforms approximately to RFC2822 - * @link http://www.hexillion.com/samples/#Regex Original pattern found here - * @param string $address The email address to check - * @return boolean - * @static - * @access public - */ - public static function ValidateAddress($address) { - if (function_exists('filter_var')) { //Introduced in PHP 5.2 - if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) { - return false; - } else { - return true; - } - } else { - return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address); - } - } - - ///////////////////////////////////////////////// - // METHODS, MAIL SENDING - ///////////////////////////////////////////////// - - /** - * Creates message and assigns Mailer. If the message is - * not sent successfully then it returns false. Use the ErrorInfo - * variable to view description of the error. - * @return bool - */ - public function Send() { - try { - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL); - } - - // Set whether the message is multipart/alternative - if(!empty($this->AltBody)) { - $this->ContentType = 'multipart/alternative'; - } - - $this->error_count = 0; // reset errors - $this->SetMessageType(); - $header = $this->CreateHeader(); - $body = $this->CreateBody(); - - if (empty($this->Body)) { - throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL); - } - - // digitally sign with DKIM if enabled - if ($this->DKIM_domain && $this->DKIM_private) { - $header_dkim = $this->DKIM_Add($header,$this->Subject,$body); - $header = str_replace("\r\n","\n",$header_dkim) . $header; - } - - // Choose the mailer and send through it - switch($this->Mailer) { - case 'sendmail': - return $this->SendmailSend($header, $body); - case 'smtp': - return $this->SmtpSend($header, $body); - default: - return $this->MailSend($header, $body); - } - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - echo $e->getMessage()."\n"; - return false; - } - } - - /** - * Sends mail using the $Sendmail program. - * @param string $header The message headers - * @param string $body The message body - * @access protected - * @return bool - */ - protected function SendmailSend($header, $body) { - if ($this->Sender != '') { - $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } else { - $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); - } - if ($this->SingleTo === true) { - foreach ($this->SingleToArray as $key => $val) { - if(!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, "To: " . $val . "\n"); - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); - if($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - } else { - if(!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent,$this->to,$this->cc,$this->bcc,$this->Subject,$body); - if($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - return true; - } - - /** - * Sends mail using the PHP mail() function. - * @param string $header The message headers - * @param string $body The message body - * @access protected - * @return bool - */ - protected function MailSend($header, $body) { - $toArr = array(); - foreach($this->to as $t) { - $toArr[] = $this->AddrFormat($t); - } - $to = implode(', ', $toArr); - - $params = sprintf("-oi -f %s", $this->Sender); - if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - if ($this->SingleTo === true && count($toArr) > 1) { - foreach ($toArr as $key => $val) { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); - } - } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); - } - } else { - if ($this->SingleTo === true && count($toArr) > 1) { - foreach ($toArr as $key => $val) { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent,$val,$this->cc,$this->bcc,$this->Subject,$body); - } - } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent,$to,$this->cc,$this->bcc,$this->Subject,$body); - } - } - if (isset($old_from)) { - ini_set('sendmail_from', $old_from); - } - if(!$rt) { - throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL); - } - return true; - } - - /** - * Sends mail via SMTP using PhpSMTP - * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * @param string $header The message headers - * @param string $body The message body - * @uses SMTP - * @access protected - * @return bool - */ - protected function SmtpSend($header, $body) { - require_once $this->PluginDir . 'class.smtp.php'; - $bad_rcpt = array(); - - if(!$this->SmtpConnect()) { - throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL); - } - $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; - if(!$this->smtp->Mail($smtp_from)) { - throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL); - } - - // Attempt to send attach all recipients - foreach($this->to as $to) { - if (!$this->smtp->Recipient($to[0])) { - $bad_rcpt[] = $to[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent,$to[0],'','',$this->Subject,$body); - } - } - foreach($this->cc as $cc) { - if (!$this->smtp->Recipient($cc[0])) { - $bad_rcpt[] = $cc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent,'',$cc[0],'',$this->Subject,$body); - } - } - foreach($this->bcc as $bcc) { - if (!$this->smtp->Recipient($bcc[0])) { - $bad_rcpt[] = $bcc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent,'','',$bcc[0],$this->Subject,$body); - } - } - - - if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses - $badaddresses = implode(', ', $bad_rcpt); - throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses); - } - if(!$this->smtp->Data($header . $body)) { - throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL); - } - if($this->SMTPKeepAlive == true) { - $this->smtp->Reset(); - } - return true; - } - - /** - * Initiates a connection to an SMTP server. - * Returns false if the operation failed. - * @uses SMTP - * @access public - * @return bool - */ - public function SmtpConnect() { - if(is_null($this->smtp)) { - $this->smtp = new SMTP(); - } - - $this->smtp->do_debug = $this->SMTPDebug; - $hosts = explode(';', $this->Host); - $index = 0; - $connection = $this->smtp->Connected(); - - // Retry while there is no connection - try { - while($index < count($hosts) && !$connection) { - $hostinfo = array(); - if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) { - $host = $hostinfo[1]; - $port = $hostinfo[2]; - } else { - $host = $hosts[$index]; - $port = $this->Port; - } - - $tls = ($this->SMTPSecure == 'tls'); - $ssl = ($this->SMTPSecure == 'ssl'); - - if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { - - $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); - $this->smtp->Hello($hello); - - if ($tls) { - if (!$this->smtp->StartTLS()) { - throw new phpmailerException($this->Lang('tls')); - } - - //We must resend HELO after tls negotiation - $this->smtp->Hello($hello); - } - - $connection = true; - if ($this->SMTPAuth) { - if (!$this->smtp->Authenticate($this->Username, $this->Password)) { - throw new phpmailerException($this->Lang('authenticate')); - } - } - } - $index++; - if (!$connection) { - throw new phpmailerException($this->Lang('connect_host')); - } - } - } catch (phpmailerException $e) { - $this->smtp->Reset(); - throw $e; - } - return true; - } - - /** - * Closes the active SMTP session if one exists. - * @return void - */ - public function SmtpClose() { - if(!is_null($this->smtp)) { - if($this->smtp->Connected()) { - $this->smtp->Quit(); - $this->smtp->Close(); - } - } - } - - /** - * Sets the language for all class error messages. - * Returns false if it cannot load the language file. The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br") - * @param string $lang_path Path to the language file directory - * @access public - */ - function SetLanguage($langcode = 'en', $lang_path = 'language/') { - //Define full set of translatable strings - $PHPMAILER_LANG = array( - 'provide_address' => 'You must provide at least one recipient email address.', - 'mailer_not_supported' => ' mailer is not supported.', - 'execute' => 'Could not execute: ', - 'instantiate' => 'Could not instantiate mail function.', - 'authenticate' => 'SMTP Error: Could not authenticate.', - 'from_failed' => 'The following From address failed: ', - 'recipients_failed' => 'SMTP Error: The following recipients failed: ', - 'data_not_accepted' => 'SMTP Error: Data not accepted.', - 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', - 'file_access' => 'Could not access file: ', - 'file_open' => 'File Error: Could not open file: ', - 'encoding' => 'Unknown encoding: ', - 'signing' => 'Signing Error: ', - 'smtp_error' => 'SMTP server error: ', - 'empty_message' => 'Message body empty', - 'invalid_address' => 'Invalid address', - 'variable_set' => 'Cannot set or reset variable: ' - ); - //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"! - $l = true; - if ($langcode != 'en') { //There is no English translation file - $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php'; - } - $this->language = $PHPMAILER_LANG; - return ($l == true); //Returns false if language not found - } - - /** - * Return the current array of language strings - * @return array - */ - public function GetTranslations() { - return $this->language; - } - - ///////////////////////////////////////////////// - // METHODS, MESSAGE CREATION - ///////////////////////////////////////////////// - - /** - * Creates recipient headers. - * @access public - * @return string - */ - public function AddrAppend($type, $addr) { - $addr_str = $type . ': '; - $addresses = array(); - foreach ($addr as $a) { - $addresses[] = $this->AddrFormat($a); - } - $addr_str .= implode(', ', $addresses); - $addr_str .= $this->LE; - - return $addr_str; - } - - /** - * Formats an address correctly. - * @access public - * @return string - */ - public function AddrFormat($addr) { - if (empty($addr[1])) { - return $this->SecureHeader($addr[0]); - } else { - return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; - } - } - - /** - * Wraps message for use with mailers that do not - * automatically perform wrapping and for quoted-printable. - * Original written by philippe. - * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public - * @return string - */ - public function WrapText($message, $length, $qp_mode = false) { - $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; - // If utf-8 encoding is used, we will need to make sure we don't - // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == "utf-8"); - - $message = $this->FixEOL($message); - if (substr($message, -1) == $this->LE) { - $message = substr($message, 0, -1); - } - - $line = explode($this->LE, $message); - $message = ''; - for ($i=0 ;$i < count($line); $i++) { - $line_part = explode(' ', $line[$i]); - $buf = ''; - for ($e = 0; $e $length)) { - $space_left = $length - strlen($buf) - 1; - if ($e != 0) { - if ($space_left > 20) { - $len = $space_left; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf .= ' ' . $part; - $message .= $buf . sprintf("=%s", $this->LE); - } else { - $message .= $buf . $soft_break; - } - $buf = ''; - } - while (strlen($word) > 0) { - $len = $length; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if (strlen($word) > 0) { - $message .= $part . sprintf("=%s", $this->LE); - } else { - $buf = $part; - } - } - } else { - $buf_o = $buf; - $buf .= ($e == 0) ? $word : (' ' . $word); - - if (strlen($buf) > $length and $buf_o != '') { - $message .= $buf_o . $soft_break; - $buf = $word; - } - } - } - $message .= $buf . $this->LE; - } - - return $message; - } - - /** - * Finds last character boundary prior to maxLength in a utf-8 - * quoted (printable) encoded string. - * Original written by Colin Brown. - * @access public - * @param string $encodedText utf-8 QP text - * @param int $maxLength find last character boundary prior to this length - * @return int - */ - public function UTF8CharBoundary($encodedText, $maxLength) { - $foundSplitPos = false; - $lookBack = 3; - while (!$foundSplitPos) { - $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); - $encodedCharPos = strpos($lastChunk, "="); - if ($encodedCharPos !== false) { - // Found start of encoded character byte within $lookBack block. - // Check the encoded byte value (the 2 chars after the '=') - $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); - $dec = hexdec($hex); - if ($dec < 128) { // Single byte character. - // If the encoded char was found at pos 0, it will fit - // otherwise reduce maxLength to start of the encoded char - $maxLength = ($encodedCharPos == 0) ? $maxLength : - $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec >= 192) { // First byte of a multi byte character - // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back - $lookBack += 3; - } - } else { - // No encoded character found - $foundSplitPos = true; - } - } - return $maxLength; - } - - - /** - * Set the body wrapping. - * @access public - * @return void - */ - public function SetWordWrap() { - if($this->WordWrap < 1) { - return; - } - - switch($this->message_type) { - case 'alt': - case 'alt_attachments': - $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->WrapText($this->Body, $this->WordWrap); - break; - } - } - - /** - * Assembles message header. - * @access public - * @return string The assembled header - */ - public function CreateHeader() { - $result = ''; - - // Set the boundaries - $uniq_id = md5(uniqid(time())); - $this->boundary[1] = 'b1_' . $uniq_id; - $this->boundary[2] = 'b2_' . $uniq_id; - - $result .= $this->HeaderLine('Date', self::RFCDate()); - if($this->Sender == '') { - $result .= $this->HeaderLine('Return-Path', trim($this->From)); - } else { - $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); - } - - // To be created automatically by mail() - if($this->Mailer != 'mail') { - if ($this->SingleTo === true) { - foreach($this->to as $t) { - $this->SingleToArray[] = $this->AddrFormat($t); - } - } else { - if(count($this->to) > 0) { - $result .= $this->AddrAppend('To', $this->to); - } elseif (count($this->cc) == 0) { - $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); - } - } - } - - $from = array(); - $from[0][0] = trim($this->From); - $from[0][1] = $this->FromName; - $result .= $this->AddrAppend('From', $from); - - // sendmail and mail() extract Cc from the header before sending - if(count($this->cc) > 0) { - $result .= $this->AddrAppend('Cc', $this->cc); - } - - // sendmail and mail() extract Bcc from the header before sending - if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) { - $result .= $this->AddrAppend('Bcc', $this->bcc); - } - - if(count($this->ReplyTo) > 0) { - $result .= $this->AddrAppend('Reply-to', $this->ReplyTo); - } - - // mail() sets the subject itself - if($this->Mailer != 'mail') { - $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); - } - - if($this->MessageID != '') { - $result .= $this->HeaderLine('Message-ID',$this->MessageID); - } else { - $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); - } - $result .= $this->HeaderLine('X-Priority', $this->Priority); - $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (phpmailer.sourceforge.net)'); - - if($this->ConfirmReadingTo != '') { - $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); - } - - // Add custom headers - for($index = 0; $index < count($this->CustomHeader); $index++) { - $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); - } - if (!$this->sign_key_file) { - $result .= $this->HeaderLine('MIME-Version', '1.0'); - $result .= $this->GetMailMIME(); - } - - return $result; - } - - /** - * Returns the message MIME. - * @access public - * @return string - */ - public function GetMailMIME() { - $result = ''; - switch($this->message_type) { - case 'plain': - $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); - $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet); - break; - case 'attachments': - case 'alt_attachments': - if($this->InlineImageExists()){ - $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE); - } else { - $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - } - break; - case 'alt': - $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - } - - if($this->Mailer != 'mail') { - $result .= $this->LE.$this->LE; - } - - return $result; - } - - /** - * Assembles the message body. Returns an empty string on failure. - * @access public - * @return string The assembled message body - */ - public function CreateBody() { - $body = ''; - - if ($this->sign_key_file) { - $body .= $this->GetMailMIME(); - } - - $this->SetWordWrap(); - - switch($this->message_type) { - case 'alt': - $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[1]); - break; - case 'plain': - $body .= $this->EncodeString($this->Body, $this->Encoding); - break; - case 'attachments': - $body .= $this->GetBoundary($this->boundary[1], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE; - $body .= $this->AttachAll(); - break; - case 'alt_attachments': - $body .= sprintf("--%s%s", $this->boundary[1], $this->LE); - $body .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE); - $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[2]); - $body .= $this->AttachAll(); - break; - } - - if ($this->IsError()) { - $body = ''; - } elseif ($this->sign_key_file) { - try { - $file = tempnam('', 'mail'); - file_put_contents($file, $body); //TODO check this worked - $signed = tempnam("", "signed"); - if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) { - @unlink($file); - @unlink($signed); - $body = file_get_contents($signed); - } else { - @unlink($file); - @unlink($signed); - throw new phpmailerException($this->Lang("signing").openssl_error_string()); - } - } catch (phpmailerException $e) { - $body = ''; - if ($this->exceptions) { - throw $e; - } - } - } - - return $body; - } - - /** - * Returns the start of a message boundary. - * @access private - */ - private function GetBoundary($boundary, $charSet, $contentType, $encoding) { - $result = ''; - if($charSet == '') { - $charSet = $this->CharSet; - } - if($contentType == '') { - $contentType = $this->ContentType; - } - if($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->TextLine('--' . $boundary); - $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet); - $result .= $this->LE; - $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); - $result .= $this->LE; - - return $result; - } - - /** - * Returns the end of a message boundary. - * @access private - */ - private function EndBoundary($boundary) { - return $this->LE . '--' . $boundary . '--' . $this->LE; - } - - /** - * Sets the message type. - * @access private - * @return void - */ - private function SetMessageType() { - if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) { - $this->message_type = 'plain'; - } else { - if(count($this->attachment) > 0) { - $this->message_type = 'attachments'; - } - if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) { - $this->message_type = 'alt'; - } - if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) { - $this->message_type = 'alt_attachments'; - } - } - } - - /** - * Returns a formatted header line. - * @access public - * @return string - */ - public function HeaderLine($name, $value) { - return $name . ': ' . $value . $this->LE; - } - - /** - * Returns a formatted mail line. - * @access public - * @return string - */ - public function TextLine($value) { - return $value . $this->LE; - } - - ///////////////////////////////////////////////// - // CLASS METHODS, ATTACHMENTS - ///////////////////////////////////////////////// - - /** - * Adds an attachment from a path on the filesystem. - * Returns false if the file could not be found - * or accessed. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { - try { - if ( !@is_file($path) ) { - throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE); - } - $filename = basename($path); - if ( $name == '' ) { - $name = $filename; - } - - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - echo $e->getMessage()."\n"; - if ( $e->getCode() == self::STOP_CRITICAL ) { - return false; - } - } - return true; - } - - /** - * Return the current array of attachments - * @return array - */ - public function GetAttachments() { - return $this->attachment; - } - - /** - * Attaches all fs, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access private - * @return string - */ - private function AttachAll() { - // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); - - // Add all attachments - foreach ($this->attachment as $attachment) { - // Check for string attachment - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - if (in_array($attachment[0], $incl)) { continue; } - $filename = $attachment[1]; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - $incl[] = $attachment[0]; - if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; } - $cidUniq[$cid] = true; - - $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); - $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); - - if($disposition == 'inline') { - $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); - } - - $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); - - // Encode as string attachment - if($bString) { - $mime[] = $this->EncodeString($string, $encoding); - if($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } else { - $mime[] = $this->EncodeFile($path, $encoding); - if($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } - } - - $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); - - return join('', $mime); - } - - /** - * Encodes attachment in requested format. - * Returns an empty string on failure. - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @see EncodeFile() - * @access private - * @return string - */ - private function EncodeFile($path, $encoding = 'base64') { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE); - } - if (function_exists('get_magic_quotes')) { - function get_magic_quotes() { - return false; - } - } - if (PHP_VERSION < 6) { - $magic_quotes = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->EncodeString($file_buffer, $encoding); - if (PHP_VERSION < 6) { set_magic_quotes_runtime($magic_quotes); } - return $file_buffer; - } catch (Exception $e) { - $this->SetError($e->getMessage()); - return ''; - } - } - - /** - * Encodes string to requested format. - * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public - * @return string - */ - public function EncodeString ($str, $encoding = 'base64') { - $encoded = ''; - switch(strtolower($encoding)) { - case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->FixEOL($str); - //Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) - $encoded .= $this->LE; - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->EncodeQP($str); - break; - default: - $this->SetError($this->Lang('encoding') . $encoding); - break; - } - return $encoded; - } - - /** - * Encode a header string to best (shortest) of Q, B, quoted or none. - * @access public - * @return string - */ - public function EncodeHeader($str, $position = 'text') { - $x = 0; - - switch (strtolower($position)) { - case 'phrase': - if (!preg_match('/[\200-\377]/', $str)) { - // Can't use addslashes as we don't know what value has magic_quotes_sybase - $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); - } - } - $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - case 'comment': - $x = preg_match_all('/[()"]/', $str, $matches); - // Fall-through - case 'text': - default: - $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - if ($x == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - // Try to select the encoding which should produce the shortest output - if (strlen($str)/3 < $x) { - $encoding = 'B'; - if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { - // Use a custom function which correctly encodes and wraps long - // multibyte strings without breaking lines within a character - $encoded = $this->Base64EncodeWrapMB($str); - } else { - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - } else { - $encoding = 'Q'; - $encoded = $this->EncodeQ($str, $position); - $encoded = $this->WrapText($encoded, $maxlen, true); - $encoded = str_replace('='.$this->LE, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; - } - - /** - * Checks if a string contains multibyte characters. - * @access public - * @param string $str multi-byte text to wrap encode - * @return bool - */ - public function HasMultiBytes($str) { - if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - return false; - } - } - - /** - * Correctly encodes and wraps long multibyte strings for mail headers - * without breaking lines within a character. - * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php - * @access public - * @param string $str multi-byte text to wrap encode - * @return string - */ - public function Base64EncodeWrapMB($str) { - $start = "=?".$this->CharSet."?B?"; - $end = "?="; - $encoded = ""; - - $mb_length = mb_strlen($str, $this->CharSet); - // Each line must have length <= 75, including $start and $end - $length = 75 - strlen($start) - strlen($end); - // Average multi-byte ratio - $ratio = $mb_length / strlen($str); - // Base64 has a 4:3 ratio - $offset = $avgLength = floor($length * $ratio * .75); - - for ($i = 0; $i < $mb_length; $i += $offset) { - $lookBack = 0; - - do { - $offset = $avgLength - $lookBack; - $chunk = mb_substr($str, $i, $offset, $this->CharSet); - $chunk = base64_encode($chunk); - $lookBack++; - } - while (strlen($chunk) > $length); - - $encoded .= $chunk . $this->LE; - } - - // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($this->LE)); - return $encoded; - } - - /** - * Encode string to quoted-printable. - * Only uses standard PHP, slow, but will always work - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @return string - */ - public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false) { - $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'); - $lines = preg_split('/(?:\r\n|\r|\n)/', $input); - $eol = "\r\n"; - $escape = '='; - $output = ''; - while( list(, $line) = each($lines) ) { - $linlen = strlen($line); - $newline = ''; - for($i = 0; $i < $linlen; $i++) { - $c = substr( $line, $i, 1 ); - $dec = ord( $c ); - if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E - $c = '=2E'; - } - if ( $dec == 32 ) { - if ( $i == ( $linlen - 1 ) ) { // convert space at eol only - $c = '=20'; - } else if ( $space_conv ) { - $c = '=20'; - } - } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required - $h2 = floor($dec/16); - $h1 = floor($dec%16); - $c = $escape.$hex[$h2].$hex[$h1]; - } - if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted - $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay - $newline = ''; - // check if newline first character will be point or not - if ( $dec == 46 ) { - $c = '=2E'; - } - } - $newline .= $c; - } // end of for - $output .= $newline.$eol; - } // end of while - return $output; - } - - /** - * Encode string to RFC2045 (6.7) quoted-printable format - * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version - * Also results in same content as you started with after decoding - * @see EncodeQPphp() - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function - * @return string - * @author Marcus Bointon - */ - public function EncodeQP($string, $line_max = 76, $space_conv = false) { - if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) - return quoted_printable_encode($string); - } - $filters = stream_get_filters(); - if (!in_array('convert.*', $filters)) { //Got convert stream filter? - return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation - } - $fp = fopen('php://temp/', 'r+'); - $string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks - $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE); - $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); - fputs($fp, $string); - rewind($fp); - $out = stream_get_contents($fp); - stream_filter_remove($s); - $out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange - fclose($fp); - return $out; - } - - /** - * Encode string to q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode - * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public - * @return string - */ - public function EncodeQ ($str, $position = 'text') { - // There should not be any EOL in the string - $encoded = preg_replace('/[\r\n]*/', '', $str); - - switch (strtolower($position)) { - case 'phrase': - $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - break; - case 'comment': - $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - case 'text': - default: - // Replace every high ascii, control =, ? and _ characters - //TODO using /e (equivalent to eval()) is probably not a good idea - $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', - "'='.sprintf('%02X', ord('\\1'))", $encoded); - break; - } - - // Replace every spaces to _ (more readable than =20) - $encoded = str_replace(' ', '_', $encoded); - - return $encoded; - } - - /** - * Adds a string or binary attachment (non-filesystem) to the list. - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return void - */ - public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') { - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - } - - /** - * Adds an embedded attachment. This can include images, sounds, and - * just about any other document. Make sure to set the $type to an - * image type. For JPEG images use "image/jpeg" and for GIF images - * use "image/gif". - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment. Use this to identify - * the Id for accessing the image in an HTML form. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { - - if ( !@is_file($path) ) { - $this->SetError($this->Lang('file_access') . $path); - return false; - } - - $filename = basename($path); - if ( $name == '' ) { - $name = $filename; - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'inline', - 7 => $cid - ); - - return true; - } - - /** - * Returns true if an inline attachment is present. - * @access public - * @return bool - */ - public function InlineImageExists() { - foreach($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { - return true; - } - } - return false; - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MESSAGE RESET - ///////////////////////////////////////////////// - - /** - * Clears all recipients assigned in the TO array. Returns void. - * @return void - */ - public function ClearAddresses() { - foreach($this->to as $to) { - unset($this->all_recipients[strtolower($to[0])]); - } - $this->to = array(); - } - - /** - * Clears all recipients assigned in the CC array. Returns void. - * @return void - */ - public function ClearCCs() { - foreach($this->cc as $cc) { - unset($this->all_recipients[strtolower($cc[0])]); - } - $this->cc = array(); - } - - /** - * Clears all recipients assigned in the BCC array. Returns void. - * @return void - */ - public function ClearBCCs() { - foreach($this->bcc as $bcc) { - unset($this->all_recipients[strtolower($bcc[0])]); - } - $this->bcc = array(); - } - - /** - * Clears all recipients assigned in the ReplyTo array. Returns void. - * @return void - */ - public function ClearReplyTos() { - $this->ReplyTo = array(); - } - - /** - * Clears all recipients assigned in the TO, CC and BCC - * array. Returns void. - * @return void - */ - public function ClearAllRecipients() { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - } - - /** - * Clears all previously set filesystem, string, and binary - * attachments. Returns void. - * @return void - */ - public function ClearAttachments() { - $this->attachment = array(); - } - - /** - * Clears all custom headers. Returns void. - * @return void - */ - public function ClearCustomHeaders() { - $this->CustomHeader = array(); - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MISCELLANEOUS - ///////////////////////////////////////////////// - - /** - * Adds the error message to the error container. - * @access protected - * @return void - */ - protected function SetError($msg) { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { - $lasterror = $this->smtp->getError(); - if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) { - $msg .= '

' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "

\n"; - } - } - $this->ErrorInfo = $msg; - } - - /** - * Returns the proper RFC 822 formatted date. - * @access public - * @return string - * @static - */ - public static function RFCDate() { - $tz = date('Z'); - $tzs = ($tz < 0) ? '-' : '+'; - $tz = abs($tz); - $tz = (int)($tz/3600)*100 + ($tz%3600)/60; - $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); - - return $result; - } - - /** - * Returns the server hostname or 'localhost.localdomain' if unknown. - * @access private - * @return string - */ - private function ServerHostname() { - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } else { - $result = 'localhost.localdomain'; - } - - return $result; - } - - /** - * Returns a message in the appropriate language. - * @access private - * @return string - */ - private function Lang($key) { - if(count($this->language) < 1) { - $this->SetLanguage('en'); // set the default language - } - - if(isset($this->language[$key])) { - return $this->language[$key]; - } else { - return 'Language string failed to load: ' . $key; - } - } - - /** - * Returns true if an error occurred. - * @access public - * @return bool - */ - public function IsError() { - return ($this->error_count > 0); - } - - /** - * Changes every end of line from CR or LF to CRLF. - * @access private - * @return string - */ - private function FixEOL($str) { - $str = str_replace("\r\n", "\n", $str); - $str = str_replace("\r", "\n", $str); - $str = str_replace("\n", $this->LE, $str); - return $str; - } - - /** - * Adds a custom header. - * @access public - * @return void - */ - public function AddCustomHeader($custom_header) { - $this->CustomHeader[] = explode(':', $custom_header, 2); - } - - /** - * Evaluates the message and returns modifications for inline images and backgrounds - * @access public - * @return $message - */ - public function MsgHTML($message, $basedir = '') { - preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); - if(isset($images[2])) { - foreach($images[2] as $i => $url) { - // do not change urls for absolute images (thanks to corvuscorax) - if (!preg_match('#^[A-z]+://#',$url)) { - $filename = basename($url); - $directory = dirname($url); - ($directory == '.')?$directory='':''; - $cid = 'cid:' . md5($filename); - $ext = pathinfo($filename, PATHINFO_EXTENSION); - $mimeType = self::_mime_types($ext); - if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; } - if ( strlen($directory) > 1 && substr($directory,-1) != '/') { $directory .= '/'; } - if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64',$mimeType) ) { - $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message); - } - } - } - } - $this->IsHTML(true); - $this->Body = $message; - $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message))); - if (!empty($textMsg) && empty($this->AltBody)) { - $this->AltBody = html_entity_decode($textMsg); - } - if (empty($this->AltBody)) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n"; - } - } - - /** - * Gets the MIME type of the embedded or inline image - * @param string File extension - * @access public - * @return string MIME type of ext - * @static - */ - public static function _mime_types($ext = '') { - $mimes = array( - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'doc' => 'application/msword', - 'bin' => 'application/macbinary', - 'dms' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'class' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'js' => 'application/x-javascript', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xhtml' => 'application/xhtml+xml', - 'xht' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mpga' => 'audio/mpeg', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'rv' => 'video/vnd.rn-realvideo', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'txt' => 'text/plain', - 'text' => 'text/plain', - 'log' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xl' => 'application/excel', - 'eml' => 'message/rfc822' - ); - return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; - } - - /** - * Set (or reset) Class Objects (variables) - * - * Usage Example: - * $page->set('X-Priority', '3'); - * - * @access public - * @param string $name Parameter Name - * @param mixed $value Parameter Value - * NOTE: will not work with arrays, there are no arrays to set/reset - * @todo Should this not be using __set() magic function? - */ - public function set($name, $value = '') { - try { - if (isset($this->$name) ) { - $this->$name = $value; - } else { - throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL); - } - } catch (Exception $e) { - $this->SetError($e->getMessage()); - if ($e->getCode() == self::STOP_CRITICAL) { - return false; - } - } - return true; - } - - /** - * Strips newlines to prevent header injection. - * @access public - * @param string $str String - * @return string - */ - public function SecureHeader($str) { - $str = str_replace("\r", '', $str); - $str = str_replace("\n", '', $str); - return trim($str); - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param string $key_filename Parameter File Name - * @param string $key_pass Password for private key - */ - public function Sign($cert_filename, $key_filename, $key_pass) { - $this->sign_cert_file = $cert_filename; - $this->sign_key_file = $key_filename; - $this->sign_key_pass = $key_pass; - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param string $key_filename Parameter File Name - * @param string $key_pass Password for private key - */ - public function DKIM_QP($txt) { - $tmp=""; - $line=""; - for ($i=0;$iDKIM_private); - if ($this->DKIM_passphrase!='') { - $privKey = openssl_pkey_get_private($privKeyStr,$this->DKIM_passphrase); - } else { - $privKey = $privKeyStr; - } - if (openssl_sign($s, $signature, $privKey)) { - return base64_encode($signature); - } - } - - /** - * Generate DKIM Canonicalization Header - * - * @access public - * @param string $s Header - */ - public function DKIM_HeaderC($s) { - $s=preg_replace("/\r\n\s+/"," ",$s); - $lines=explode("\r\n",$s); - foreach ($lines as $key=>$line) { - list($heading,$value)=explode(":",$line,2); - $heading=strtolower($heading); - $value=preg_replace("/\s+/"," ",$value) ; // Compress useless spaces - $lines[$key]=$heading.":".trim($value) ; // Don't forget to remove WSP around the value - } - $s=implode("\r\n",$lines); - return $s; - } - - /** - * Generate DKIM Canonicalization Body - * - * @access public - * @param string $body Message Body - */ - public function DKIM_BodyC($body) { - if ($body == '') return "\r\n"; - // stabilize line endings - $body=str_replace("\r\n","\n",$body); - $body=str_replace("\n","\r\n",$body); - // END stabilize line endings - while (substr($body,strlen($body)-4,4) == "\r\n\r\n") { - $body=substr($body,0,strlen($body)-2); - } - return $body; - } - - /** - * Create the DKIM header, body, as new header - * - * @access public - * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body - */ - public function DKIM_Add($headers_line,$subject,$body) { - $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms - $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body - $DKIMquery = 'dns/txt'; // Query method - $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) - $subject_header = "Subject: $subject"; - $headers = explode("\r\n",$headers_line); - foreach($headers as $header) { - if (strpos($header,'From:') === 0) { - $from_header=$header; - } elseif (strpos($header,'To:') === 0) { - $to_header=$header; - } - } - $from = str_replace('|','=7C',$this->DKIM_QP($from_header)); - $to = str_replace('|','=7C',$this->DKIM_QP($to_header)); - $subject = str_replace('|','=7C',$this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable - $body = $this->DKIM_BodyC($body); - $DKIMlen = strlen($body) ; // Length of body - $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body - $ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";"; - $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n". - "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n". - "\th=From:To:Subject;\r\n". - "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n". - "\tz=$from\r\n". - "\t|$to\r\n". - "\t|$subject;\r\n". - "\tbh=" . $DKIMb64 . ";\r\n". - "\tb="; - $toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs); - $signed = $this->DKIM_Sign($toSign); - return "X-PHPMAILER-DKIM: phpmailer.worxware.com\r\n".$dkimhdrs.$signed."\r\n"; - } - - protected function doCallback($isSent,$to,$cc,$bcc,$subject,$body) { - if (!empty($this->action_function) && function_exists($this->action_function)) { - $params = array($isSent,$to,$cc,$bcc,$subject,$body); - call_user_func_array($this->action_function,$params); - } - } -} - -class phpmailerException extends Exception { - public function errorMessage() { - $errorMsg = '' . $this->getMessage() . "
\n"; - return $errorMsg; - } -} -?> \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/AUTHORS b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/AUTHORS deleted file mode 100644 index dbbe3f4f94..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/AUTHORS +++ /dev/null @@ -1,11 +0,0 @@ -Monte Ohrt - - main Snoopy work - -Andrei Zmievski - - miscellaneous fixes - - read timeout support - - file submission capability - -Gene Wood - - bug fixes - - security fixes diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/COPYING.lib b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/COPYING.lib deleted file mode 100644 index 3b204400cf..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/COPYING.lib +++ /dev/null @@ -1,458 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/ChangeLog b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/ChangeLog deleted file mode 100644 index f4557613ed..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/ChangeLog +++ /dev/null @@ -1,105 +0,0 @@ -Version 1.2.4 -------------- - - - fix command line escapement vulnerability with execution of curl binary on https fetches (mohrt) - -Version 1.2.3 ------------ - - updated the version variable in the code to reflect the new version number - - fixed a typo that I introduced in 1.2.2 (the first character of the file is a "z" (gene_wood, Marc Desrousseaux, Jan Pedersen) - - fixed BUG # 1328793 : fetch is case sensetive when it comes to the scheme (http / https) (gene_wood) - -Version 1.2.2 ------------ - - incorporated PATCH # 985470 : pass port information in http 1.1 Host header ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 ) (gene_wood) - - fixed BUG # 1110049 : redirect is case sensitive - - fixed bug in security bugfix from 1.2.1 (gene_wood, kellan, zaruba) - -Version 1.2.1 ------------ - - fixed potential security issue with unchecked variables being passed to exec (for https with curl) (gene_wood) - - fixed BUG # 1086830 : submitlinks,fetchlinks and submittext expandlinks with the URI of the original page not the refreshed page (gene_wood) - - fixed BUG # 1077870 : Snoopy can't deal with multiple spaces in a refresh tag (gene_wood) - - fixed BUG # 864047 : Root relative links are treated as relative (gene_wood) - - fixed BUG # 1097134 : Undefined URI_PARTS["path"] generates Notice (gene_wood) - -Version 1.2 ------------ - - fixed BUG # 1014823 : Meta redirect regex inaccurate (gene_wood) - - fixed BUG # 999079 : Trailing slashes not removed in uri passed to fetchlinks (gene_wood) - - fixed BUG # 642958 and 912060 : $URI_PARTS["query"] causing undefined variable notices (gene_wood) - - fixed BUG # 626849 : cURL security risk (Tajh Leitso, gene_wood) - - fixed BUG # 626849 : Corrects the redirect function under the submit functions (Tajh Leitso, gene_wood) - - fixed BUG # 912060 : Undefined variable: postdata (gene_wood) - - fixed BUG # 858526 : win32 tmp/$headerfile create error (gene_wood) - - fixed BUG # 929682 : Called undefined function is_executable() on line 194. (gene_wood) - - fixed BUG # 859711 : typo: http://snoopy.sourceforge.com (gene_wood) - - fixed BUG # 852993 : double urlencoding breaks redirect (gene_wood) - - added proxy user/pass support (Robert Zwink, Monte) - - fixed post data array problem (stefan, Monte) - -Version 1.01 ------------ - - fixed problem with PHP 4.3.2 and fread() (Monte) - -Version 1.0 ------------ - - added textarea to stripform functionality (Monte) - - fixed multiple cookie setting problem (Monte) - - fixed problem where extra text inside curl_path variable to the location of your curl installation. Here's an example of the code : - include "Snoopy.class.php"; - $snoopy = new Snoopy; - $snoopy->curl_path="/usr/bin/curl"; - -Q: where does the function preg_match_all come from? -A: PCRE functions in PHP 3.0.9 and later - -Q: I get the error: Warning: Wrong parameter count for fsockopen() -A: Upgrade your verion of PHP to 3.0.9 or later - -Q: Snoopy cuts of my results every time. What's wrong? -A: Upgrade your verion of PHP to 3.0.9 or later diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/INSTALL b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/INSTALL deleted file mode 100644 index b6315ef78a..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/INSTALL +++ /dev/null @@ -1,2 +0,0 @@ -Put Snoopy.class.php into one of the directories specified in your -php.ini include_path directive. diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/NEWS b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/NEWS deleted file mode 100644 index a2ae3d9bde..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/NEWS +++ /dev/null @@ -1,61 +0,0 @@ -RELEASE NOTE: v1.2.4 -October 22, 2008 - -https fetches were not properly escaping shell args for curl binary execution. This is fixed. - -RELEASE NOTE: v1.2.3 -November 7, 2005 - -A typo was introduced in 1.2.2 which broke the whole release. This has been fixed. -A couple small fixes have been implemented also. - -RELEASE NOTE: v1.2.2 -October 30, 2005 - -Fixed a bug with the bugfix for the security hole. - -RELEASE NOTE: v1.2.1 -October 24, 2005 - -Fixed a few outstanding bugs and a potential security hole. - -RELEASE NOTE: v1.2 -November 17, 2004 - -Fixed a number of outstanding bugs. - -RELEASE NOTE: v1.01 - -PHP fixed a bug with fread() which consequently broke the way Snoopy called it. This has been fixed. -Renamed Snoopy.class.inc to Snoopy.class.php for proper file extention. - -RELEASE NOTE: v1.0 - -Added fetchform() function for fetching form elements from an html page. -For SSL support, you must have cURL installed. see http://curl.haxx.se -for details. Snoopy does not use the cURL library fuctions within PHP, -as these are not stable as of this Snoopy release. -Fixed bug with posting arrays of data. -Added status variable to track http status. -Several other bug fixes, see Changelog. -RELEASE NOTE: v0.93 - -A bug was fixed with redirection headers not containing the hostname, doubling up the redirection location URL. - -There is also a new variable, $lastredirectaddr that contains the last redirection URL. - -RELEASE NOTE: v0.92 -March 9, 2000 - -A bug was fixed with redirection on MS web servers. Also, cookies are now passed through redirects. - -This release also adds the ability to traverse html framed pages. Just set $maxframes to the recursion depth you want to allow, and results are returned in $this->results as an array. See the README for an example. - --Monte - -RELEASE NOTE: v0.91 -February 22, 2000 - -In previous versions of Snoopy, $this->header was an array containing key/value pairs of headers returned from fetched content, not including HTTP and GET headers. If a key value was the same, the old value was overwritten (Two Set-Cookie: headers for example). This was overcome by making $this->header a simple array containing every header returned. Therefore, it will now be up to the programmer to split these headers into key/value pairs if so desired. - --Monte diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/README b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/README deleted file mode 100644 index f6664b4131..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/README +++ /dev/null @@ -1,262 +0,0 @@ -NAME: - - Snoopy - the PHP net client v1.2.4 - -SYNOPSIS: - - include "Snoopy.class.php"; - $snoopy = new Snoopy; - - $snoopy->fetchtext("http://www.php.net/"); - print $snoopy->results; - - $snoopy->fetchlinks("http://www.phpbuilder.com/"); - print $snoopy->results; - - $submit_url = "http://lnk.ispi.net/texis/scripts/msearch/netsearch.html"; - - $submit_vars["q"] = "amiga"; - $submit_vars["submit"] = "Search!"; - $submit_vars["searchhost"] = "Altavista"; - - $snoopy->submit($submit_url,$submit_vars); - print $snoopy->results; - - $snoopy->maxframes=5; - $snoopy->fetch("http://www.ispi.net/"); - echo "
\n";
-	echo htmlentities($snoopy->results[0]); 
-	echo htmlentities($snoopy->results[1]); 
-	echo htmlentities($snoopy->results[2]); 
-	echo "
\n"; - - $snoopy->fetchform("http://www.altavista.com"); - print $snoopy->results; - -DESCRIPTION: - - What is Snoopy? - - Snoopy is a PHP class that simulates a web browser. It automates the - task of retrieving web page content and posting forms, for example. - - Some of Snoopy's features: - - * easily fetch the contents of a web page - * easily fetch the text from a web page (strip html tags) - * easily fetch the the links from a web page - * supports proxy hosts - * supports basic user/pass authentication - * supports setting user_agent, referer, cookies and header content - * supports browser redirects, and controlled depth of redirects - * expands fetched links to fully qualified URLs (default) - * easily submit form data and retrieve the results - * supports following html frames (added v0.92) - * supports passing cookies on redirects (added v0.92) - - -REQUIREMENTS: - - Snoopy requires PHP with PCRE (Perl Compatible Regular Expressions), - which should be PHP 3.0.9 and up. For read timeout support, it requires - PHP 4 Beta 4 or later. Snoopy was developed and tested with PHP 3.0.12. - -CLASS METHODS: - - fetch($URI) - ----------- - - This is the method used for fetching the contents of a web page. - $URI is the fully qualified URL of the page to fetch. - The results of the fetch are stored in $this->results. - If you are fetching frames, then $this->results - contains each frame fetched in an array. - - fetchtext($URI) - --------------- - - This behaves exactly like fetch() except that it only returns - the text from the page, stripping out html tags and other - irrelevant data. - - fetchform($URI) - --------------- - - This behaves exactly like fetch() except that it only returns - the form elements from the page, stripping out html tags and other - irrelevant data. - - fetchlinks($URI) - ---------------- - - This behaves exactly like fetch() except that it only returns - the links from the page. By default, relative links are - converted to their fully qualified URL form. - - submit($URI,$formvars) - ---------------------- - - This submits a form to the specified $URI. $formvars is an - array of the form variables to pass. - - - submittext($URI,$formvars) - -------------------------- - - This behaves exactly like submit() except that it only returns - the text from the page, stripping out html tags and other - irrelevant data. - - submitlinks($URI) - ---------------- - - This behaves exactly like submit() except that it only returns - the links from the page. By default, relative links are - converted to their fully qualified URL form. - - -CLASS VARIABLES: (default value in parenthesis) - - $host the host to connect to - $port the port to connect to - $proxy_host the proxy host to use, if any - $proxy_port the proxy port to use, if any - $agent the user agent to masqerade as (Snoopy v0.1) - $referer referer information to pass, if any - $cookies cookies to pass if any - $rawheaders other header info to pass, if any - $maxredirs maximum redirects to allow. 0=none allowed. (5) - $offsiteok whether or not to allow redirects off-site. (true) - $expandlinks whether or not to expand links to fully qualified URLs (true) - $user authentication username, if any - $pass authentication password, if any - $accept http accept types (image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*) - $error where errors are sent, if any - $response_code responde code returned from server - $headers headers returned from server - $maxlength max return data length - $read_timeout timeout on read operations (requires PHP 4 Beta 4+) - set to 0 to disallow timeouts - $timed_out true if a read operation timed out (requires PHP 4 Beta 4+) - $maxframes number of frames we will follow - $status http status of fetch - $temp_dir temp directory that the webserver can write to. (/tmp) - $curl_path system path to cURL binary, set to false if none - - -EXAMPLES: - - Example: fetch a web page and display the return headers and - the contents of the page (html-escaped): - - include "Snoopy.class.php"; - $snoopy = new Snoopy; - - $snoopy->user = "joe"; - $snoopy->pass = "bloe"; - - if($snoopy->fetch("http://www.slashdot.org/")) - { - echo "response code: ".$snoopy->response_code."
\n"; - while(list($key,$val) = each($snoopy->headers)) - echo $key.": ".$val."
\n"; - echo "

\n"; - - echo "

".htmlspecialchars($snoopy->results)."
\n"; - } - else - echo "error fetching document: ".$snoopy->error."\n"; - - - - Example: submit a form and print out the result headers - and html-escaped page: - - include "Snoopy.class.php"; - $snoopy = new Snoopy; - - $submit_url = "http://lnk.ispi.net/texis/scripts/msearch/netsearch.html"; - - $submit_vars["q"] = "amiga"; - $submit_vars["submit"] = "Search!"; - $submit_vars["searchhost"] = "Altavista"; - - - if($snoopy->submit($submit_url,$submit_vars)) - { - while(list($key,$val) = each($snoopy->headers)) - echo $key.": ".$val."
\n"; - echo "

\n"; - - echo "

".htmlspecialchars($snoopy->results)."
\n"; - } - else - echo "error fetching document: ".$snoopy->error."\n"; - - - - Example: showing functionality of all the variables: - - - include "Snoopy.class.php"; - $snoopy = new Snoopy; - - $snoopy->proxy_host = "my.proxy.host"; - $snoopy->proxy_port = "8080"; - - $snoopy->agent = "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)"; - $snoopy->referer = "http://www.microsnot.com/"; - - $snoopy->cookies["SessionID"] = 238472834723489l; - $snoopy->cookies["favoriteColor"] = "RED"; - - $snoopy->rawheaders["Pragma"] = "no-cache"; - - $snoopy->maxredirs = 2; - $snoopy->offsiteok = false; - $snoopy->expandlinks = false; - - $snoopy->user = "joe"; - $snoopy->pass = "bloe"; - - if($snoopy->fetchtext("http://www.phpbuilder.com")) - { - while(list($key,$val) = each($snoopy->headers)) - echo $key.": ".$val."
\n"; - echo "

\n"; - - echo "

".htmlspecialchars($snoopy->results)."
\n"; - } - else - echo "error fetching document: ".$snoopy->error."\n"; - - - Example: fetched framed content and display the results - - include "Snoopy.class.php"; - $snoopy = new Snoopy; - - $snoopy->maxframes = 5; - - if($snoopy->fetch("http://www.ispi.net/")) - { - echo "
".htmlspecialchars($snoopy->results[0])."
\n"; - echo "
".htmlspecialchars($snoopy->results[1])."
\n"; - echo "
".htmlspecialchars($snoopy->results[2])."
\n"; - } - else - echo "error fetching document: ".$snoopy->error."\n"; - - -COPYRIGHT: - Copyright(c) 1999,2000 ispi. All rights reserved. - This software is released under the GNU General Public License. - Please read the disclaimer at the top of the Snoopy.class.php file. - - -THANKS: - Special Thanks to: - Peter Sorger help fixing a redirect bug - Andrei Zmievski implementing time out functionality - Patric Sandelin help with fetchform debugging - Carmelo misc bug fixes with frames diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/TODO b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/TODO deleted file mode 100644 index d46738c162..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/TODO +++ /dev/null @@ -1,9 +0,0 @@ -* fetch other types of protocols such as ftp, nntp, gopher, etc. -* post forms with http file upload (I didn't have this need, - but it should be fairly straightforward) -* expand links, image tags, and form actions to fully - qualified URLs - -Bugs ----- -* none known diff --git a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/snoopy.class.php b/tags/zentaopms_1.1_stable_20100706/lib/snoopy/snoopy.class.php deleted file mode 100644 index 531161059d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/lib/snoopy/snoopy.class.php +++ /dev/null @@ -1,1250 +0,0 @@ - -Copyright (c): 1999-2008 New Digital Group, all rights reserved -Version: 1.2.4 - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -You may contact the author of Snoopy by e-mail at: -monte@ohrt.com - -The latest version of Snoopy can be obtained from: -http://snoopy.sourceforge.net/ - -*************************************************/ - -class Snoopy -{ - /**** Public variables ****/ - - /* user definable vars */ - - var $host = "www.php.net"; // host name we are connecting to - var $port = 80; // port we are connecting to - var $proxy_host = ""; // proxy host to use - var $proxy_port = ""; // proxy port to use - var $proxy_user = ""; // proxy user to use - var $proxy_pass = ""; // proxy password to use - - var $agent = "Snoopy v1.2.4"; // agent we masquerade as - var $referer = ""; // referer info to pass - var $cookies = array(); // array of cookies to pass - // $cookies["username"]="joe"; - var $rawheaders = array(); // array of raw headers to send - // $rawheaders["Content-type"]="text/html"; - - var $maxredirs = 5; // http redirection depth maximum. 0 = disallow - var $lastredirectaddr = ""; // contains address of last redirected address - var $offsiteok = true; // allows redirection off-site - var $maxframes = 0; // frame content depth maximum. 0 = disallow - var $expandlinks = true; // expand links to fully qualified URLs. - // this only applies to fetchlinks() - // submitlinks(), and submittext() - var $passcookies = true; // pass set cookies back through redirects - // NOTE: this currently does not respect - // dates, domains or paths. - - var $user = ""; // user for http authentication - var $pass = ""; // password for http authentication - - // http accept types - var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - - var $results = ""; // where the content is put - - var $error = ""; // error messages sent here - var $response_code = ""; // response code returned from server - var $headers = array(); // headers returned from server sent here - var $maxlength = 500000; // max return data length (body) - var $read_timeout = 0; // timeout on read operations, in seconds - // supported only since PHP 4 Beta 4 - // set to 0 to disallow timeouts - var $timed_out = false; // if a read operation timed out - var $status = 0; // http request status - - var $temp_dir = "/tmp"; // temporary directory that the webserver - // has permission to write to. - // under Windows, this should be C:\temp - - var $curl_path = "/usr/local/bin/curl"; - // Snoopy will use cURL for fetching - // SSL content if a full system path to - // the cURL binary is supplied here. - // set to false if you do not have - // cURL installed. See http://curl.haxx.se - // for details on installing cURL. - // Snoopy does *not* use the cURL - // library functions built into php, - // as these functions are not stable - // as of this Snoopy release. - - /**** Private variables ****/ - - var $_maxlinelen = 4096; // max line length (headers) - - var $_httpmethod = "GET"; // default http request method - var $_httpversion = "HTTP/1.0"; // default http request version - var $_submit_method = "POST"; // default submit method - var $_submit_type = "application/x-www-form-urlencoded"; // default submit type - var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type - var $_redirectaddr = false; // will be set if page fetched is a redirect - var $_redirectdepth = 0; // increments on an http redirect - var $_frameurls = array(); // frame src urls - var $_framedepth = 0; // increments on frame depth - - var $_isproxy = false; // set if using a proxy server - var $_fp_timeout = 30; // timeout for socket connection - -/*======================================================================*\ - Function: fetch - Purpose: fetch the contents of a web page - (and possibly other protocols in the - future like ftp, nntp, gopher, etc.) - Input: $URI the location of the page to fetch - Output: $this->results the output text from the fetch -\*======================================================================*/ - - function fetch($URI) - { - - //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS); - $URI_PARTS = parse_url($URI); - if (!empty($URI_PARTS["user"])) - $this->user = $URI_PARTS["user"]; - if (!empty($URI_PARTS["pass"])) - $this->pass = $URI_PARTS["pass"]; - if (empty($URI_PARTS["query"])) - $URI_PARTS["query"] = ''; - if (empty($URI_PARTS["path"])) - $URI_PARTS["path"] = ''; - - switch(strtolower($URI_PARTS["scheme"])) - { - case "http": - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_connect($fp)) - { - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httprequest($URI,$fp,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httprequest($path, $fp, $URI, $this->_httpmethod); - } - - $this->_disconnect($fp); - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - } - else - { - return false; - } - return true; - break; - case "https": - if(!$this->curl_path) - return false; - if(function_exists("is_executable")) - if (!is_executable($this->curl_path)) - return false; - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httpsrequest($URI,$URI,$this->_httpmethod); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httpsrequest($path, $URI, $this->_httpmethod); - } - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - $this->fetch($this->_redirectaddr); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - return true; - break; - default: - // not a valid protocol - $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; - return false; - break; - } - return true; - } - -/*======================================================================*\ - Function: submit - Purpose: submit an http form - Input: $URI the location to post the data - $formvars the formvars to use. - format: $formvars["var"] = "val"; - $formfiles an array of files to submit - format: $formfiles["var"] = "/dir/filename.ext"; - Output: $this->results the text output from the post -\*======================================================================*/ - - function submit($URI, $formvars="", $formfiles="") - { - unset($postdata); - - $postdata = $this->_prepare_post_body($formvars, $formfiles); - - $URI_PARTS = parse_url($URI); - if (!empty($URI_PARTS["user"])) - $this->user = $URI_PARTS["user"]; - if (!empty($URI_PARTS["pass"])) - $this->pass = $URI_PARTS["pass"]; - if (empty($URI_PARTS["query"])) - $URI_PARTS["query"] = ''; - if (empty($URI_PARTS["path"])) - $URI_PARTS["path"] = ''; - - switch(strtolower($URI_PARTS["scheme"])) - { - case "http": - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_connect($fp)) - { - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); - } - - $this->_disconnect($fp); - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) - $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]); - - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - if( strpos( $this->_redirectaddr, "?" ) > 0 ) - $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get - else - $this->submit($this->_redirectaddr,$formvars, $formfiles); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - - } - else - { - return false; - } - return true; - break; - case "https": - if(!$this->curl_path) - return false; - if(function_exists("is_executable")) - if (!is_executable($this->curl_path)) - return false; - $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) - $this->port = $URI_PARTS["port"]; - if($this->_isproxy) - { - // using proxy, send entire URI - $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata); - } - else - { - $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); - // no proxy, send only the path - $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata); - } - - if($this->_redirectaddr) - { - /* url was redirected, check if we've hit the max depth */ - if($this->maxredirs > $this->_redirectdepth) - { - if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) - $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]); - - // only follow redirect if it's on this site, or offsiteok is true - if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok) - { - /* follow the redirect */ - $this->_redirectdepth++; - $this->lastredirectaddr=$this->_redirectaddr; - if( strpos( $this->_redirectaddr, "?" ) > 0 ) - $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get - else - $this->submit($this->_redirectaddr,$formvars, $formfiles); - } - } - } - - if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) - { - $frameurls = $this->_frameurls; - $this->_frameurls = array(); - - while(list(,$frameurl) = each($frameurls)) - { - if($this->_framedepth < $this->maxframes) - { - $this->fetch($frameurl); - $this->_framedepth++; - } - else - break; - } - } - return true; - break; - - default: - // not a valid protocol - $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; - return false; - break; - } - return true; - } - -/*======================================================================*\ - Function: fetchlinks - Purpose: fetch the links from a web page - Input: $URI where you are fetching from - Output: $this->results an array of the URLs -\*======================================================================*/ - - function fetchlinks($URI) - { - if ($this->fetch($URI)) - { - if($this->lastredirectaddr) - $URI = $this->lastredirectaddr; - if(is_array($this->results)) - { - for($x=0;$xresults);$x++) - $this->results[$x] = $this->_striplinks($this->results[$x]); - } - else - $this->results = $this->_striplinks($this->results); - - if($this->expandlinks) - $this->results = $this->_expandlinks($this->results, $URI); - return true; - } - else - return false; - } - -/*======================================================================*\ - Function: fetchform - Purpose: fetch the form elements from a web page - Input: $URI where you are fetching from - Output: $this->results the resulting html form -\*======================================================================*/ - - function fetchform($URI) - { - - if ($this->fetch($URI)) - { - - if(is_array($this->results)) - { - for($x=0;$xresults);$x++) - $this->results[$x] = $this->_stripform($this->results[$x]); - } - else - $this->results = $this->_stripform($this->results); - - return true; - } - else - return false; - } - - -/*======================================================================*\ - Function: fetchtext - Purpose: fetch the text from a web page, stripping the links - Input: $URI where you are fetching from - Output: $this->results the text from the web page -\*======================================================================*/ - - function fetchtext($URI) - { - if($this->fetch($URI)) - { - if(is_array($this->results)) - { - for($x=0;$xresults);$x++) - $this->results[$x] = $this->_striptext($this->results[$x]); - } - else - $this->results = $this->_striptext($this->results); - return true; - } - else - return false; - } - -/*======================================================================*\ - Function: submitlinks - Purpose: grab links from a form submission - Input: $URI where you are submitting from - Output: $this->results an array of the links from the post -\*======================================================================*/ - - function submitlinks($URI, $formvars="", $formfiles="") - { - if($this->submit($URI,$formvars, $formfiles)) - { - if($this->lastredirectaddr) - $URI = $this->lastredirectaddr; - if(is_array($this->results)) - { - for($x=0;$xresults);$x++) - { - $this->results[$x] = $this->_striplinks($this->results[$x]); - if($this->expandlinks) - $this->results[$x] = $this->_expandlinks($this->results[$x],$URI); - } - } - else - { - $this->results = $this->_striplinks($this->results); - if($this->expandlinks) - $this->results = $this->_expandlinks($this->results,$URI); - } - return true; - } - else - return false; - } - -/*======================================================================*\ - Function: submittext - Purpose: grab text from a form submission - Input: $URI where you are submitting from - Output: $this->results the text from the web page -\*======================================================================*/ - - function submittext($URI, $formvars = "", $formfiles = "") - { - if($this->submit($URI,$formvars, $formfiles)) - { - if($this->lastredirectaddr) - $URI = $this->lastredirectaddr; - if(is_array($this->results)) - { - for($x=0;$xresults);$x++) - { - $this->results[$x] = $this->_striptext($this->results[$x]); - if($this->expandlinks) - $this->results[$x] = $this->_expandlinks($this->results[$x],$URI); - } - } - else - { - $this->results = $this->_striptext($this->results); - if($this->expandlinks) - $this->results = $this->_expandlinks($this->results,$URI); - } - return true; - } - else - return false; - } - - - -/*======================================================================*\ - Function: set_submit_multipart - Purpose: Set the form submission content type to - multipart/form-data -\*======================================================================*/ - function set_submit_multipart() - { - $this->_submit_type = "multipart/form-data"; - } - - -/*======================================================================*\ - Function: set_submit_normal - Purpose: Set the form submission content type to - application/x-www-form-urlencoded -\*======================================================================*/ - function set_submit_normal() - { - $this->_submit_type = "application/x-www-form-urlencoded"; - } - - - - -/*======================================================================*\ - Private functions -\*======================================================================*/ - - -/*======================================================================*\ - Function: _striplinks - Purpose: strip the hyperlinks from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _striplinks($document) - { - preg_match_all("'<\s*a\s.*?href\s*=\s* # find ]+)) # if quote found, match up to next matching - # quote, otherwise match up to next space - 'isx",$document,$links); - - - // catenate the non-empty matches from the conditional subpattern - - while(list($key,$val) = each($links[2])) - { - if(!empty($val)) - $match[] = $val; - } - - while(list($key,$val) = each($links[3])) - { - if(!empty($val)) - $match[] = $val; - } - - // return the links - return $match; - } - -/*======================================================================*\ - Function: _stripform - Purpose: strip the form elements from an html document - Input: $document document to strip. - Output: $match an array of the links -\*======================================================================*/ - - function _stripform($document) - { - preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements); - - // catenate the matches - $match = implode("\r\n",$elements[0]); - - // return the links - return $match; - } - - - -/*======================================================================*\ - Function: _striptext - Purpose: strip the text from an html document - Input: $document document to strip. - Output: $text the resulting text -\*======================================================================*/ - - function _striptext($document) - { - - // I didn't use preg eval (//e) since that is only available in PHP 4.0. - // so, list your entities one by one here. I included some of the - // more common ones. - - $search = array("']*?>.*?'si", // strip out javascript - "'<[\/\!]*?[^<>]*?>'si", // strip out html tags - "'([\r\n])[\s]+'", // strip out white space - "'&(quot|#34|#034|#x22);'i", // replace html entities - "'&(amp|#38|#038|#x26);'i", // added hexadecimal values - "'&(lt|#60|#060|#x3c);'i", - "'&(gt|#62|#062|#x3e);'i", - "'&(nbsp|#160|#xa0);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i", - "'&(reg|#174);'i", - "'&(deg|#176);'i", - "'&(#39|#039|#x27);'", - "'&(euro|#8364);'i", // europe - "'&a(uml|UML);'", // german - "'&o(uml|UML);'", - "'&u(uml|UML);'", - "'&A(uml|UML);'", - "'&O(uml|UML);'", - "'&U(uml|UML);'", - "'ß'i", - ); - $replace = array( "", - "", - "\\1", - "\"", - "&", - "<", - ">", - " ", - chr(161), - chr(162), - chr(163), - chr(169), - chr(174), - chr(176), - chr(39), - chr(128), - "", - "", - "", - "", - "", - "", - "", - ); - - $text = preg_replace($search,$replace,$document); - - return $text; - } - -/*======================================================================*\ - Function: _expandlinks - Purpose: expand each link into a fully qualified URL - Input: $links the links to qualify - $URI the full URI to get the base from - Output: $expandedLinks the expanded links -\*======================================================================*/ - - function _expandlinks($links,$URI) - { - - preg_match("/^[^\?]+/",$URI,$match); - - $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]); - $match = preg_replace("|/$|","",$match); - $match_part = parse_url($match); - $match_root = - $match_part["scheme"]."://".$match_part["host"]; - - $search = array( "|^http://".preg_quote($this->host)."|i", - "|^(\/)|i", - "|^(?!http://)(?!mailto:)|i", - "|/\./|", - "|/[^\/]+/\.\./|" - ); - - $replace = array( "", - $match_root."/", - $match."/", - "/", - "/" - ); - - $expandedLinks = preg_replace($search,$replace,$links); - - return $expandedLinks; - } - -/*======================================================================*\ - Function: _httprequest - Purpose: go get the http data from the server - Input: $url the url to fetch - $fp the current open file pointer - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="") - { - $cookie_headers = ''; - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; - if(!empty($this->agent)) - $headers .= "User-Agent: ".$this->agent."\r\n"; - if(!empty($this->host) && !isset($this->rawheaders['Host'])) { - $headers .= "Host: ".$this->host; - if(!empty($this->port)) - $headers .= ":".$this->port; - $headers .= "\r\n"; - } - if(!empty($this->accept)) - $headers .= "Accept: ".$this->accept."\r\n"; - if(!empty($this->referer)) - $headers .= "Referer: ".$this->referer."\r\n"; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_headers .= 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers .= substr($cookie_headers,0,-2) . "\r\n"; - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers .= $headerKey.": ".$headerVal."\r\n"; - } - if(!empty($content_type)) { - $headers .= "Content-type: $content_type"; - if ($content_type == "multipart/form-data") - $headers .= "; boundary=".$this->_mime_boundary; - $headers .= "\r\n"; - } - if(!empty($body)) - $headers .= "Content-length: ".strlen($body)."\r\n"; - if(!empty($this->user) || !empty($this->pass)) - $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n"; - - //add proxy auth headers - if(!empty($this->proxy_user)) - $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n"; - - - $headers .= "\r\n"; - - // set the read timeout if needed - if ($this->read_timeout > 0) - socket_set_timeout($fp, $this->read_timeout); - $this->timed_out = false; - - fwrite($fp,$headers.$body,strlen($headers.$body)); - - $this->_redirectaddr = false; - unset($this->headers); - - while($currentHeader = fgets($fp,$this->_maxlinelen)) - { - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - if($currentHeader == "\r\n") - break; - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location:|URI:)/i",$currentHeader)) - { - // get URL portion of the redirect - preg_match("/^(Location:|URI:)[ ]+(.*)/i",chop($currentHeader),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$currentHeader)) - { - if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status)) - { - $this->status= $status[1]; - } - $this->response_code = $currentHeader; - } - - $this->headers[] = $currentHeader; - } - - $results = ''; - do { - $_data = fread($fp, $this->maxlength); - if (strlen($_data) == 0) { - break; - } - $results .= $_data; - } while(true); - - if ($this->read_timeout > 0 && $this->_check_timeout($fp)) - { - $this->status=-100; - return false; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - return true; - } - -/*======================================================================*\ - Function: _httpsrequest - Purpose: go get the https data from the server using curl - Input: $url the url to fetch - $URI the full URI - $body body contents to send if any (POST) - Output: -\*======================================================================*/ - - function _httpsrequest($url,$URI,$http_method,$content_type="",$body="") - { - if($this->passcookies && $this->_redirectaddr) - $this->setcookies(); - - $headers = array(); - - $URI_PARTS = parse_url($URI); - if(empty($url)) - $url = "/"; - // GET ... header not needed for curl - //$headers[] = $http_method." ".$url." ".$this->_httpversion; - if(!empty($this->agent)) - $headers[] = "User-Agent: ".$this->agent; - if(!empty($this->host)) - if(!empty($this->port)) - $headers[] = "Host: ".$this->host.":".$this->port; - else - $headers[] = "Host: ".$this->host; - if(!empty($this->accept)) - $headers[] = "Accept: ".$this->accept; - if(!empty($this->referer)) - $headers[] = "Referer: ".$this->referer; - if(!empty($this->cookies)) - { - if(!is_array($this->cookies)) - $this->cookies = (array)$this->cookies; - - reset($this->cookies); - if ( count($this->cookies) > 0 ) { - $cookie_str = 'Cookie: '; - foreach ( $this->cookies as $cookieKey => $cookieVal ) { - $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; "; - } - $headers[] = substr($cookie_str,0,-2); - } - } - if(!empty($this->rawheaders)) - { - if(!is_array($this->rawheaders)) - $this->rawheaders = (array)$this->rawheaders; - while(list($headerKey,$headerVal) = each($this->rawheaders)) - $headers[] = $headerKey.": ".$headerVal; - } - if(!empty($content_type)) { - if ($content_type == "multipart/form-data") - $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary; - else - $headers[] = "Content-type: $content_type"; - } - if(!empty($body)) - $headers[] = "Content-length: ".strlen($body); - if(!empty($this->user) || !empty($this->pass)) - $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass); - - for($curr_header = 0; $curr_header < count($headers); $curr_header++) { - $safer_header = strtr( $headers[$curr_header], "\"", " " ); - $cmdline_params .= " -H \"".$safer_header."\""; - } - - if(!empty($body)) - $cmdline_params .= " -d \"$body\""; - - if($this->read_timeout > 0) - $cmdline_params .= " -m ".$this->read_timeout; - - $headerfile = tempnam($temp_dir, "sno"); - - exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return); - - if($return) - { - $this->error = "Error: cURL could not retrieve the document, error $return."; - return false; - } - - - $results = implode("\r\n",$results); - - $result_headers = file("$headerfile"); - - $this->_redirectaddr = false; - unset($this->headers); - - for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++) - { - - // if a header begins with Location: or URI:, set the redirect - if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader])) - { - // get URL portion of the redirect - preg_match("/^(Location: |URI:)\s+(.*)/",chop($result_headers[$currentHeader]),$matches); - // look for :// in the Location header to see if hostname is included - if(!preg_match("|\:\/\/|",$matches[2])) - { - // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; - // eliminate double slash - if(!preg_match("|^/|",$matches[2])) - $this->_redirectaddr .= "/".$matches[2]; - else - $this->_redirectaddr .= $matches[2]; - } - else - $this->_redirectaddr = $matches[2]; - } - - if(preg_match("|^HTTP/|",$result_headers[$currentHeader])) - $this->response_code = $result_headers[$currentHeader]; - - $this->headers[] = $result_headers[$currentHeader]; - } - - // check if there is a a redirect meta tag - - if(preg_match("']*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match)) - { - $this->_redirectaddr = $this->_expandlinks($match[1],$URI); - } - - // have we hit our frame depth and is there frame src to fetch? - if(($this->_framedepth < $this->maxframes) && preg_match_all("']+)'i",$results,$match)) - { - $this->results[] = $results; - for($x=0; $x_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host); - } - // have we already fetched framed content? - elseif(is_array($this->results)) - $this->results[] = $results; - // no framed content - else - $this->results = $results; - - unlink("$headerfile"); - - return true; - } - -/*======================================================================*\ - Function: setcookies() - Purpose: set cookies for a redirection -\*======================================================================*/ - - function setcookies() - { - for($x=0; $xheaders); $x++) - { - if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match)) - $this->cookies[$match[1]] = urldecode($match[2]); - } - } - - -/*======================================================================*\ - Function: _check_timeout - Purpose: checks whether timeout has occurred - Input: $fp file pointer -\*======================================================================*/ - - function _check_timeout($fp) - { - if ($this->read_timeout > 0) { - $fp_status = socket_get_status($fp); - if ($fp_status["timed_out"]) { - $this->timed_out = true; - return true; - } - } - return false; - } - -/*======================================================================*\ - Function: _connect - Purpose: make a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _connect(&$fp) - { - if(!empty($this->proxy_host) && !empty($this->proxy_port)) - { - $this->_isproxy = true; - - $host = $this->proxy_host; - $port = $this->proxy_port; - } - else - { - $host = $this->host; - $port = $this->port; - } - - $this->status = 0; - - if($fp = fsockopen( - $host, - $port, - $errno, - $errstr, - $this->_fp_timeout - )) - { - // socket connection succeeded - - return true; - } - else - { - // socket connection failed - $this->status = $errno; - switch($errno) - { - case -3: - $this->error="socket creation failed (-3)"; - case -4: - $this->error="dns lookup failure (-4)"; - case -5: - $this->error="connection refused or timed out (-5)"; - default: - $this->error="connection failed (".$errno.")"; - } - return false; - } - } -/*======================================================================*\ - Function: _disconnect - Purpose: disconnect a socket connection - Input: $fp file pointer -\*======================================================================*/ - - function _disconnect($fp) - { - return(fclose($fp)); - } - - -/*======================================================================*\ - Function: _prepare_post_body - Purpose: Prepare post body according to encoding type - Input: $formvars - form variables - $formfiles - form upload files - Output: post body -\*======================================================================*/ - - function _prepare_post_body($formvars, $formfiles) - { - settype($formvars, "array"); - settype($formfiles, "array"); - $postdata = ''; - - if (count($formvars) == 0 && count($formfiles) == 0) - return; - - switch ($this->_submit_type) { - case "application/x-www-form-urlencoded": - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; - } - } else - $postdata .= urlencode($key)."=".urlencode($val)."&"; - } - break; - - case "multipart/form-data": - $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); - - reset($formvars); - while(list($key,$val) = each($formvars)) { - if (is_array($val) || is_object($val)) { - while (list($cur_key, $cur_val) = each($val)) { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; - $postdata .= "$cur_val\r\n"; - } - } else { - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; - $postdata .= "$val\r\n"; - } - } - - reset($formfiles); - while (list($field_name, $file_names) = each($formfiles)) { - settype($file_names, "array"); - while (list(, $file_name) = each($file_names)) { - if (!is_readable($file_name)) continue; - - $fp = fopen($file_name, "r"); - $file_content = fread($fp, filesize($file_name)); - fclose($fp); - $base_name = basename($file_name); - - $postdata .= "--".$this->_mime_boundary."\r\n"; - $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; - $postdata .= "$file_content\r\n"; - } - } - $postdata .= "--".$this->_mime_boundary."--\r\n"; - break; - } - - return $postdata; - } -} - -?> diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/config.php b/tags/zentaopms_1.1_stable_20100706/module/action/config.php deleted file mode 100644 index 1c09cebd45..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/config.php +++ /dev/null @@ -1,24 +0,0 @@ -action->objectTables['product'] = TABLE_PRODUCT; -$config->action->objectTables['story'] = TABLE_STORY; -$config->action->objectTables['productplan'] = TABLE_PRODUCTPLAN; -$config->action->objectTables['release'] = TABLE_RELEASE; -$config->action->objectTables['project'] = TABLE_PROJECT; -$config->action->objectTables['task'] = TABLE_TASK; -$config->action->objectTables['build'] = TABLE_BUILD; -$config->action->objectTables['bug'] = TABLE_BUG; -$config->action->objectTables['case'] = TABLE_CASE; -$config->action->objectTables['testtask'] = TABLE_TESTTASK; -$config->action->objectTables['user'] = TABLE_USER; - -$config->action->objectNameFields['product'] = 'name'; -$config->action->objectNameFields['story'] = 'title'; -$config->action->objectNameFields['productplan'] = 'title'; -$config->action->objectNameFields['release'] = 'name'; -$config->action->objectNameFields['project'] = 'name'; -$config->action->objectNameFields['task'] = 'name'; -$config->action->objectNameFields['build'] = 'name'; -$config->action->objectNameFields['bug'] = 'title'; -$config->action->objectNameFields['case'] = 'title'; -$config->action->objectNameFields['testtask'] = 'name'; -$config->action->objectNameFields['user'] = 'account'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/control.php b/tags/zentaopms_1.1_stable_20100706/module/action/control.php deleted file mode 100644 index b5df73dde7..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/control.php +++ /dev/null @@ -1,63 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentaoms.com - */ -class action extends control -{ - /* 已删除记录列表。*/ - public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) - { - /* 登记session。*/ - $uri = $this->app->getURI(true); - $this->session->set('productList', $uri); - $this->session->set('productPlanList', $uri); - $this->session->set('releaseList', $uri); - $this->session->set('storyList', $uri); - $this->session->set('projectList', $uri); - $this->session->set('taskList', $uri); - $this->session->set('buildList', $uri); - $this->session->set('bugList', $uri); - $this->session->set('caseList', $uri); - $this->session->set('testtaskList', $uri); - - /* 设置标题和导航条。*/ - $this->view->header->title = $this->lang->action->trash; - $this->view->position[] = $this->lang->action->trash; - - /* 获取已删除记录。*/ - $this->app->loadClass('pager', $static = true); - $pager = pager::init($recTotal, $recPerPage, $pageID); - $this->view->trashes = $this->action->getTrashes($orderBy, $pager); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->users['system'] = 'system'; - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; - $this->display(); - } - - /* 还原某一个对象。*/ - public function undelete($actionID) - { - $this->action->undelete($actionID); - die(js::locate(inlink('trash'), 'parent')); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/lang/en.php b/tags/zentaopms_1.1_stable_20100706/module/action/lang/en.php deleted file mode 100644 index 84d3ffa09b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/lang/en.php +++ /dev/null @@ -1,47 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, 由 $actor 创建。'; -$lang->action->desc->changed = '$date, 由 $actor 变更。'; -$lang->action->desc->edited = '$date, 由 $actor 编辑。'; -$lang->action->desc->closed = '$date, 由 $actor 关闭。'; -$lang->action->desc->commented = '$date, 由 $actor 发表评论。'; -$lang->action->desc->activated = '$date, 由 $actor 激活。'; -$lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
'; -$lang->action->desc->diff2 = '修改了 %s,区别为:
%s
'; - -$lang->action->label->opened = '创建了'; -$lang->action->label->changed = '变更了'; -$lang->action->label->edited = '编辑了'; -$lang->action->label->closed = '关闭了'; -$lang->action->label->commented = '评论了'; -$lang->action->label->activated = '激活了'; -$lang->action->label->resolved = '解决了'; -$lang->action->label->reviewed = '评审了'; -$lang->action->label->story = '需求|story|view|storyID=%s'; -$lang->action->label->task = '任务|task|view|taskID=%s'; -$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; -$lang->action->label->testcase = '用例|testcase|view|caseID=%s'; -$lang->action->label->space = ' '; diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/lang/zh-cn.php b/tags/zentaopms_1.1_stable_20100706/module/action/lang/zh-cn.php deleted file mode 100644 index 60d23e9a38..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/lang/zh-cn.php +++ /dev/null @@ -1,99 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->action->common = '系统日志'; -$lang->action->trash = '回收站'; -$lang->action->undelete = '还原'; - -$lang->action->objectType = '对象类型'; -$lang->action->objectID = '对象ID'; -$lang->action->objectName = '对象名称'; -$lang->action->actor = '操作者'; -$lang->action->date = '日期'; - -$lang->action->objectTypes['product'] = '产品'; -$lang->action->objectTypes['story'] = '需求'; -$lang->action->objectTypes['productplan'] = '产品计划'; -$lang->action->objectTypes['release'] = '发布'; -$lang->action->objectTypes['project'] = '项目'; -$lang->action->objectTypes['task'] = '任务'; -$lang->action->objectTypes['build'] = 'Build'; -$lang->action->objectTypes['bug'] = 'Bug'; -$lang->action->objectTypes['case'] = '用例'; -$lang->action->objectTypes['testtask'] = '测试任务'; -$lang->action->objectTypes['user'] = '用户'; - -/* 用来描述操作历史记录。*/ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, 由 $actor 创建。'; -$lang->action->desc->changed = '$date, 由 $actor 变更。'; -$lang->action->desc->edited = '$date, 由 $actor 编辑。'; -$lang->action->desc->closed = '$date, 由 $actor 关闭。'; -$lang->action->desc->deleted = '$date, 由 $actor 删除。'; -$lang->action->desc->erased = '$date, 由 $actor 删除。'; -$lang->action->desc->undeleted = '$date, 由 $actor 还原。'; -$lang->action->desc->commented = '$date, 由 $actor 发表评论。'; -$lang->action->desc->activated = '$date, 由 $actor 激活。'; -$lang->action->desc->moved = '$date, 由 $actor 移动,之前为 "$extra"'; -$lang->action->desc->confirmed = '$date, 由 $actor 确认需求变动,最新版本为#$extra'; -$lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
'; -$lang->action->desc->diff2 = '修改了 %s,区别为:
%s
'; - -/* 用来显示动态信息。*/ -$lang->action->label->opened = '创建了'; -$lang->action->label->changed = '变更了'; -$lang->action->label->edited = '编辑了'; -$lang->action->label->closed = '关闭了'; -$lang->action->label->deleted = '删除了'; -$lang->action->label->erased = '删除了'; -$lang->action->label->undeleted = '还原了'; -$lang->action->label->commented = '评论了'; -$lang->action->label->activated = '激活了'; -$lang->action->label->resolved = '解决了'; -$lang->action->label->reviewed = '评审了'; -$lang->action->label->moved = '移动了'; -$lang->action->label->confirmed = '确认了需求,'; -$lang->action->label->linked2plan = '关联计划'; -$lang->action->label->unlinkedfromplan = '移除计划'; -$lang->action->label->linked2project = '关联项目'; -$lang->action->label->unlinkedfromproject = '移除项目'; -$lang->action->label->marked = '编辑了'; -$lang->action->label->login = '登录系统'; -$lang->action->label->logout = "退出登录"; - -/* 用来生成相应对象的链接。*/ -$lang->action->label->product = '产品|product|view|productID=%s'; -$lang->action->label->productplan = '计划|productplan|view|productID=%s'; -$lang->action->label->release = '发布|release|view|productID=%s'; -$lang->action->label->story = '需求|story|view|storyID=%s'; -$lang->action->label->project = '项目|project|view|projectID=%s'; -$lang->action->label->task = '任务|task|view|taskID=%s'; -$lang->action->label->build = 'Build|build|view|buildID=%s'; -$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; -$lang->action->label->case = '用例|testcase|view|caseID=%s'; -$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->user = '用户'; - -$lang->action->label->space = ' '; diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/model.php b/tags/zentaopms_1.1_stable_20100706/module/action/model.php deleted file mode 100644 index eed681e821..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/model.php +++ /dev/null @@ -1,236 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> -objectType = strtolower($objectType); - $action->objectID = $objectID; - $action->actor = $this->app->user->account; - $action->action = strtolower($actionType); - $action->date = helper::now(); - $action->comment = htmlspecialchars($comment); - $action->extra = $extra; - $this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec(); - return $this->dbh->lastInsertID(); - } - - /* 返回某一个对象的所有action列表。*/ - public function getList($objectType, $objectID) - { - $actions = $this->dao->select('*')->from(TABLE_ACTION) - ->where('objectType')->eq($objectType) - ->andWhere('objectID')->eq($objectID) - ->orderBy('id')->fetchAll('id'); - $histories = $this->getHistory(array_keys($actions)); - foreach($actions as $actionID => $action) - { - $action->history = isset($histories[$actionID]) ? $histories[$actionID] : array(); - $actions[$actionID] = $action; - } - return $actions; - } - - /* 获得action信息。*/ - public function getById($actionID) - { - return $this->dao->findById((int)$actionID)->from(TABLE_ACTION)->fetch(); - } - - /* 获得所有的删除记录列表。*/ - public function getTrashes($orderBy, $pager) - { - $trashes = $this->dao->select('*')->from(TABLE_ACTION) - ->where('action')->eq('deleted') - ->andWhere('extra')->eq(self::CAN_UNDELETED) - ->orderBy($orderBy)->page($pager)->fetchAll(); - if(!$trashes) return array(); - - /* 将对象按照类型分开,然后查找其对应的名称。*/ - foreach($trashes as $object) $typeTrashes[$object->objectType][] = $object->objectID; - foreach($typeTrashes as $objectType => $objectIds) - { - $objectIds = array_unique($objectIds); - $table = $this->config->action->objectTables[$objectType]; - $field = $this->config->action->objectNameFields[$objectType]; - $objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs(); - } - - /* 将name字段添加到trashes中。*/ - foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID]; - return $trashes; - } - - /* 返回某一个action所对应的字段修改记录。*/ - public function getHistory($actionID) - { - return $this->dao->select()->from(TABLE_HISTORY)->where('action')->in($actionID)->orderBy('id')->fetchGroup('action'); - } - - /* 记录历史。*/ - public function logHistory($actionID, $changes) - { - foreach($changes as $change) - { - $change['action'] = $actionID; - $this->dao->insert(TABLE_HISTORY)->data($change)->exec(); - } - } - - /* 打印action标题,显示在每一个对象的详情界面。*/ - public function printAction($action) - { - $objectType = $action->objectType; - $actionType = strtolower($action->action); - - /** - * 判断使用哪一种描述。如果该模块有对应的描述,则取之,然后则取action模块中对应的方法的描述。 - * 如果还没有,则判断当前action是否有extra信息,如果有,则取action模块的extra描述,最后使用通用的描述。 - */ - if(isset($this->lang->$objectType->action->$actionType)) - { - $desc = $this->lang->$objectType->action->$actionType; - } - elseif(isset($this->lang->action->desc->$actionType)) - { - $desc = $this->lang->action->desc->$actionType; - } - else - { - $desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common; - } - - /* 循环替换desc中对应的标签。*/ - foreach($action as $key => $value) - { - if($key == 'history') continue; - - /* desc可能是数组,也有可能是一个字符串。*/ - if(is_array($desc)) - { - if($key == 'extra') continue; - $desc['main'] = str_replace('$' . $key, $value, $desc['main']); - } - else - { - $desc = str_replace('$' . $key, $value, $desc); - } - } - - /* 如果desc是数组,再处理extra变量。例子参考bug模块的语言设置。*/ - if(is_array($desc)) - { - $extra = strtolower($action->extra); - if(isset($desc['extra'][$extra])) - { - echo str_replace('$extra', $desc['extra'][$extra], $desc['main']); - } - else - { - echo str_replace('$extra', $action->extra, $desc['main']); - } - } - else - { - echo $desc; - } - } - - /* 打印动态信息。*/ - public function getDynamic($objectType = 'all', $count = 30) - { - $actions = $this->dao->select('*')->from(TABLE_ACTION) - ->beginIF($objectType != 'all')->where('objectType')->eq($objectType)->fi() - ->orderBy('id desc')->limit($count)->fetchAll(); - if(!$actions) return array(); - foreach($actions as $action) - { - $actionType = strtolower($action->action); - $objectType = strtolower($action->objectType); - $action->date = date(DT_MONTHTIME2, strtotime($action->date)); - $action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action; - $action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType; - - /* 处理login和logout动作。*/ - if($actionType == 'login' or $actionType == 'logout') - { - $action->objectLink = ''; - $action->objectLabel = ''; - continue; - } - - /* 其他的动作生成相应的链接。*/ - if(strpos($action->objectLabel, '|') !== false) - { - list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel); - $action->objectLink = html::a(helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID)), '#' . $action->objectID); - $action->objectLabel = $objectLabel; - } - else - { - $action->objectLink = '#' . $action->objectID; - } - } - return $actions; - } - - /* 打印修改记录。*/ - public function printChanges($objectType, $histories) - { - if(empty($histories)) return; - - /* 计算字段的最大长度,并将历史记录根据是否有diff分开,以保证含有diff的字段显示在最后面。*/ - $maxLength = 0; - $historiesWithDiff = array(); - $historiesWithoutDiff = array(); - - foreach($histories as $history) - { - $fieldName = $history->field; - $history->fieldLabel = isset($this->lang->$objectType->$fieldName) ? $this->lang->$objectType->$fieldName : $fieldName; - if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length; - $history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history; - } - $histories = array_merge($historiesWithoutDiff, $historiesWithDiff); - - foreach($histories as $history) - { - $history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space); - if($history->diff != '') - { - printf($this->lang->action->desc->diff2, $history->fieldLabel, nl2br($history->diff)); - } - else - { - printf($this->lang->action->desc->diff1, $history->fieldLabel, $history->old, $history->new); - } - } - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/action/view/trash.html.php b/tags/zentaopms_1.1_stable_20100706/module/action/view/trash.html.php deleted file mode 100644 index 7cac5f6828..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/action/view/trash.html.php +++ /dev/null @@ -1,56 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - -
- - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - objectType == 'case' ? 'testcase' : $action->objectType;?> - - - - - - - - - -
action->objectType);?>idAB);?>action->objectName;?>action->actor);?>action->date);?>actions;?>
action->objectTypes[$action->objectType];?>objectID;?>createLink($module, 'view', "id=$action->objectID"), $action->objectName);?>actor];?>date;?>id", $lang->action->undelete, 'hiddenwin');?> -
-
show();?>
-
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/admin/control.php b/tags/zentaopms_1.1_stable_20100706/module/admin/control.php deleted file mode 100644 index ef84ce0382..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/admin/control.php +++ /dev/null @@ -1,31 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentaoms.com - */ -class admin extends control -{ - /* 首页。*/ - public function index($tab = 'index') - { - $this->locate($this->createLink('action', 'trash')); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/admin/lang/en.php b/tags/zentaopms_1.1_stable_20100706/module/admin/lang/en.php deleted file mode 100644 index 806e9d7a2c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/admin/lang/en.php +++ /dev/null @@ -1,33 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->admin->common = '后台管理'; -$lang->admin->index = '后台管理首页'; -$lang->admin->company = '公司管理'; -$lang->admin->user = '用户管理'; -$lang->admin->group = '分组管理'; -$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统'; - -$lang->admin->browseCompany = '浏览公司'; -$lang->admin->browseUser = '浏览用户'; -$lang->admin->browseGroup = '浏览分组'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/admin/lang/zh-cn.php b/tags/zentaopms_1.1_stable_20100706/module/admin/lang/zh-cn.php deleted file mode 100644 index c8053651a3..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/admin/lang/zh-cn.php +++ /dev/null @@ -1,31 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->admin->common = '后台管理'; -$lang->admin->index = '后台管理首页'; -$lang->admin->company = '公司管理'; -$lang->admin->user = '用户管理'; -$lang->admin->group = '分组管理'; -$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统'; - -$lang->admin->browseCompany = '浏览公司'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/admin/model.php b/tags/zentaopms_1.1_stable_20100706/module/admin/model.php deleted file mode 100644 index ac98ab378f..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/admin/model.php +++ /dev/null @@ -1,44 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> -dbh->query($sql)->fetchALL(); - } - - /* 获得某一个公司的统计信息。*/ - public function getStatOfCompany($companyID) - { - } - - /* 获得系统的运行信息。*/ - public function getStatOfSys() - { - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/admin/view/browsecompany.html.php b/tags/zentaopms_1.1_stable_20100706/module/admin/view/browsecompany.html.php deleted file mode 100644 index 2f73c37af7..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/admin/view/browsecompany.html.php +++ /dev/null @@ -1,61 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
company->id;?>company->name;?>company->phone;?>company->fax;?>company->address;?>company->zipcode;?>company->website;?>company->backyard;?>company->pms;?>company->guest;?>actions;?>
id;?>name;?>phone;?>fax;?>address;?>zipcode;?>website, $company->website, '_blank');?>backyard,$company->backyard, '_blank');?>pms, $company->pms, '_blank');?>company->guestList[(int)$company->guest];?> - createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?> - createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?> -
-
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/api/control.php b/tags/zentaopms_1.1_stable_20100706/module/api/control.php deleted file mode 100644 index d958ee8fa4..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/api/control.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id$ - * @link http://www.zentaoms.com - */ -class api extends control -{ - /* 获得sessionid。*/ - public function getSessionID() - { - $this->session->set('rand', mt_rand(0, 10000)); - $this->view->sessionName = session_name(); - $this->view->sessionID = session_id(); - $this->view->rand = $this->session->rand; - $this->display(); - } - - /* 获得某一个model某一个方法的结果。params的传递方式:param1=value1,param2=value2。*/ - public function getModel($moduleName, $methodName, $params = '') - { - parse_str(str_replace(',', '&', $params), $params); - $module = $this->loadModel($moduleName); - $result = call_user_func_array(array(&$module, $methodName), $params); - if(dao::isError()) die(json_encode(dao::getError())); - die(json_encode($result)); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/api/lang/zh-cn.php b/tags/zentaopms_1.1_stable_20100706/module/api/lang/zh-cn.php deleted file mode 100644 index 93433db69c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/api/lang/zh-cn.php +++ /dev/null @@ -1,25 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->api->common = 'API接口'; -$lang->api->getModel = '超级model调用接口'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/config.php b/tags/zentaopms_1.1_stable_20100706/module/bug/config.php deleted file mode 100644 index 190bf6f918..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/config.php +++ /dev/null @@ -1,61 +0,0 @@ -bug->search['module'] = 'bug'; -$config->bug->search['fields']['title'] = $lang->bug->title; -$config->bug->search['fields']['id'] = $lang->bug->id; -$config->bug->search['fields']['keywords'] = $lang->bug->keywords; -$config->bug->search['fields']['steps'] = $lang->bug->steps; -$config->bug->search['fields']['assignedTo'] = $lang->bug->assignedTo; -$config->bug->search['fields']['resolvedBy'] = $lang->bug->resolvedBy; -$config->bug->search['fields']['openedBy'] = $lang->bug->openedBy; -$config->bug->search['fields']['product'] = $lang->bug->product; -$config->bug->search['fields']['module'] = $lang->bug->module; -$config->bug->search['fields']['project'] = $lang->bug->project; -$config->bug->search['fields']['closedBy'] = $lang->bug->closedBy; -$config->bug->search['fields']['lastEditedBy'] = $lang->bug->lastEditedByAB; -$config->bug->search['fields']['status'] = $lang->bug->status; -$config->bug->search['fields']['severity'] = $lang->bug->severity; -$config->bug->search['fields']['pri'] = $lang->bug->pri; -$config->bug->search['fields']['type'] = $lang->bug->type; -$config->bug->search['fields']['os'] = $lang->bug->os; -$config->bug->search['fields']['browser'] = $lang->bug->browser; -$config->bug->search['fields']['resolution'] = $lang->bug->resolution; -$config->bug->search['fields']['mailto'] = $lang->bug->mailto; -$config->bug->search['fields']['openedDate'] = $lang->bug->openedDate; -$config->bug->search['fields']['openedBuild'] = $lang->bug->openedBuild; -$config->bug->search['fields']['resolvedBuild'] = $lang->bug->resolvedBuild; -$config->bug->search['fields']['resolvedDate'] = $lang->bug->resolvedDate; -$config->bug->search['fields']['assignedDate'] = $lang->bug->assignedDate; -$config->bug->search['fields']['closedDate'] = $lang->bug->closedDate; -$config->bug->search['fields']['lastEditedDate'] = $lang->bug->lastEditedDateAB; - -$config->bug->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['steps'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => ''); -$config->bug->search['params']['module'] = array('operator' => '=', 'control' => 'select', 'values' => 'modules'); -$config->bug->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => 'projects'); -$config->bug->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['resolvedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->statusList); -$config->bug->search['params']['severity'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->severityList); -$config->bug->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->priList); -$config->bug->search['params']['type'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->typeList); -$config->bug->search['params']['os'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->osList); -$config->bug->search['params']['browser'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->browserList); -$config->bug->search['params']['resolution'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->resolutionList); -$config->bug->search['params']['mailto'] = array('operator' => 'include', 'control' => 'select', 'values' => 'users'); -$config->bug->search['params']['openedBuild'] = array('operator' => 'include', 'control' => 'select', 'values' => 'builds'); -$config->bug->search['params']['resolvedBuild'] = array('operator' => '=', 'control' => 'select', 'values' => 'builds'); -$config->bug->search['params']['openedDate'] = array('operator' => '>=', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['resolvedDate'] = array('operator' => '>=', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['closedDate'] = array('operator' => '>=', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['lastEditedDate']= array('operator' => '>=', 'control' => 'input', 'values' => ''); -$config->bug->search['params']['assignedDate'] = array('operator' => '>=', 'control' => 'input', 'values' => ''); - -$config->bug->create->requiredFields = 'title,openedBuild'; -$config->bug->edit->requiredFields = $config->bug->create->requiredFields; -$config->bug->resolve->requiredFields = 'resolution'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/control.php b/tags/zentaopms_1.1_stable_20100706/module/bug/control.php deleted file mode 100644 index c507161027..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/control.php +++ /dev/null @@ -1,553 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -class bug extends control -{ - private $products = array(); - - /* 构造函数,加载story, release, tree等模块。*/ - public function __construct() - { - parent::__construct(); - $this->loadModel('product'); - $this->loadModel('tree'); - $this->loadModel('user'); - $this->loadModel('action'); - $this->loadModel('story'); - $this->loadModel('task'); - $this->products = $this->product->getPairs(); - if(empty($this->products)) $this->locate($this->createLink('product', 'create')); - $this->view->products = $this->products; - } - - /* bug首页。*/ - public function index() - { - $this->locate($this->createLink('bug', 'browse')); - } - - /* 浏览一个产品下面的bug。*/ - public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) - { - /* 设置产品id和模块id。*/ - $browseType = strtolower($browseType); - $productID = common::saveProductState($productID, key($this->products)); - $moduleID = ($browseType == 'bymodule') ? (int)$param : 0; - $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - - /* 设置菜单,登记session。*/ - $this->bug->setMenu($this->products, $productID); - $this->session->set('bugList', $this->app->getURI(true)); - - /* 加载分页类。*/ - $this->app->loadClass('pager', $static = true); - $pager = pager::init($recTotal, $recPerPage, $pageID); - - $bugs = array(); - if($browseType == 'all') - { - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == "bymodule") - { - $childModuleIds = $this->tree->getAllChildId($moduleID); - $bugs = $this->bug->getModuleBugs($productID, $childModuleIds, $orderBy, $pager); - } - elseif($browseType == 'assigntome') - { - $bugs = $this->dao->findByAssignedTo($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'openedbyme') - { - $bugs = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'resolvedbyme') - { - $bugs = $this->dao->findByResolvedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'assigntonull') - { - $bugs = $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'longlifebugs') - { - $bugs = $this->dao->findByLastEditedDate("<", date(DT_DATE1, strtotime('-7 days')))->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->andWhere('status')->ne('closed')->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'postponedbugs') - { - $bugs = $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'needconfirm') - { - $bugs = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') - ->where("t2.status = 'active'") - ->andWhere('t1.deleted')->eq(0) - ->andWhere('t2.version > t1.storyVersion') - ->orderBy($orderBy) - ->fetchAll(); - } - elseif($browseType == 'bysearch') - { - if($queryID) - { - $query = $this->loadModel('search')->getQuery($queryID); - if($query) - { - $this->session->set('bugQuery', $query->sql); - $this->session->set('bugForm', $query->form); - } - else - { - $this->session->set('bugQuery', ' 1 = 1'); - } - } - else - { - if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1'); - } - $bugQuery = str_replace("`product` = 'all'", '1', $this->session->bugQuery); // 如果指定了搜索所有的产品,去掉这个查询条件。 - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 处理查询语句,获取条件部分,并记录session。需求待确认的,不参与报表统计。*/ - if($browseType != 'needconfirm') - { - $sql = explode('WHERE', $this->dao->get()); - $sql = explode('ORDER', $sql[1]); - $this->session->set('bugReportCondition', $sql[0]); - } - - /* 设置搜索表单。*/ - $this->config->bug->search['actionURL'] = $this->createLink('bug', 'browse', "productID=$productID&browseType=bySearch&queryID=queryID"); - $this->config->bug->search['queryID'] = $queryID; - $this->config->bug->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->bug->allProduct); - $this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0); - $this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID); - $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID); - $this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID); - $this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->bug->search); - - $users = $this->user->getPairs('noletter'); - - $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; - $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $position[] = $this->lang->bug->common; - - $this->view->header = $header; - $this->view->position = $position; - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $rooteModuleID = 0, array('treeModel', 'createBugLink')); - $this->view->browseType = $browseType; - $this->view->bugs = $bugs; - $this->view->users = $users; - $this->view->pager = $pager; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->moduleID = $moduleID; - - $this->display(); - } - - /* 统计报表。*/ - public function report($productID, $browseType, $moduleID) - { - $this->loadModel('report'); - $this->view->charts = array(); - $this->view->rendJS = ''; - - if(!empty($_POST)) - { - foreach($this->post->charts as $chart) - { - $chartFunc = 'getDataOf' . $chart; - $chartData = $this->bug->$chartFunc(); - $chartOption = $this->lang->bug->report->$chart; - $this->bug->mergeChartOption($chart); - - $chartXML = $this->report->createSingleXML($chartData, $chartOption->graph); - $this->view->charts[$chart] = $this->report->createJSChart($chartOption->swf, $chartXML, $chartOption->width, $chartOption->height); - $this->view->datas[$chart] = $this->report->computePercent($chartData); - } - $this->view->rendJS = $this->report->rendJsCharts(count($this->view->charts)); - } - - $this->bug->setMenu($this->products, $productID); - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; - $this->view->productID = $productID; - $this->view->browseType = $browseType; - $this->view->moduleID = $moduleID; - $this->view->checkedCharts = $this->post->charts ? join(',', $this->post->charts) : ''; - $this->display(); - } - - /* 创建Bug。extras是其他的参数,key和value之间使用=连接,多个键值对之间使用,隔开。*/ - public function create($productID, $extras = '') - { - if(empty($this->products)) $this->locate($this->createLink('product', 'create')); - - if(!empty($_POST)) - { - $bugID = $this->bug->create(); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Opened'); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'browse', "productID={$this->post->product}&type=byModule¶m={$this->post->module}"), 'parent')); - } - - /* 设置当前的产品,设置菜单。*/ - $productID = common::saveProductState($productID, key($this->products)); - $this->bug->setMenu($this->products, $productID); - - /* 去掉几个类型的设置。*/ - unset($this->lang->bug->typeList['designchange']); - unset($this->lang->bug->typeList['newfeature']); - unset($this->lang->bug->typeList['trackthings']); - - /* 初始化变量。*/ - $moduleID = 0; - $projectID = 0; - $taskID = 0; - $storyID = 0; - $buildID = 0; - $caseID = 0; - $runID = 0; - $title = ''; - $steps = ''; - - /* 解析extra参数。*/ - $extras = str_replace(array(',', ' '), array('&', ''), $extras); - parse_str($extras); - - /* 如果设置了runID,获得最后一次的resultID。*/ - if($runID > 0) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id'); - if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID)); - - /* 如果指定了项目,则查找项目范围内的build和story。*/ - if($projectID) - { - $builds = $this->loadModel('build')->getProjectBuildPairs($projectID, 'noempty'); - $stories = $this->story->getProjectStoryPairs($projectID); - } - else - { - $builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); - $stories = $this->story->getProductStoryPairs($productID); - } - - /* 位置信息。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->create; - - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0); - $this->view->stories = $stories; - $this->view->users = $this->user->getPairs('noclosed,nodeleted'); - $this->view->projects = $this->product->getProjectPairs($productID); - $this->view->builds = $builds; - $this->view->tasks = $this->loadModel('task')->getProjectTaskPairs($projectID); - $this->view->moduleID = $moduleID; - $this->view->projectID = $projectID; - $this->view->taskID = $taskID; - $this->view->storyID = $storyID; - $this->view->buildID = $buildID; - $this->view->caseID = $caseID; - $this->view->title = $title; - $this->view->steps = $steps; - $this->display(); - } - - /* 查看一个bug。*/ - public function view($bugID) - { - /* 查找bug信息及相关产品信息。*/ - $bug = $this->bug->getById($bugID); - if(!$bug) die(js::error($this->lang->notFound) . js::locate('back')); - - $productID = $bug->product; - $productName = $this->products[$productID]; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置信息。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->view; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName); - $this->view->position[] = $this->lang->bug->view; - - /* 赋值。*/ - $this->view->productName = $productName; - $this->view->modulePath = $this->tree->getParents($bug->module); - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('noletter'); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - - $this->display(); - } - - /* 编辑一个Bug。*/ - public function edit($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $changes = $this->bug->update($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $files = $this->loadModel('file')->saveUpload('bug', $bugID); - if($this->post->comment != '' or !empty($changes) or !empty($files)) - { - $action = !empty($changes) ? 'Edited' : 'Commented'; - $fileAction = ''; - if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ; - $actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment); - $this->action->logHistory($actionID, $changes); - $this->sendmail($bugID, $actionID); - } - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 查找当前bug信息和产品模块信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - $currentModuleID = $bug->module; - - /* 修改类型的配置。*/ - if($bug->type != 'designchange') unset($this->lang->bug->typeList['designchange']); - if($bug->type != 'newfeature') unset($this->lang->bug->typeList['newfeature']); - if($bug->type != 'trackthings') unset($this->lang->bug->typeList['trackthings']); - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->edit; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->edit; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $rooteModuleID = 0); - $this->view->currentModuleID = $currentModuleID; - $this->view->projects = $this->product->getProjectPairs($bug->product); - $this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product); - $this->view->tasks = $this->task->getProjectTaskPairs($bug->project); - $this->view->users = $this->user->setDeleted($this->user->getPairs('nodeleted'), "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy"); - $this->view->openedBuilds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); - $this->view->resolvedBuilds = array('' => '') + $this->view->openedBuilds; - $this->view->actions = $this->action->getList('bug', $bugID); - - $this->display(); - } - - /* 解决bug。*/ - public function resolve($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->resolve($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Resolved', $this->post->comment, $this->post->resolution); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 查找bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置。*/ - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->resolve; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('nodeleted'); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->display(); - } - - /* 激活bug。*/ - public function activate($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->activate($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $files = $this->loadModel('file')->saveUpload('bug', $bugID); - $actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 获得bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 当前位置。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->activate; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('nodeleted'); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - $this->view->actions = $this->action->getList('bug', $bugID); - - $this->display(); - } - - /* 激活bug。*/ - public function close($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->close($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->close; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->close; - - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs(); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->display(); - } - - /* 确认需求变动。*/ - public function confirmStoryChange($bugID) - { - $bug = $this->bug->getById($bugID); - $this->dao->update(TABLE_BUG)->set('storyVersion')->eq($bug->latestStoryVersion)->where('id')->eq($bugID)->exec(); - $this->loadModel('action')->create('bug', $bugID, 'confirmed', '', $bug->latestStoryVersion); - die(js::reload('parent')); - } - - /* 删除bug。*/ - public function delete($bugID, $confirm = 'no') - { - if($confirm == 'no') - { - die(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID=$bugID&confirm=yes"))); - } - else - { - $this->bug->delete(TABLE_BUG, $bugID); - die(js::locate($this->session->bugList, 'parent')); - } - } - - /* 获得用户的bug列表。*/ - public function ajaxGetUserBugs($account = '') - { - if($account == '') $account = $this->app->user->account; - $bugs = $this->bug->getUserBugPairs($account); - die(html::select('bug', $bugs, '', 'class=select-1')); - } - - /* 发送邮件。*/ - private function sendmail($bugID, $actionID) - { - /* 设定toList和ccList。*/ - $bug = $this->bug->getByID($bugID); - $toList = $bug->assignedTo; - $ccList = trim($bug->mailto, ','); - if($toList == '') - { - if($ccList == '') return; - if(strpos($ccList, ',') === false) - { - $toList = $ccList; - $ccList = ''; - } - else - { - $commaPos = strpos($ccList, ','); - $toList = substr($ccList, 0, $commaPos); - $ccList = substr($ccList, $commaPos + 1); - } - } - elseif(strtolower($toList) == 'closed') - { - $toList = $bug->resolvedBy; - } - - /* 获得action信息。*/ - $action = $this->action->getById($actionID); - $history = $this->action->getHistory($actionID); - $action->history = isset($history[$actionID]) ? $history[$actionID] : array(); - if(strtolower($action->action) == 'opened') $action->comment = $bug->steps; - - /* 赋值,获得邮件内容。*/ - $this->view->bug = $bug; - $this->view->action = $action; - $mailContent = $this->parse($this->moduleName, 'sendmail'); - - /* 发信。*/ - $this->loadModel('mail')->send($toList, 'BUG #' . $bug->id . $this->lang->colon . $bug->title, $mailContent, $ccList); - if($this->mail->isError()) echo js::error($this->mail->getError()); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/lang/en.php b/tags/zentaopms_1.1_stable_20100706/module/bug/lang/en.php deleted file mode 100644 index 41d6ecb74c..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/lang/en.php +++ /dev/null @@ -1,169 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->bug->common = '缺陷管理'; -$lang->bug->index = '首页'; -$lang->bug->create = '创建Bug'; -$lang->bug->edit = '编辑Bug'; -$lang->bug->browse = 'Bug列表'; -$lang->bug->view = 'Bug详情'; -$lang->bug->resolve = '解决Bug'; -$lang->bug->close = '关闭Bug'; -$lang->bug->activate = '激活Bug'; -$lang->bug->ajaxGetUserBugs = '接口:我的Bug'; - -$lang->bug->selectProduct = '请选择产品'; -$lang->bug->byModule = '按模块'; -$lang->bug->assignToMe = '指派给我'; -$lang->bug->openedByMe = '由我创建'; -$lang->bug->resolvedByMe = '由我解决'; -$lang->bug->assignToNull = '未指派'; -$lang->bug->longLifeBugs = '久未处理'; -$lang->bug->postponedBugs = '被延期'; -$lang->bug->allBugs = '所有Bug'; -$lang->bug->moduleBugs = '按模块浏览'; -$lang->bug->byQuery = '搜索'; - -$lang->bug->lblProductAndModule = '产品模块'; -$lang->bug->lblProjectAndTask = '项目任务'; -$lang->bug->lblStory = '相关需求'; -$lang->bug->lblTypeAndSeverity = '类型/严重程度'; -$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器'; -$lang->bug->lblAssignedTo = '当前指派'; -$lang->bug->lblMailto = '抄送给'; -$lang->bug->lblLastEdited = '最后修改'; -$lang->bug->lblResolved = '由谁解决'; - -$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?'; - -$lang->bug->legendBasicInfo = '基本信息'; -$lang->bug->legendMailto = '抄送给'; -$lang->bug->legendAttatch = '附件'; -$lang->bug->legendLinkBugs = '相关Bug'; -$lang->bug->legendPrjStoryTask= '项目/需求/任务'; -$lang->bug->legendCases = '相关用例'; -$lang->bug->legendSteps = '重现步骤'; -$lang->bug->legendAction = '操作'; -$lang->bug->legendHistory = '历史记录'; -$lang->bug->legendComment = '备注'; -$lang->bug->legendLife = 'BUG的一生'; -$lang->bug->legendMisc = '其相关他'; - -$lang->bug->buttonEdit = '编辑'; -$lang->bug->buttonActivate = '激活'; -$lang->bug->buttonResolve = '解决'; -$lang->bug->buttonClose = '关闭'; -$lang->bug->buttonToList = '返回'; - -$lang->bug->severityList[3] = 3; -$lang->bug->severityList[1] = 1; -$lang->bug->severityList[2] = 2; -$lang->bug->severityList[4] = 4; - -/* Define the OS list. */ -$lang->bug->osList['all'] = '全部'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['winnt'] = 'Windows NT'; -$lang->bug->osList['win98'] = 'Windows 98'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = '其他'; - -/* Define the OS list. */ -$lang->bug->browserList['all'] = '全部'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox2'] = 'firefox2'; -$lang->bug->browserList['firefx3'] = 'firefox3'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['other'] = '其他'; - -/* Define the types. */ -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = '代码错误'; -$lang->bug->typeList['interface'] = '界面优化'; -$lang->bug->typeList['designchange'] = '设计变更'; -$lang->bug->typeList['Others'] = '其他'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '激活'; -$lang->bug->statusList['resolved'] = '已解决'; -$lang->bug->statusList['closed'] = '已关闭'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = '设计如此'; -$lang->bug->resolutionList['duplicate'] = '重复Bug'; -$lang->bug->resolutionList['external'] = '外部原因'; -$lang->bug->resolutionList['fixed'] = '已解决'; -$lang->bug->resolutionList['notrepro'] = '无法重现'; -$lang->bug->resolutionList['postponed'] = '延期处理'; -$lang->bug->resolutionList['willnotfix'] = "不予解决"; - -$lang->bug->id = 'Bug编号'; -$lang->bug->product = '所属产品'; -$lang->bug->module = '所属模块'; -$lang->bug->path = '模块路径'; -$lang->bug->project = '所属项目'; -$lang->bug->story = '相关需求'; -$lang->bug->storyVersion = '需求版本'; -$lang->bug->task = '相关任务'; -$lang->bug->title = 'Bug标题'; -$lang->bug->severity = '严重程度'; -$lang->bug->type = 'Bug类型'; -$lang->bug->os = '操作系统'; -$lang->bug->browser = '浏览器'; -$lang->bug->machine = '机器硬件'; -$lang->bug->found = '如何发现'; -$lang->bug->steps = '重现步骤'; -$lang->bug->status = 'Bug状态'; -$lang->bug->mailto = '抄送给'; -$lang->bug->openedBy = '由谁创建'; -$lang->bug->openedDate = '创建日期'; -$lang->bug->openedBuild = '影响版本'; -$lang->bug->assignedTo = '指派给'; -$lang->bug->assignedDate = '指派日期'; -$lang->bug->resolvedBy = '解决者'; -$lang->bug->resolution = '解决方案'; -$lang->bug->resolvedBuild = '解决版本'; -$lang->bug->resolvedDate = '解决日期'; -$lang->bug->closedBy = '由谁关闭'; -$lang->bug->closedDate = '关闭日期'; -$lang->bug->duplicateBug = '重复Bug'; -$lang->bug->lastEditedBy = '最后修改者'; -$lang->bug->lastEditedDate = '最后修改日期'; -$lang->bug->linkBug = '相关Bug'; -$lang->bug->case = '相关用例'; -$lang->bug->files = '附件'; - -$lang->bug->tblStep = "[步骤]\n"; -$lang->bug->tblResult = "[结果]\n"; -$lang->bug->tblExpect = "[期望]\n"; - -$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解决,方案为 $extra。', 'extra' => $lang->bug->resolutionList); diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/lang/zh-cn.php b/tags/zentaopms_1.1_stable_20100706/module/bug/lang/zh-cn.php deleted file mode 100644 index 5a007f1045..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/lang/zh-cn.php +++ /dev/null @@ -1,275 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -/* 字段列表。*/ -$lang->bug->common = '缺陷管理'; -$lang->bug->id = 'Bug编号'; -$lang->bug->product = '所属产品'; -$lang->bug->module = '所属模块'; -$lang->bug->path = '模块路径'; -$lang->bug->project = '所属项目'; -$lang->bug->story = '相关需求'; -$lang->bug->storyVersion = '需求版本'; -$lang->bug->task = '相关任务'; -$lang->bug->title = 'Bug标题'; -$lang->bug->severity = '严重程度'; -$lang->bug->severityAB = '级别'; -$lang->bug->pri = '优先级'; -$lang->bug->type = 'Bug类型'; -$lang->bug->os = '操作系统'; -$lang->bug->browser = '浏览器'; -$lang->bug->machine = '机器硬件'; -$lang->bug->found = '如何发现'; -$lang->bug->steps = '重现步骤'; -$lang->bug->status = 'Bug状态'; -$lang->bug->mailto = '抄送给'; -$lang->bug->openedBy = '由谁创建'; -$lang->bug->openedByAB = '创建'; -$lang->bug->openedDate = '创建日期'; -$lang->bug->openedBuild = '影响版本'; -$lang->bug->assignedTo = '指派给'; -$lang->bug->assignedDate = '指派日期'; -$lang->bug->resolvedBy = '解决者'; -$lang->bug->resolution = '解决方案'; -$lang->bug->resolutionAB = '方案'; -$lang->bug->resolvedBuild = '解决版本'; -$lang->bug->resolvedDate = '解决日期'; -$lang->bug->closedBy = '由谁关闭'; -$lang->bug->closedDate = '关闭日期'; -$lang->bug->duplicateBug = '重复Bug'; -$lang->bug->lastEditedBy = '最后修改者'; -$lang->bug->lastEditedDate = '最后修改日期'; -$lang->bug->linkBug = '相关Bug'; -$lang->bug->case = '相关用例'; -$lang->bug->files = '附件'; -$lang->bug->keywords = '关键词'; -$lang->bug->lastEditedByAB = '修改者'; -$lang->bug->lastEditedDateAB = '修改日期'; - -/* 方法列表。*/ -$lang->bug->index = '首页'; -$lang->bug->create = '创建Bug'; -$lang->bug->edit = '编辑Bug'; -$lang->bug->browse = 'Bug列表'; -$lang->bug->view = 'Bug详情'; -$lang->bug->resolve = '解决Bug'; -$lang->bug->close = '关闭Bug'; -$lang->bug->activate = '激活Bug'; -$lang->bug->reportChart = '报表统计'; -$lang->bug->delete = '删除Bug'; -$lang->bug->ajaxGetUserBugs = '接口:我的Bug'; -$lang->bug->confirmStoryChange = '确认需求变动'; - -/* 查询条件列表。*/ -$lang->bug->selectProduct = '请选择产品'; -$lang->bug->byModule = '按模块'; -$lang->bug->assignToMe = '指派给我'; -$lang->bug->openedByMe = '由我创建'; -$lang->bug->resolvedByMe = '由我解决'; -$lang->bug->assignToNull = '未指派'; -$lang->bug->longLifeBugs = '久未处理'; -$lang->bug->postponedBugs = '被延期'; -$lang->bug->allBugs = '所有Bug'; -$lang->bug->moduleBugs = '按模块浏览'; -$lang->bug->byQuery = '搜索'; -$lang->bug->needConfirm = '需求有变动的Bug'; -$lang->bug->allProduct = '所有产品'; - -/* 页面标签。*/ -$lang->bug->lblProductAndModule = '产品模块'; -$lang->bug->lblProjectAndTask = '项目任务'; -$lang->bug->lblStory = '相关需求'; -$lang->bug->lblTypeAndSeverity = '类型/严重程度'; -$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器'; -$lang->bug->lblAssignedTo = '当前指派'; -$lang->bug->lblMailto = '抄送给'; -$lang->bug->lblLastEdited = '最后修改'; -$lang->bug->lblResolved = '由谁解决'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = '基本信息'; -$lang->bug->legendMailto = '抄送给'; -$lang->bug->legendAttatch = '附件'; -$lang->bug->legendLinkBugs = '相关Bug'; -$lang->bug->legendPrjStoryTask= '项目/需求/任务'; -$lang->bug->legendCases = '相关用例'; -$lang->bug->legendSteps = '重现步骤'; -$lang->bug->legendAction = '操作'; -$lang->bug->legendHistory = '历史记录'; -$lang->bug->legendComment = '备注'; -$lang->bug->legendLife = 'BUG的一生'; -$lang->bug->legendMisc = '其相关他'; - -/* 功能按钮。*/ -$lang->bug->buttonEdit = '编辑'; -$lang->bug->buttonActivate = '激活'; -$lang->bug->buttonResolve = '解决'; -$lang->bug->buttonClose = '关闭'; -$lang->bug->buttonToList = '返回'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?'; -$lang->bug->confirmDelete = '您确认要删除该Bug吗?'; - -/* 模板。*/ -$lang->bug->tblStep = "[步骤]\n"; -$lang->bug->tblResult = "[结果]\n"; -$lang->bug->tblExpect = "[期望]\n"; - -/* 各个字段取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = '全部'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['winnt'] = 'Windows NT'; -$lang->bug->osList['win98'] = 'Windows 98'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = '其他'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = '全部'; -$lang->bug->browserList['ie'] = 'IE系列'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox'] = 'firefox系列'; -$lang->bug->browserList['firefox2'] = 'firefox2'; -$lang->bug->browserList['firefx3'] = 'firefox3'; -$lang->bug->browserList['opera'] = 'opera系列'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['other'] = '其他'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = '代码错误'; -$lang->bug->typeList['interface'] = '界面优化'; -$lang->bug->typeList['designchange'] = '设计变更'; -$lang->bug->typeList['newfeature'] = '新增需求'; -$lang->bug->typeList['designdefect'] = '设计缺陷'; -$lang->bug->typeList['config'] = '配置相关'; -$lang->bug->typeList['install'] = '安装部署'; -$lang->bug->typeList['security'] = '安全相关'; -$lang->bug->typeList['performance'] = '性能问题'; -$lang->bug->typeList['standard'] = '标准规范'; -$lang->bug->typeList['automation'] = '测试脚本'; -$lang->bug->typeList['trackthings'] = '事务跟踪'; -$lang->bug->typeList['Others'] = '其他'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '激活'; -$lang->bug->statusList['resolved'] = '已解决'; -$lang->bug->statusList['closed'] = '已关闭'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = '设计如此'; -$lang->bug->resolutionList['duplicate'] = '重复Bug'; -$lang->bug->resolutionList['external'] = '外部原因'; -$lang->bug->resolutionList['fixed'] = '已解决'; -$lang->bug->resolutionList['notrepro'] = '无法重现'; -$lang->bug->resolutionList['postponed'] = '延期处理'; -$lang->bug->resolutionList['willnotfix'] = "不予解决"; - -/* 统计报表。*/ -$lang->bug->report->common = '统计报表'; -$lang->bug->report->select = '请选择报表类型'; -$lang->bug->report->create = '生成报表'; -$lang->bug->report->selectAll = '全选'; -$lang->bug->report->selectReverse = '反选'; - -$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量'; -$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量'; -$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数'; -$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数'; -$lang->bug->report->charts['closedBugsPerDay'] = '每天关闭的Bug数'; -$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数'; -$lang->bug->report->charts['resolvedBugsPerUser']= '每人解决的Bug数'; -$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数'; -$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计'; -$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计'; -$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计'; -$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计'; -//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计'; -//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = 'auto'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNT'; -$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = '项目'; -$lang->bug->report->bugsPerModule->graph->xAxisName = '模块'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态'; -$lang->bug->report->bugsPerType->graph->xAxisName = '类型'; -$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间'; -$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤'; - -/* 操作记录。*/ -$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解决,方案为 $extra。', 'extra' => $lang->bug->resolutionList); diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/model.php b/tags/zentaopms_1.1_stable_20100706/module/bug/model.php deleted file mode 100644 index 25828859d3..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/model.php +++ /dev/null @@ -1,434 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> -lang->bug->menu, 'product', $selectHtml . $this->lang->arrow); - common::setMenuVars($this->lang->bug->menu, 'bug', $productID); - common::setMenuVars($this->lang->bug->menu, 'testcase', $productID); - common::setMenuVars($this->lang->bug->menu, 'testtask', $productID); - } - - /* 创建一个Bug。*/ - public function create() - { - $now = helper::now(); - $bug = fixer::input('post') - ->add('openedBy', $this->app->user->account) - ->add('openedDate', $now) - ->setDefault('project,story,task', 0) - ->setDefault('openedBuild', '') - ->setIF($this->post->assignedTo != '', 'assignedDate', $now) - ->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) - ->specialChars('title,steps,keyword') - ->cleanInt('product, module, severity') - ->join('openedBuild', ',') - ->remove('files, labels') - ->get(); - $this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec(); - if(!dao::isError()) - { - $bugID = $this->dao->lastInsertID(); - $this->loadModel('file')->saveUpload('bug', $bugID); - return $bugID; - } - return false; - } - - /* 获得某一个产品,某一个模块下面的所有bug。*/ - public function getModuleBugs($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null) - { - return $this->dao->select('*')->from(TABLE_BUG) - ->where('product')->eq((int)$productID) - ->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi() - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 获取一个bug的详细信息。*/ - public function getById($bugID) - { - $bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName') - ->from(TABLE_BUG)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') - ->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id') - ->where('t1.id')->eq((int)$bugID)->fetch(); - if(!$bug) return false; - foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = ''; - if($bug->mailto) - { - $bug->mailto = ltrim(trim($bug->mailto), ','); // 去掉开始的,。 - $bug->mailto = str_replace(' ', '', $bug->mailto); - $bug->mailto = rtrim($bug->mailto, ',') . ','; - $bug->mailto = str_replace(',', ', ', $bug->mailto); - } - if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title'); - if($bug->case) $bug->caseTitle = $this->dao->findById($bug->case)->from(TABLE_CASE)->fields('title')->fetch('title'); - if($bug->linkBug) $bug->linkBugTitles = $this->dao->select('id,title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs(); - $bug->files = $this->loadModel('file')->getByObject('bug', $bugID); - return $bug; - } - - /* 更新bug信息。*/ - public function update($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->cleanInt('product,module,severity,project,story,task') - ->specialChars('title,steps,keyword') - ->remove('comment,fiels,labels') - ->setDefault('project,module,project,story,task,duplicateBug', 0) - ->setDefault('openedBuild', '') - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->join('openedBuild', ',') - ->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now) - ->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) - ->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) - ->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account) - ->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now) - ->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account) - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now) - ->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') - ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) - ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now) - ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') - ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug) - ->autoCheck() - ->batchCheck($this->config->bug->edit->requiredFields, 'notempty') - ->checkIF($bug->resolvedBy, 'resolution', 'notempty') - ->checkIF($bug->closedBy, 'resolution', 'notempty') - ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') - ->where('id')->eq((int)$bugID) - ->exec(); - if(!dao::isError()) return common::createChanges($oldBug, $bug); - } - - /* 解决Bug。*/ - public function resolve($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->add('resolvedBy', $this->app->user->account) - ->add('resolvedDate', $now) - ->add('status', 'resolved') - ->add('assignedDate', $now) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->setDefault('duplicateBug', 0) - ->setDefault('assignedTo', $oldBug->openedBy) - ->remove('comment') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug) - ->autoCheck() - ->batchCheck($this->config->bug->resolve->requiredFields, 'notempty') - ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') - ->where('id')->eq((int)$bugID) - ->exec(); - } - - /* 激活Bug。*/ - public function activate($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->setDefault('assignedTo', $oldBug->resolvedBy) - ->add('assignedDate', $now) - ->add('resolution', '') - ->add('status', 'active') - ->add('resolvedDate', '0000-00-00') - ->add('resolvedBy', '') - ->add('resolvedBuild', '') - ->add('closedBy', '') - ->add('closedDate', '0000-00-00') - ->add('duplicateBug', 0) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->remove('comment,files,labels') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); - } - - /* 关闭Bug。*/ - public function close($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->add('assignedTo', 'closed') - ->add('assignedDate', $now) - ->add('status', 'closed') - ->add('closedBy', $this->app->user->account) - ->add('closedDate', $now) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->remove('comment') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); - } - - /* 从bug列表中提取所有出现过的账户。*/ - public function extractAccountsFromList($bugs) - { - $accounts = array(); - foreach($bugs as $bug) - { - if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; - if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; - if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; - if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; - if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; - } - return array_unique($accounts); - } - - /* 从一条bug中提取所有出现过的账户。*/ - public function extractAccountsFromSingle($bug) - { - $accounts = array(); - if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; - if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; - if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; - if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; - if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; - return array_unique($accounts); - } - - /* 获得用户的Bug id=>title列表。*/ - public function getUserBugPairs($account) - { - $bugs = array(); - $stmt = $this->dao->select('t1.id, t1.title, t2.name as product') - ->from(TABLE_BUG)->alias('t1') - ->leftJoin(TABLE_PRODUCT)->alias('t2') - ->on('t1.product=t2.id') - ->where('t1.assignedTo')->eq($account) - ->andWhere('t1.deleted')->eq(0) - ->query(); - while($bug = $stmt->fetch()) - { - $bug->title = $bug->product . ' / ' . $bug->title; - $bugs[$bug->id] = $bug->title; - } - return $bugs; - } - - /* 获得某个项目的bug列表。*/ - public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null) - { - return $this->dao->select('*')->from(TABLE_BUG) - ->where('project')->eq((int)$projectID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 通过某一次测试结果获得bug的标题和步骤。*/ - public function getBugInfoFromResult($resultID) - { - $title = ''; - $bugSteps = ''; - - $result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch(); - $run = $this->loadModel('testtask')->getRunById($result->run); - if($result and $result->caseResult == 'fail') - { - $title = $run->case->title; - $caseSteps = $run->case->steps; - $stepResults = unserialize($result->stepResults); - $bugSteps = $this->lang->bug->tblStep; - foreach($caseSteps as $key => $step) - { - $bugSteps .= ($key + 1) . '. ' .$step->desc . "\n"; - if($stepResults[$step->id]['result'] == 'fail') - { - $bugSteps .= $this->lang->bug->tblResult; - $bugSteps .= $stepResults[$step->id]['real'] . "\n"; - $bugSteps .= $this->lang->bug->tblExpect; - $bugSteps .= $step->expect; - break; - } - } - } - return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story); - } - - /* 按项目统计bug数。*/ - public function getDataOfBugsPerProject() - { - $datas = $this->dao->select('project as name, count(project) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('project')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - $projects = $this->loadModel('project')->getPairs(); - foreach($datas as $projectID => $data) $data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined; - return $datas; - } - - /* 按产品模块统计bug数。*/ - public function getDataOfBugsPerModule() - { - $datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('module')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - $modules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in(array_keys($datas))->fetchPairs(); - foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/'; - return $datas; - } - - /* 按bug创建日期统计。*/ - public function getDataOfOpenedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(openedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('openedDate')->fetchAll(); - } - - /* 按bug解决日期统计。*/ - public function getDataOfResolvedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(resolvedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) - ->where($this->session->bugReportCondition)->groupBy('name') - ->having('name != 0000-00-00') - ->orderBy('resolvedDate') - ->fetchAll(); - } - - /* 按bug关闭日期统计。*/ - public function getDataOfClosedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(closedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) - ->where($this->session->bugReportCondition)->groupBy('name') - ->having('name != 0000-00-00') - ->orderBy('closedDate')->fetchAll(); - } - - /* 按bug创建者统计。*/ - public function getDataOfOpenedBugsPerUser() - { - $datas = $this->dao->select('openedBy AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug解决者统计。*/ - public function getDataOfResolvedBugsPerUser() - { - $datas = $this->dao->select('resolvedBy AS name, COUNT(*) AS value') - ->from(TABLE_BUG)->where($this->session->bugReportCondition) - ->andWhere('resolvedBy')->ne('') - ->groupBy('name') - ->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug关闭者统计。*/ - public function getDataOfClosedBugsPerUser() - { - $datas = $this->dao->select('closedBy AS name, COUNT(*) AS value') - ->from(TABLE_BUG) - ->where($this->session->bugReportCondition) - ->andWhere('closedBy')->ne('') - ->groupBy('name') - ->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug严重程度统计。*/ - public function getDataOfBugsPerSeverity() - { - $datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity]; - return $datas; - } - - /* 按bug解决方案统计。*/ - public function getDataOfBugsPerResolution() - { - $datas = $this->dao->select('resolution AS name, COUNT(*) AS value') - ->from(TABLE_BUG) - ->where($this->session->bugReportCondition) - ->andWhere('resolution')->ne('') - ->groupBy('name')->orderBy('value DESC') - ->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $resolution => $data) if(isset($this->lang->bug->resolutionList[$resolution])) $data->name = $this->lang->bug->resolutionList[$resolution]; - return $datas; - } - - /* 按bug状态统计。*/ - public function getDataOfBugsPerStatus() - { - $datas = $this->dao->select('status AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $status => $data) if(isset($this->lang->bug->statusList[$status])) $data->name = $this->lang->bug->statusList[$status]; - return $datas; - } - - /* 按bug类型统计。*/ - public function getDataOfBugsPerType() - { - $datas = $this->dao->select('type AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type]; - return $datas; - } - - - /* 合并公共的chart设置和当前chart的设置。*/ - public function mergeChartOption($chartType) - { - $chartOption = $this->lang->bug->report->$chartType; - $commonOption = $this->lang->bug->report->options; - - /* 设置图表的标题和展示方式。*/ - $chartOption->graph->caption = $this->lang->bug->report->charts[$chartType]; - if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf; - if(!isset($chartOption->width)) $chartOption->width = $commonOption->width; - if(!isset($chartOption->height)) $chartOption->height = $commonOption->height; - - /* 合并配置。*/ - foreach($commonOption->graph as $key => $value) if(!isset($chartOption->graph->$key)) $chartOption->graph->$key = $value; - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/activate.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/activate.html.php deleted file mode 100644 index a0d2807972..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/activate.html.php +++ /dev/null @@ -1,56 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - -
-
- - - - - - - - - - - - - - - - - - - - - -
title;?>
bug->assignedTo;?>resolvedBy, 'class=select-3');?>
bug->openedBuild;?>resolvedBuild, 'class=select-3');?>
comment;?>
bug->files;?>fetch('file', 'buildform');?>
- - -
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/browse.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/browse.html.php deleted file mode 100644 index aa8e586004..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/browse.html.php +++ /dev/null @@ -1,149 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - - - - -
-
-
- " . $lang->bug->moduleBugs . " "; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull¶m=0"), $lang->bug->assignToNull) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . ""; - echo "{$lang->bug->byQuery} "; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . ""; - ?> -
-
- exportCSV, $lang->setFileName);?> - bug->report->common); ?> - bug->create); ?> -
-
-
'>
-
- -
' id='mainbox'> - -
-
- recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - - - - - - - - - - id");?> - - - - - - - - - - - - - - - - - - -
idAB);?>bug->severityAB);?> priAB);?>bug->title);?>bug->story);?>actions;?>openedByAB);?>assignedToAB);?>bug->resolvedBy);?>bug->resolutionAB);?>actions;?>
bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>title);?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>id"), $lang->confirm, 'hiddenwin')?>openedBy];?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - ?> -
- show();?> -
-
- -
' id='treebox'> -
-
- -
- createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?> -
-
-
- -
- - diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/close.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/close.html.php deleted file mode 100644 index 89e032211d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/close.html.php +++ /dev/null @@ -1,44 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - -
- - - - - - - - - -
title;?>
comment;?>
- - -
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/create.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/create.html.php deleted file mode 100644 index 77c4a61c59..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/create.html.php +++ /dev/null @@ -1,192 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bug->create;?>
bug->lblProductAndModule;?> - - -
bug->lblProjectAndTask;?> - - -
bug->lblStory;?> - -
bug->openedBuild;?> - -
bug->lblTypeAndSeverity;?> - bug->typeList, 'codeerror', 'class=select-2');?> - bug->severityList, '', 'class=select-2');?> -
bug->lblSystemBrowserAndHardware;?> - bug->osList, '', 'class=select-2');?> - bug->browserList, '', 'class=select-2');?> -
bug->lblAssignedTo;?>
bug->lblMailto;?>
bug->title;?>
bug->steps;?>
bug->keywords;?>
bug->files;?>fetch('file', 'buildform');?>
- -
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/edit.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/edit.html.php deleted file mode 100644 index 63100be587..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/edit.html.php +++ /dev/null @@ -1,317 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - - -
-
-
-
- BUG #id . $lang->colon;?> - title), 'class=text-1');?> -
-
-
-
- -
-
-
- - -
-
- bug->legendSteps;?> - steps, "rows='8' class='area-1'");?> -
-
- bug->legendComment;?> - -
-
- bug->legendAttatch;?> - fetch('file', 'buildform', 'filecount=2');?> -
-
- session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); - echo html::linkButton($lang->goback, $browseLink); - ?> -
-
- -
-
- -
-
- bug->legendBasicInfo;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bug->product;?> - -
bug->module;?> - -
bug->type;?>bug->typeList, $bug->type, 'class=select-3');?> -
bug->severity;?>bug->severityList, $bug->severity, 'class=select-3');?> -
bug->pri;?>bug->priList, $bug->pri, 'class=select-3');?> -
bug->status;?>bug->statusList, $bug->status, 'class=select-3');?>
bug->assignedTo;?>assignedTo, 'class=select-3');?>
bug->os;?>bug->osList, $bug->os, 'class=select-3');?>
bug->browser;?>bug->browserList, $bug->browser, 'class=select-3');?>
bug->keywords;?>keywords, 'class="text-3"');?>
-
- -
- bug->legendPrjStoryTask;?> - - - - - - - - - - - - - -
bug->project;?>project, 'class=select-3 onchange=loadProjectRelated(this.value)');?>
bug->story;?>story, 'class=select-3');?>
bug->task;?>task, 'class=select-3');?>
-
- -
- bug->legendLife;?> - - - - - - - - - - - - - - - - - - - - - - - - - - resolution != 'duplicate') echo "style='display:none'";?>> - - - - - - - - - - - -
bug->openedBy;?>openedBy];?>
bug->openedBuild;?>openedBuild, 'size=4 multiple=multiple class=select-3');?>
bug->resolvedBy;?>resolvedBy, 'class=select-3');?>
bug->resolvedDate;?>resolvedDate, 'class=text-3');?>
bug->resolvedBuild;?>resolvedBuild, 'class=select-3');?>
bug->resolution;?>bug->resolutionList, $bug->resolution, 'class=select-3 onchange=setDuplicate(this.value)');?>
bug->duplicateBug;?>duplicateBug, 'class=text-3');?>
bug->closedBy;?>closedBy, 'class=select-3');?>
bug->closedDate;?>closedDate, 'class=text-3');?>
-
-
- bug->legendMisc;?> - - - - - - - - - - - - - -
bug->mailto;?>mailto, 'class="text-3"');?>
bug->linkBug;?>linkBug, 'class="text-3"');?>
bug->case;?>case, 'class="text-3"');?>
-
-
-
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/index.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/index.html.php deleted file mode 100644 index 306624e1dc..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/index.html.php +++ /dev/null @@ -1,28 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - -
-
- \ No newline at end of file diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/report.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/report.html.php deleted file mode 100644 index 140c6caa31..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/report.html.php +++ /dev/null @@ -1,99 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - - -
-
-
bug->report->common;?>
-
goback); ?>
-
-
- -
-
-
bug->report->select;?>
-
- - bug->report->charts, $checkedCharts);?> - - -

- bug->report->create);?> -
-
-
-
- - - $chartContent):?> - - - - - -
bug->report->common;?>
- - - - - - - $data):?> - - - - - - -
report->item;?>report->value;?>report->percent;?>
name;?>value;?>percent * 100) . '%';?>
-
-
-
-
- - diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/resolve.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/resolve.html.php deleted file mode 100644 index 29fa6c834b..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/resolve.html.php +++ /dev/null @@ -1,73 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
title;?>
bug->resolution;?>bug->resolutionList, '', 'class=select-3 onchange=setDuplicate(this.value)');?>
bug->resolvedBuild;?>
bug->assignedTo;?>openedBy, 'class=select-3');?>
comment;?>
- - -
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/sendmail.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/sendmail.html.php deleted file mode 100644 index d90a1e2963..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/sendmail.html.php +++ /dev/null @@ -1,34 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - - - - - - -
- BUG #id . "=>$bug->assignedTo " . html::a(common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> -
diff --git a/tags/zentaopms_1.1_stable_20100706/module/bug/view/view.html.php b/tags/zentaopms_1.1_stable_20100706/module/bug/view/view.html.php deleted file mode 100644 index d2d8e534f8..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/bug/view/view.html.php +++ /dev/null @@ -1,238 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - -
-
-
deleted) echo "class='deleted'";?>>BUG #id . $lang->colon . $bug->title;?>
-
- session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); - $params = "bugID=$bug->id"; - if(!$bug->deleted) - { - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; - common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
-
-
- -
-
-
-
- bug->legendSteps;?> -
steps);?>
-
-
- bug->legendAttatch;?> -
files as $file) echo html::a($this->createLink('file', 'download', "fileID=$file->id"), $file->title, '_blank');?>
-
- -
- deleted) - { - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; - common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
-
-
- -
-
- bug->legendBasicInfo;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bug->product;?>product", $productName)) echo $productName;?> -
bug->module;?> - $module) - { - if(!common::printLink('bug', 'browse', "productID=$bug->product&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) echo $lang->arrow; - } - ?> -
bug->type;?>bug->typeList[$bug->type])) echo $lang->bug->typeList[$bug->type]; else echo $bug->type;?>
bug->severity;?>bug->severityList[$bug->severity];?>
bug->pri;?>bug->priList[$bug->pri];?>
bug->status;?>bug->statusList[$bug->status];?>
bug->lblAssignedTo;?>assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?>
bug->os;?>bug->osList[$bug->os];?>
bug->browser;?>bug->browserList[$bug->browser];?>
bug->keywords;?>keywords;?>
-
- -
- bug->legendLife;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bug->openedBy;?> openedBy] . $lang->at . $bug->openedDate;?>
bug->openedBuild;?> - openedBuild) - { - $openedBuilds = explode(',', $bug->openedBuild); - foreach($openedBuilds as $openedBuild) isset($builds[$openedBuild]) ? print($builds[$openedBuild] . '
') : print($openedBuild . '
'); - } - else - { - echo $bug->openedBuild; - } - ?> -
bug->lblResolved;?>resolvedBy) echo $users[$bug->resolvedBy] . $lang->at . $bug->resolvedDate;?> -
bug->resolvedBuild;?>resolvedBuild])) echo $builds[$bug->resolvedBuild]; else echo $bug->resolvedBuild;?>
bug->resolution;?> - bug->resolutionList[$bug->resolution]; - if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug"), $bug->duplicateBugTitle); - ?> -
bug->closedBy;?>closedBy) echo $users[$bug->closedBy] . $lang->at . $bug->closedDate;?>
bug->lblLastEdited;?>lastEditedBy) echo $users[$bug->lastEditedBy] . $lang->at . $bug->lastEditedDate?>
-
- -
- bug->legendPrjStoryTask;?> - - - - - - - - - - - - - -
bug->project;?>project) echo html::a($this->createLink('project', 'browse', "projectid=$bug->project"), $bug->projectName);?>
bug->story;?> - story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story"), $bug->storyTitle); - if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - ?> -
bug->task;?>task) echo html::a($this->createLink('task', 'view', "taskID=$bug->task"), $bug->taskName);?>
-
-
- bug->legendMisc;?> - - - - - - - - - - - - - -
bug->mailto;?>mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?>
bug->linkBug;?> - linkBugTitles)) - { - foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle) - { - echo html::a($this->createLink('bug', 'view', "bugID=$linkBugID"), "#$linkBugID $linkBugTitle", '_blank') . '
'; - } - } - ?> -
bug->case;?>caseTitle)) echo html::a($this->createLink('testcase', 'view', "caseID=$bug->case"), "#$bug->case $bug->caseTitle", '_blank');?>
-
-
-
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/config.php b/tags/zentaopms_1.1_stable_20100706/module/build/config.php deleted file mode 100644 index 01751b45b1..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/config.php +++ /dev/null @@ -1,3 +0,0 @@ -build->create->requiredFields = 'product,name,builder,date'; -$config->build->edit->requiredFields = 'product,name,builder,date'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/control.php b/tags/zentaopms_1.1_stable_20100706/module/build/control.php deleted file mode 100644 index 04337fdd41..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/control.php +++ /dev/null @@ -1,122 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -class build extends control -{ - /* 添加build。*/ - public function create($projectID) - { - if(!empty($_POST)) - { - $buildID = $this->build->create($projectID); - if(dao::isError()) die(js::error(dao::getError())); - $this->loadModel('action')->create('build', $buildID, 'opened'); - die(js::locate($this->createLink('project', 'build', "project=$projectID"), 'parent')); - } - - /* 设置菜单。*/ - $this->loadModel('project')->setMenu($this->project->getPairs(), $projectID); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->create; - $this->view->products = $this->project->getProducts($projectID); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->display(); - } - - /* 编辑build。*/ - public function edit($buildID) - { - if(!empty($_POST)) - { - $changes = $this->build->update($buildID); - if(dao::isError()) die(js::error(dao::getError())); - if($changes) - { - $actionID = $this->loadModel('action')->create('build', $buildID, 'edited'); - $this->action->logHistory($actionID, $changes); - } - die(js::locate(inlink('view', "buildID=$buildID"), 'parent')); - } - - /* 设置菜单。*/ - $build = $this->build->getById((int)$buildID); - $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->edit; - $this->view->position[] = $this->lang->build->edit; - $this->view->products = $this->project->getProducts($build->project); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->view->build = $build; - $this->display(); - } - - /* 查看build。*/ - public function view($buildID) - { - /* 设置菜单。*/ - $build = $this->build->getById((int)$buildID); - if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); - - $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->view; - $this->view->position[] = $this->lang->build->view; - $this->view->products = $this->project->getProducts($build->project); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->view->build = $build; - $this->view->actions = $this->loadModel('action')->getList('build', $buildID); - $this->display(); - } - - /* 删除build。*/ - public function delete($buildID, $confirm = 'no') - { - if($confirm == 'no') - { - die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes"))); - } - else - { - $build = $this->build->getById($buildID); - $this->build->delete(TABLE_BUILD, $buildID); - die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent')); - } - } - - /* AJAX接口:获得产品的build列表。*/ - public function ajaxGetProductBuilds($productID, $varName, $build = '') - { - if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); - if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'class=select-3')); - } - - /* AJAX接口:获得项目的build列表。*/ - public function ajaxGetProjectBuilds($projectID, $varName, $build = '') - { - if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'size=4 class=select-3 multiple')); - if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, 'noempty'), $build, 'class=select-3')); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/lang/en.php b/tags/zentaopms_1.1_stable_20100706/module/build/lang/en.php deleted file mode 100644 index b6b8f4dc6d..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/lang/en.php +++ /dev/null @@ -1,42 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->build->common = 'Build'; -$lang->build->create = "创建Build"; -$lang->build->edit = "编辑Build"; -$lang->build->delete = "删除Build"; -$lang->build->view = "Build详情"; -$lang->build->ajaxGetProductBuilds = '接口:产品Build列表'; -$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表'; - -$lang->build->confirmDelete = "您确认删除该build吗?"; - -$lang->build->id = 'ID'; -$lang->build->product = '产品'; -$lang->build->project = '项目'; -$lang->build->name = '名称编号'; -$lang->build->date = 'Build日期'; -$lang->build->builder = '构建者'; -$lang->build->scmPath = '源代码地址'; -$lang->build->filePath = '存储地址'; -$lang->build->desc = '描述'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/lang/zh-cn.php b/tags/zentaopms_1.1_stable_20100706/module/build/lang/zh-cn.php deleted file mode 100644 index 52be59c910..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/lang/zh-cn.php +++ /dev/null @@ -1,42 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -$lang->build->common = 'Build'; -$lang->build->create = "创建Build"; -$lang->build->edit = "编辑Build"; -$lang->build->delete = "删除Build"; -$lang->build->view = "Build详情"; -$lang->build->ajaxGetProductBuilds = '接口:产品Build列表'; -$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表'; - -$lang->build->confirmDelete = "您确认删除该build吗?"; - -$lang->build->id = 'ID'; -$lang->build->product = '产品'; -$lang->build->project = '项目'; -$lang->build->name = '名称编号'; -$lang->build->date = 'Build日期'; -$lang->build->builder = '构建者'; -$lang->build->scmPath = '源代码地址'; -$lang->build->filePath = '存储地址'; -$lang->build->desc = '描述'; diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/model.php b/tags/zentaopms_1.1_stable_20100706/module/build/model.php deleted file mode 100644 index 5441c0e2d6..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/model.php +++ /dev/null @@ -1,116 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> -dao->select('t1.*, t2.name as projectName, t3.name as productName') - ->from(TABLE_BUILD)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') - ->where('t1.id')->eq((int)$buildID) - ->orderBy('t1.id DESC') - ->fetch(); - } - - /* 查找项目中的build列表。*/ - public function getProjectBuilds($projectID) - { - return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName') - ->from(TABLE_BUILD)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') - ->where('t1.project')->eq((int)$projectID) - ->andWhere('t1.deleted')->eq(0) - ->orderBy('t1.id DESC') - ->fetchAll(); - } - - /* 查找项目中的build列表。params='noempty|notrunk' */ - public function getProjectBuildPairs($projectID, $params = '') - { - $sysBuilds = array(); - if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); - if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - - $builds = $this->dao->select('id,name')->from(TABLE_BUILD) - ->where('project')->eq((int)$projectID) - ->andWhere('deleted')->eq(0) - ->orderBy('id desc')->fetchPairs(); - if(!$builds) return $sysBuilds; - $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) - ->where('build')->in(array_keys($builds)) - ->andWhere('deleted')->eq(0) - ->fetchPairs(); - foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; - return $sysBuilds + $builds; - } - - /* 查找产品中的build列表。params='noempty|notrunk' */ - public function getProductBuildPairs($productID, $params = '') - { - $sysBuilds = array(); - if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); - if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - - $builds = $this->dao->select('id,name')->from(TABLE_BUILD) - ->where('product')->eq((int)$productID) - ->andWhere('deleted')->eq(0) - ->orderBy('id desc')->fetchPairs(); - if(!$builds) return $sysBuilds; - $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) - ->where('build')->in(array_keys($builds)) - ->andWhere('deleted')->eq(0) - ->fetchPairs(); - foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; - return $sysBuilds + $builds; - } - - /* 创建。*/ - public function create($projectID) - { - $build = fixer::input('post') - ->stripTags('name') - ->specialChars('desc') - ->add('project', (int)$projectID) - ->get(); - $this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name','unique')->exec(); - if(!dao::isError()) return $this->dao->lastInsertID(); - } - - /* 编辑。*/ - public function update($buildID) - { - $oldBuild = $this->getByID($buildID); - $build = fixer::input('post') - ->stripTags('name') - ->specialChars('desc') - ->get(); - $this->dao->update(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->edit->requiredFields, 'notempty')->where('id')->eq((int)$buildID)->exec(); - if(!dao::isError()) return common::createChanges($oldBuild, $build); - } -} diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/view/create.html.php b/tags/zentaopms_1.1_stable_20100706/module/build/view/create.html.php deleted file mode 100644 index f3713535a6..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/view/create.html.php +++ /dev/null @@ -1,63 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
build->create;?>
build->product;?>
build->name;?>
build->builder;?>user->account, 'class="select-3"');?>
build->date;?>
build->scmPath;?>
build->filePath;?>
build->desc;?>
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/view/edit.html.php b/tags/zentaopms_1.1_stable_20100706/module/build/view/edit.html.php deleted file mode 100644 index 55a0cf5139..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/view/edit.html.php +++ /dev/null @@ -1,63 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
build->edit;?>
build->product;?>product, "class='select-3'");?>
build->name;?>name, "class='text-3'");?>
build->builder;?>user->account, 'class="select-3"');?>
build->date;?>date, "class='text-3 date'");?>
build->scmPath;?>scmPath, "class='text-1'");?>
build->filePath;?>filePath, "class='text-1'");?>
build->desc;?>desc, "rows='5' class='area-1'");?>
project);?>
-
-
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/build/view/view.html.php b/tags/zentaopms_1.1_stable_20100706/module/build/view/view.html.php deleted file mode 100644 index b230ebbf5e..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/build/view/view.html.php +++ /dev/null @@ -1,72 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentaoms.com - */ -?> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
build->view;?>
build->product;?>productName;?>
build->name;?>'>name;?>
build->builder;?>builder];?>
build->date;?>date;?>
build->scmPath;?>scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?>
build->filePath;?>filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?>
build->desc;?>desc);?>
-
- session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project"); - if(!$build->deleted) - { - common::printLink('build', 'edit', "buildID=$build->id", $lang->edit); - common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
- -
- diff --git a/tags/zentaopms_1.1_stable_20100706/module/common/control.php b/tags/zentaopms_1.1_stable_20100706/module/common/control.php deleted file mode 100644 index 0a298eff7f..0000000000 --- a/tags/zentaopms_1.1_stable_20100706/module/common/control.php +++ /dev/null @@ -1,508 +0,0 @@ -. - * - * @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com) - * @author Chunsheng Wang - * @package common - * @version $Id$ - * @link http://www.zentaoms.com - */ -class common extends control -{ - /** - * 构造函数:启动会话,加载公司模块,并设置公司信息。 - * - * @access public - * @return void - */ - public function __construct() - { - parent::__construct(); - session_name($this->config->sessionVar); - session_start(); - $this->sendHeader(); - $this->loadModel('company'); - $this->setCompany(); - $this->setUser(); - } - - /** - * 检查用户对当前的请求有没有权限。如果没有权限,则跳转到登陆界面。 - * - * @access public - * @return void - */ - public function checkPriv() - { - $module = $this->app->getModuleName(); - $method = $this->app->getMethodName(); - if($module == 'user') - { - if($method == 'login' or $method == 'logout' or $method == 'deny') return true; - } - elseif($module == 'api' and $method == 'getsessionid') - { - return true; - } - elseif($module == 'misc' and $method == 'about') - { - return true; - } - - if(isset($this->app->user)) - { - if(!common::hasPriv($module, $method)) - { - $vars = "module=$module&method=$method"; - if(isset($_SERVER['HTTP_REFERER'])) - { - $referer = helper::safe64Encode($_SERVER['HTTP_REFERER']); - $vars .= "&referer=$referer"; - } - $denyLink = $this->createLink('user', 'deny', $vars); - - /* Fix the bug of IE: use js locate, can't get the referer. */ - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) - { - echo <<