Subversion Repositories computer_asset_manager_v1

Rev

Rev 50 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 50 Rev 51
Line 18... Line 18...
18
   name text comment 'name of the license',
18
   name text comment 'name of the license',
19
   primary key ( license_product_id )
19
   primary key ( license_product_id )
20
) comment 'a list of all products we track license for';
20
) comment 'a list of all products we track license for';
21
 
21
 
22
/* set up the _system table to plug in the module */
22
/* set up the _system table to plug in the module */
23
delete from _system where key_name = 'License';
-
 
24
/* this is required, and officially installs the module */
23
/* this is required, and officially installs the module */
25
insert into _system ( group_name,key_name,theValue,added_date) values ( 'Modules', 'License', 'modules/license/', now() );
24
insert into _system ( group_name,key_name,theValue,added_date) values ( 'Modules', 'License', 'modules/license/', now() );
26
/* we will provide data to the main screen via a callback routine. In this case, function view is located in callable.php */
25
/* we will provide data to the main screen via a callback routine. In this case, function view is located in callable.php */
27
insert into _system( group_name,key_name,theValue,added_date ) values ( 'device view', 'License', 'callable.php:licenseView', now() );
26
insert into _system( group_name,key_name,theValue,added_date ) values ( 'device view', 'License', 'callable.php:licenseView', now() );
28
 
27
 
29
/* This has a menu entry, so add it */
28
/* This has a menu entry, so add it */
30
/* first, make sure we don't have any danglies */
29
/* first, make sure we don't have any danglies */
31
delete from menu 
-
 
32
where 
-
 
33
   menu.parent_id in 
-
 
34
      ( select menu_id 
-
 
35
        from ( 
-
 
36
           select distinct a.menu_id as menu_id 
-
 
37
           from menu a join menu b on a.menu_id = b.menu_id 
-
 
38
           where a.caption = 'Licenses' 
-
 
39
           ) 
-
 
40
      as c );
-
 
41
delete from menu where caption = 'Licenses';
-
 
42
/* create three menu options. First one is the main menu option (ie, no parent_id) */
30
/* create three menu options. First one is the main menu option (ie, no parent_id) */
43
insert into menu( url, caption, parent_id) values ('/modules/license/', 'Licenses', null);
31
insert into menu( url, caption, parent_id) values ('/modules/license/', 'Licenses', null);
44
/* two additional menu options for bulk_load and editing the license_product table */
32
/* two additional menu options for bulk_load and editing the license_product table */
45
insert into menu( url,caption,parent_id) select '/modules/license/bulk_load.html','Bulk Load',menu_id from menu where caption = 'Licenses';
33
insert into menu( url,caption,parent_id) select '/modules/license/bulk_load.html','Bulk Load',menu_id from menu where caption = 'Licenses';
46
insert into menu( url,caption,parent_id) select '/modules/license/edit_license_product.html','Edit Products',menu_id from menu where caption = 'Licenses';
34
insert into menu( url,caption,parent_id) select '/modules/license/edit_license_product.html','Edit Products',menu_id from menu where caption = 'Licenses';