root/modules/branches/2.3/featurecodeadmin/page.featurecodeadmin.php

Revision 3589, 5.6 kB (checked in by qldrob, 5 years ago)

Merged revisions 3329-3354,3357-3358,3361-3384,3387-3439,3441-3464,3466-3468,3470-3473,3475-3484,3486-3526,3529-3588 via svnmerge from
https://amportal.svn.sourceforge.net/svnroot/amportal/modules/branches/2.2

........

r3344 | qldrob | 2006-12-18 14:56:53 +1000 (Mon, 18 Dec 2006) | 2 lines


Fix bad XML ampersand

........

r3346 | qldrob | 2006-12-18 15:09:53 +1000 (Mon, 18 Dec 2006) | 1 line


Module Publish Script: dictate 1.1.1

........

r3375 | gregmac | 2006-12-20 09:56:54 +1000 (Wed, 20 Dec 2006) | 2 lines


Updated for changes in r3372

........

r3377 | gregmac | 2006-12-20 10:10:12 +1000 (Wed, 20 Dec 2006) | 1 line


Module Publish Script: ivr 2.5.2

........

r3378 | gregmac | 2006-12-20 10:10:28 +1000 (Wed, 20 Dec 2006) | 1 line


Module Publish Script: queues 2.2.3

........

r3379 | gregmac | 2006-12-20 10:30:28 +1000 (Wed, 20 Dec 2006) | 2 lines


Misc apps module

........

r3380 | gregmac | 2006-12-20 10:30:53 +1000 (Wed, 20 Dec 2006) | 1 line


Module Publish Script: miscapps 0.1

........

r3381 | qldrob | 2006-12-20 10:34:09 +1000 (Wed, 20 Dec 2006) | 1 line


Module Publish Script: pbdirectory 0.3

........

r3382 | qldrob | 2006-12-20 10:36:22 +1000 (Wed, 20 Dec 2006) | 2 lines


Fix <version> being incorrectly picked up.

........

r3394 | gregmac | 2006-12-21 10:42:37 +1000 (Thu, 21 Dec 2006) | 2 lines


Fixed URL, added description

........

r3401 | p_lindheimer | 2006-12-21 13:10:09 +1000 (Thu, 21 Dec 2006) | 1 line


merged r3308, r3317, r3396 from 2.3 - NODEST and BLKVM related fixes

........

r3402 | p_lindheimer | 2006-12-21 13:10:38 +1000 (Thu, 21 Dec 2006) | 1 line


Module Publish Script: findmefollow 2.4.7

........

r3403 | p_lindheimer | 2006-12-21 13:10:43 +1000 (Thu, 21 Dec 2006) | 1 line


Module Publish Script: ringgroups 2.2.11

........

r3404 | p_lindheimer | 2006-12-21 13:10:46 +1000 (Thu, 21 Dec 2006) | 1 line


Module Publish Script: queues 2.2.5

........

r3405 | p_lindheimer | 2006-12-21 13:10:52 +1000 (Thu, 21 Dec 2006) | 1 line


Module Publish Script: backup 2.0.3

........

r3423 | p_lindheimer | 2006-12-26 03:59:58 +1000 (Tue, 26 Dec 2006) | 1 line


remove # on nnn# included in group list where nnn is the extention of the list itself, which gives an infinite loop

........

r3426 | p_lindheimer | 2006-12-26 04:00:40 +1000 (Tue, 26 Dec 2006) | 1 line


Module Publish Script: ringgroups 2.2.12

........

r3427 | p_lindheimer | 2006-12-26 04:00:43 +1000 (Tue, 26 Dec 2006) | 1 line


Module Publish Script: ringgroups 2.2.12

........

r3428 | p_lindheimer | 2006-12-26 04:54:07 +1000 (Tue, 26 Dec 2006) | 1 line


error in version numbers creating upgrade problems

........

r3429 | p_lindheimer | 2006-12-26 04:54:37 +1000 (Tue, 26 Dec 2006) | 1 line


Module Publish Script: findmefollow 2.4.8

........

r3442 | qldrob | 2007-01-02 12:32:34 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: backup 2.0.4

........

r3443 | qldrob | 2007-01-02 12:32:43 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: blacklist 1.1.1

........

r3444 | qldrob | 2007-01-02 12:32:54 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: callback 1.3.1

........

r3445 | qldrob | 2007-01-02 12:33:03 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: cidlookup 1.1.1

........

r3446 | qldrob | 2007-01-02 12:33:18 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: conferences 1.1.2

........

r3447 | qldrob | 2007-01-02 12:33:28 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: customerdb 1.2.3

........

r3448 | qldrob | 2007-01-02 12:33:38 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: disa 2.2.1

........

r3449 | qldrob | 2007-01-02 12:33:48 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: featurecodeadmin 1.0.3

........

r3450 | qldrob | 2007-01-02 12:34:07 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: findmefollow 2.4.9

........

r3451 | qldrob | 2007-01-02 12:34:16 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: gabcast 1.2.3

........

r3452 | qldrob | 2007-01-02 12:34:27 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: inventorydb 1.0.3

........

r3453 | qldrob | 2007-01-02 12:35:08 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: irc 1.1.1

........

r3454 | qldrob | 2007-01-02 12:35:21 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: ivr 2.5.3

........

r3455 | qldrob | 2007-01-02 12:35:29 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: miscdests 1.3.2

........

r3456 | qldrob | 2007-01-02 12:35:39 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: music 1.3.2

........

r3457 | qldrob | 2007-01-02 12:35:50 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: paging 1.6.3

........

r3458 | qldrob | 2007-01-02 12:35:58 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: parking 2.0.2

........

r3459 | qldrob | 2007-01-02 12:36:08 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: pinsets 1.0.12

........

r3460 | qldrob | 2007-01-02 12:36:18 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: printextensions 1.3.1

........

r3461 | qldrob | 2007-01-02 12:36:28 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: queues 2.2.6

........

r3462 | qldrob | 2007-01-02 12:36:39 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: recordings 3.2.4

........

r3463 | qldrob | 2007-01-02 12:36:54 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: ringgroups 2.2.13

........

r3464 | qldrob | 2007-01-02 12:37:06 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: timeconditions 2.4.1

........

r3466 | qldrob | 2007-01-02 21:14:35 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: backup 2.1

........

r3471 | qldrob | 2007-01-02 21:38:36 +1000 (Tue, 02 Jan 2007) | 2 lines


xml update

........

r3472 | qldrob | 2007-01-02 21:38:46 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: music 1.4

........

r3475 | qldrob | 2007-01-02 21:42:40 +1000 (Tue, 02 Jan 2007) | 1 line


Module Publish Script: music 1.4.1

........

r3487 | qldrob | 2007-01-03 07:48:59 +1000 (Wed, 03 Jan 2007) | 1 line


Module Publish Script: miscapps 0.2

........

r3489 | qldrob | 2007-01-03 10:24:21 +1000 (Wed, 03 Jan 2007) | 2 lines


Change alert() to confirm() with better description when duplicate feature codes are in use. This makes it easier to have different featurecodes for other contexts. Ref #1595.

........

r3490 | qldrob | 2007-01-03 10:25:00 +1000 (Wed, 03 Jan 2007) | 1 line


Module Publish Script: featurecodeadmin 1.0.4

........

r3502 | gregmac | 2007-01-03 16:31:11 +1000 (Wed, 03 Jan 2007) | 2 lines


backport r3502 from 2.3

........

r3503 | gregmac | 2007-01-03 16:31:39 +1000 (Wed, 03 Jan 2007) | 1 line


Module Publish Script: music 1.4.2

........

r3505 | gregmac | 2007-01-03 16:49:59 +1000 (Wed, 03 Jan 2007) | 2 lines


Fix #1417

........

r3506 | gregmac | 2007-01-03 16:52:29 +1000 (Wed, 03 Jan 2007) | 1 line


Module Publish Script: ivr 2.5.4

........

r3508 | qldrob | 2007-01-03 17:13:07 +1000 (Wed, 03 Jan 2007) | 2 lines


Apply #1564, pinset being lost when routes are moved. Thanks, naftali5!

........

r3509 | qldrob | 2007-01-03 17:13:44 +1000 (Wed, 03 Jan 2007) | 1 line


Module Publish Script: pinsets 1.1

........

r3526 | qldrob | 2007-01-04 14:48:48 +1000 (Thu, 04 Jan 2007) | 2 lines


Change formatting a bit to make it look more like the other modules.

........

r3563 | gregmac | 2007-01-11 07:35:21 +1000 (Thu, 11 Jan 2007) | 3 lines


Initialized merge tracking via "svnmerge" with revisions "1-3256" from
https://amportal.svn.sourceforge.net/svnroot/amportal/modules/branches/2.3

........

r3564 | p_lindheimer | 2007-01-11 08:15:53 +1000 (Thu, 11 Jan 2007) | 1 line


fix #1651 with #1664: if ivr is used as a breakout menu for a queue, clear any voicemail blocks and treat the ivr as if the call was answered

........

r3565 | p_lindheimer | 2007-01-11 08:17:24 +1000 (Thu, 11 Jan 2007) | 1 line


oops - bumped revision number wrong

........

r3566 | p_lindheimer | 2007-01-11 08:17:34 +1000 (Thu, 11 Jan 2007) | 1 line


Module Publish Script: ivr 2.5.5

........

r3586 | qldrob | 2007-01-21 16:12:52 +1000 (Sun, 21 Jan 2007) | 2 lines


Stop assuming that uploaded recordings are .wav files, allow any supported asterisk format.

........

r3587 | qldrob | 2007-01-21 16:13:13 +1000 (Sun, 21 Jan 2007) | 1 line


Module Publish Script: recordings 3.3

........

  • Property svn:mime-type set to text/html
  • Property svn:eol-style set to native
Line 
1 <?php
2 // Original Copyright (C) 2006 Niklas Larsson
3 // Re-written 20060331, Rob Thomas <xrobau@gmail.com>
4 //
5 //This program is free software; you can redistribute it and/or
6 //modify it under the terms of the GNU General Public License
7 //as published by the Free Software Foundation; either version 2
8 //of the License, or (at your option) any later version.
9 //
10 //This program is distributed in the hope that it will be useful,
11 //but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //GNU General Public License for more details.
14
15 $action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
16 $dispnum = "featurecodeadmin"; //used for switch on config.php
17
18 //if submitting form, update database
19 switch ($action) {
20   case "save":
21     featurecodeadmin_update($_REQUEST);
22     needreload();
23   break;
24 }
25
26 $featurecodes = featurecodes_getAllFeaturesDetailed();
27 ?>
28
29 </div>
30
31 <div class="content">
32   <form autocomplete="off" name="frmAdmin" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return frmAdmin_onsubmit();">
33   <input type="hidden" name="display" value="<?php echo $dispnum?>">
34     <input type="hidden" name="action" value="save">
35   <table>
36   <tr><td colspan="4"><h3><?php echo _("Feature Code Admin"); ?><hr></h3></td></tr>
37   <tr>
38     <td colspan="2">&nbsp;</td>
39     <td align="center"><b><?php echo _("Use"); ?><br><?php echo _("Default"); ?>?</b></td>
40     <td align="center"><b><?php echo _("Feature"); ?><br><?php echo _("Status"); ?></b></td>
41   </tr>
42   <?php
43   $currentmodule = "(none)";
44   foreach($featurecodes as $item) {
45     $moduledesc = isset($item['moduledescription'])?_($item['moduledescription']):null;
46     $moduleena = ($item['moduleenabled'] == 1 ? true : false);
47
48     $featuredesc = _($item['featuredescription']);
49     $featureid = $item['modulename'] . '#' . $item['featurename'];
50     $featureena = ($item['featureenabled'] == 1 ? true : false);
51     $featurecodedefault = (isset($item['defaultcode']) ? $item['defaultcode'] : '');
52     $featurecodecustom = (isset($item['customcode']) ? $item['customcode'] : '');
53     
54     if ($currentmodule != $moduledesc) {
55       $currentmodule = $moduledesc;
56       ?>
57       <tr>
58         <td colspan="4">
59           <h4>
60           <?php echo $currentmodule; ?>
61           <?php if ($moduleena == false) {?>
62           <i>(<?php echo _("Disabled"); ?>)</i>
63           <?php } ?>
64           </h4>
65         </td>
66       </tr>
67       <?php
68     }
69     ?> 
70     <tr>
71       <td>
72         <?php echo $featuredesc; ?>
73       </td>
74       <td>
75         <input type="text" name="custom#<?php echo $featureid; ?>" value="<?php echo $featurecodecustom; ?>" size="4">
76       </td>
77       <td align="center">
78         <input type="checkbox" onclick="usedefault_onclick(this);" name="usedefault_<?php echo $featureid; ?>"<?php if ($featurecodecustom == '') echo "checked"; ?>>
79         <input type="hidden" name="default_<?php echo $featureid; ?>" value="<?php echo $featurecodedefault; ?>">
80         <input type="hidden" name="origcustom_<?php echo $featureid; ?>" value="<?php echo $featurecodecustom; ?>">
81       </td>
82       <td>
83         <select name="ena#<?php echo $featureid; ?>">
84         <option <?php if ($featureena == true) echo ("selected "); ?>value="1"><?php echo _("Enabled"); ?></option>
85         <option <?php if ($featureena == false) echo ("selected "); ?>value="0"><?php echo _("Disabled"); ?></option>
86         </select>
87       </td>
88     </tr>
89     <?php
90   }
91  ?>
92   <tr>
93     <td colspan="4"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>   
94   </tr>
95   </table>
96
97   <script language="javascript">
98   <!--
99  
100   var theForm = document.frmAdmin;
101  
102   callallusedefaults();
103  
104   // call the onclick function for all the Use Default boxes
105   function callallusedefaults() {
106     for (var i=0; i<theForm.elements.length; i++) {
107       var theFld = theForm.elements[i];
108       if (theFld.name.substring(0,11) == "usedefault_") {
109         usedefault_onclick(theFld);
110       }
111     }
112   }
113    
114   // disabled the custom code box if using default and also puts the default number in the box
115   function usedefault_onclick(chk) {
116     var featureid = chk.name.substring(11);
117     if (chk.checked) {
118       theForm.elements['origcustom_' + featureid].value = theForm.elements['custom#' + featureid].value;     
119       theForm.elements['custom#' + featureid].value = theForm.elements['default_' + featureid].value;
120     } else {
121       theForm.elements['custom#' + featureid].value = theForm.elements['origcustom_' + featureid].value;
122     }
123     theForm.elements['custom#' + featureid].readOnly = chk.checked;
124   }
125  
126   // form validation
127   function frmAdmin_onsubmit() {
128     var msgErrorMissingFC = "<?php echo _("Please enter a Feature Code or check Use Default for all Enabled Feature Codes"); ?>";
129     var msgErrorDuplicateFC = "<?php echo _("Feature Codes have been duplicated"); ?>";
130     var msgErrorProceedOK = "<?php echo _("Are you sure you wish to proceed?"); ?>";
131    
132     for (var i=0; i<theForm.elements.length; i++) {
133       var theFld = theForm.elements[i];
134       if (theFld.name.substring(0,7) == "custom#") {
135         var featureid = theFld.name.substring(7);
136         // check that every non default has a custom code
137         if (!theForm.elements['usedefault_' + featureid].checked && theForm.elements['ena#' + featureid].value == 1) {
138           defaultEmptyOK = false;
139           if (!isDialDigits(theFld.value))
140             return warnInvalid(theFld, msgErrorMissingFC);
141            
142           if (isDuplicated(theFld.name, theFld.value))
143             return confirm(msgErrorDuplicateFC+".  "+msgErrorProceedOK);
144         }
145       }
146     }
147    
148    
149     return true;
150   }
151
152   function isDuplicated(firstfldname, firstfc) {
153     for (var i=0; i<theForm.elements.length; i++) {
154       var theFld = theForm.elements[i];
155       if (theFld.name.substring(0,7) == "custom#" && theFld.name != firstfldname) {
156         if (theFld.value == firstfc)
157           return true;
158       }
159     }
160   }
161  
162   //-->
163   </script>
164  
165   </form>
Note: See TracBrowser for help on using the browser.