Changeset 10227

Show
Ignore:
Timestamp:
08/25/10 00:48:05 (1 year ago)
Author:
tm1000
Message:

EPM 2.2.4
-Fixed several upgrade problems (if you upgraded from 2.0.0 to 2.2.x you'd have issues)
-Fixed remote repository location change on upgrade (I forgot! :-( )
-Added option to install firmwares back in
-Would fail if languages module wasn't installed [Fixed]
-Fixed Some cosmetic changes to template_editor/manager
-Updated global footer (not sure why it was removed)
-License change to MPL 1.1
-Disabled some template stuff that was causing some errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/endpointman/functions.inc.php

    r10220 r10227  
    2727function endpointman_configpageinit($pagename) { 
    2828  global $currentcomponent; 
    29  
    30         endpointman_applyhooks(); 
     29  endpointman_applyhooks(); 
    3130} 
    3231function endpointman_applyhooks() { 
     
    4746  // Don't display this stuff it it's on a 'This xtn has been deleted' page. 
    4847  if ($action != 'del') { 
    49     $langcode = languages_user_get($extdisplay); 
    5048    $section = _('End Point Manager'); 
    5149    $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); 
    5351    //$currentcomponent->addguielem($section, "",9); 
    5452 
  • contributed_modules/modules/endpointman/includes/advanced.inc

    r10220 r10227  
    275275            $endpoint->db->query($sql); 
    276276        } 
    277         if(isset($_REQUEST['temp_file'])) { 
     277        if(1 == 0) { 
    278278            $file = $_REQUEST['temp_file']; 
    279279 
  • contributed_modules/modules/endpointman/includes/brand_model_manager.inc

    r10219 r10227  
    112112} 
    113113 
    114  
    115  
    116114if (!isset($error)) { 
    117115  $error = ""; 
     
    128126} 
    129127 
    130  
    131128$tpl->assign("error", $error); 
    132129$tpl->assign("web_var", "?type=$type"); 
  • contributed_modules/modules/endpointman/includes/devices_manager.inc

    r10220 r10227  
    282282} 
    283283 
    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 )'; 
    285285 
    286286$devices_list =& $endpoint->db->getAll($sql,array(),DB_FETCHMODE_ASSOC); 
     
    300300        $list[$i]['template_name'] = $row2; 
    301301    } 
     302    if (!$row['enabled']) { 
     303        $list[$i]['model'] = $row['model']."<i>(Disabled)</i>"; 
     304    } 
    302305    $i++; 
    303 }    # End while 
     306} 
    304307 
    305308 
  • contributed_modules/modules/endpointman/includes/functions.inc

    r10220 r10227  
    209209        //Determine if we are dealing with a general template or a specific [for that phone only] template (custom =0 means general) 
    210210        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"; 
    214214        } 
    215215 
     
    227227            $tpl->assign("template_name", $row['name']); 
    228228        } 
    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        } 
    231235        //Start the display of the html file in the product folder 
    232236        if($row['config_files_override'] == "") { 
     
    505509        //Provide alternate Configuration file instead of the one from the hard drive 
    506510        $temp = ""; 
    507         if(!empty($phone_info['config_files_override']))
     511        if(!empty($phone_info['config_files_override']))
    508512            $temp = unserialize($phone_info['config_files_override']); 
    509513            foreach($temp as $list) { 
     
    545549        $returned_data = $provisioner_lib->generate_config(); 
    546550 
     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 
    547600        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            } 
    551609        } 
    552610        $provisioner_lib->reboot(); 
     
    565623            return FALSE; 
    566624        } 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"); 
    568626            if((array_key_exists('data',$temp)) AND (!is_array($temp['data']['firmware_ver']))) { 
    569627                if($row['firmware_vers'] < $temp['data']['firmware_ver']) { 
     
    593651                return("nothing"); 
    594652            } 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 
    596655                if((isset ($temp['data']['firmware_ver'])) AND (!is_array($temp['data']['firmware_ver']))) { 
    597656                    if($row['firmware_vers'] == "") { 
     
    610669 
    611670    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); 
    618675        $i = 0; 
    619676        while($i < count($file_list)) { 
    620             unlink($global_cfg['config_location'].$file_list[$i]); 
     677            unlink($this->global_cfg['config_location'].$file_list[$i]); 
    621678            $i++; 
    622679        } 
    623680        $sql = 'UPDATE endpointman_product_list SET firmware_files = "", firmware_vers = "" WHERE id = '.$id; 
    624         mysql_query($sql); 
     681        $this->db->query($sql); 
    625682    } 
    626683 
    627684    function install_firmware($product_id) { 
    628         global $global_cfg, $debug; 
    629685        $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"); 
    633688        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); 
    651707            $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 
    664713        } 
    665714    } 
     
    9891038            if (file_exists(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/template_data_custom.xml')) { 
    9901039                $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                } 
    9931044            } 
    9941045 
    9951046            if (file_exists(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/template_data_' . $model_row['model'] . '_custom.xml')) { 
    9961047                $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                } 
    9991052            } 
    10001053 
     
    10351088        $file_size  = 1; 
    10361089        $downloaded = 1; 
     1090        echo "&nbsp;"; 
    10371091        /* open destination file */ 
    10381092        $fout = fopen($destination_file, "wb"); 
     
    14231477    } 
    14241478 
    1425     function modelsAvailable($model=NULL, $macAdd=NULL, $brand=NULL) { 
     1479    function modelsAvailable($model=NULL, $macAdd=NULL, $brand=NULL, $product=NULL) { 
    14261480        if (isset($macAdd)) { 
    14271481            $oui=substr($macAdd,0,6); 
     
    14311485        }elseif((isset($brand)) && ($brand !=0)) { 
    14321486            $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; 
    14331489        } else { 
    14341490            $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"; 
     
    15581614 
    15591615function 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     */ 
    15651616    echo "."; 
    15661617} 
     
    15701621    $length = strlen($string); 
    15711622    $regs = ""; 
    1572     //ereg("(Content-Length:) (.*)", $string, $regs); 
    15731623    preg_match("/(Content-Length:) (.*)/i", $string, $regs); 
    15741624    if((isset($regs[2])) AND ($regs[2] <> "")) { 
     
    15801630 
    15811631function endpointmanager_read_body($ch, $string) { 
    1582     //Andrew Nagy added the below echo, otherwise the progress bar never updated until the download was complete 
    1583     //echo "&nbsp;"; 
    1584     //end Andrew code 
    15851632    global $fout, $file_size, $downloaded, $lastseen, $progress_bar; 
    15861633    $length = strlen($string); 
  • contributed_modules/modules/endpointman/includes/installer.php

    r10220 r10227  
    2525    } 
    2626} elseif($_REQUEST['type'] == "firmware") { 
    27     $endpoint->install_firmware($data['id']); 
     27    $endpoint->install_firmware($_REQUEST['id']); 
    2828} elseif($_REQUEST['type'] == "manual_install") { 
    2929    switch($_REQUEST['install_type']) { 
  • contributed_modules/modules/endpointman/includes/template_manager.inc

    r10220 r10227  
    5454 
    5555if($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 AND 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'; 
     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'; 
    5757        $template_list =& $db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    5858  $i = 0; 
     
    6161                $row_out[$i] = $row; 
    6262    $row_out[$i]['custom'] = 0; 
     63                if(!$row['enabled']) { 
     64                    $row_out[$i]['model_clone'] = $row_out[$i]['model_clone']."<i>(Disabled)</i>"; 
     65                } 
    6366    $i++; 
    6467  } 
  • contributed_modules/modules/endpointman/install.php

    r10220 r10227  
    9393} 
    9494 
    95 $version = "2.2.3"; 
     95$version = "2.2.4"; 
    9696 
    9797if(ep_table_exists("endpointman_global_vars")) { 
     
    579579            "3" => "1-2-10", 
    580580            "4" => "1-2-9", 
    581             "6" => "", 
    582             "7" => "", 
     581            "6" => "4-2-3", 
     582            "7" => "4-3-7", 
    583583            "8" => "6-1-1", 
    584584            "9" => "6-1-2", 
     
    588588            "13"  => "6-1-6", 
    589589            "15" => "2-1-3", 
    590             "22"  => "", 
     590            "22"  => "4-2-4", 
    591591            "23" => "2-1-2", 
    592592            "24" => "2-1-1", 
     
    595595            "27" => "2-2-1", 
    596596            "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", 
    602602            "34" => "4-3-1", 
    603603            "35" => "4-3-2", 
     
    611611            "43" => "4-3-11", 
    612612            "44" => "4-3-12", 
    613             "45" => "", 
    614             "46" => "", 
     613            "45" => "4-1-1", 
     614            "46" => "4-1-2", 
    615615            "47" => "1-2-1", 
    616616            "48" => "1-2-2", 
     
    641641 
    642642        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']; 
    644644            $db->query($sql); 
    645645        } 
     
    652652            "1" => array("product_id" => "2-1", "model_id" => "2-1-1"), 
    653653            "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"), 
    656656            "4" => array("product_id" => "4-3", "model_id" => "4-3-1"), 
    657657            "8" => array("product_id" => "6-1", "model_id" => "6-1-1"), 
     
    671671        $data =& $db->getAll("SELECT * FROM endpointman_template_list",array(), DB_FETCHMODE_ASSOC); 
    672672        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']; 
    674674            $db->query($sql); 
    675675        } 
     
    740740        $new_model_id = str_replace("-", "", $list['model']); 
    741741        $sql = "UPDATE endpointman_mac_list SET model = '".$new_model_id."' WHERE id = ". $list['id']; 
    742         $db->query($sql); 
     742   $db->query($sql); 
    743743    } 
    744744 
     
    759759        $db->query($sql); 
    760760    } 
     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); 
    761764} 
    762765 
  • contributed_modules/modules/endpointman/module.xml

    r10221 r10227  
    22  <rawname>endpointman</rawname> 
    33  <name>PBX End Point Manager</name> 
    4   <version>2.2.3</version> 
     4  <version>2.2.4</version> 
    55  <type>tool</type> 
    66  <category>End Point Manager</category> 
     
    2222        </changelog> 
    2323  <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> 
    2525 
    26 <md5sum>bdb9b805ac2949ec0ee4b1c9d6920dd2</md5sum> 
     26<md5sum>b1341a35ef60d0fad17348803a0a7833</md5sum> 
    2727</module> 
  • contributed_modules/modules/endpointman/templates/advanced_settings_poce.html

    r10218 r10227  
    2222  <tr> 
    2323    <td valign="top"> 
     24        <!-- 
    2425        <u><?=_("Custom Template Files")?></u><br /> 
    2526  {loop name="template_file_list"} 
     
    2728  {/loop} 
    2829  <hr> 
     30        --> 
    2931  <u><?=_("Local File Configs")?></u><br /> 
    3032  {loop name="file_list"} 
  • contributed_modules/modules/endpointman/templates/brand_model_manager.html

    r10220 r10227  
    159159{/if} 
    160160 
    161  
     161{include="global_footer"} 
    162162 
    163163   
  • contributed_modules/modules/endpointman/templates/devices_manager.html

    r10218 r10227  
    221221</table> 
    222222</form> 
     223{include="global_footer"} 
  • contributed_modules/modules/endpointman/templates/global_footer.html

    r10198 r10227  
    11<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 &amp Andrew Nagy 
    35<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 &#169; 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> 
    77</body> 
    88</html>  
  • contributed_modules/modules/endpointman/templates/template_editor.html

    r10198 r10227  
    33    <head> 
    44        <link href="/recordings/theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" /> 
    5  
    6  
    75        <!-- Begin JavaScript --> 
    86        <script type="text/javascript" src="/recordings/theme/js/jquery.easing.1.3.js"></script> 
     
    1917    <body> 
    2018        {else} 
    21         <?=_('You are currently editing')?> 
    2219  {if condition="$custom != 0"} 
    2320        <?=_('a custom config template for extension')?> {$ext}, <?=_('Model')?>: {$model} 
    2421  {/if} 
    2522  {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> 
    2731  {/if} 
    2832        <br /> 
     
    9397        </form> 
    9498        {/if} 
     99{include="global_footer"} 
  • contributed_modules/modules/endpointman/templates/template_manager.html

    r10198 r10227  
    4848</center> 
    4949{/if} 
     50{include="global_footer"}