forked from PluginsOCSInventory-NG/sharedFolders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.php
35 lines (30 loc) · 996 Bytes
/
install.php
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
<?php
function plugin_version_sharedfolder()
{
return array('name' => 'sharedfolder',
'version' => '1.0',
'author'=> 'Benoit SARDA, Valentin DEVILLE',
'license' => 'GPLv2',
'verMinOcs' => '2.2');
}
function plugin_init_sharedfolder()
{
$object = new plugins;
$object -> add_cd_entry("sharedfolder","config");
$object -> sql_query("CREATE TABLE IF NOT EXISTS `sharedfolders` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`HARDWARE_ID` INT(11) NOT NULL,
`ShareName` VARCHAR(256) DEFAULT NULL,
`SharePath` VARCHAR(256) DEFAULT NULL,
`ShareType` VARCHAR(8) DEFAULT NULL,
`ShareDesc` VARCHAR(256) DEFAULT NULL,
PRIMARY KEY (`ID`,`HARDWARE_ID`)
) ENGINE=INNODB;"
);
}
function plugin_delete_sharedfolder()
{
$object = new plugins;
$object -> del_cd_entry("sharedfolder");
$object -> sql_query("DROP TABLE `sharedfolders`");
}