Changeset 10227
- Timestamp:
- 08/25/10 00:48:05 (1 year ago)
- Files:
-
- contributed_modules/modules/endpointman/functions.inc.php (modified) (2 diffs)
- contributed_modules/modules/endpointman/includes/advanced.inc (modified) (1 diff)
- contributed_modules/modules/endpointman/includes/brand_model_manager.inc (modified) (2 diffs)
- contributed_modules/modules/endpointman/includes/devices_manager.inc (modified) (2 diffs)
- contributed_modules/modules/endpointman/includes/functions.inc (modified) (14 diffs)
- contributed_modules/modules/endpointman/includes/installer.php (modified) (1 diff)
- contributed_modules/modules/endpointman/includes/template_manager.inc (modified) (2 diffs)
- contributed_modules/modules/endpointman/install.php (modified) (10 diffs)
- contributed_modules/modules/endpointman/module.xml (modified) (2 diffs)
- contributed_modules/modules/endpointman/templates/advanced_settings_poce.html (modified) (2 diffs)
- contributed_modules/modules/endpointman/templates/brand_model_manager.html (modified) (1 diff)
- contributed_modules/modules/endpointman/templates/devices_manager.html (modified) (1 diff)
- contributed_modules/modules/endpointman/templates/global_footer.html (modified) (1 diff)
- contributed_modules/modules/endpointman/templates/template_editor.html (modified) (3 diffs)
- contributed_modules/modules/endpointman/templates/template_manager.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/endpointman/functions.inc.php
r10220 r10227 27 27 function endpointman_configpageinit($pagename) { 28 28 global $currentcomponent; 29 30 endpointman_applyhooks(); 29 endpointman_applyhooks(); 31 30 } 32 31 function endpointman_applyhooks() { … … 47 46 // Don't display this stuff it it's on a 'This xtn has been deleted' page. 48 47 if ($action != 'del') { 49 $langcode = languages_user_get($extdisplay);50 48 $section = _('End Point Manager'); 51 49 $msgInvalidLanguage = _('Please enter a valid Lajnguage Code'); 52 //$currentcomponent->addguielem($section, new gui_textbox(' langcode', $langcode, _('Language Code'), _('This will cause all messages and voice prompts to use the selected language if installed.'), "!isFilename()", $msgInvalidLanguage, true),9);50 //$currentcomponent->addguielem($section, new gui_textbox('brand', $langcode, _('Language Code'), _('This will cause all messages and voice prompts to use the selected language if installed.'), "!isFilename()", $msgInvalidLanguage, true),9); 53 51 //$currentcomponent->addguielem($section, "",9); 54 52 contributed_modules/modules/endpointman/includes/advanced.inc
r10220 r10227 275 275 $endpoint->db->query($sql); 276 276 } 277 if( isset($_REQUEST['temp_file'])) {277 if(1 == 0) { 278 278 $file = $_REQUEST['temp_file']; 279 279 contributed_modules/modules/endpointman/includes/brand_model_manager.inc
r10219 r10227 112 112 } 113 113 114 115 116 114 if (!isset($error)) { 117 115 $error = ""; … … 128 126 } 129 127 130 131 128 $tpl->assign("error", $error); 132 129 $tpl->assign("web_var", "?type=$type"); contributed_modules/modules/endpointman/includes/devices_manager.inc
r10220 r10227 282 282 } 283 283 284 $sql = 'SELECT endpointman_mac_list.id , endpointman_mac_list.mac , endpointman_model_list.model , endpointman_mac_list.ext , endpointman_mac_list.description , endpointman_brand_list.name, endpointman_mac_list.custom_cfg_data, endpointman_mac_list.custom_cfg_template FROM endpointman_mac_list , endpointman_model_list , endpointman_brand_list WHERE ( endpointman_model_list.id = endpointman_mac_list.model ) AND ( endpointman_model_list.brand = endpointman_brand_list.id )';284 $sql = 'SELECT endpointman_mac_list.id , endpointman_mac_list.mac , endpointman_model_list.model, endpointman_model_list.enabled , endpointman_mac_list.ext , endpointman_mac_list.description , endpointman_brand_list.name, endpointman_mac_list.custom_cfg_data, endpointman_mac_list.custom_cfg_template FROM endpointman_mac_list , endpointman_model_list , endpointman_brand_list WHERE ( endpointman_model_list.id = endpointman_mac_list.model ) AND ( endpointman_model_list.brand = endpointman_brand_list.id )'; 285 285 286 286 $devices_list =& $endpoint->db->getAll($sql,array(),DB_FETCHMODE_ASSOC); … … 300 300 $list[$i]['template_name'] = $row2; 301 301 } 302 if (!$row['enabled']) { 303 $list[$i]['model'] = $row['model']."<i>(Disabled)</i>"; 304 } 302 305 $i++; 303 } # End while306 } 304 307 305 308 contributed_modules/modules/endpointman/includes/functions.inc
r10220 r10227 209 209 //Determine if we are dealing with a general template or a specific [for that phone only] template (custom =0 means general) 210 210 if($custom == 0) { 211 $sql = "SELECT endpointman_ product_list.config_files, endpointman_product_list.long_name, endpointman_product_list.id as product_id, endpointman_model_list.template_data, endpointman_model_list.id as model_id, endpointman_template_list.* FROM endpointman_product_list, endpointman_model_list, endpointman_template_list WHERE endpointman_product_list.id = endpointman_template_list.product_id AND endpointman_template_list.model_id = endpointman_model_list.id AND endpointman_template_list.id = ".$id;212 } else { 213 $sql = "SELECT endpointman_ product_list.config_files, endpointman_mac_list.*, endpointman_model_list.id as model_id, endpointman_model_list.template_data, endpointman_product_list.id as product_id, endpointman_product_list.long_name, endpointman_product_list.cfg_dir, endpointman_brand_list.directory FROM endpointman_brand_list, endpointman_mac_list, endpointman_model_list, endpointman_product_list WHERE endpointman_mac_list.id=".$id." AND endpointman_mac_list.model = endpointman_model_list.id AND endpointman_model_list.brand = endpointman_brand_list.id AND endpointman_model_list.product_id = endpointman_product_list.id";211 $sql = "SELECT endpointman_model_list.model as model_name, endpointman_product_list.config_files, endpointman_product_list.short_name, endpointman_product_list.id as product_id, endpointman_model_list.template_data, endpointman_model_list.id as model_id, endpointman_template_list.* FROM endpointman_product_list, endpointman_model_list, endpointman_template_list WHERE endpointman_product_list.id = endpointman_template_list.product_id AND endpointman_template_list.model_id = endpointman_model_list.id AND endpointman_template_list.id = ".$id; 212 } else { 213 $sql = "SELECT endpointman_model_list.model as model_name, endpointman_product_list.config_files, endpointman_mac_list.*, endpointman_model_list.id as model_id, endpointman_model_list.template_data, endpointman_product_list.id as product_id, endpointman_product_list.short_name, endpointman_product_list.cfg_dir, endpointman_brand_list.directory FROM endpointman_brand_list, endpointman_mac_list, endpointman_model_list, endpointman_product_list WHERE endpointman_mac_list.id=".$id." AND endpointman_mac_list.model = endpointman_model_list.id AND endpointman_model_list.brand = endpointman_brand_list.id AND endpointman_model_list.product_id = endpointman_product_list.id"; 214 214 } 215 215 … … 227 227 $tpl->assign("template_name", $row['name']); 228 228 } 229 $tpl->assign("model", $row['long_name']); 230 229 $tpl->assign("product", $row['short_name']); 230 $tpl->assign("model", $row['model_name']); 231 232 if($ma = $this->modelsAvailable($row['model_id'], NULL, NULL, $row['product_id'])) { 233 $tpl->assign("models_ava", $ma); 234 } 231 235 //Start the display of the html file in the product folder 232 236 if($row['config_files_override'] == "") { … … 505 509 //Provide alternate Configuration file instead of the one from the hard drive 506 510 $temp = ""; 507 if(!empty($phone_info['config_files_override'])) {511 if(!empty($phone_info['config_files_override'])) { 508 512 $temp = unserialize($phone_info['config_files_override']); 509 513 foreach($temp as $list) { … … 545 549 $returned_data = $provisioner_lib->generate_config(); 546 550 551 //Create Directory Structure (If needed) 552 if(isset($provisioner_lib->directory_structure)) { 553 foreach($provisioner_lib->directory_structure as $data) { 554 $dir = $this->global_cfg['config_location'] . $data; 555 if(!file_exists($dir)) { 556 mkdir($dir); 557 } 558 } 559 } 560 561 //Copy Files/Directories (If needed) 562 if(isset($provisioner_lib->copy_files)) { 563 foreach($provisioner_lib->copy_files as $data) { 564 if(((file_exists($this->global_cfg['config_location'].$data)) AND (!in_array($data,$provisioner_lib->protected_files))) OR (!file_exists($this->global_cfg['config_location'].$data))) { 565 if(is_dir(PHONE_MODULES_PATH."endpoint/".$phone_info['directory']."/".$phone_info['cfg_dir']."/".$data)) { 566 if(!file_exists($this->global_cfg['config_location'].$data)) { 567 mkdir($this->global_cfg['config_location'].$data); 568 } 569 $dir_iterator = new RecursiveDirectoryIterator(PHONE_MODULES_PATH."endpoint/".$phone_info['directory']."/".$phone_info['cfg_dir']."/".$data."/"); 570 $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); 571 // could use CHILD_FIRST if you so wish 572 foreach ($iterator as $file) { 573 if(is_dir($file)) { 574 $dir = str_replace(PHONE_MODULES_PATH."endpoint/".$phone_info['directory']."/".$phone_info['cfg_dir']."/".$data."/", "", $file); 575 if(!file_exists($this->global_cfg['config_location'].$data."/".$dir)) { 576 mkdir($this->global_cfg['config_location'].$data."/".$dir); 577 } 578 } else { 579 $dir = str_replace(PHONE_MODULES_PATH."endpoint/".$phone_info['directory']."/".$phone_info['cfg_dir']."/".$data."/", "", $file); 580 copy($file, $this->global_cfg['config_location'].$data."/".$dir); 581 } 582 } 583 } else { 584 copy(PHONE_MODULES_PATH."endpoint/".$phone_info['directory']."/".$phone_info['cfg_dir']."/".$data,$this->global_cfg['config_location'].$data); 585 } 586 } 587 } 588 } 589 590 $sql = 'SELECT `value` FROM `endpointman_global_vars` WHERE `var_name` LIKE CONVERT(_utf8 \'version\' USING latin1) COLLATE latin1_swedish_ci'; 591 $epm_version = $this->db->getOne($sql); 592 593 $sql = 'SELECT `value` FROM `endpointman_global_vars` WHERE `var_name` LIKE CONVERT(_utf8 \'endpoint_vers\' USING latin1) COLLATE latin1_swedish_ci'; 594 $prov_version = $this->db->getOne($sql); 595 596 $sql = 'SELECT `cfg_ver` FROM `endpointman_brand_list` WHERE `directory` LIKE CONVERT(_utf8 \'grandstream\' USING latin1) COLLATE latin1_swedish_ci'; 597 $brand_version = $this->db->getOne($sql); 598 599 //Generate Files 547 600 foreach($returned_data as $key => $data) { 548 $fp = fopen($this->global_cfg['config_location'].$key, 'w'); 549 fwrite($fp, $data); 550 fclose($fp); 601 if(((file_exists($this->global_cfg['config_location'].$key)) AND (!in_array($key,$provisioner_lib->protected_files))) OR (!file_exists($this->global_cfg['config_location'].$key))) { 602 $fp = fopen($this->global_cfg['config_location'].$key, 'w'); 603 $data = str_replace("[\$epm_version]", "EndPoint Manager Version ".$epm_version,$data); 604 $data = str_replace("[\$provisioner_version]", date('m/d/Y',$prov_version)." at ".date("G:i",$prov_version),$data); 605 $data = str_replace("[\$brand_version]", date('m/d/Y',$brand_version)." at ".date("G:i",$brand_version),$data); 606 fwrite($fp, $data); 607 fclose($fp); 608 } 551 609 } 552 610 $provisioner_lib->reboot(); … … 565 623 return FALSE; 566 624 } else { 567 $temp = $this->xml2array(PHONE_MODULES_PATH."endpoint/".$brand_directory."/".$row['cfg_dir']."/ template_data.xml");625 $temp = $this->xml2array(PHONE_MODULES_PATH."endpoint/".$brand_directory."/".$row['cfg_dir']."/family_data.xml"); 568 626 if((array_key_exists('data',$temp)) AND (!is_array($temp['data']['firmware_ver']))) { 569 627 if($row['firmware_vers'] < $temp['data']['firmware_ver']) { … … 593 651 return("nothing"); 594 652 } else { 595 $temp = $this->xml2array(PHONE_MODULES_PATH.$brand_directory."/".$row['cfg_dir']."/template_data.xml"); 653 $temp = $this->xml2array(PHONE_MODULES_PATH."endpoint/".$brand_directory."/".$row['cfg_dir']."/family_data.xml"); 654 596 655 if((isset ($temp['data']['firmware_ver'])) AND (!is_array($temp['data']['firmware_ver']))) { 597 656 if($row['firmware_vers'] == "") { … … 610 669 611 670 function remove_firmware($id=NULL) { 612 global $global_cfg; 613 $sql = "SELECT * FROM endpointman_product_list WHERE id =". $id; 614 $result = mysql_query($sql); 615 $row = mysql_fetch_array($result); 616 617 $file_list = explode(",",$row['firmware_files']); 671 $sql = "SELECT firmware_files FROM endpointman_product_list WHERE id =". $id; 672 $files = $this->db->getOne($sql); 673 674 $file_list = explode(",",$files); 618 675 $i = 0; 619 676 while($i < count($file_list)) { 620 unlink($ global_cfg['config_location'].$file_list[$i]);677 unlink($this->global_cfg['config_location'].$file_list[$i]); 621 678 $i++; 622 679 } 623 680 $sql = 'UPDATE endpointman_product_list SET firmware_files = "", firmware_vers = "" WHERE id = '.$id; 624 mysql_query($sql);681 $this->db->query($sql); 625 682 } 626 683 627 684 function install_firmware($product_id) { 628 global $global_cfg, $debug;629 685 $sql = 'SELECT endpointman_product_list.*, endpointman_brand_list.directory FROM endpointman_product_list, endpointman_brand_list WHERE endpointman_product_list.brand = endpointman_brand_list.id AND endpointman_product_list.id = '.$product_id; 630 $result = mysql_query($sql); 631 $row = mysql_fetch_array($result); 632 $temp = $this->xml2array(PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/template_data.xml"); 686 $row =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 687 $temp = $this->xml2array(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/family_data.xml"); 633 688 if($temp['data']['firmware_ver'] > $row['firmware_vers']) { 634 echo "<script>$('div.demo-container').text('Installing firmware');</script>"; 635 $this->download_file_with_progress_bar(UPDATE_PATH . $temp['data']['firmware_pkg'], PHONE_MODULES_PATH."temp/".$temp['data']['firmware_pkg']); 636 global $global_cfg, $endpoint; 637 if(!file_exists(PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/firmware")) { 638 mkdir(PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/firmware"); 639 } 640 exec("unzip ".PHONE_MODULES_PATH."temp/" . $temp['data']['firmware_pkg'] ." -d ".PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/firmware/", $debug_a = array()); 641 if ($handle = opendir(PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/firmware/")) { 642 while (false !== ($file = readdir($handle))) { 643 if ($file != "." && $file != "..") { 644 $list .= $file.","; 645 } 646 } 647 closedir($handle); 648 } 649 $list = substr_replace($list ,"",-1); 650 exec("cp -r " . PHONE_MODULES_PATH.$row['directory']."/".$row['cfg_dir']."/firmware/*.* ". $global_cfg['config_location'], $debug_a2 = array()); 689 echo "Downloading firmware.."; 690 $this->download_file_with_progress_bar(UPDATE_PATH.$row['directory']."/". $temp['data']['firmware_pkg'], PHONE_MODULES_PATH."temp/".$temp['data']['firmware_pkg']); 691 echo "Done!<br />"; 692 if(!file_exists(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/firmware")) { 693 mkdir(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/firmware"); 694 } 695 echo "Installing Firmware..."; 696 exec("rm -Rf ".PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/firmware"); 697 mkdir(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/firmware"); 698 exec("tar -xvf ".PHONE_MODULES_PATH.'temp/'. $temp['data']['firmware_pkg'] ." -C ".PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']); 699 $i = 0; 700 foreach (glob(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/firmware/*.*") as $filename) { 701 $file = basename($filename); 702 $list[$i] = $file; 703 copy($filename, $this->global_cfg['config_location'].$file); 704 $i++; 705 } 706 $list = implode(",", $list); 651 707 $sql = "UPDATE endpointman_product_list SET firmware_vers = '".$temp['data']['firmware_ver']."', firmware_files = '".$list."' WHERE id = ". $row['id']; 652 mysql_query($sql); 653 echo "<script>$('div.demo-container').text('Done!');</script>"; 654 } else { 655 echo "<script>$('div.demo-container').text('Your Firmware is already up to date');</script>"; 656 657 } 658 if($global_cfg['debug']) { 659 $debug = array_merge($debug_a, $debug_a2); 660 $outfile=LOCAL_PATH."debug_installer.log"; 661 $wfh=fopen($outfile,'a'); 662 fwrite($wfh,print_r($debug, TRUE)); 663 fclose($wfh); 708 $this->db->query($sql); 709 echo "Done!"; 710 } else { 711 echo "Your Firmware is already up to date"; 712 664 713 } 665 714 } … … 989 1038 if (file_exists(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/template_data_custom.xml')) { 990 1039 $template_data_multi = $this->xml2array(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/template_data_custom.xml'); 991 $template_data_multi = $this->fix_single_array_keys($template_data_multi['template_data']['item']); 992 $template_data_array = array_merge($template_data_array, $template_data_multi); 1040 if($template_data_multi) { 1041 $template_data_multi = $this->fix_single_array_keys($template_data_multi['template_data']['item']); 1042 $template_data_array = array_merge($template_data_array, $template_data_multi); 1043 } 993 1044 } 994 1045 995 1046 if (file_exists(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/template_data_' . $model_row['model'] . '_custom.xml')) { 996 1047 $template_data_multi = $this->xml2array(self::$modules_path . $this->brand_name . "/" . $this->family_line . "/template_data_" . $this->model . "_custom.xml"); 997 $template_data_multi = $this->fix_single_array_keys($template_data_multi['template_data']['item']); 998 $template_data_array = array_merge($template_data_array, $template_data_multi); 1048 if($template_data_multi) { 1049 $template_data_multi = $this->fix_single_array_keys($template_data_multi['template_data']['item']); 1050 $template_data_array = array_merge($template_data_array, $template_data_multi); 1051 } 999 1052 } 1000 1053 … … 1035 1088 $file_size = 1; 1036 1089 $downloaded = 1; 1090 echo " "; 1037 1091 /* open destination file */ 1038 1092 $fout = fopen($destination_file, "wb"); … … 1423 1477 } 1424 1478 1425 function modelsAvailable($model=NULL, $macAdd=NULL, $brand=NULL ) {1479 function modelsAvailable($model=NULL, $macAdd=NULL, $brand=NULL, $product=NULL) { 1426 1480 if (isset($macAdd)) { 1427 1481 $oui=substr($macAdd,0,6); … … 1431 1485 }elseif((isset($brand)) && ($brand !=0)) { 1432 1486 $sql="SELECT endpointman_model_list.* FROM endpointman_model_list, endpointman_product_list WHERE endpointman_model_list.product_id = endpointman_product_list.id AND endpointman_model_list.enabled = 1 AND endpointman_product_list.hidden = 0 AND endpointman_model_list.brand = " . $brand; 1487 }elseif((isset($product)) && ($product !=0)) { 1488 $sql="SELECT * FROM endpointman_model_list WHERE product_id = ".$product; 1433 1489 } else { 1434 1490 $sql="SELECT endpointman_model_list.* FROM endpointman_model_list, endpointman_product_list WHERE endpointman_model_list.product_id = endpointman_product_list.id AND endpointman_model_list.enabled = 1 AND endpointman_product_list.hidden = 0"; … … 1558 1614 1559 1615 function endpointman_update_progress_bar($out) { 1560 /*1561 echo "\n<script type=\"text/javascript\" language=\"javascript\">";1562 echo 'document.getElementById("tb").style.width = "'.$out.'%";';1563 echo "\n</script>";1564 */1565 1616 echo "."; 1566 1617 } … … 1570 1621 $length = strlen($string); 1571 1622 $regs = ""; 1572 //ereg("(Content-Length:) (.*)", $string, $regs);1573 1623 preg_match("/(Content-Length:) (.*)/i", $string, $regs); 1574 1624 if((isset($regs[2])) AND ($regs[2] <> "")) { … … 1580 1630 1581 1631 function endpointmanager_read_body($ch, $string) { 1582 //Andrew Nagy added the below echo, otherwise the progress bar never updated until the download was complete1583 //echo " ";1584 //end Andrew code1585 1632 global $fout, $file_size, $downloaded, $lastseen, $progress_bar; 1586 1633 $length = strlen($string); contributed_modules/modules/endpointman/includes/installer.php
r10220 r10227 25 25 } 26 26 } elseif($_REQUEST['type'] == "firmware") { 27 $endpoint->install_firmware($ data['id']);27 $endpoint->install_firmware($_REQUEST['id']); 28 28 } elseif($_REQUEST['type'] == "manual_install") { 29 29 switch($_REQUEST['install_type']) { contributed_modules/modules/endpointman/includes/template_manager.inc
r10220 r10227 54 54 55 55 if($default_display) { 56 $sql = 'SELECT endpointman_template_list.*, endpointman_product_list.short_name as model_class, endpointman_model_list.model as model_clone FROM endpointman_template_list, endpointman_model_list, endpointman_product_list WHERE endpointman_model_list.enabled = 1 ANDendpointman_model_list.hidden = 0 AND endpointman_template_list.model_id = endpointman_model_list.id AND endpointman_template_list.product_id = endpointman_product_list.id';56 $sql = 'SELECT endpointman_template_list.*, endpointman_product_list.short_name as model_class, endpointman_model_list.model as model_clone, endpointman_model_list.enabled FROM endpointman_template_list, endpointman_model_list, endpointman_product_list WHERE endpointman_model_list.hidden = 0 AND endpointman_template_list.model_id = endpointman_model_list.id AND endpointman_template_list.product_id = endpointman_product_list.id'; 57 57 $template_list =& $db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 58 58 $i = 0; … … 61 61 $row_out[$i] = $row; 62 62 $row_out[$i]['custom'] = 0; 63 if(!$row['enabled']) { 64 $row_out[$i]['model_clone'] = $row_out[$i]['model_clone']."<i>(Disabled)</i>"; 65 } 63 66 $i++; 64 67 } contributed_modules/modules/endpointman/install.php
r10220 r10227 93 93 } 94 94 95 $version = "2.2. 3";95 $version = "2.2.4"; 96 96 97 97 if(ep_table_exists("endpointman_global_vars")) { … … 579 579 "3" => "1-2-10", 580 580 "4" => "1-2-9", 581 "6" => " ",582 "7" => " ",581 "6" => "4-2-3", 582 "7" => "4-3-7", 583 583 "8" => "6-1-1", 584 584 "9" => "6-1-2", … … 588 588 "13" => "6-1-6", 589 589 "15" => "2-1-3", 590 "22" => " ",590 "22" => "4-2-4", 591 591 "23" => "2-1-2", 592 592 "24" => "2-1-1", … … 595 595 "27" => "2-2-1", 596 596 "28" => "2-2-2", 597 "29" => " ",598 "30" => " ",599 "31" => " ",600 "32" => " ",601 "33" => " ",597 "29" => "4-2-1", 598 "30" => "4-2-5", 599 "31" => "4-2-6", 600 "32" => "4-2-7", 601 "33" => "4-2-2", 602 602 "34" => "4-3-1", 603 603 "35" => "4-3-2", … … 611 611 "43" => "4-3-11", 612 612 "44" => "4-3-12", 613 "45" => " ",614 "46" => " ",613 "45" => "4-1-1", 614 "46" => "4-1-2", 615 615 "47" => "1-2-1", 616 616 "48" => "1-2-2", … … 641 641 642 642 foreach($data as $list) { 643 $sql = "UPDATE endpointman_mac_list SET model = '".$new_model_list[$list[' id']]."' WHERE id = ". $list['id'];643 $sql = "UPDATE endpointman_mac_list SET model = '".$new_model_list[$list['model']]."' WHERE id = ". $list['id']; 644 644 $db->query($sql); 645 645 } … … 652 652 "1" => array("product_id" => "2-1", "model_id" => "2-1-1"), 653 653 "2" => array("product_id" => "2-2", "model_id" => "2-2-1"), 654 "3" => array("product_id" => " ", "model_id" => ""),655 "5" => array("product_id" => " ", "model_id" => ""),654 "3" => array("product_id" => "4-2", "model_id" => "4-2-1"), 655 "5" => array("product_id" => "4-1", "model_id" => "4-1-1"), 656 656 "4" => array("product_id" => "4-3", "model_id" => "4-3-1"), 657 657 "8" => array("product_id" => "6-1", "model_id" => "6-1-1"), … … 671 671 $data =& $db->getAll("SELECT * FROM endpointman_template_list",array(), DB_FETCHMODE_ASSOC); 672 672 foreach($data as $list) { 673 $sql = "UPDATE endpointman_template_list SET model_id = '".$new_product_list[$list[' model_id']]['model_id']."', product_id = '".$new_product_list[$list['product_id']]['product_id']."' WHERE id = ". $list['id'];673 $sql = "UPDATE endpointman_template_list SET model_id = '".$new_product_list[$list['product_id']]['model_id']."', product_id = '".$new_product_list[$list['product_id']]['product_id']."' WHERE id = ". $list['id']; 674 674 $db->query($sql); 675 675 } … … 740 740 $new_model_id = str_replace("-", "", $list['model']); 741 741 $sql = "UPDATE endpointman_mac_list SET model = '".$new_model_id."' WHERE id = ". $list['id']; 742 $db->query($sql);742 $db->query($sql); 743 743 } 744 744 … … 759 759 $db->query($sql); 760 760 } 761 } if ($ver <= "2.2.3") { 762 $sql = 'UPDATE `asterisk`.`endpointman_global_vars` SET `value` = \'http://www.provisioner.net/release/\' WHERE `endpointman_global_vars`.`idnum` = 6 LIMIT 1;'; 763 $db->query($sql); 761 764 } 762 765 contributed_modules/modules/endpointman/module.xml
r10221 r10227 2 2 <rawname>endpointman</rawname> 3 3 <name>PBX End Point Manager</name> 4 <version>2.2. 3</version>4 <version>2.2.4</version> 5 5 <type>tool</type> 6 6 <category>End Point Manager</category> … … 22 22 </changelog> 23 23 <info>http://projects.colsolgrp.net/projects/show/endpointman</info> 24 <location>contributed_modules/release/endpointman-2. 2.3.tgz</location>24 <location>contributed_modules/release/endpointman-2.0.0.tgz</location> 25 25 26 <md5sum>b db9b805ac2949ec0ee4b1c9d6920dd2</md5sum>26 <md5sum>b1341a35ef60d0fad17348803a0a7833</md5sum> 27 27 </module> contributed_modules/modules/endpointman/templates/advanced_settings_poce.html
r10218 r10227 22 22 <tr> 23 23 <td valign="top"> 24 <!-- 24 25 <u><?=_("Custom Template Files")?></u><br /> 25 26 {loop name="template_file_list"} … … 27 28 {/loop} 28 29 <hr> 30 --> 29 31 <u><?=_("Local File Configs")?></u><br /> 30 32 {loop name="file_list"} contributed_modules/modules/endpointman/templates/brand_model_manager.html
r10220 r10227 159 159 {/if} 160 160 161 161 {include="global_footer"} 162 162 163 163 contributed_modules/modules/endpointman/templates/devices_manager.html
r10218 r10227 221 221 </table> 222 222 </form> 223 {include="global_footer"} contributed_modules/modules/endpointman/templates/global_footer.html
r10198 r10227 1 1 <hr> 2 <h6 align='center'><?=_("The Endpoint Configuration Manager was written by")?> <a target="_blank" href=http://www.mymcs.us>Ed Macri</a>, <a target="_blank" href=http://www.cohutta.com> John Mullinix.</a> and Andrew Nagy 2 <h6 align='center'>The Endpoint Configuration Manager is currently maintained by <a target="_blank" href=http://www.andrewsnagy.com/>Andrew Nagy</a> 3 <br/><?=_("The Endpoint Configuration Manager was originally written by")?> <a target="_blank" href=http://www.mymcs.us>Ed Macri</a>, <a target="_blank" href=http://www.cohutta.com> John Mullinix.</a> and <a target="_blank" href=http://www.colsolgrp.com>Tony Shiffer</a> 4 <br/>Endpoint Configuration Manager uses code from the MPL licensed project Provisioner.net at <a href="http://https://www.assembla.com/code/provisioner/git/nodes?rev=master">https://www.assembla.com/code/provisioner/git/nodes?rev=master</a> co-written by Darren Schreiber & Andrew Nagy 3 5 <br> <?=_("The project is maintained at")?> 4 <a target="_blank" href="http://projects.colsolgrp.net/projects/show/endpointman"> CSG Software Projects.</a><br> 5 Copyright © 2009, 2010 by Ed Macri and John Mullinix</h6> 6 {if condition="isset($debug)"}<?=_("Debug Log")?>:<br /><textarea name="" cols="200" rows="50" readonly>{$debug}</textarea>{/if} 6 <a target="_blank" href="http://projects.colsolgrp.net/projects/show/endpointman"> CSG Software Projects.</a> 7 7 </body> 8 8 </html> contributed_modules/modules/endpointman/templates/template_editor.html
r10198 r10227 3 3 <head> 4 4 <link href="/recordings/theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" /> 5 6 7 5 <!-- Begin JavaScript --> 8 6 <script type="text/javascript" src="/recordings/theme/js/jquery.easing.1.3.js"></script> … … 19 17 <body> 20 18 {else} 21 <?=_('You are currently editing')?>22 19 {if condition="$custom != 0"} 23 20 <?=_('a custom config template for extension')?> {$ext}, <?=_('Model')?>: {$model} 24 21 {/if} 25 22 {if condition="$custom == 0"} 26 <?=_('the template named')?> "{$template_name}" <?=_('for Model')?>: {$model} 23 <strong><?=_('Template Name')?>:</strong> <i>{$template_name}</i><br /> 24 <strong><?=_('Product Line')?>:</strong> {$product}<br /> 25 <strong><?=_('Clone of Model')?>:</strong> 26 <select name="model_list"> 27 {loop name="models_ava"} 28 <option value="{$value.value}" {if condition="!empty($value.selected)"}selected{/if}>{$value.text}</option> 29 {/loop} 30 </select> 27 31 {/if} 28 32 <br /> … … 93 97 </form> 94 98 {/if} 99 {include="global_footer"} contributed_modules/modules/endpointman/templates/template_manager.html
r10198 r10227 48 48 </center> 49 49 {/if} 50 {include="global_footer"}
