Changeset 10376
- Timestamp:
- 10/08/10 14:02:11 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r10286 r10376 12 12 //GNU General Public License for more details. 13 13 14 //include all ne sesary classes TODO: inlcude them dynamicaly as needed14 //include all necessary classes TODO: include them dynamically as needed 15 15 require_once( (defined('AMP_BASE_INCLUDE_PATH') ? AMP_BASE_INCLUDE_PATH.'/' : '').'libraries/config.functions.php'); 16 16 require_once( (defined('AMP_BASE_INCLUDE_PATH') ? AMP_BASE_INCLUDE_PATH.'/' : '').'libraries/featurecodes.class.php'); … … 113 113 return true; 114 114 } else if (isset($astman) && $astman->connected()) { 115 // earlier revisions of 1.4 a hd dadhi loaded but still running as zap, so if ZapScan is present, we assume115 // earlier revisions of 1.4 and dahdi loaded but still running as zap, so if ZapScan is present, we assume 116 116 // that is the mode it is running in. 117 117 $response = $astman->send_request('Command', array('Command' => 'show applications like ZapScan')); … … 171 171 172 172 if (!function_exists('version_compare_freepbx')) { 173 /* ver ison_compare that works with freePBX version numbers173 /* version_compare that works with FreePBX version numbers 174 174 */ 175 175 function version_compare_freepbx($version1, $version2, $op = null) { … … 261 261 exec($retrieve, $output, $exit_val); 262 262 263 // retri ve_conf html output263 // retrieve_conf html output 264 264 $return['retrieve_conf'] = 'exit: '.$exit_val.'<br/>'.implode('<br/>',$output); 265 265 … … 357 357 358 358 // draw list for users and devices with paging 359 // $skip has been d precated, used to be used to page-enate359 // $skip has been deprecated, used to be used to page-enate 360 360 function drawListMenu($results, $skip, $type, $dispnum, $extdisplay, $description=false) { 361 361 … … 688 688 * $goto is the current goto destination setting 689 689 * $i is the destination set number (used when drawing multiple destination sets in a single form ie: digital receptionist) 690 * e snure that any form that includes this calls the setDestinations() javascript function on submit.690 * ensure that any form that includes this calls the setDestinations() javascript function on submit. 691 691 * ie: if the form name is "edit", and drawselects has been called with $i=2 then use onsubmit="setDestinations(edit,2)" 692 692 * $table specifies if the destinations will be drawn in a new <tr> and <td> … … 716 716 } 717 717 } 718 //sort destination alphabetical y718 //sort destination alphabetically 719 719 ksort($drawselect_destinations); 720 720 ksort($drawselects_module_hash); 721 721 } 722 //set vari bales as arrays for the rare (imposible?) case where there are none722 //set variables as arrays for the rare (impossible?) case where there are none 723 723 if(!isset($drawselect_destinations)){$drawselect_destinations=array();} 724 724 if(!isset($drawselects_module_hash)){$drawselects_module_hash = array();} … … 735 735 } 736 736 } 737 if($destmod==''){//if we hav nt found a match, display error dest737 if($destmod==''){//if we haven't found a match, display error dest 738 738 $destmod='Error'; 739 739 $drawselect_destinations['Error'][]=array('destination'=>$goto, 'description'=>'Bad Dest: '.$goto, 'class'=>'drawselect_error'); … … 749 749 /* We bind to the hosting module's domain. If we find the translation there we use it, if not 750 750 * we try the default 'amp' domain. If still no luck, we will try the _() which is the current 751 * module's display since some old translation code may have stored it local y but should migrate */751 * module's display since some old translation code may have stored it locally but should migrate */ 752 752 bindtextdomain($drawselects_module_hash[$mod],"modules/".$drawselects_module_hash[$mod]."/i18n"); 753 753 bind_textdomain_codeset($drawselects_module_hash[$mod], 'utf8'); … … 763 763 764 764 //draw "children" select boxes 765 $tabindexhtml=' tabindex="'.++$tabindex.'"';//keep out of the foreach so that we don t increment it765 $tabindexhtml=' tabindex="'.++$tabindex.'"';//keep out of the foreach so that we don't increment it 766 766 foreach($drawselect_destinations as $cat=>$destination){ 767 767 $style=(($cat==$destmod)?'':'display:none;'); … … 867 867 * @param string debug message to be printed 868 868 * @param string optional mode, default 'a' 869 * @param string opti nal filename, default /tmp/freepbx_debug.log869 * @param string optional filename, default /tmp/freepbx_debug.log 870 870 */ 871 871 function freepbx_debug($string, $option='a', $filename='/tmp/freepbx_debug.log') { … … 880 880 } 881 881 /* 882 * FreePBX Debug ing function882 * FreePBX Debugging function 883 883 * This function can be called as follows: 884 884 * dbug() - will just print a time stamp to the debug log file ($amp_conf['FPBXDBUGFILE']) … … 1036 1036 * 1037 1037 */ 1038 function redirect_standard( /* Note. Read the next line. Var aible No of Paramas */ ) {1038 function redirect_standard( /* Note. Read the next line. Variable No of Params */ ) { 1039 1039 $args = func_get_Args(); 1040 1040 … … 1048 1048 } 1049 1049 1050 function redirect_standard_continue( /* Note. Read the next line. Varaible No of Param as */ ) {1050 function redirect_standard_continue( /* Note. Read the next line. Varaible No of Params */ ) { 1051 1051 $args = func_get_Args(); 1052 1052 … … 1063 1063 //expects a returned array which minimally includes 'context' => the actual context to include 1064 1064 //can also define 'description' => the display for this context - if undefined will be set to 'context' 1065 //'module' => the display for the section this should be listed under defaults to mod lue display (can be used to group subsets within one module)1065 //'module' => the display for the section this should be listed under defaults to module display (can be used to group subsets within one module) 1066 1066 //'parent' => if including another context automatically includes this one, list the parent context 1067 1067 //'priority' => default sort order for includes range -50 to +50, 0 is default
