-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.php
More file actions
68 lines (60 loc) · 1.81 KB
/
Copy pathsetup.php
File metadata and controls
68 lines (60 loc) · 1.81 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
<?php
/*
* Name: History
* Directory: history
* Version: 0.1
* Class: user
* UI Name: History
* UI Icon:
*/
// MODULE CONFIGURATION DEFINITION
$config = array();
$config['mod_name'] = 'Document Management';
$config['mod_version'] = '0.1';
$config['mod_directory'] = 'mngdocument';
$config['mod_setup_class'] = 'CSetupMngDocument';
$config['mod_type'] = 'user';
$config['mod_ui_name'] = 'Document Management';
$config['mod_ui_icon'] = 'folder5.png';
$config['mod_description'] = 'A module for Document Management';
$config['permissions_item_table'] = 'SGD';
$config['permissions_item_field'] = 'SGD_id';
$config['permissions_item_label'] = 'SGD_name';
$config['mod_ui_active'] = 1;
if (@$a == 'setup') {
echo dPshowModuleConfig( $config );
}
class CSetupMngDocument {
function install() {
$sql = "CREATE TABLE SGD (" .
"SGD_id int(11) NOT NULL auto_increment," .
"SGD_name varchar(50) NOT NULL default ''," .
"SGD_description varchar(250) default NULL," .
"SGD_type tinyint(4) NOT NULL default '0'," .
"SGD_date varchar(16) NOT NULL default ''," .
"SGD_parent int(11) NOT NULL default '0'," .
"SGD_state tinyint(4) NOT NULL default '0'," .
"PRIMARY KEY (SGD_id)" .
") TYPE=MyISAM;";
db_exec( $sql );
$sql = "CREATE TABLE SGD_Logs (" .
"SGD_Logs_id int(11) NOT NULL auto_increment," .
"SGD_Logs_document_name varchar(50) NOT NULL default ''," .
"SGD_Logs_user_id int(11) NOT NULL default '0'," .
"SGD_Logs_date varchar(20) NOT NULL default ''," .
"SGD_Logs_action varchar(20) NOT NULL default ''," .
"PRIMARY KEY (SGD_Logs_id)" .
") TYPE=MyISAM;";
db_exec( $sql );
return null;
}
function remove() {
db_exec( "DROP TABLE SGD" );
db_exec( "DROP TABLE SGD_Logs" );
return null;
}
function upgrade() {
return null;
}
}
?>