Magellan Linux

Annotation of /mcore-src/trunk/mcore-tools/src/modules/helpdesk/helpdesk.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2720 - (hide annotations) (download)
Fri Dec 18 14:13:48 2015 UTC (8 years, 4 months ago) by niro
File size: 1132 byte(s)
-make the helpdesk information configurable via the global database
1 niro 2720 # $Id$
2    
3     provide helpdesk
4    
5     push_config 05_helpdesk_unit
6     push_config 05_helpdesk_phone
7    
8     help_helpdesk_unit()
9     {
10     local serial="${CLASS_ARGV[0]}"
11     control_client "${serial}" help helpdesk.unit
12     }
13    
14     help_helpdesk_phone()
15     {
16     local serial="${CLASS_ARGV[0]}"
17     control_client "${serial}" help helpdesk.phone
18     }
19    
20     control_helpdesk_unit()
21     {
22     local serial="${CLASS_ARGV[0]}"
23     push_config_05_helpdesk_unit "${serial}"
24     }
25    
26     control_helpdesk_phone()
27     {
28     local serial="${CLASS_ARGV[0]}"
29     push_config_05_helpdesk_phone "${serial}"
30     }
31    
32     push_config_05_helpdesk_unit()
33     {
34     local serial="$1"
35     local value
36    
37     value=$(mysqldo "select client_locations.helpdesk_unit from client_serials inner join client_locations on client_serials.location=client_locations.location where serial='${serial}'")
38     control_client "${serial}" set helpdesk.unit "${value}"
39     }
40    
41     push_config_05_helpdesk_phone()
42     {
43     local serial="$1"
44     local value
45    
46     value=$(mysqldo "select client_locations.helpdesk_phone from client_serials inner join client_locations on client_serials.location=client_locations.location where serial='${serial}'")
47     control_client "${serial}" set helpdesk.phone "${value}"
48     }