Changeset 7778
- Timestamp:
- 05/30/09 06:48:40 (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
r7579 r7778 1 1 <?php 2 //This file is part of FreePBX.3 //4 // FreePBX is free software: you can redistribute it and/or modify5 // it under the terms of the GNU General Public License as published by6 // the Free Software Foundation, either version 2 of the License, or7 // (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 of11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12 // GNU General Public License for more details.13 //14 // You should have received a copy of the GNU General Public License15 // along with FreePBX. If not, see <http://www.gnu.org/licenses/>.16 //17 // Copyright 2008 sasargen18 // Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com19 //20 21 2 /* functions.inc.php - functions for BulkExtensions module. */ 22 3 include_once("modules/voicemail/functions.inc.php"); // for using voicemail module functions to retrieve voicemail settings … … 305 286 306 287 function generate_table_rows() { 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; 288 $fh = fopen("modules/bulkextensions/table.csv", "r"); 289 if ($fh == NULL) { 290 return NULL; 315 291 } 316 292 $k = 0; contributed_modules/modules/bulkextensions/module.xml
r7497 r7778 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. 4</version>5 <version>2.5.0.5</version> 6 6 <type>tool</type> 7 7 <category>Third Party Addon</category> … … 12 12 <version>ge2.5</version> 13 13 </depends> 14 <location> contributed_modules/release/bulkextensions-2.5.0.4.tgz</location>14 <location>release/contributed_modules/bulkextensions-2.5.0.3.tgz</location> 15 15 <info></info> 16 16 <changelog> 17 *2.5.0.5* Added Permit and Deny fields 17 18 *2.5.0.4* No changes, re-publishing to get md5sum and location info updated 18 19 *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 … … 26 27 *0.1* First release 27 28 </changelog> 28 <md5sum> b48bbbe84441349953a097f1844b9ca7</md5sum>29 <md5sum>0be37625af7d972b7b726551df500549</md5sum> 29 30 </module> 30 31 contributed_modules/modules/bulkextensions/page.bulkextensions.php
r7579 r7778 1 1 <?php 2 //This file is part of FreePBX.3 //4 // FreePBX is free software: you can redistribute it and/or modify5 // it under the terms of the GNU General Public License as published by6 // the Free Software Foundation, either version 2 of the License, or7 // (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 of11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12 // GNU General Public License for more details.13 //14 // You should have received a copy of the GNU General Public License15 // along with FreePBX. If not, see <http://www.gnu.org/licenses/>.16 //17 // Copyright 2006 Seth Sargent, Steven Ward18 // Portions Copyright 2009 Mikael Carlsson, mickecamino@gmail.com19 //20 2 // This is a long running process, so extend time limit for execution. 21 3 // Typical PHP default is 30 seconds, but this only allows 100 to 200 … … 343 325 $vars["devinfo_mailbox"] = trim($aInfo[$aFields["devinfo_mailbox"][1]]); 344 326 } 345 327 346 328 if ($aFields["devinfo_deny"][0]) { 347 329 $vars["devinfo_deny"] = trim($aInfo[$aFields["devinfo_deny"][1]]); … … 826 808 } 827 809 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>";840 810 ?> 811 <h1>Bulk Extensions</h1> 812 813 <h2>Manage Extensions in bulk using CSV files.</h2> 814 815 <p> 816 Start by downloading the 817 <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 load 822 the CSV file. After the CSV file is processed, the action taken for each row 823 will be displayed. 824 </p> 825 <p> 826 <b>Bulk extension changes can take a long time to complete. It can take 30-60 827 seconds to add 100 extensions on a small system. However, on a system with 2000 828 extensions it can take about 5 minutes to add 100 new extensions.</b> 829 </p> 830 841 831 <form action="<?php $_SERVER["PHP_SELF"] ?>" name="uploadcsv" method="post" enctype="multipart/form-data"> 842 832 <input id="csv_type" name="csv_type" type="hidden" value="none" /> 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")?>" />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" /> 846 836 <hr /> 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 ?> 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. 854 842 <table> 855 843 <tr> 856 844 <td> 857 845 <a href="#" class="info"> 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.")?> 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. 860 851 </span> 861 852 </a> … … 868 859 <td> 869 860 <a href="#" class="info"> 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.")?> 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. 872 867 </span> 873 868 </a> … … 880 875 <td> 881 876 <a href="#" class="info"> 882 <?php echo _("Email From:")?>877 Email From: 883 878 <span> 884 <?php echo _("The Email From header may be specified. If left blank, the system default will be used.")?> 879 The Email From header may be specified. If left blank, 880 the system default will be used. 885 881 </span> 886 882 </a> … … 893 889 <td> 894 890 <a href="#" class="info"> 895 <?php echo _("Email Reply-To:")?>891 Email Reply-To: 896 892 <span> 897 <?php echo _("The Email Reply-To header may be specified. If left blank, the system default will be used.")?> 893 The Email Reply-To header may be specified. If left blank, 894 the system default will be used. 898 895 </span> 899 896 </a> … … 906 903 <td> 907 904 <a href="#" class="info"> 908 <?php echo _("Email Subject:")?>905 Email Subject: 909 906 <span> 910 <?php echo _("The Email Subject may be specified. If left blank, the default subject, \"Voicemail Account Activated\", will be used.")?> 907 The Email Subject may be specified. If left blank, the 908 default subject, "Voicemail Account Activated", will be 909 used. 911 910 </span> 912 911 </a> … … 919 918 <td> 920 919 <a href="#" class="info"> 921 <?php echo _("Email Opening:")?>920 Email Opening: 922 921 <span> 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.")?> 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. 925 927 </span> 926 928 </a> … … 933 935 <td> 934 936 <a href="#" class="info"> 935 <?php echo _("Email Closing:")?>937 Email Closing: 936 938 <span> 937 <?php echo _("The Email Closing may be specified. If any text is entered, it will be inserted at the end of the email.")?> 939 The Email Closing may be specified. If any text is 940 entered, it will be inserted at the end of the email. 938 941 </span> 939 942 </a> … … 946 949 </form> 947 950 <hr /> 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>"; 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 951 957 print $table_output; 952 958 } contributed_modules/modules/bulkextensions/table.csv
r7542 r7778 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."
