-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.php
More file actions
executable file
·116 lines (99 loc) · 2.89 KB
/
Copy pathsetup.php
File metadata and controls
executable file
·116 lines (99 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
if (!defined('DP_BASE_DIR')){
die('You should not access this file directly.');
}
/**
* Name: MS-Project Import
* Directory: projectimporter
* Version 1.4
* Type: user
* UI Name: Project Importer
* UI Icon: ?
Initial Work: Richard Thompson - Belfast, Northern Ireland
Developers: Keith Casey - Washington, DC keith@caseysoftware.com
Ivan Peevski - Adelaide, Australia cyberhorse@users.sourceforge.net
*/
global $AppUI;
// MODULE CONFIGURATION DEFINITION
$config = array();
$config['mod_name'] = 'Risks';
$config['mod_version'] = '3.0';
$config['mod_directory'] = 'risks';
$config['mod_setup_class'] = 'dotProject_AddOn_Setup_Risks';
$config['mod_type'] = 'user';
$config['mod_ui_name'] = 'Risks';
$config['mod_ui_icon'] = '';
$config['mod_description'] = 'Risk Management';
if (@$a == 'setup') {
echo dPshowModuleConfig( $config );
}
class dotProject_AddOn_Setup_Risks {
function install() {
$q = new DBQuery();
$q->createTable('risks');
$sql = '(
`risk_id` int(10) unsigned NOT NULL auto_increment,
`risk_name` varchar(50) default NULL,
`risk_description` text,
`risk_probability` tinyint(3) default 100,
`risk_status` text default NULL,
`risk_owner` int(10) default NULL,
`risk_project` int(10) default NULL,
`risk_task` int(10) default NULL,
`risk_impact` int(10) default NULL,
`risk_duration_type` tinyint(10) default 1,
`risk_notes` text,
PRIMARY KEY (`risk_id`),
UNIQUE KEY `risk_id` (`risk_id`),
KEY `risk_id_2` (`risk_id`))
TYPE=MyISAM';
$q->createDefinition($sql);
$q->exec();
$q->clear();
$q->createTable('risk_notes');
$sql = '(
`risk_note_id` int(11) NOT NULL auto_increment,
`risk_note_risk` int(11) NOT NULL default \'0\',
`risk_note_creator` int(11) NOT NULL default \'0\',
`risk_note_date` datetime NOT NULL default \'0000-00-00 00:00:00\',
`risk_note_description` text NOT NULL,
PRIMARY KEY (`risk_note_id`)
) TYPE=MyISAM';
$q->createDefinition($sql);
$q->exec();
$q->clear();
$q->addTable('sysvals');
$q->addInsert('sysval_key_id', 1);
$q->addInsert('sysval_title', 'RiskProbability');
$q->addInsert('sysval_value', "0|Not Specified\n1|Low\n2|Medium\n3|High");
$q->exec();
$q->clear();
$q->addTable('sysvals');
$q->addInsert('sysval_key_id', 1);
$q->addInsert('sysval_title', 'RiskStatus');
$q->addInsert('sysval_value', "0|Not Specified\n1|Open\n2|Closed\n3|Not Applicable");
$q->exec();
$q->clear();
$q->addTable('sysvals');
$q->addInsert('sysval_key_id', 1);
$q->addInsert('sysval_title', 'RiskImpact');
$q->addInsert('sysval_value', "0|Not Specified\n1|Low\n2|Medium\n3|High\n4|Super High");
$q->exec();
$q->clear();
return true;
}
function remove() {
$q = new DBQuery;
$q->dropTable('risks');
$q->exec();
$q->clear();
$q->dropTable('risk_notes');
$q->exec();
$q->clear();
return true;
}
function upgrade() {
return null;
}
}
?>