Changeset 7779
- Timestamp:
- 05/30/09 08:07:14 (4 years ago)
- Files:
-
- contributed_modules/modules/bulkextensions/functions.inc.php (modified) (2 diffs)
- contributed_modules/modules/bulkextensions/module.xml (modified) (3 diffs)
- contributed_modules/modules/bulkextensions/page.bulkextensions.php (modified) (10 diffs)
- contributed_modules/modules/bulkextensions/table.csv (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/bulkextensions/functions.inc.php
r7778 r7779 1 1 <?php 2 //This file is part of FreePBX. 3 // 4 // FreePBX is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 2 of the License, or 7 // (at your option) any later version. 8 // 9 // FreePBX is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with FreePBX. If not, see <http://www.gnu.org/licenses/>. 16 // 17 // Copyright 2008 sasargen 18 // Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com 19 // 20 2 21 /* functions.inc.php - functions for BulkExtensions module. */ 3 22 include_once("modules/voicemail/functions.inc.php"); // for using voicemail module functions to retrieve voicemail settings … … 286 305 287 306 function generate_table_rows() { 288 $fh = fopen("modules/bulkextensions/table.csv", "r"); 289 if ($fh == NULL) { 290 return NULL; 307 $langcookie = $_COOKIE['lang']; 308 if (file_exists("modules/bulkextensions/i18n/$langcookie/LC_MESSAGES/table.csv")) { // check if translated file exists 309 $fh = fopen("modules/bulkextensions/i18n/$langcookie/LC_MESSAGES/table.csv", "r"); // open it 310 } else { // nope, no translated file was found, open the default one 311 $fh = fopen("modules/bulkextensions/table.csv", "r"); 312 } 313 if ($fh == NULL) { 314 return NULL; 291 315 } 292 316 $k = 0; contributed_modules/modules/bulkextensions/module.xml
r7778 r7779 3 3 <name>Bulk Extensions</name> 4 4 <description>Bulk Extensions uses CSV files to import and export extensions.</description> 5 <version>2.5.0. 5</version>5 <version>2.5.0.4</version> 6 6 <type>tool</type> 7 7 <category>Third Party Addon</category> … … 12 12 <version>ge2.5</version> 13 13 </depends> 14 <location> release/contributed_modules/bulkextensions-2.5.0.3.tgz</location>14 <location>contributed_modules/release/bulkextensions-2.5.0.4.tgz</location> 15 15 <info></info> 16 16 <changelog> 17 *2.5.0.5* Added Permit and Deny fields18 17 *2.5.0.4* No changes, re-publishing to get md5sum and location info updated 19 18 *2.5.0.3* Fixed bug - every notification email after the first one had increasing amounts of unwanted white space at the beginning of the message … … 27 26 *0.1* First release 28 27 </changelog> 29 <md5sum> 0be37625af7d972b7b726551df500549</md5sum>28 <md5sum>b48bbbe84441349953a097f1844b9ca7</md5sum> 30 29 </module> 31 30 contributed_modules/modules/bulkextensions/page.bulkextensions.php
r7778 r7779 1 1 <?php 2 //This file is part of FreePBX. 3 // 4 // FreePBX is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 2 of the License, or 7 // (at your option) any later version. 8 // 9 // FreePBX is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with FreePBX. If not, see <http://www.gnu.org/licenses/>. 16 // 17 // Copyright 2006 Seth Sargent, Steven Ward 18 // Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com 19 // 2 20 // This is a long running process, so extend time limit for execution. 3 21 // Typical PHP default is 30 seconds, but this only allows 100 to 200 … … 325 343 $vars["devinfo_mailbox"] = trim($aInfo[$aFields["devinfo_mailbox"][1]]); 326 344 } 327 345 328 346 if ($aFields["devinfo_deny"][0]) { 329 347 $vars["devinfo_deny"] = trim($aInfo[$aFields["devinfo_deny"][1]]); … … 808 826 } 809 827 828 829 echo "<h1>"._("Bulk Extensions")."</h1>"; 830 echo "<h2>"._("Manage Extensions in bulk using CSV files.")."</h2>"; 831 echo "<p>"; 832 833 echo sprintf(_("Start by downloading the %s Template CSV file %s (right-click > save as) or clicking the Export Extensions button."), "<a href=\"modules/bulkextensions/template.csv\">", "</a>"); 834 835 echo "<p>"; 836 837 echo _("Modify the CSV file to add, edit, or delete Extensions as desired. Then load the CSV file. After the CSV file is processed, the action taken for each row will be displayed."); 838 echo "<p>"; 839 echo "<b>"._("Bulk extension changes can take a long time to complete. It can take 30-60 seconds to add 100 extensions on a small system. However, on a system with 2000 extensions it can take about 5 minutes to add 100 new extensions.")."</b>"; 810 840 ?> 811 <h1>Bulk Extensions</h1>812 813 <h2>Manage Extensions in bulk using CSV files.</h2>814 815 <p>816 Start by downloading the817 <a href="modules/bulkextensions/template.csv">Template CSV file</a>818 (right-click > save as) or clicking the Export Extensions button.819 </p>820 <p>821 Modify the CSV file to add, edit, or delete Extensions as desired. Then load822 the CSV file. After the CSV file is processed, the action taken for each row823 will be displayed.824 </p>825 <p>826 <b>Bulk extension changes can take a long time to complete. It can take 30-60827 seconds to add 100 extensions on a small system. However, on a system with 2000828 extensions it can take about 5 minutes to add 100 new extensions.</b>829 </p>830 831 841 <form action="<?php $_SERVER["PHP_SELF"] ?>" name="uploadcsv" method="post" enctype="multipart/form-data"> 832 842 <input id="csv_type" name="csv_type" type="hidden" value="none" /> 833 <input type="submit" onclick="document.getElementById('csv_type').value='output';" value=" Export Extensions" />834 CSV File to Load: <input name="csvFile" type="file" />835 <input type="submit" onclick="document.getElementById('csv_type').value='input';" value=" Load File" />843 <input type="submit" onclick="document.getElementById('csv_type').value='output';" value="<?php echo _("Export Extensions")?>" /> 844 <?php echo _("CSV File to Load")?>: <input name="csvFile" type="file" /> 845 <input type="submit" onclick="document.getElementById('csv_type').value='input';" value="<?php echo _("Load File")?>" /> 836 846 <hr /> 837 <h3>Email Notification for New Accounts</h3> 838 <p> 839 By default, a notification email will be sent to the voicemail email address 840 set for each account added. The settings below can be used to control the 841 content and destination of the notification emails. 847 848 <?php 849 echo "<h3>"._("Email Notification for New Accounts")."</h3>"; 850 echo "<p>"; 851 echo _("By default, a notification email will be sent to the voicemail email address set for each account added.")."<br>"; 852 echo _(" The settings below can be used to control the content and destination of the notification emails."); 853 ?> 842 854 <table> 843 855 <tr> 844 856 <td> 845 857 <a href="#" class="info"> 846 Default Address: 847 <span> 848 If a Default Address is specified, notification emails 849 for new accounts without a voicemail email address will 850 be sent to the Default Address. 858 <?php echo _("Default Address:")?> 859 <span><?php echo _("If a Default Address is specified, notification emails for new accounts without a voicemail email address will be sent to the Default Address.")?> 851 860 </span> 852 861 </a> … … 859 868 <td> 860 869 <a href="#" class="info"> 861 Override Address: 862 <span> 863 If an Override Address is specified, all notification 864 emails will be sent to the Override Address only. Type 865 "noemail" (without the quotes) as the Override Address 866 to stop notification emails from being sent. 870 <?php echo _("Override Address:")?> 871 <span><?php echo _("If an Override Address is specified, all notification emails will be sent to the Override Address only. Type \"noemail\" (without the quotes) as the Override Address to stop notification emails from being sent.")?> 867 872 </span> 868 873 </a> … … 875 880 <td> 876 881 <a href="#" class="info"> 877 Email From:882 <?php echo _("Email From:")?> 878 883 <span> 879 The Email From header may be specified. If left blank, 880 the system default will be used. 884 <?php echo _("The Email From header may be specified. If left blank, the system default will be used.")?> 881 885 </span> 882 886 </a> … … 889 893 <td> 890 894 <a href="#" class="info"> 891 Email Reply-To:895 <?php echo _("Email Reply-To:")?> 892 896 <span> 893 The Email Reply-To header may be specified. If left blank, 894 the system default will be used. 897 <?php echo _("The Email Reply-To header may be specified. If left blank, the system default will be used.")?> 895 898 </span> 896 899 </a> … … 903 906 <td> 904 907 <a href="#" class="info"> 905 Email Subject:908 <?php echo _("Email Subject:")?> 906 909 <span> 907 The Email Subject may be specified. If left blank, the 908 default subject, "Voicemail Account Activated", will be 909 used. 910 <?php echo _("The Email Subject may be specified. If left blank, the default subject, \"Voicemail Account Activated\", will be used.")?> 910 911 </span> 911 912 </a> … … 918 919 <td> 919 920 <a href="#" class="info"> 920 Email Opening:921 <?php echo _("Email Opening:")?> 921 922 <span> 922 The Email Opening may be specified. If left blank, the 923 default opening, "Login information for your voicemail 924 account is as follows:", will be used. The account name, 925 extension, and voicemail password will automatically be 926 inserted after the opening. 923 <?php echo _("The Email Opening may be specified. If left blank, the default opening, \"Login information for your voicemail account is as follows:\", will be used.")?> 924 <?php echo _(" The account name, extension, and voicemail password will automatically be inserted after the opening.")?> 927 925 </span> 928 926 </a> … … 935 933 <td> 936 934 <a href="#" class="info"> 937 Email Closing:935 <?php echo _("Email Closing:")?> 938 936 <span> 939 The Email Closing may be specified. If any text is 940 entered, it will be inserted at the end of the email. 937 <?php echo _("The Email Closing may be specified. If any text is entered, it will be inserted at the end of the email.")?> 941 938 </span> 942 939 </a> … … 949 946 </form> 950 947 <hr /> 951 <h3>Bulk Extensions CSV File Columns</h3> 952 <p> 953 The table below explains each column in the CSV file. You can change the column 954 order of the CSV file as you like, however, the column names must be preserved. 955 </p> 956 <?php 948 <?php 949 echo "<h3>"._("Bulk Extensions CSV File Columns")."</h3><p>"; 950 echo _("The table below explains each column in the CSV file. You can change the column order of the CSV file as you like, however, the column names must be preserved.")."<p>"; 957 951 print $table_output; 958 952 } contributed_modules/modules/bulkextensions/table.csv
r7778 r7779 8 8 "callwaiting","enabled","enabled, disabled","Call Waiting","Set the initial/current Call Waiting state for this user's extension." 9 9 "call_screen","0","0, nomemory, memory","Call Screening","Call Screening requires external callers to say their name, which will be played back to the user and allow the user to accept or reject the call. Screening with memory only verifies a caller for their caller-id once. Screening without memory always requires a caller to say their name. Either mode will always announce the caller based on the last introduction saved with that callerid. If any user on the system uses the memory option, when that user is called, the caller will be required to re-introduce themselves and all users on the system will have that new introduction associated with the caller's CallerId.Set the initial/current Call Waiting state for this user's extension." 10 "password",,,, ,"For logging in and out of devices in deviceanduser mode, not available on Extensions page."10 "password",,,,"For logging in and out of devices in deviceanduser mode, not available on Extensions page." 11 11 "emergency_cid",,,"Emergency CID","This caller id will always be set when dialing out an Outbound Route flagged as Emergency. The Emergency CID overrides all other caller id settings." 12 12 "tech",,"sip, iax2, zap, custom",,"Device channel type."
