Changeset 11618

Show
Ignore:
Timestamp:
02/27/11 20:03:06 (2 years ago)
Author:
tm1000
Message:

Fixed #4870, #4892 & allowed duplicate extensions on phones

Files:

Legend:

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

    r11318 r11618  
    3434} 
    3535function endpointman_configpageinit($pagename) { 
    36   global $currentcomponent
     36  global $currentcomponent, $amp_conf
    3737 
    3838        $display = isset($_REQUEST['display'])?$_REQUEST['display']:null; 
    39         if(isset($_REQUEST['extension'])) { 
    40             $extdisplay = isset($_REQUEST['extension'])?$_REQUEST['extension']:null; 
    41         } else { 
     39 
     40        if($display == "extensions") { 
     41            if(isset($_REQUEST['extension'])) { 
     42                $extdisplay = isset($_REQUEST['extension'])?$_REQUEST['extension']:null; 
     43            } else { 
     44                $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 
     45            } 
     46        } elseif($display == "devices") { 
    4247            $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 
    4348        } 
     49 
    4450        $action = isset($_REQUEST['action'])?$_REQUEST['action']:null; 
    4551        $delete = isset($_REQUEST['epm_delete'])?$_REQUEST['epm_delete']:null; 
    4652        $tech = isset($_REQUEST['tech_hardware'])?$_REQUEST['tech_hardware']:null; 
    4753 
    48         if(($display == "extensions") && (isset($extdisplay) OR ($tech == "sip_generic"))) { 
     54        if((($display == "extensions") OR ($display == "devices")) && (isset($extdisplay) OR ($tech == "sip_generic"))) { 
    4955            global $endpoint; 
    5056 
    51             $doc_root = $_SERVER["DOCUMENT_ROOT"] ."/admin/modules/endpointman/"; 
     57            $doc_root = $amp_conf['AMPWEBROOT'] ."/admin/modules/endpointman/"; 
    5258            require($doc_root . "includes/functions.inc"); 
    5359 
     
    8086                    $line = isset($_REQUEST['epm_line'])?$_REQUEST['epm_line']:null; 
    8187                    $temp = isset($_REQUEST['epm_temps'])?$_REQUEST['epm_temps']:null; 
    82                     $name = isset($_REQUEST['name'])?$_REQUEST['name']:null; 
     88                    if(isset($_REQUEST['name'])) { 
     89                        $name = isset($_REQUEST['name'])?$_REQUEST['name']:null; 
     90                    } else { 
     91                        $name = isset($_REQUEST['description'])?$_REQUEST['description']:null; 
     92                    } 
    8393                    $reboot = isset($_REQUEST['epm_reboot'])?$_REQUEST['epm_reboot']:null; 
    8494 
     
    165175function endpointman_configpageload() { 
    166176  global $currentcomponent, $endpoint, $db; 
     177 
     178        $display = isset($_REQUEST['display'])?$_REQUEST['display']:null; 
    167179 
    168180  // Init vars from $_REQUEST[] 
     
    236248                $currentcomponent->addguielem($section, new gui_checkbox('epm_delete', $checked, 'Delete','Delete this Extension from Endpoint Manager'),9); 
    237249                $currentcomponent->addguielem($section, new gui_textbox('epm_mac', $info['mac'], 'MAC Address', 'The MAC Address of the Phone Assigned to this Extension/Device. <br />(Leave Blank to Remove from Endpoint Manager)', '', 'Please enter a valid MAC Address', true, 17, false),9); 
    238                 $currentcomponent->addguielem($section, new gui_selectbox('epm_brand', $brand_list, $info['brand_id'], 'Brand', 'The Brand of this Phone.', false, 'frm_extensions_brand_change(this.options[this.selectedIndex].value)', false),9); 
    239                 $currentcomponent->addguielem($section, new gui_selectbox('epm_model', $model_list, $info['model_id'], 'Model', 'The Model of this Phone.', false, 'frm_extensions_model_change(this.options[this.selectedIndex].value,\''.$line_info['luid'].'\')', false),9); 
     250                $currentcomponent->addguielem($section, new gui_selectbox('epm_brand', $brand_list, $info['brand_id'], 'Brand', 'The Brand of this Phone.', false, 'frm_'.$display.'_brand_change(this.options[this.selectedIndex].value)', false),9); 
     251                $currentcomponent->addguielem($section, new gui_selectbox('epm_model', $model_list, $info['model_id'], 'Model', 'The Model of this Phone.', false, 'frm_'.$display.'_model_change(this.options[this.selectedIndex].value,\''.$line_info['luid'].'\')', false),9); 
    240252                $currentcomponent->addguielem($section, new gui_selectbox('epm_line', $line_list, $line_info['line'], 'Line', 'The Line of this Extension/Device.', false, '', false),9); 
    241253                $currentcomponent->addguielem($section, new gui_selectbox('epm_temps', $template_list, $info['template_id'], 'Template', 'The Template of this Phone.', false, '', false),9); 
     
    272284 
    273285                $currentcomponent->addguielem($section, new gui_textbox('epm_mac', $info['mac'], 'MAC Address', 'The MAC Address of the Phone Assigned to this Extension/Device. <br />(Leave Blank to Remove from Endpoint Manager)', '', 'Please enter a valid MAC Address', true, 17, false),9); 
    274                 $currentcomponent->addguielem($section, new gui_selectbox('epm_brand', $brand_list, $info['brand_id'], 'Brand', 'The Brand of this Phone.', false, 'frm_extensions_brand_change(this.options[this.selectedIndex].value)', false),9); 
    275                 $currentcomponent->addguielem($section, new gui_selectbox('epm_model', $model_list, $info['model_id'], 'Model', 'The Model of this Phone.', false, 'frm_extensions_model_change(this.options[this.selectedIndex].value,document.getElementById(\'epm_mac\').value)', false),9); 
     286                $currentcomponent->addguielem($section, new gui_selectbox('epm_brand', $brand_list, $info['brand_id'], 'Brand', 'The Brand of this Phone.', false, 'frm_'.$display.'_brand_change(this.options[this.selectedIndex].value)', false),9); 
     287                $currentcomponent->addguielem($section, new gui_selectbox('epm_model', $model_list, $info['model_id'], 'Model', 'The Model of this Phone.', false, 'frm_'.$display.'_model_change(this.options[this.selectedIndex].value,document.getElementById(\'epm_mac\').value)', false),9); 
    276288                $currentcomponent->addguielem($section, new gui_selectbox('epm_line', $line_list, $line_info['line'], 'Line', 'The Line of this Extension/Device.', false, '', false),9); 
    277289                $currentcomponent->addguielem($section, new gui_selectbox('epm_temps', $template_list, $info['template_id'], 'Template', 'The Template of this Phone.', false, '', false),9); 
  • modules/branches/2.9/endpointman/includes/abstraction/freepbx.inc

    r10792 r11618  
    99    public $db; 
    1010    public $amp_conf; 
     11    public $global_cfg; 
    1112 
    1213    function __construct() { 
    1314        //Pull in shit from FreePBX! (it's all about the globals baaaaabbbyyyyyyyy) 
    14         global $amp_conf, $db, $global_cfg
     15        global $amp_conf, $db
    1516 
    1617        //The only time dbh_asterisk is set is when we are inside the ARI Recording interface 
     
    114115 
    115116    function all_unused_registrations() { 
    116         $not_added="SELECT devices.id, devices.description FROM devices WHERE tech='sip' AND devices.id not in (SELECT devices.id FROM devices, endpointman_line_list WHERE tech='sip' AND devices.id = endpointman_line_list.ext ) ORDER BY devices.id"; 
     117        if($this->global_cfg['show_all_registrations']) { 
     118            $not_added="SELECT devices.id, devices.description FROM devices WHERE tech='sip' ORDER BY devices.id"; 
     119        } else { 
     120            $not_added="SELECT devices.id, devices.description FROM devices WHERE tech='sip' AND devices.id not in (SELECT devices.id FROM devices, endpointman_line_list WHERE tech='sip' AND devices.id = endpointman_line_list.ext ) ORDER BY devices.id"; 
     121        } 
    117122        $result =& $this->db->getAll($not_added,array(), DB_FETCHMODE_ASSOC); 
    118123        return($result); 
  • modules/branches/2.9/endpointman/includes/advanced.inc

    r11075 r11618  
    159159                $endpoint->error['manual_upload'] = "Invalid File Extension"; 
    160160            } 
    161              
    162  
    163         } elseif(isset($_REQUEST['upload_master_xml'])) { 
    164             $extension = pathinfo($_FILES["xml"]["name"],PATHINFO_EXTENSION); 
    165             if($extension == "xml") { 
    166                 if ($_FILES['xml']['error'] == UPLOAD_ERR_OK) { 
    167                     $tmp_name = $_FILES['xml']["tmp_name"]; 
    168                     $name = $_FILES['xml']["name"]; 
    169                     move_uploaded_file($tmp_name, "$uploads_dir/$name"); 
    170                     $endpoint->tpl->assign("show_installer", 1); 
    171                     $endpoint->tpl->assign("package", 0); 
    172                     $endpoint->tpl->assign("type", "upload_master_xml"); 
    173                     $endpoint->tpl->assign("xml", $name); 
    174                 } else { 
    175                     $endpoint->error['manual_upload'] = $endpoint->file_upload_error_message($_FILES['xml']['error']); 
    176                 } 
    177             } else { 
    178                 $endpoint->error['manual_upload'] = "Invalid File Extension"; 
    179             } 
    180161        } elseif(isset($_REQUEST['upload_brand'])) { 
    181162            $error = FALSE; 
     
    184165            foreach($_FILES as $files) { 
    185166                $extension = pathinfo($files["name"],PATHINFO_EXTENSION); 
    186                 if(($extension == "xml") OR ($extension == "tgz")) { 
     167                if($extension == "tgz") { 
    187168                    if ($files['error'] == UPLOAD_ERR_OK) { 
    188169                        $tmp_name = $files["tmp_name"]; 
     
    202183            if(!$error){ 
    203184                $endpoint->tpl->assign("show_installer", 1); 
    204                 $endpoint->tpl->assign("package", $files_list[1]); 
     185                $endpoint->tpl->assign("package", $files_list[0]); 
    205186                $endpoint->tpl->assign("type", "upload_brand"); 
    206                 $endpoint->tpl->assign("xml", $files_list[0]); 
    207187            } else { 
    208188                $message = $error_message; 
     
    338318            $message = "Deleted!"; 
    339319        } 
    340         if(1 == 0) { 
    341             $file = $_REQUEST['temp_file']; 
    342  
    343             $sql = "SELECT cfg_dir,directory,config_files FROM endpointman_product_list,endpointman_brand_list WHERE endpointman_product_list.brand = endpointman_brand_list.id AND endpointman_product_list.id = '". $_REQUEST['product_select'] ."'"; 
    344             $row =& $endpoint->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    345  
    346             $file=PHONE_MODULES_PATH.'endpoint/'.$row['directory']."/".$row['cfg_dir']."/".$file; 
    347  
    348             if(isset($_REQUEST['config_text'])) { 
    349                 if(isset($_REQUEST['button_save'])) { 
    350                     $wfh=fopen($file,'w'); 
    351                     fwrite($wfh,$_REQUEST['config_text']); 
    352                     fclose($wfh); 
    353                 } 
    354             } 
    355  
    356             if(!file_exists($file)) { 
    357                 $fp = fopen($file, 'w'); 
    358                 fwrite($fp, ' 
    359 <!--<template_data> 
    360     <item> 
    361             <description>General Settings</description> 
    362             <type>group</type> 
    363     </item> 
    364     <item> 
    365             <variable>$sip_digit_timeout</variable> 
    366             <default_value>4</default_value> 
    367             <description>SIP Digit Timeout</description> 
    368             <type>input</type> 
    369     </item> 
    370 </template_data>--> 
    371                             '); 
    372                 fclose($fp); 
    373             } 
    374             $handle = fopen($file, "rb"); 
    375             $contents = fread($handle, filesize($file)); 
    376             fclose($handle); 
    377             $endpoint->tpl->assign("location", $file); 
    378             $endpoint->tpl->assign("config_data", $contents); 
    379         } 
    380320        if(isset($_REQUEST['file'])) { 
    381321            $sql = "SELECT cfg_dir,directory,config_files FROM endpointman_product_list,endpointman_brand_list WHERE endpointman_product_list.brand = endpointman_brand_list.id AND endpointman_product_list.id = '". $_REQUEST['product_select'] ."'"; 
     
    407347 
    408348            $endpoint->tpl->assign("save_as_name_value", $config_files[$_REQUEST['file']]); 
     349 
     350            $contents = $endpoint->display_htmlspecialchars($contents); 
     351 
    409352            $endpoint->tpl->assign("config_data", $contents); 
    410353            $endpoint->tpl->assign("filename", $config_files[$_REQUEST['file']]); 
     
    438381            } 
    439382 
     383            $row['data'] = $endpoint->display_htmlspecialchars($row['data']); 
     384 
    440385            $endpoint->tpl->assign("save_as_name_value", $row['name']); 
    441386            $endpoint->tpl->assign("filename", $row['original_name']); 
     
    574519                $_POST['disable_help'] = 0; 
    575520            } 
     521            if((isset($_POST['allow_dupext'])) AND ($_POST['allow_dupext'] == "on")) { 
     522                $_POST['allow_dupext'] = 1; 
     523            } else { 
     524                $_POST['allow_dupext'] = 0; 
     525            } 
     526 
     527            $sql="UPDATE endpointman_global_vars SET value='" . $_POST['allow_dupext'] . "' WHERE var_name='show_all_registrations'"; 
     528            $endpoint->db->query($sql); 
    576529 
    577530            $sql="UPDATE endpointman_global_vars SET value='" . $_POST['enable_ari'] . "' WHERE var_name='enable_ari'"; 
     
    606559        $endpoint->global_cfg =& $db->getAssoc("SELECT var_name, value FROM endpointman_global_vars"); 
    607560 
     561        if($endpoint->global_cfg['show_all_registrations']) { 
     562            $dupext_selected= "checked"; 
     563        } else { 
     564            $dupext_selected = ""; 
     565        } 
    608566 
    609567        if($endpoint->global_cfg['enable_ari']) { 
     
    628586        } 
    629587        $endpoint->tpl->assign("help_selected", $help_selected); 
     588        $endpoint->tpl->assign("dupext_selected", $dupext_selected); 
    630589 
    631590        $endpoint->tpl->assign("ari_selected", $ari_selected); 
  • modules/branches/2.9/endpointman/includes/brand_model_manager.inc

    r10792 r11618  
    4444  } 
    4545} elseif(isset($_REQUEST['button_check_for_updates'])) { 
    46   $brand_up = $endpoint->brand_update_check(); 
     46  $brand_up = $endpoint->update_check(); 
    4747        $endpoint->tpl->assign("update_check", 1); 
    4848 
  • modules/branches/2.9/endpointman/includes/functions.inc

    r11318 r11618  
    2929        $this->global_cfg = $this->endpoint_data->get_stored_globals(); 
    3030 
     31        $this->endpoint_data->global_cfg = $this->global_cfg; 
     32 
    3133        $this->global_cfg['disable_epm'] = FALSE; 
    3234 
     
    4446            $this->amp_conf = $amp_conf; 
    4547        } else { 
    46             $this->error['amp_conf'] = "The Global Variable $amp_conf is empty or not set! Can't connect to the database."
     48            $this->error['amp_conf'] = 'The Global Variable $amp_conf is empty or not set! Can\'t connect to the database.'
    4749            $this->global_cfg['disable_epm'] = TRUE; 
    4850        } 
     
    5355        //end possible removal 
    5456 
    55   define("MODULES_PATH", $this->get_modules_dir()); 
     57  define("MODULES_PATH", $this->get_modules_dir()); 
    5658 
    5759        //Define the location of phone modules, keeping it outside of the module directory so that when the user updates endpointmanager they don't lose all of their phones 
     
    108110            $this->tpl->assign("disable_help", 1); 
    109111        } 
    110     } 
    111  
    112   function get_modules_dir() { 
    113      
    114     $file_name = "endpointman/includes/functions.inc"; 
    115      
    116      $includes = get_included_files();  
    117       foreach($includes as $key => $data) { 
    118       if(strripos($data,$file_name)) { 
    119         $keyout = $key; 
    120         break; 
    121       } 
    122     } 
    123  
    124     $stripped_path = str_replace("endpointman/includes/functions.inc", "", $includes[$keyout]); 
    125  
    126      return $stripped_path; 
    127   } 
     112 
     113        $sql = 'SELECT value FROM `admin` WHERE `variable` LIKE CONVERT(_utf8 \'version\' USING latin1) COLLATE latin1_swedish_ci'; 
     114        $this->global_cfg['amp_ver'] = $this->db->getOne($sql); 
     115        $this->tpl->assign("amp_ver", (float)$this->global_cfg['amp_ver']); 
     116 
     117    } 
     118 
     119    function display_htmlspecialchars($contents) { 
     120        $contents = str_replace("&amp;", "&amp;amp;", $contents); 
     121        $contents = str_replace("&lt;", "&amp;lt;", $contents); 
     122        $contents = str_replace("&gt;", "&amp;gt;", $contents); 
     123        $contents = str_replace("&quot;", "&amp;quot;", $contents); 
     124        $contents = str_replace("&#039;", "&amp;#039;", $contents); 
     125        return($contents); 
     126    } 
     127 
     128    function get_modules_dir() { 
     129 
     130        $file_name = "endpointman/includes/functions.inc"; 
     131 
     132        $includes = get_included_files(); 
     133        foreach($includes as $key => $data) { 
     134            if(strripos($data,$file_name)) { 
     135                $keyout = $key; 
     136                break; 
     137            } 
     138        } 
     139 
     140        $stripped_path = str_replace("endpointman/includes/functions.inc", "", $includes[$keyout]); 
     141 
     142        return $stripped_path; 
     143    } 
    128144   
    129145 
     
    218234        //Find the matching brand model to the oui 
    219235        $oui_sql = "SELECT endpointman_brand_list.name, endpointman_brand_list.id FROM endpointman_oui_list, endpointman_brand_list WHERE oui LIKE '%". $oui ."%' AND endpointman_brand_list.id = endpointman_oui_list.brand AND endpointman_brand_list.installed = 1 LIMIT 1"; 
    220         $brand =& $this->db->getRow($oui_sql, array(), DB_FETCHMODE_ASSOC); 
    221  
    222         $res =& $this->db->query($oui_sql); 
     236        $brand = $this->db->getRow($oui_sql, array(), DB_FETCHMODE_ASSOC); 
     237 
     238        $res = $this->db->query($oui_sql); 
    223239        $brand_count = $res->numRows(); 
    224240 
     
    250266    function delete_line($lineid,$allow_device_remove=FALSE) { 
    251267        $sql = 'SELECT mac_id FROM endpointman_line_list WHERE luid = '.$lineid ; 
    252         $mac_id =& $this->db->getOne($sql,array(),DB_FETCHMODE_ASSOC); 
     268        $mac_id = $this->db->getOne($sql,array(),DB_FETCHMODE_ASSOC); 
    253269        $row = $this->get_phone_info($mac_id); 
    254270 
    255271        $sql = 'SELECT COUNT(*) FROM endpointman_line_list WHERE mac_id = '.$mac_id; 
    256         $num_lines =& $this->db->getOne($sql,array(),DB_FETCHMODE_ASSOC); 
     272        $num_lines = $this->db->getOne($sql,array(),DB_FETCHMODE_ASSOC); 
    257273        if($num_lines > 1) { 
    258274            $sql = "DELETE FROM endpointman_line_list WHERE luid=".$lineid; 
     
    344360        $sql = "SELECT id FROM endpointman_mac_list WHERE model > 0 AND id =".$mac_id; 
    345361 
    346         $res =& $this->db->query($sql); 
     362        $res = $this->db->query($sql); 
    347363        if($res->numRows()) { 
    348364            //Returns Brand Name, Brand Directory, Model Name, Mac Address, Extension (FreePBX), Custom Configuration Template, Custom Configuration Data, Product Name, Product ID, Product Configuration Directory, Product Configuration Version, Product XML name, 
    349365            $sql = "SELECT endpointman_mac_list.config_files_override, endpointman_mac_list.global_user_cfg_data, endpointman_model_list.id as model_id, endpointman_brand_list.id as brand_id, endpointman_brand_list.name, endpointman_brand_list.directory, endpointman_model_list.model, endpointman_mac_list.mac, endpointman_mac_list.template_id, endpointman_mac_list.global_custom_cfg_data, endpointman_product_list.long_name, endpointman_product_list.id as product_id, endpointman_product_list.cfg_dir, endpointman_product_list.cfg_ver, endpointman_model_list.template_data, endpointman_model_list.enabled FROM endpointman_line_list, endpointman_mac_list, endpointman_model_list, endpointman_brand_list, endpointman_product_list WHERE endpointman_mac_list.model = endpointman_model_list.id AND endpointman_brand_list.id = endpointman_model_list.brand AND endpointman_product_list.id = endpointman_model_list.product_id AND endpointman_mac_list.id = endpointman_line_list.mac_id AND endpointman_mac_list.id = ". $mac_id; 
    350366 
    351             $phone_info =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     367            $phone_info = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    352368 
    353369            if(!$phone_info) { 
     
    359375                $sql = "SELECT name, global_custom_cfg_data, config_files_override FROM endpointman_template_list WHERE id = ".$phone_info['template_id']; 
    360376 
    361                 $phone_info['template_data_info'] =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     377                $phone_info['template_data_info'] = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    362378 
    363379            } 
    364380 
    365381            $sql = "SELECT endpointman_line_list.*, sip.data as secret, devices.* FROM endpointman_line_list, sip, devices WHERE endpointman_line_list.ext = devices.id AND endpointman_line_list.ext = sip.id AND sip.keyword = 'secret' AND mac_id = ".$mac_id." ORDER BY endpointman_line_list.line ASC"; 
    366             $lines_info =& $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
     382            $lines_info = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    367383            foreach($lines_info as $line) { 
    368384                $phone_info['line'][$line['line']] = $line; 
     
    373389            $sql = "SELECT id, mac, ext FROM endpointman_mac_list WHERE id =".$mac_id; 
    374390            //Phone is unknown, we need to display this to the end user so that they can make corrections 
    375             $row =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     391            $row = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    376392 
    377393            $brand = $this->get_brand_from_mac($row['mac']); 
     
    390406            $phone_info['mac'] = $row['mac']; 
    391407            $sql = "SELECT endpointman_line_list.*, sip.data as secret, devices.* FROM endpointman_line_list, sip, devices WHERE endpointman_line_list.ext = devices.id AND endpointman_line_list.ext = sip.id AND sip.keyword = 'secret' AND mac_id = ".$mac_id; 
    392             $lines_info =& $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
     408            $lines_info = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    393409            foreach($lines_info as $line) { 
    394410                $phone_info['line'][$line['line']] = $line; 
     
    431447        } 
    432448 
    433         $row =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     449        $row = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    434450 
    435451        $this->tpl->assign("template_editor_display", 1); 
     
    471487        foreach($config_files_list as $files) { 
    472488            $sql = "SELECT * FROM  endpointman_custom_configs WHERE product_id = '".$row['product_id']."' AND original_name = '".$files."'"; 
    473             $alt_configs_list_count =& $this->db->query($sql); 
     489            $alt_configs_list_count = $this->db->query($sql); 
    474490            if($alt_configs_list_count->numRows() > 0) { 
    475                 $alt_configs_list =& $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
     491                $alt_configs_list = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    476492                $alt_configs[$i]['name'] = $files; 
    477493                $files = str_replace(".","_",$files); 
     
    498514        $this->tpl->assign("alt", $alt); 
    499515        if(!isset($_REQUEST['maxlines'])) { 
    500             $maxlines = $row['max_lines']
     516            $maxlines = 3
    501517        } else { 
    502518            $maxlines = $_REQUEST['maxlines']; 
     
    832848 
    833849        //Load template data 
    834         $row =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     850        $row = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    835851 
    836852        $cfg_data = unserialize($row['template_data']); 
     
    10151031                        foreach($temp as $list) { 
    10161032                            $sql = "SELECT original_name,data FROM endpointman_custom_configs WHERE id = ".$list; 
    1017                             $res =& $this->db->query($sql); 
     1033                            $res = $this->db->query($sql); 
    10181034                            if($res->numRows()) { 
    10191035                                $data = $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
     
    10291045                        foreach($temp as $list) { 
    10301046                            $sql = "SELECT original_name,data FROM endpointman_custom_configs WHERE id = ".$list; 
    1031                             $res =& $this->db->query($sql); 
     1047                            $res = $this->db->query($sql); 
    10321048                            if($res->numRows()) { 
    10331049                                $data = $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
     
    11961212    function firmware_update_check($id=NULL) { 
    11971213        $sql = "SELECT * FROM  endpointman_product_list WHERE  id ='". $id."'"; 
    1198         $row =& $this->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     1214        $row = $this->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
    11991215 
    12001216        $sql = "SELECT directory FROM  endpointman_brand_list WHERE id =". $row['brand']; 
    1201         $brand_directory =& $this->db->getOne($sql); 
     1217        $brand_directory = $this->db->getOne($sql); 
    12021218 
    12031219        //config drive unknown! 
     
    12261242    function firmware_local_check($id=NULL) { 
    12271243        $sql = "SELECT * FROM  endpointman_product_list WHERE hidden = 0 AND id ='". $id ."'"; 
    1228         $res =& $this->db->query($sql); 
     1244        $res = $this->db->query($sql); 
    12291245 
    12301246        if($res->numRows()) { 
    1231             $row =& $this->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     1247            $row = $this->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
    12321248 
    12331249            $sql = "SELECT directory FROM  endpointman_brand_list WHERE hidden = 0 AND id =". $row['brand']; 
    1234             $brand_directory =& $this->db->getOne($sql); 
     1250            $brand_directory = $this->db->getOne($sql); 
    12351251 
    12361252            //config drive unknown! 
     
    12801296    function install_firmware($product_id) { 
    12811297        $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; 
    1282         $row =& $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     1298        $row = $this->db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
    12831299        $temp = $this->xml2array(PHONE_MODULES_PATH."endpoint/".$row['directory']."/".$row['cfg_dir']."/family_data.xml"); 
    12841300        if($temp['data']['firmware_ver'] > $row['firmware_vers']) { 
     
    13501366        if(!isset($directory)) { 
    13511367            $destination_file = PHONE_MODULES_PATH.'master.xml'; 
    1352      $directory = "master"; 
     1368            $directory = "master"; 
    13531369        } else { 
    13541370            if(!file_exists(PHONE_MODULES_PATH.'/'.$directory)) { 
    1355                 mkdir(PHONE_MODULES_PATH.'/'.$directory,0764); 
    1356             } 
     1371                mkdir(PHONE_MODULES_PATH.'/'.$directory,0764,TRUE); 
     1372            }  
    13571373            $destination_file = PHONE_MODULES_PATH.'/'.$directory.'/brand_data.xml'; 
    13581374        } 
    13591375        $temp_file = PHONE_MODULES_PATH.'temp/'.$directory.'.xml'; 
     1376        @mkdir(dirname($temp_file)); 
    13601377        if($this->download_xml_file($location, $temp_file)) { 
    13611378            $handle = fopen($temp_file, "rb"); 
     
    13821399     * @return array An array of all the brands/products/models and information about what's  enabled, installed or otherwise 
    13831400     */ 
    1384     function brand_update_check() { 
     1401    function update_check() { 
    13851402        $master_result = $this->download_xml(UPDATE_PATH . "master.xml"); 
    13861403 
     
    13961413 
    13971414        $sql = "SELECT value FROM endpointman_global_vars WHERE var_name LIKE 'endpoint_vers'"; 
    1398         $data =& $this->db->getOne($sql); 
     1415        $data = $this->db->getOne($sql); 
    13991416 
    14001417        if(($data == "") OR ($data <= $endpoint_last_mod)) { 
     
    14211438        //Assume that if we can't connect and find the master.xml file then why should we try to find every other file. 
    14221439        if($master_result) { 
    1423             $row =& $this->db->getAll('SELECT * FROM  endpointman_brand_list WHERE id > 0', array(), DB_FETCHMODE_ASSOC); 
     1440            $row = $this->db->getAll('SELECT * FROM  endpointman_brand_list WHERE id > 0', array(), DB_FETCHMODE_ASSOC); 
    14241441 
    14251442            foreach($out as $data) { 
    1426                 //TODO: Make this pull from the local directory 
    1427                 $result = $this->download_xml(UPDATE_PATH .$data['directory']."/".$data['directory'].".xml","endpoint/".$data['directory']); 
    1428                 if(!$result) { 
    1429                     $this->error['brand_update_check'] = "<br/>Not able to connect to repository. Using local brand [".$data['name']."] file instead."; 
     1443 
     1444                $local = $this->db->getOne("SELECT local FROM endpointman_brand_list WHERE  directory =  '".$data['directory']."'"); 
     1445 
     1446                if(!$local) { 
     1447                    $result = $this->download_xml(UPDATE_PATH .$data['directory']."/".$data['directory'].".xml","endpoint/".$data['directory']); 
     1448                    if(!$result) { 
     1449                        $this->error['brand_update_check'] = "<br/>Not able to connect to repository. Using local brand [".$data['name']."] file instead."; 
     1450                    } 
    14301451                } 
    14311452 
     
    14981519     */ 
    14991520    function download_brand($id) { 
    1500         $row =& $this->db->getAll('SELECT * FROM  endpointman_brand_list WHERE id ='.$id, array(), DB_FETCHMODE_ASSOC); 
     1521        $row = $this->db->getAll('SELECT * FROM  endpointman_brand_list WHERE id ='.$id, array(), DB_FETCHMODE_ASSOC); 
    15011522        echo "Downloading Brand XML....."; 
    15021523        $result = $this->download_xml(UPDATE_PATH .$row[0]['directory']. "/".$row[0]['directory'].".xml","endpoint/".$row[0]['directory']); 
     1524 
    15031525        if($result) { 
    15041526            echo "Done!<br/>"; 
    1505             $temp = $this->xml2array(PHONE_MODULES_PATH.'/endpoint/'.$row[0]['directory'].'/brand_data.xml'); 
    1506             $this->update_brand($temp); 
     1527 
     1528            $temp = $this->xml2array(PHONE_MODULES_PATH.'endpoint/'. $row[0]['directory'].'/brand_data.xml'); 
     1529            $package = $temp['data']['brands']['package']; 
     1530 
     1531            echo "<div style='float: left'>Downloading Brand Package...</div><div style='float: left' id=\"DivExample\">.</div>"; 
     1532            $this->download_file_with_progress_bar(UPDATE_PATH.$row[0]['directory'].'/'.$package, PHONE_MODULES_PATH."temp/".$package); 
     1533            echo "<script type='text/javascript'>document.getElementById('DivExample').innerHTML='Done!';</script><br />"; 
     1534 
     1535            if(file_exists(PHONE_MODULES_PATH.'temp/'. $package)) { 
     1536                echo "Extracting Tarball........"; 
     1537                exec("tar -xvf ".PHONE_MODULES_PATH.'temp/'. $package ." -C ".PHONE_MODULES_PATH."temp/"); 
     1538                echo "Done!<br />"; 
     1539 
     1540                //Update File in directory 
     1541                copy(PHONE_MODULES_PATH.'endpoint/'. $row[0]['directory'].'/brand_data.xml', PHONE_MODULES_PATH.'temp/'. $row[0]['directory'].'/brand_data.xml'); 
     1542 
     1543                $package = basename($package, ".tgz"); 
     1544                $package = explode("-",$package); 
     1545                $this->update_brand($package[0]); 
     1546            } else { 
     1547                $this->error['uploader'] = "Can't Find Downloaded File!"; 
     1548            } 
    15071549        } else { 
    15081550            echo "<br/>Error Connecting to the Package Repository. Module not installed. Please Try again later.<br/>You Can Also Manually Update The Repository By Downloading Files here: <a href='http://www.provisioner.net/releases3' target='_blank'>Release Repo</a><br />Then Use Manual Upload in Advanced Settings"; 
     
    15131555     * This will install or updated a brand package (which is the same thing to this) 
    15141556     * Still needs way to determine when models move...perhaps another function? 
    1515      * @param <type> $id 
    1516      */ 
    1517     function update_brand($temp) { 
    1518         $row[0]['directory'] = $temp['data']['brands']['directory']; 
    1519         $brand_name = $temp['data']['brands']['name']; 
    1520         $brand_id = $temp['data']['brands']['brand_id']; 
    1521         $brand_version = $temp['data']['brands']['version']; 
    1522         $brand_last_mod = $temp['data']['brands']['last_modified']; 
    1523         $package = $temp['data']['brands']['package']; 
    1524  
    1525         echo "<div style='float: left'>Downloading Brand Package...</div><div style='float: left' id=\"DivExample\">.</div>"; 
    1526         $this->download_file_with_progress_bar(UPDATE_PATH.$row[0]['directory'].'/'.$package, PHONE_MODULES_PATH."temp/".$package); 
    1527         echo "<script type='text/javascript'>document.getElementById('DivExample').innerHTML='Done!';</script><br />"; 
    1528  
    1529         echo "Extracting Tarball........"; 
    1530         exec("tar -xvf ".PHONE_MODULES_PATH.'temp/'. $package ." -C ".PHONE_MODULES_PATH."temp/"); 
    1531         echo "Done!<br />"; 
    1532  
    1533         echo "Creating Directory Structure/Moving Files..............."; 
    1534         $dir_iterator = new RecursiveDirectoryIterator(PHONE_MODULES_PATH."temp/".$row[0]['directory']."/"); 
    1535         $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); 
    1536         // could use CHILD_FIRST if you so wish 
    1537  
    1538         foreach ($iterator as $file) { 
    1539             if(is_dir($file)) { 
    1540                 $dir = str_replace(PHONE_MODULES_PATH."temp/".$row[0]['directory']."/", "", $file); 
    1541                 if(!file_exists(PHONE_MODULES_PATH."endpoint/".$row[0]['directory']."/".$dir)) { 
    1542                     mkdir(PHONE_MODULES_PATH."endpoint/".$row[0]['directory']."/".$dir,0764); 
    1543                 } 
    1544             } else { 
    1545                 if(basename($file) != "brand_data.xml") { 
    1546                     $dir = str_replace(PHONE_MODULES_PATH."temp/".$row[0]['directory']."/", "", $file); 
    1547                     rename($file, PHONE_MODULES_PATH."endpoint/".$row[0]['directory']."/".$dir); 
    1548                     chmod(PHONE_MODULES_PATH."endpoint/".$row[0]['directory']."/".$dir,0764); 
    1549                 } 
    1550             } 
    1551         } 
    1552         echo "Done!<br />"; 
    1553  
    1554         echo "Removing Temporary Files.............."; 
    1555         $this->rmrf(PHONE_MODULES_PATH."temp/" .$row[0]['directory']); 
    1556         unlink(PHONE_MODULES_PATH.'temp/'. $package); 
    1557         echo "Done!<br />"; 
    1558  
    1559         $last_mod = ""; 
    1560         $temp['data']['brands']['family_list']['family'] = $this->fix_single_array_keys($temp['data']['brands']['family_list']['family']); 
    1561         foreach($temp['data']['brands']['family_list']['family'] as $family_list) { 
    1562             echo "Updating Family Lines.................<br/>"; 
    1563             $last_mod = max($last_mod, $family_list['last_modified']); 
    1564  
    1565             $family_line_xml = $this->xml2array(PHONE_MODULES_PATH.'/endpoint/'.$row[0]['directory'].'/'.$family_list['directory'].'/family_data.xml'); 
    1566             $data =& $this->db->getOne("SELECT id FROM endpointman_product_list WHERE id='".$brand_id.$family_line_xml['data']['id']."'", array(), DB_FETCHMODE_ASSOC); 
    1567             $short_name = preg_replace("/\[(.*?)\]/si", "", $family_line_xml['data']['name']); 
    1568             if($data) { 
    1569                 $sql = "UPDATE endpointman_product_list SET short_name = '".$short_name."', long_name = '".$family_line_xml['data']['name']."', cfg_ver = '".$family_line_xml['data']['version']."', config_files='".$family_line_xml['data']['configuration_files']."' WHERE id = '".$brand_id.$family_line_xml['data']['id']."'"; 
    1570             } else { 
    1571                 $sql = "INSERT INTO endpointman_product_list (`id`, `brand`, `short_name`, `long_name`, `cfg_dir`, `cfg_ver`, `config_files`, `hidden`) VALUES ('".$brand_id.$family_line_xml['data']['id']."', '".$brand_id."', '".$short_name."', '".$family_line_xml['data']['name']."', '".$family_line_xml['data']['directory']."', '".$family_line_xml['data']['version']."','".$family_line_xml['data']['configuration_files']."', '0')"; 
    1572             } 
    1573  
    1574             $this->db->query($sql); 
    1575             $family_line_xml['data']['model_list'] = $this->fix_single_array_keys($family_line_xml['data']['model_list']); 
    1576             echo "--Updating Model Lines................<br/>"; 
    1577             foreach($family_line_xml['data']['model_list'] as $model_list) { 
    1578                 if(is_array($model_list['template_data']['files'])) { 
    1579                     $template_list = implode(",",$model_list['template_data']['files']); 
    1580                 } else { 
    1581                     $template_list = $model_list['template_data']['files']; 
    1582                 } 
    1583  
    1584                 $model_final_id = $brand_id.$family_line_xml['data']['id'].$model_list['id']; 
    1585                 $sql = 'SELECT id, global_custom_cfg_data, global_user_cfg_data FROM endpointman_mac_list WHERE model = '.$model_final_id; 
    1586                 $old_data = NULL; 
    1587                 $old_data = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    1588                 foreach($old_data as $data) { 
    1589                     $global_custom_cfg_data = unserialize($data['global_custom_cfg_data']); 
    1590                     if((is_array($global_custom_cfg_data)) AND (!array_key_exists('data', $global_custom_cfg_data))) { 
    1591                         echo "----Old Data Detected! Migrating......"; 
    1592                         $new_data = array(); 
    1593                         $new_ari = array(); 
    1594                         foreach($global_custom_cfg_data as $key => $old_keys) { 
    1595                             if(array_key_exists('value', $old_keys)) { 
    1596                                 $new_data[$key] = $old_keys['value']; 
    1597                             } else { 
    1598                                 $breaks = explode("_", $key); 
    1599                                 $new_data["loop|".$key] = $old_keys[$breaks[2]]; 
     1557     */ 
     1558    function update_brand($package,$remote=TRUE) { 
     1559        if(file_exists(PHONE_MODULES_PATH.'temp/'. $package.'/brand_data.xml')) { 
     1560            $temp = $this->xml2array(PHONE_MODULES_PATH.'temp/'. $package.'/brand_data.xml'); 
     1561            if(key_exists('directory', $temp['data']['brands'])) { 
     1562                echo "Appears to be a valid Provisioner.net XML file.....Continuing<br />"; 
     1563 
     1564                //Pull in all variables 
     1565                $directory = $temp['data']['brands']['directory']; 
     1566                $brand_name = $temp['data']['brands']['name']; 
     1567                $brand_id = $temp['data']['brands']['brand_id']; 
     1568                $brand_version = $temp['data']['brands']['version']; 
     1569                $brand_last_mod = $temp['data']['brands']['last_modified']; 
     1570 
     1571                //create directory structure and move files 
     1572                echo "Creating Directory Structure/Moving Files.."; 
     1573 
     1574                @mkdir(PHONE_MODULES_PATH."endpoint/".$directory); 
     1575 
     1576                $dir_iterator = new RecursiveDirectoryIterator(PHONE_MODULES_PATH."temp/".$directory."/"); 
     1577                $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST); 
     1578                foreach ($iterator as $file) { 
     1579                    if(is_dir($file)) { 
     1580                        $dir = str_replace(PHONE_MODULES_PATH."temp/".$directory."/", "", $file); 
     1581                        if(!file_exists(PHONE_MODULES_PATH."endpoint/".$directory."/".$dir)) { 
     1582                            mkdir(PHONE_MODULES_PATH."endpoint/".$directory."/".$dir,0764, TRUE); 
     1583                            echo "."; 
     1584                        } 
     1585                    } else { 
     1586                        if((basename($file) != "brand_data.xml") OR (!$remote)) { 
     1587                            $dir = str_replace(PHONE_MODULES_PATH."temp/".$directory."/", "", $file); 
     1588                            $stats = rename($file, PHONE_MODULES_PATH."endpoint/".$directory."/".$dir); 
     1589                            if($stats === FALSE) { 
     1590                                echo "Error Moving ". basename($file); 
    16001591                            } 
    1601                             if(array_key_exists('ari', $old_keys)) { 
    1602                                 $new_ari[$key] = 1; 
     1592                            chmod(PHONE_MODULES_PATH."endpoint/".$directory."/".$dir,0764); 
     1593                            echo "."; 
     1594                        } 
     1595                    } 
     1596                } 
     1597                echo "Done!<br />"; 
     1598 
     1599                $last_mod = ""; 
     1600                $temp['data']['brands']['family_list']['family'] = $this->fix_single_array_keys($temp['data']['brands']['family_list']['family']); 
     1601                foreach($temp['data']['brands']['family_list']['family'] as $family_list) { 
     1602                    echo "Updating Family Lines.................<br/>"; 
     1603                    $last_mod = max($last_mod, $family_list['last_modified']); 
     1604 
     1605                    $family_line_xml = $this->xml2array(PHONE_MODULES_PATH.'/endpoint/'.$directory.'/'.$family_list['directory'].'/family_data.xml'); 
     1606                    $data = $this->db->getOne("SELECT id FROM endpointman_product_list WHERE id='".$brand_id.$family_line_xml['data']['id']."'", array(), DB_FETCHMODE_ASSOC); 
     1607                    $short_name = preg_replace("/\[(.*?)\]/si", "", $family_line_xml['data']['name']); 
     1608                    if($data) { 
     1609                        $sql = "UPDATE endpointman_product_list SET short_name = '".$short_name."', long_name = '".$family_line_xml['data']['name']."', cfg_ver = '".$family_line_xml['data']['version']."', config_files='".$family_line_xml['data']['configuration_files']."' WHERE id = '".$brand_id.$family_line_xml['data']['id']."'"; 
     1610                    } else { 
     1611                        $sql = "INSERT INTO endpointman_product_list (`id`, `brand`, `short_name`, `long_name`, `cfg_dir`, `cfg_ver`, `config_files`, `hidden`) VALUES ('".$brand_id.$family_line_xml['data']['id']."', '".$brand_id."', '".$short_name."', '".$family_line_xml['data']['name']."', '".$family_line_xml['data']['directory']."', '".$family_line_xml['data']['version']."','".$family_line_xml['data']['configuration_files']."', '0')"; 
     1612                    } 
     1613 
     1614                    $this->db->query($sql); 
     1615                    $family_line_xml['data']['model_list'] = $this->fix_single_array_keys($family_line_xml['data']['model_list']); 
     1616                    echo "--Updating Model Lines................<br/>"; 
     1617                    foreach($family_line_xml['data']['model_list'] as $model_list) { 
     1618                        if(is_array($model_list['template_data']['files'])) { 
     1619                            $template_list = implode(",",$model_list['template_data']['files']); 
     1620                        } else { 
     1621                            $template_list = $model_list['template_data']['files']; 
     1622                        } 
     1623 
     1624                        $model_final_id = $brand_id.$family_line_xml['data']['id'].$model_list['id']; 
     1625                        $sql = 'SELECT id, global_custom_cfg_data, global_user_cfg_data FROM endpointman_mac_list WHERE model = '.$model_final_id; 
     1626                        $old_data = NULL; 
     1627                        $old_data = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
     1628                        foreach($old_data as $data) { 
     1629                            $global_custom_cfg_data = unserialize($data['global_custom_cfg_data']); 
     1630                            if((is_array($global_custom_cfg_data)) AND (!array_key_exists('data', $global_custom_cfg_data))) { 
     1631                                echo "----Old Data Detected! Migrating......"; 
     1632                                $new_data = array(); 
     1633                                $new_ari = array(); 
     1634                                foreach($global_custom_cfg_data as $key => $old_keys) { 
     1635                                    if(array_key_exists('value', $old_keys)) { 
     1636                                        $new_data[$key] = $old_keys['value']; 
     1637                                    } else { 
     1638                                        $breaks = explode("_", $key); 
     1639                                        $new_data["loop|".$key] = $old_keys[$breaks[2]]; 
     1640                                    } 
     1641                                    if(array_key_exists('ari', $old_keys)) { 
     1642                                        $new_ari[$key] = 1; 
     1643                                    } 
     1644                                } 
     1645                                $final_data = array(); 
     1646                                $final_data['data'] = $new_data; 
     1647                                $final_data['ari'] = $new_ari; 
     1648                                $final_data = serialize($final_data); 
     1649                                $sql = "UPDATE endpointman_mac_list SET  global_custom_cfg_data =  '".$final_data."' WHERE  id =".$data['id']; 
     1650                                $this->db->query($sql); 
     1651                                echo "Done!<br/>"; 
     1652                            } 
     1653 
     1654                            $global_user_cfg_data = unserialize($data['global_user_cfg_data']); 
     1655                            $old_check = FALSE; 
     1656                            if(is_array($global_user_cfg_data)) { 
     1657                                foreach($global_user_cfg_data as $stuff) { 
     1658                                    if(is_array($stuff)) { 
     1659                                        if(array_key_exists('value', $stuff)) { 
     1660                                            $old_check = TRUE; 
     1661                                            break; 
     1662                                        } else { 
     1663                                            break; 
     1664                                        } 
     1665                                    } else { 
     1666                                        break; 
     1667                                    } 
     1668                                } 
     1669                            } 
     1670                            if((is_array($global_user_cfg_data)) AND ($old_check)) { 
     1671                                echo "Old Data Detected! Migrating......"; 
     1672                                $new_data = array(); 
     1673                                foreach($global_user_cfg_data as $key => $old_keys) { 
     1674                                    if(array_key_exists('value', $old_keys)) { 
     1675                                        $exploded = explode("_",$key); 
     1676                                        $counted = count($exploded); 
     1677                                        $counted = $counted - 1; 
     1678                                        if(is_numeric($exploded[$counted])) { 
     1679                                            $key = "loop|".$key; 
     1680                                        } 
     1681                                        $new_data[$key] = $old_keys['value']; 
     1682                                    } 
     1683                                } 
     1684                                $final_data = serialize($new_data); 
     1685                                $sql = "UPDATE endpointman_mac_list SET  global_user_cfg_data =  '".$final_data."' WHERE  id =".$data['id']; 
     1686                                $this->db->query($sql); 
     1687                                echo "Done!<br/>"; 
    16031688                            } 
    16041689                        } 
    1605                         $final_data = array()
    1606                         $final_data['data'] = $new_data
    1607                         $final_data['ari'] = $new_ari
    1608                         $final_data = serialize($final_data); 
    1609                         $sql = "UPDATE endpointman_mac_list SET  global_custom_cfg_data =  '".$final_data."' WHERE  id =".$data['id']
    1610                         $this->db->query($sql); 
    1611                         echo "Done!<br/>"; 
    1612                     } 
    1613  
    1614                     $global_user_cfg_data = unserialize($data['global_user_cfg_data']); 
    1615                     $old_check = FALSE; 
    1616                     if(is_array($global_user_cfg_data)) { 
    1617                         foreach($global_user_cfg_data as $stuff)
    1618                             if(is_array($stuff)) { 
    1619                                 if(array_key_exists('value', $stuff)) { 
    1620                                     $old_check = TRUE; 
    1621                                     break; 
    1622                                 } else { 
    1623                                     break; 
     1690                        $old_data = NULL
     1691                        $sql = 'SELECT id, global_custom_cfg_data FROM endpointman_template_list WHERE model_id = '.$model_final_id
     1692                        $old_data = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC)
     1693                        foreach($old_data as $data) { 
     1694                            $global_custom_cfg_data = unserialize($data['global_custom_cfg_data'])
     1695                            if((is_array($global_custom_cfg_data)) AND (!array_key_exists('data', $global_custom_cfg_data))) { 
     1696                                echo "Old Data Detected! Migrating......"; 
     1697                                $new_data = array(); 
     1698                                $new_ari = array(); 
     1699                                foreach($global_custom_cfg_data as $key => $old_keys) { 
     1700                                    if(array_key_exists('value', $old_keys)) { 
     1701                                        $new_data[$key] = $old_keys['value']; 
     1702                                    } else
     1703                                        $breaks = explode("_", $key); 
     1704                                        $new_data["loop|".$key] = $old_keys[$breaks[2]]; 
     1705                                    } 
     1706                                    if(array_key_exists('ari', $old_keys)) { 
     1707                                        $new_ari[$key] = 1; 
     1708                                    } 
    16241709                                } 
    1625                             } else { 
    1626                                 break; 
     1710                                $final_data = array(); 
     1711                                $final_data['data'] = $new_data; 
     1712                                $final_data['ari'] = $new_ari; 
     1713                                $final_data = serialize($final_data); 
     1714                                $sql = "UPDATE endpointman_template_list SET  global_custom_cfg_data =  '".$final_data."' WHERE  id =".$data['id']; 
     1715                                $this->db->query($sql); 
     1716                                echo "Done!<br/>"; 
    16271717                            } 
    16281718                        } 
    1629                     } 
    1630                     if((is_array($global_user_cfg_data)) AND ($old_check)) { 
    1631                         echo "Old Data Detected! Migrating......"; 
    1632                         $new_data = array(); 
    1633                         foreach($global_user_cfg_data as $key => $old_keys) { 
    1634                             if(array_key_exists('value', $old_keys)) { 
    1635                                 $exploded = explode("_",$key); 
    1636                                 $counted = count($exploded); 
    1637                                 $counted = $counted - 1; 
    1638                                 if(is_numeric($exploded[$counted])) { 
    1639                                     $key = "loop|".$key; 
    1640                                 } 
    1641                                 $new_data[$key] = $old_keys['value']; 
    1642                             } 
     1719 
     1720                        $m_data = $this->db->getOne("SELECT id FROM endpointman_model_list WHERE id='".$brand_id.$family_line_xml['data']['id'].$model_list['id']."'", array(), DB_FETCHMODE_ASSOC); 
     1721                        if($m_data) { 
     1722                            $sql = "UPDATE endpointman_model_list SET max_lines = '".$model_list['lines']."', model = '".$model_list['model']."', template_list = '".$template_list."' WHERE id = '".$brand_id.$family_line_xml['data']['id'].$model_list['id']."'"; 
     1723                        } else { 
     1724                            $sql = "INSERT INTO endpointman_model_list (`id`, `brand`, `model`, `max_lines`, `product_id`, `template_list`, `enabled`, `hidden`) VALUES ('".$brand_id.$family_line_xml['data']['id'].$model_list['id']."', '".$brand_id."', '".$model_list['model']."', '".$model_list['lines']."', '".$brand_id.$family_line_xml['data']['id']."', '".$template_list."', '0', '0')"; 
    16431725                        } 
    1644                         $final_data = serialize($new_data); 
    1645                         $sql = "UPDATE endpointman_mac_list SET  global_user_cfg_data =  '".$final_data."' WHERE  id =".$data['id']; 
    16461726                        $this->db->query($sql); 
    1647                         echo "Done!<br/>"; 
    1648                     } 
    1649                 } 
    1650                 $old_data = NULL; 
    1651                 $sql = 'SELECT id, global_custom_cfg_data FROM endpointman_template_list WHERE model_id = '.$model_final_id; 
    1652                 $old_data = $this->db->getAll($sql, array(), DB_FETCHMODE_ASSOC); 
    1653                 foreach($old_data as $data) { 
    1654                     $global_custom_cfg_data = unserialize($data['global_custom_cfg_data']); 
    1655                     if((is_array($global_custom_cfg_data)) AND (!array_key_exists('data', $global_custom_cfg_data))) { 
    1656                         echo "Old Data Detected! Migrating......"; 
    1657                         $new_data = array(); 
    1658                         $new_ari = array(); 
    1659                         foreach($global_custom_cfg_data as $key => $old_keys) { 
    1660                             if(array_key_exists('value', $old_keys)) { 
    1661                                 $new_data[$key] = $old_keys['value']; 
    1662                             } else { 
    1663                                 $breaks = explode("_", $key); 
    1664                                 $new_data["loop|".$key] = $old_keys[$breaks[2]]; 
    1665                             } 
    1666                             if(array_key_exists('ari', $old_keys)) { 
    1667                                 $new_ari[$key] = 1; 
    1668                             } 
     1727 
     1728                        if(!$this->sync_model($brand_id.$family_line_xml['data']['id'].$model_list['id'])) { 
     1729                            echo "System Error in Sync Model Function, Load Failure!<br />"; 
    16691730                        } 
    1670                         $final_data = array(); 
    1671                         $final_data['data'] = $new_data; 
    1672                         $final_data['ari'] = $new_ari; 
    1673                         $final_data = serialize($final_data); 
    1674                         $sql = "UPDATE endpointman_template_list SET  global_custom_cfg_data =  '".$final_data."' WHERE  id =".$data['id']; 
    1675                         $this->db->query($sql); 
    1676                         echo "Done!<br/>"; 
    1677                     } 
    1678                 } 
    1679  
    1680                 $m_data =& $this->db->getOne("SELECT id FROM endpointman_model_list WHERE id='".$brand_id.$family_line_xml['data']['id'].$model_list['id']."'", array(), DB_FETCHMODE_ASSOC); 
    1681                 if($m_data) { 
    1682                     $sql = "UPDATE endpointman_model_list SET max_lines = '".$model_list['lines']."', model = '".$model_list['model']."', template_list = '".$template_list."' WHERE id = '".$brand_id.$family_line_xml['data']['id'].$model_list['id']."'"; 
     1731                    } 
     1732                    //TODO: Phone Models Move Here 
     1733                } 
     1734                if($remote) { 
     1735                    $local = 0; 
    16831736                } else { 
    1684                     $sql = "INSERT INTO endpointman_model_list (`id`, `brand`, `model`, `max_lines`, `product_id`, `template_list`, `enabled`, `hidden`) VALUES ('".$brand_id.$family_line_xml['data']['id'].$model_list['id']."', '".$brand_id."', '".$model_list['model']."', '".$model_list['lines']."', '".$brand_id.$family_line_xml['data']['id']."', '".$template_list."', '0', '0')"; 
    1685                 } 
    1686                 $this->db->query($sql); 
    1687  
    1688                 if(!$this->sync_model($brand_id.$family_line_xml['data']['id'].$model_list['id'])) { 
    1689                     echo "System Error in Sync Model Function, Load Failure!<br />"; 
    1690                 } 
    1691             } 
    1692         } 
    1693  
    1694         $brand_version = max($last_mod, $brand_last_mod); 
    1695         echo "Updating data.........."; 
    1696         $sql = "UPDATE endpointman_brand_list SET name = '".$brand_name."', cfg_ver = '".$brand_version."', installed = 1, hidden = 0 WHERE id = ".$brand_id; 
    1697         $this->db->query($sql); 
    1698         echo "Done!<br/>"; 
    1699     } 
     1737                    $local = 1; 
     1738                } 
     1739                $brand_version = max($last_mod, $brand_last_mod); 
     1740 
     1741                $b_data = $this->db->getOne("SELECT id FROM endpointman_brand_list WHERE id='".$brand_id."'", array(), DB_FETCHMODE_ASSOC); 
     1742                if($b_data) { 
     1743                    echo "Updating data.........."; 
     1744                    $sql = "UPDATE endpointman_brand_list SET local = '".$local."', name = '".$brand_name."', cfg_ver = '".$brand_version."', installed = 1, hidden = 0 WHERE id = ".$brand_id; 
     1745                    $this->db->query($sql); 
     1746                } else { 
     1747                    $sql = "INSERT INTO endpointman_brand_list (id, name, directory, cfg_ver, local, installed) VALUES ('".$brand_id."', '".$brand_name."', '".$directory."', '".$brand_version."', '1', '1')"; 
     1748                    $this->db->query($sql); 
     1749                } 
     1750 
     1751                foreach($temp['data']['brands']['oui_list']['oui'] as $oui) { 
     1752                    $sql = "INSERT INTO endpointman_oui_list (`oui`, `brand`, `custom`) VALUES ('".$oui."', '".$brand_id."', '0')"; 
     1753                    $this->db->query($sql); 
     1754                } 
     1755 
     1756                echo "Done!<br/>"; 
     1757            } else { 
     1758                echo "Invalid XML Structure<br />"; 
     1759            } 
     1760        } else { 
     1761            echo "No 'brand_data.xml' file exists!<br />"; 
     1762        } 
     1763 
     1764        echo "Removing Temporary Files.............."; 
     1765        $this->rmrf(PHONE_MODULES_PATH."temp/" .$package); 
     1766        echo "Done!<br />"; 
     1767 
     1768    } 
     1769 
    17001770 
    17011771    /** 
     
    17041774     */ 
    17051775    function remove_brand($id=NULL) { 
    1706         $brand_dir =& $this->db->getOne("SELECT directory FROM endpointman_brand_list WHERE id=".$id); 
     1776        $brand_dir = $this->db->getOne("SELECT directory FROM endpointman_brand_list WHERE id=".$id); 
    17071777        $this->rmrf(PHONE_MODULES_PATH."endpoint/".$brand_dir); 
    17081778 
     
    17311801            $sql = "SELECT * FROM  endpointman_model_list WHERE id='".$model."'"; 
    17321802 
    1733             $model_row =& $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
     1803            $model_row = $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
    17341804 
    17351805            $sql = "SELECT * FROM  endpointman_product_list WHERE id='".$model_row['product_id']."'"; 
    17361806 
    1737             $product_row =& $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
     1807            $product_row = $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
    17381808 
    17391809            $sql = "SELECT * FROM  endpointman_brand_list WHERE id=".$model_row['brand']; 
    17401810 
    17411811 
    1742             $brand_row =& $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
     1812            $brand_row = $this->db->getRow($sql, array(),DB_FETCHMODE_ASSOC); 
    17431813 
    17441814            $family_line_xml = $this->xml2array(PHONE_MODULES_PATH.'/endpoint/'.$brand_row['directory'].'/'.$product_row['cfg_dir'].'/family_data.xml'); 
     
    22462316                $oui_sql = "SELECT endpointman_brand_list.name, endpointman_brand_list.id FROM endpointman_oui_list, endpointman_brand_list WHERE oui LIKE '%". $oui ."%' AND endpointman_brand_list.id = endpointman_oui_list.brand AND endpointman_brand_list.installed = 1 LIMIT 1"; 
    22472317 
    2248                 $brand =& $this->db->getRow($oui_sql, array(), DB_FETCHMODE_ASSOC); 
     2318                $brand = $this->db->getRow($oui_sql, array(), DB_FETCHMODE_ASSOC); 
    22492319                 
    2250                 $res =& $this->db->query($oui_sql); 
     2320                $res = $this->db->query($oui_sql); 
    22512321                $brand_count = $res->numRows(); 
    22522322                 
     
    22592329                //Find out if endpoint has already been configured for this mac address 
    22602330                $epm_sql = "SELECT * FROM endpointman_mac_list WHERE mac LIKE  '%". $mac_strip ."%'"; 
    2261                 $epm_row =& $this->db->getRow($epm_sql, array(), DB_FETCHMODE_ASSOC); 
    2262  
    2263                 $res =& $this->db->query($epm_sql); 
     2331                $epm_row = $this->db->getRow($epm_sql, array(), DB_FETCHMODE_ASSOC); 
     2332 
     2333                $res = $this->db->query($epm_sql); 
    22642334                $epm_count = $res->numRows(); 
    22652335 
     
    22892359        $count = $this->db->getOne($sql); 
    22902360 
    2291         //TODO: FIX this 
    2292         /** 
    2293         if($count == 0) { 
    2294            $this->sync_model($model); 
    2295            $sql = "SELECT max_lines FROM endpointman_model_list WHERE id = '". $model."'"; 
    2296            $count = $this->db->getOne($sql); 
    2297            if($count == 0) { 
    2298                die("Can't Reset Lines to more than 0! ['areaAvailble']"); 
    2299            } 
    2300         } 
    2301          *  
    2302          */ 
    23032361        for($z=0;$z<$count;$z++) { 
    23042362            $result[$z]['id'] = $z + 1; 
     
    23332391         
    23342392        if ((!isset($oui)) && (!isset($brand)) && (!isset($model))) { 
    2335             $result1 =& $this->endpoint_data->all_models(); 
     2393            $result1 = $this->endpoint_data->all_models(); 
    23362394        }elseif((isset($brand)) && ($brand !=0)) { 
    2337             $result1 =& $this->endpoint_data->all_models_by_brand($brand); 
     2395            $result1 = $this->endpoint_data->all_models_by_brand($brand); 
    23382396        }elseif((isset($product)) && ($product !=0)) { 
    2339             $result1 =& $this->endpoint_data->all_models_by_product($product); 
    2340         } else { 
    2341             $result1 =& $this->endpoint_data->all_models(); 
     2397            $result1 = $this->endpoint_data->all_models_by_product($product); 
     2398        } else { 
     2399            $result1 = $this->endpoint_data->all_models(); 
    23422400        } 
    23432401 
     
    23832441 
    23842442            $sql_l = "SELECT line, mac_id FROM `endpointman_line_list` WHERE luid = ".$lineid; 
    2385             $line =& $this->db->getRow($sql_l, array(), DB_FETCHMODE_ASSOC); 
     2443            $line = $this->db->getRow($sql_l, array(), DB_FETCHMODE_ASSOC); 
    23862444 
    23872445            $sql_lu = "SELECT line FROM endpointman_line_list WHERE mac_id = ".$line['mac_id']; 
     
    23942452 
    23952453        $max_lines = $this->db->getOne($sql); 
    2396         $lines_used =& $this->db->getAll($sql_lu); 
     2454        $lines_used = $this->db->getAll($sql_lu); 
    23972455 
    23982456        for($i = 1; $i <= $max_lines; $i++) {     
     
    24222480 
    24232481        if(isset($line_id)) { 
    2424             $result =& $this->endpoint_data->all_unused_registrations(); 
    2425             $line_data =& $this->endpoint_data->get_line_information($line_id); 
    2426         } else { 
    2427             $result =& $this->endpoint_data->all_unused_registrations(); 
     2482            $result = $this->endpoint_data->all_unused_registrations(); 
     2483            $line_data = $this->endpoint_data->get_line_information($line_id); 
     2484        } else { 
     2485            $result = $this->endpoint_data->all_unused_registrations(); 
    24282486            $line_data = NULL; 
    24292487        } 
     
    24522510     */ 
    24532511    function brands_available ($selected = NULL,$show_blank=TRUE) { 
    2454         $data =& $this->endpoint_data->all_active_brands(); 
     2512        $data = $this->endpoint_data->all_active_brands(); 
    24552513        if($show_blank) { 
    24562514            $temp[0]['value'] = ""; 
     
    24772535        $sql="SELECT id FROM  endpointman_product_list WHERE endpointman_product_list.id ='".$product_id."'"; 
    24782536 
    2479         $id =& $this->db->getOne($sql); 
     2537        $id = $this->db->getOne($sql); 
    24802538 
    24812539        $sql="SELECT * FROM  endpointman_template_list WHERE  product_id = '".$id."'"; 
    24822540 
    2483         $data =& $this->db->getAll($sql,array(), DB_FETCHMODE_ASSOC); 
     2541        $data = $this->db->getAll($sql,array(), DB_FETCHMODE_ASSOC); 
    24842542        foreach($data as $row) { 
    24852543            $temp[$i]['value'] = $row['id']; 
     
    25032561    function listTZ($selected) { 
    25042562        $sql="SELECT tz FROM endpointman_time_zones"; 
    2505         $data =& $this->db->getAll($sql,array(), DB_FETCHMODE_ASSOC); 
     2563        $data = $this->db->getAll($sql,array(), DB_FETCHMODE_ASSOC); 
    25062564        $i = 0; 
    25072565        foreach($data as $row) { 
  • modules/branches/2.9/endpointman/includes/installer.php

    r11318 r11618  
    7373            break; 
    7474        case "upload_brand": 
    75             if ((file_exists(PHONE_MODULES_PATH."temp/".$_REQUEST['package'])) AND (file_exists(PHONE_MODULES_PATH."temp/".$_REQUEST['xml']))) { 
    76                 $temp = $endpoint->xml2array(PHONE_MODULES_PATH."temp/".$_REQUEST['xml']); 
    77                 $endpoint->update_brand($temp); 
     75            if (file_exists(PHONE_MODULES_PATH."temp/".$_REQUEST['package'])) { 
     76                echo "Extracting Tarball........"; 
     77                exec("tar -xvf ".PHONE_MODULES_PATH.'temp/'. $_REQUEST['package'] ." -C ".PHONE_MODULES_PATH."temp/"); 
     78                echo "Done!<br />"; 
     79 
     80                $package = basename($_REQUEST['package'], ".tgz");                 
     81                $package = explode("-",$package); 
     82 
     83                if(file_exists(PHONE_MODULES_PATH."temp/".$package[0])) { 
     84                    $endpoint->update_brand($package[0],FALSE); 
     85                    unlink(PHONE_MODULES_PATH.'temp/'. $_REQUEST['package']); 
     86                } else { 
     87                    echo "Please name the Package the same name as your brand!"; 
     88                }        
     89            } else { 
     90                $endpoint->error['upload'] = "No File Provided"; 
    7891            } 
    7992            break; 
  • modules/branches/2.9/endpointman/includes/popup.php

    r10792 r11618  
    4545                $endpoint->tpl->assign("save_as_name_value", $row['name']); 
    4646                $endpoint->tpl->assign("filename", $row['original_name']); 
     47                $row['data'] = $endpoint->display_htmlspecialchars($row['data']); 
    4748                $endpoint->tpl->assign("config_data", $row['data']); 
    4849            } else { 
     
    6263                $contents = fread($handle, filesize($file)); 
    6364                fclose($handle); 
     65                $contents = $endpoint->display_htmlspecialchars($contents); 
    6466                $endpoint->tpl->assign("config_data", $contents); 
    6567            } 
     
    7678                $endpoint->tpl->assign("save_as_name_value", $row['name']); 
    7779                $endpoint->tpl->assign("filename", $row['original_name']); 
     80                $row['data'] = $endpoint->display_htmlspecialchars($row['data']); 
    7881                $endpoint->tpl->assign("config_data", $row['data']); 
    7982            } else { 
     
    9396                $contents = fread($handle, filesize($file)); 
    9497                fclose($handle); 
     98                $contents = $endpoint->display_htmlspecialchars($contents); 
    9599                $endpoint->tpl->assign("config_data", $contents); 
    96100            } 
  • modules/branches/2.9/endpointman/install.php

    r11318 r11618  
    9292} 
    9393 
    94 $version = "2.9.0.4"; 
     94$version = "2.9.0.6"; 
    9595 
    9696if(ep_table_exists("endpointman_global_vars")) { 
     
    900900    } 
    901901 
     902    if($ver <= "2.9.0.4") { 
     903        $sql = 'ALTER TABLE  `endpointman_brand_list` ADD  `local` INT( 1 ) NOT NULL DEFAULT  \'0\' AFTER  `cfg_ver`'; 
     904        $db->query($sql); 
     905    } 
     906 
     907    if($ver <= "2.9.0.5") { 
     908        $sql = "INSERT INTO  `asterisk`.`endpointman_global_vars` (`idnum` ,`var_name` ,`value`)VALUES (NULL ,  'show_all_registrations',  '0')"; 
     909        $db->query($sql); 
     910    } 
     911 
    902912} 
    903913 
     
    912922                  `cfg_ver` varchar(255) NOT NULL, 
    913923                  `installed` int(1) NOT NULL DEFAULT '0', 
     924                    `local` int(1) NOT NULL DEFAULT '0', 
    914925                  `hidden` int(1) NOT NULL DEFAULT '0', 
    915926                  PRIMARY KEY (`id`) 
     
    963974            (15, 'disable_htaccess', ''), 
    964975            (16, 'endpoint_vers', '0'), 
    965             (17, 'disable_help', '0')"; 
     976            (17, 'disable_help', '0'), 
     977            (17, 'show_all_registrations', '0')"; 
    966978    $db->query($sql); 
    967979 
  • modules/branches/2.9/endpointman/module.xml

    r11319 r11618  
    33  <repo>standard</repo> 
    44  <name>PBX End Point Manager</name> 
    5   <version>2.9.0.3RC5</version> 
     5  <version>2.9.0.3RC7</version> 
    66  <type>tool</type> 
    77  <category>End Point Manager</category> 
     
    1616   <description>PBX End Point Manager supports automated deployment of multiple manufacturers IP telephones.</description> 
    1717   <changelog> 
     18                *2.9.0.3RC6* Fixed Device & User Mode (http://www.freepbx.org/forum/freepbx/users/device-user-mode), #4792 
    1819    *2.9.0.0* bumped for 2.9, removed errors in module.xml causing erors for online xml parsing 
    1920                *2.3.2* Various Bug Fixes 
     
    2223        </changelog> 
    2324  <info>http://projects.colsolgrp.net/projects/show/endpointman</info> 
    24   <location>release/2.9/endpointman-2.9.0.3RC5.tgz</location> 
     25  <location>release/2.9/endpointman-2.9.0.3RC2.tgz</location> 
    2526 
    26 <md5sum>ecd0e63c2947a7b1e6eaa678a6e09d76</md5sum> 
     27<md5sum>f4aed8221b1398a65438454786ce8089</md5sum> 
    2728</module> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_iedl.html

    r10947 r11618  
    55  <br> 
    66  <a href="{$exporter_address}"><?=_('Export CSV')?></a></p> 
    7 <p><?=_('Import CSV file of devices')?>:<form name="form1" enctype="multipart/form-data" method="post" action="config.php{$web_vars}&display=epm_advanced&subpage=iedl&action=import"> 
     7<p><?=_('Import CSV file of devices')?>:<form name="form1" enctype="multipart/form-data" method="post" action="config.php?type=tool&display=epm_advanced&subpage=iedl&action=import"> 
    88  <label> 
    99  <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_manual_upload.html

    r10792 r11618  
    1717  freepbx_modal_hide('moduleBox'); 
    1818  if (goback) { 
    19       location.href = 'config.php?type=tool&display=epm_advanced&subpage=manual_upload'; 
     19      location.href = 'config.php?type=tool&amp;display=epm_advanced&amp;subpage=manual_upload'; 
    2020  } 
    2121} 
     
    3535</form> 
    3636    <br /><br /> 
    37 {if condition="1 == 0"} 
    3837<form action="" method="post" enctype="multipart/form-data" name="form1"> 
    39     <label>Master List File (.xml): 
    40         <input type="file" name="xml" id="fileField"> 
    41     </label> Local Date Last Modified: {$master_ver} 
    42         <br/> 
    43     <input type="submit" name="upload_master_xml" value="<?=_('Upload')?>"> 
    44 </form> 
    45     <br /><br /> 
    46 {/if} 
    47 <form action="" method="post" enctype="multipart/form-data" name="form1"> 
    48     <label>Brand XML File (.xml): 
    49         <input type="file" name="xml" id="fileField"> 
    50     </label> 
    51     <br /> 
    5238    <label>Brand Package (.tgz): 
    5339        <input type="file" name="package" id="fileField"> 
    5440    </label> 
    55         <br/> 
     41    <br /><font style="font-size: small">Note: The Brand XML File is no longer needed as it is contained within the Brand Package.<br /><br />Learn How to Create your own brand package here: <a target="_blank" href="http://www.provisioner.net/adding_new_phones">http://www.provisioner.net/adding_new_phones</a></font><br /> 
    5642    <input type="submit" name="upload_brand" value="<?=_('Upload')?>"> 
    5743</form> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_oui.html

    r10792 r11618  
    1212  {loop name="oui_list_custom"} 
    1313  </tr><tr> 
    14   <td align='center'>{$value.oui}</td><td align='center'>{$value.name}</td><td align='center'><a href="config.php{$web_vars}&display=epm_advanced&subpage=oui_manager&delete=yes&id={$value.id}"><img src='images/delete.gif' ALT='Delete' border='0'></a></td> 
     14  <td align='center'>{$value.oui}</td><td align='center'>{$value.name}</td><td align='center'><a href="config.php?type=tool&amp;display=epm_advanced&amp;subpage=oui_manager&amp;delete=yes&amp;id={$value.id}"><img src='images/delete.gif' ALT='Delete' border='0'></a></td> 
    1515  </tr><tr> 
    1616  {/loop} 
     
    1919    <td colspan="2" align='center'><h3><?=_('Add Custom')?> OUI</h3></td> 
    2020</form> 
    21 <form action='config.php{$web_vars}&display=epm_advanced&subpage=oui_manager' method='POST'> 
     21<form action='config.php?type=tool&amp;display=epm_advanced&amp;subpage=oui_manager' method='POST'> 
    2222  </tr><tr> 
    2323  <td align='center'><input name="oui" type="text"  maxlength="6"/></td><td align='center'> <select name="rb_brand"> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_poce.html

    r10792 r11618  
    22    {include="message_box"} 
    33{/if} 
    4 <center><form method="post" action="config.php{$web_vars}&display=epm_advanced&subpage=poce"> 
     4<center><form method="post" action="config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce"> 
    55  <?=_("Select Product")?> 
    66  <select name="product_select" id="product_select"> 
     
    1515</center> 
    1616<hr width="30%"> 
    17 <form method="post" action="config.php{$web_vars}&display=epm_advanced&subpage=poce&product_select={$product_selected}&phone_options=true"> 
     17<form method="post" action="config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce&amp;product_select={$product_selected}&amp;phone_options=true"> 
    1818{if condition="isset($options)"}   
    1919{$options} 
     
    3535  <u><?=_("Local File Configs")?></u><br /> 
    3636  {loop name="file_list"} 
    37   <a href="config.php{$web_vars}&display=epm_advanced&subpage=poce&product_select={$product_selected}&file={$value.value}">{$value.text}</a><br /> 
     37  <a href="config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce&amp;product_select={$product_selected}&amp;file={$value.value}">{$value.text}</a><br /> 
    3838  {/loop} 
    3939  <hr> 
     
    4141  {if condition="isset($sql_file_list)"} 
    4242    {loop name="sql_file_list"} 
    43     <a href="config.php{$web_vars}&display=epm_advanced&subpage=poce&product_select={$product_selected}&sql={$value.value}">{$value.text}</a> [{$value.ref}] <a href="{$web_vars}&display=epm_advanced&subpage=poce&product_select={$product_selected}&sql={$value.value}&delete=yes"><img src='images/delete.gif' ALT='Delete' border='0'></a> 
     43    <a href="config.php?type=tool&display=epm_advanced&subpage=poce&product_select={$product_selected}&sql={$value.value}">{$value.text}</a> [{$value.ref}] <a href="config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce&product_select={$product_selected}&amp;sql={$value.value}&amp;delete=yes"><img src='images/delete.gif' ALT='Delete' border='0'></a> 
    4444    <br /> 
    4545    {/loop} 
     
    5959  <label> 
    6060    <input type="text" name="save_as_name" id="save_as_name" value="{if condition="isset($save_as_name_value)"}{$save_as_name_value}{/if}"> 
    61   </label>{/if}{if condition="isset($type)"}|| <a href="config.php{$web_vars}&display=epm_advanced&subpage=poce&sendid={$sendid}&filename={$filename}&product_select={$product_selected}&{if condition="$type == 'sql'"}sql={$sendid}{else}file={$sendid}{/if}">Click here to send this configuration file to the Provisioner.net Team</a>{/if}</div> 
     61  </label>{/if}{if condition="isset($type)"}|| <a href="config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce&sendid={$sendid}&amp;filename={$filename}&amp;product_select={$product_selected}&amp;{if condition="$type == 'sql'"}sql={$sendid}{else}file={$sendid}{/if}">Click here to send this configuration file to the Provisioner.net Team</a>{/if}</div> 
    6262        </form><div style="font-size: 13px">(Note: 'Save' Saves to the local hard drive, if the phone module is ever updated this file will be over-written, 'Save As' Saves to the database and is not over-written on updates)</div></td> 
    6363     
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_settings.html

    r10797 r11618  
    22    {include="message_box"} 
    33{/if} 
    4 <form action='config.php{$web_vars}&display=epm_advanced&subpage=settings' method='POST'> 
     4<form action='config.php?type=tool&amp;display=epm_advanced&amp;subpage=settings' method='POST'> 
    55<table width='90%' align='center'> 
    66<tr> 
    77<td width='50%' align='right'><?=_("IP address of phone server")?>:</td> 
    88<td width='50%' align='left'><input type='text' id='srvip' name='srvip' value='{$srvip}'><a href='#' onclick="document.getElementById('srvip').value = '{$ip}'; "><?=_("Determine for me")?></a></td> 
    9 </tr><tr> 
     9</tr> 
     10<tr> 
     11  <td align='right'><?=_("Configuration Type")?></td> 
     12  <td align='left'> 
     13        <select name="cfg_type" id="cfg_type"> 
     14            <option value="file">File (TFTP/FTP)</option> 
     15            <option value="web">Web (HTTP)</option> 
     16        </select> 
     17  </td> 
     18</tr> 
     19<tr> 
     20  <td align='right'><?=_("Default Final Configuration Directory")?></td> 
     21  <td align='left'><label> 
     22    <input type="text" name="config_loc" value="{$config_location}"> 
     23  </label></td> 
     24</tr> 
     25<tr> 
    1026<td width='50%' align='right'><?=_("Time Zone")?> (<?=_('like')?> USA-5)</td> 
    1127<td width='50%' align='left'><select name="tz" id="tz"> 
     
    1632 
    1733</td> 
    18 </tr> 
    19 <!-- Future 
    20 <tr> 
    21 <td width='50%' align='right'><?=_("Language")?> (<?=_('like')?> EN_US)</td> 
    22 <td width='50%' align='left'><select name="tz" id="tz"> 
    23   {loop name="list_tz"} 
    24   <option value="{$value.value}" {if condition="$value.selected == 1"}selected='selected'{/if}>{$value.text}</option> 
    25   {/loop} 
    26 </select> 
    27 </td> 
    28 </tr> 
    29 --> 
    30 <tr> 
    31   <td align='right'><?=_("Default Final Configuration Directory")?></td> 
    32   <td align='left'><label> 
    33     <input type="text" name="config_loc" value="{$config_location}"> 
    34   </label></td> 
    3534</tr> 
    3635<tr> 
     
    7170</tr> 
    7271<tr> 
     72  <td align='right'><?=_("Allow Duplicate Extensions")?></td> 
     73  <td align='left'><label> 
     74    <input type=checkbox name="allow_dupext" {$dupext_selected}> 
     75  </label></td> 
     76</tr> 
     77<tr> 
    7378<td colspan='2' align='center'><input type='Submit' name='button_update_globals' value='<?=_('Update Globals')?>'></td> 
    7479</tr> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_settings_sh_manager.html

    r10792 r11618  
    2121<table width="100%" class="brand" border="0" cellspacing="0" cellpadding="0"> 
    2222  <tr> 
    23     <td colspan="2">{$value.name}<form action='config.php{$web_vars}&display=epm_advanced&subpage=sh_manager' method='POST'><input type="hidden" name="brand" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
     23      <td colspan="2">{$value.name}<form action='config.php?type=tool&amp;display=epm_advanced&amp;subpage=sh_manager' method='POST'><input type="hidden" name="brand" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
    2424  </tr> 
    2525  <tr> 
     
    2828  <table width="100%" class="product" border="0" cellspacing="0" cellpadding="0"> 
    2929      <tr> 
    30         <td colspan="2">{$value.long_name}<form action='config.php{$web_vars}&display=epm_advanced&subpage=sh_manager' method='POST'><input type="hidden" name="product" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
     30          <td colspan="2">{$value.long_name}<form action='config.php?type=tool&amp;display=epm_advanced&amp;subpage=sh_manager' method='POST'><input type="hidden" name="product" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
    3131      </tr> 
    3232      <tr> 
     
    3535    <table width="100%" class="model" border="0" cellspacing="0" cellpadding="0"> 
    3636          <tr> 
    37             <td>{$value.model} <form action='config.php{$web_vars}&display=epm_advanced&subpage=sh_manager' method='POST'><input type="hidden" name="model" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}Show{else}Hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
     37            <td>{$value.model} <form action='config.php?type=tool&amp;display=epm_advanced&amp;subpage=sh_manager' method='POST'><input type="hidden" name="model" value="{$value.id}"><input type="submit" name="button_{if condition="$value.hidden == '1'"}show{else}hide{/if}" class="button_{if condition="$value.hidden == '1'"}Show{else}Hide{/if}" value="{if condition="$value.hidden == '1'"}<?=_('Show')?>{else}<?=_('Hide')?>{/if}"></form></td> 
    3838          </tr> 
    3939        </table>{/loop}</td> 
  • modules/branches/2.9/endpointman/templates/freepbx/advanced_subheader.html

    r10792 r11618  
    11<table align='center' width='90%'> 
    22<tr> 
    3     <td align='center'>{if condition="$subhead_area == 'settings'"}<h4 style="color:#ff9933;"><?=_('Settings')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=settings'><?=_('Settings')?></a></h4>{/if}</td> 
    4     <td align='center'>{if condition="$subhead_area == 'oui_manager'"}<h4 style="color:#ff9933;"><?=_('OUI Manager')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=oui_manager'><?=_('OUI Manager')?></a></h4>{/if}</td> 
    5     <td align='center'>{if condition="$subhead_area == 'poce'"}<h4 style="color:#ff9933;"><?=_('Product Options/Configuration Editor')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=poce'><?=_('Product Options/Configuration Editor')?></a></h4>{/if}</td> 
     3    <td align='center'>{if condition="$subhead_area == 'settings'"}<h4 style="color:#ff9933;"><?=_('Settings')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=settings'><?=_('Settings')?></a></h4>{/if}</td> 
     4    <td align='center'>{if condition="$subhead_area == 'oui_manager'"}<h4 style="color:#ff9933;"><?=_('OUI Manager')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=oui_manager'><?=_('OUI Manager')?></a></h4>{/if}</td> 
     5    <td align='center'>{if condition="$subhead_area == 'poce'"}<h4 style="color:#ff9933;"><?=_('Product Options/Configuration Editor')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=poce'><?=_('Product Options/Configuration Editor')?></a></h4>{/if}</td> 
    66</tr> 
    77<tr> 
    8     <td align='center'>{if condition="$subhead_area == 'iedl'"}<h4 style="color:#ff9933;"><?=_('Import/Export Devices My Devices List')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=iedl'><?=_('Import/Export Devices My Devices List')?></a></h4>{/if}</td> 
    9 <td align='center'>{if condition="$subhead_area == 'manual_upload'"}<h4 style="color:#ff9933;"><?=_('Manual Endpoint Modules Upload')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=manual_upload'><?=_('Manual Endpoint Modules Upload')?></a></h4>{/if}</td> 
    10 <td align='center'>{if condition="$subhead_area == 'sh_manager'"}<h4 style="color:#ff9933;"><?=_('Show/Hide Brands/Models')?></h4>{else}<h4><a href='{$web_vars}&display=epm_advanced&subpage=sh_manager'><?=_('Show/Hide Brands/Models')?></a></h4>{/if}</td> 
     8    <td align='center'>{if condition="$subhead_area == 'iedl'"}<h4 style="color:#ff9933;"><?=_('Import/Export Devices My Devices List')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=iedl'><?=_('Import/Export Devices My Devices List')?></a></h4>{/if}</td> 
     9<td align='center'>{if condition="$subhead_area == 'manual_upload'"}<h4 style="color:#ff9933;"><?=_('Manual Endpoint Modules Upload')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=manual_upload'><?=_('Manual Endpoint Modules Upload')?></a></h4>{/if}</td> 
     10<td align='center'>{if condition="$subhead_area == 'sh_manager'"}<h4 style="color:#ff9933;"><?=_('Show/Hide Brands/Models')?></h4>{else}<h4><a href='config.php?type=tool&amp;display=epm_advanced&amp;subpage=sh_manager'><?=_('Show/Hide Brands/Models')?></a></h4>{/if}</td> 
    1111</tr> 
    1212</table> 
  • modules/branches/2.9/endpointman/templates/freepbx/brand_model_manager.html

    r11318 r11618  
    2929</script> 
    3030<center> 
    31 <form id='check' action='config.php{$web_var}&display=epm_config' method='POST'> 
     31<form id='check' action='config.php?type=tool&amp;display=epm_config' method='POST'> 
    3232  <input type="submit" name="button_check_for_updates" onclick="check();" value="<?=_('Check for Updates')?>"> 
    3333</form> 
     
    160160        <table width="100%" class="brand" border="0" cellspacing="0" cellpadding="0"> 
    161161            <tr> 
    162                 <td colspan="2">{$value.name} {if condition="$value.installed == '1'"}(<?=_('Package Last Modified')?> [{$value.cfg_ver}]) {/if}<form action='config.php{$web_var}&display=epm_config' method='POST'><input type="hidden" name="brand" value="{$value.id}"><input type="submit" name="button_{if condition="$value.installed == '1'"}uninstall{else}install{/if}" class="button_{if condition="$value.installed == '1'"}Disable{else}Enable{/if}" value="{if condition="$value.installed == '1'"}<?=_('Uninstall')?>{else}<?=_('Install')?>{/if}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}New Package Modified [{$value.update_vers}]<input type="submit" name="button_update" class="button_update" value="<?=_('Update')?>">{/if}{/if}</form></td> 
     162                <td colspan="2">{$value.name} {if condition="$value.installed == '1'"}(<?=_('Package Last Modified')?> [{$value.cfg_ver}]) {/if}<form action='config.php?type=tool&amp;display=epm_config' method='POST'><input type="hidden" name="brand" value="{$value.id}"><input type="submit" name="button_{if condition="$value.installed == '1'"}uninstall{else}install{/if}" class="button_{if condition="$value.installed == '1'"}Disable{else}Enable{/if}" value="{if condition="$value.installed == '1'"}<?=_('Uninstall')?>{else}<?=_('Install')?>{/if}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}New Package Modified [{$value.update_vers}]<input type="submit" name="button_update" class="button_update" value="<?=_('Update')?>">{/if}{/if}</form></td> 
    163163            </tr> 
    164164            <tr> 
     
    167167                    <table width="100%" class="product" border="0" cellspacing="0" cellpadding="0"> 
    168168                        <tr> 
    169                             <td colspan="2">{$value.long_name} {if condition="$value.cfg_ver != ''"}{/if} <form action='config.php{$web_var}&display=epm_config' method='POST'><input type="hidden" name="product" value="{$value.id}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}<input type="submit" name="button_update" class="button_update" value="Update">{/if}{/if}{if condition="$value.fw_type == 'install'"}<input type="submit" name="button_install_firmware" class="button_update" value="<?=_('Install Firmware')?>">{elseif condition="$value.fw_type == 'remove'"}<input type="submit" name="button_remove_firmware" class="button_update" value="<?=_('Remove Firmware')?>">{/if}{if condition="array_key_exists('update_fw',$value)"}{if condition="$value.update_fw == 1"}<input type="submit" name="button_update_firmware" class="button_update" value="<?=_('Update Firmware')?>">{/if}{/if}</form></td> 
     169                            <td colspan="2">{$value.long_name} {if condition="$value.cfg_ver != ''"}{/if} <form action='config.php?type=tool&amp;display=epm_config' method='POST'><input type="hidden" name="product" value="{$value.id}">{if condition="array_key_exists('update',$value)"}{if condition="$value.update == 1"}<input type="submit" name="button_update" class="button_update" value="Update">{/if}{/if}{if condition="$value.fw_type == 'install'"}<input type="submit" name="button_install_firmware" class="button_update" value="<?=_('Install Firmware')?>">{elseif condition="$value.fw_type == 'remove'"}<input type="submit" name="button_remove_firmware" class="button_update" value="<?=_('Remove Firmware')?>">{/if}{if condition="array_key_exists('update_fw',$value)"}{if condition="$value.update_fw == 1"}<input type="submit" name="button_update_firmware" class="button_update" value="<?=_('Update Firmware')?>">{/if}{/if}</form></td> 
    170170                        </tr> 
    171171                        <tr> 
     
    174174                                <table width="100%" class="model" border="0" cellspacing="0" cellpadding="0"> 
    175175                                    <tr> 
    176                                         <td>{$value.model} <form action='config.php{$web_var}&display=epm_config' method='POST'><input type="hidden" name="model" value="{$value.id}"><input type="submit" name="button_{if condition="$value.enabled == '1'"}disable{else}enable{/if}" class="button_{if condition="$value.enabled == '1'"}Disable{else}Enable{/if}" value="{if condition="$value.enabled == '1'"}<?=_('Disable')?>{else}<?=_('Enable')?>{/if}"></form></td> 
     176                                        <td>{$value.model} <form action='config.php?type=tool&amp;display=epm_config' method='POST'><input type="hidden" name="model" value="{$value.id}"><input type="submit" name="button_{if condition="$value.enabled == '1'"}disable{else}enable{/if}" class="button_{if condition="$value.enabled == '1'"}Disable{else}Enable{/if}" value="{if condition="$value.enabled == '1'"}<?=_('Disable')?>{else}<?=_('Enable')?>{/if}"></form></td> 
    177177                                    </tr> 
    178178                                </table>{/loop}</td> 
  • modules/branches/2.9/endpointman/templates/freepbx/devices_manager.html

    r11318 r11618  
    6060<center> 
    6161    {if condition="$no_add == FALSE"} 
    62     <form id='go' action='config.php?type=tool&display=epm_devices' method='POST'> 
     62    <form id='go' action='config.php?type=tool&amp;display=epm_devices' method='POST'> 
    6363        <label><?=_('Search for new devices in netmask')?> 
    6464            <input name="netmask" type="text" value="{$srvip}/24"> 
     
    8484        <td align='center'></td> 
    8585    </tr> 
    86         <form name="adding" id="adding" action='config.php?type=tool&display=epm_devices' method='POST' /> 
     86        <form name="adding" id="adding" action='config.php?type=tool&amp;display=epm_devices' method='POST' /> 
    8787 
    8888  {if condition="$no_add == FALSE"} 
     
    304304        <td align='center'><h3>Delete</h3></td> 
    305305    </tr> 
    306     <form id="managed" action='config.php?type=tool&display=epm_devices' method='POST'> 
     306    <form id="managed" action='config.php?type=tool&amp;display=epm_devices' method='POST'> 
    307307  {loop name="list"} 
    308308        <tr class="headerRow"> 
  • modules/branches/2.9/endpointman/templates/freepbx/global_footer.html

    r11318 r11618  
    1 <hr> 
     1<!--<hr> 
    22<h6 align='center'>The Endpoint Configuration Manager is currently maintained by <a target="_blank" href=http://www.andrewsnagy.com/>Andrew Nagy</a> 
    33<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> 
     
    55<br> <?=_("The project is maintained at")?>  
    66<a target="_blank" href="http://projects.colsolgrp.net/projects/show/endpointman"> CSG Software Projects.</a> 
    7 </body> 
    8 </html>  
     7--> 
  • modules/branches/2.9/endpointman/templates/freepbx/global_header.html

    r11318 r11618  
    22    <head> 
    33        <title>PBX Endpoint Configuration Manager</title> 
     4        {if condition="isset($silent_mode)"} 
     5        <script type="text/javascript" src="common/libfreepbx.javascripts.js" language="javascript"></script> 
    46        <script type="text/javascript" src="assets/endpointman/js/jquery.tools.min.js"></script> 
    5         {if condition="isset($silent_mode)"} 
    6         <script type="text/javascript" src="assets/endpointman/js/jquery-1.3.2.min.js"></script> 
     7        <script type="text/javascript" src="assets/endpointman/js/jquery.easing.1.3.js"></script> 
     8        <script type="text/javascript" src="assets/endpointman/js/jquery.coda-slider-2.0.js"></script> 
    79        <link href="common/mainstyle.css" rel="stylesheet" type="text/css" /> 
     10        {/if} 
     11        {if condition="$amp_ver < 2.9"} 
     12        <script type="text/javascript" src="assets/endpointman/js/jquery.tools.min.js"></script> 
     13        <script type="text/javascript" src="assets/endpointman/js/jquery.easing.1.3.js"></script> 
     14        <script type="text/javascript" src="assets/endpointman/js/jquery.coda-slider-2.0.js"></script> 
    815        {/if} 
    916        <style> 
     
    4047        <link href="assets/endpointman/theme/coda-slider-2.0a.css" media="screen, projection" rel="stylesheet" type="text/css" /> 
    4148 
    42  
    43         <!-- Begin JavaScript --> 
    44         <script type="text/javascript" src="assets/endpointman/js/jquery.easing.1.3.js"></script> 
    45         <script type="text/javascript" src="assets/endpointman/js/jquery.coda-slider-2.0.js"></script> 
    4649        <script type="text/javascript"> 
    4750            $().ready(function() { 
     
    5154            }); 
    5255        </script> 
    53         <!-- End JavaScript --> 
    5456  {/if} 
    5557  {if condition="isset($amp_conf_serial)"} 
  • modules/branches/2.9/endpointman/templates/freepbx/message_box.html

    r10792 r11618  
    1 <div style="background-color:#f8f8ff; border: 1px solid #aaaaff; padding:10px;font-family:arial;color:{if condition="$fatal_error == 1"}red{else}grey{/if};font-size:20px;text-align:center"><b>{$error_message}</b>{if condition="$advanced_debug == 1"}<br /><h5 style="font-family:arial;color:black;font-size:12px;text-align:left"><pre><?=debug_print_backtrace();?></pre></h5>{/if}</div> 
     1<div style="background-color:#f8f8ff; border: 1px solid #aaaaff; padding:10px;font-family:arial;color:{if condition="$fatal_error == 1"}red{else}grey{/if};font-size:20px;text-align:center"><b>{$error_message}</b>{if condition="$advanced_debug == 1"}<br /><h5 style="font-family:arial;color:black;font-size:12px;text-align:left"><pre><u>Backtrace</u><br /><?=debug_print_backtrace();?><br /><u>Extended Backtrace</u><br /><?=var_dump(debug_backtrace());?><br /><u>Last Error</u><br /><?=print_r(error_get_last());?></pre></h5>{/if}</div> 
  • modules/branches/2.9/endpointman/templates/freepbx/template_editor.html

    r11318 r11618  
    3737        <strong><?=_('Clone of Model')?>:</strong> {$model}<br /> 
    3838        <strong><?=_('Display')?></strong> 
     39        {if condition="isset($silent_mode)"} 
     40        <select name="area_list" onchange="window.location.href='config.php?display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=edit_template&edit_id={$hidden_id}&model_list=126&template_list=0&rand='+ new Date().getTime() + '&maxlines='+this.options[this.selectedIndex].value"> 
     41        {else} 
    3942        <select name="area_list" onchange="window.location.href='config.php?type=tool&edit_template=true&display=epm_templates&custom='+ document.getElementById('custom').value +'&id='+ document.getElementById('id').value +'&maxlines='+this.options[this.selectedIndex].value"> 
     43        {/if} 
    4044        {loop name="area_ava"} 
    4145        <option value="{$value.value}" {if condition="!empty($value.selected)"}selected{/if}>{$value.text}</option> 
     
    5862        </select><br/> 
    5963        <strong><?=_('Display')?></strong> 
     64        {if condition="isset($silent_mode)"} 
     65        <select name="area_list" onchange="window.location.href='config.php?display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=edit_template&edit_id={$hidden_id}&model_list=126&template_list=0&rand='+ new Date().getTime() + '&maxlines='+this.options[this.selectedIndex].value"> 
     66        {else} 
    6067        <select name="area_list" onchange="window.location.href='config.php?type=tool&edit_template=true&display=epm_templates&custom='+ document.getElementById('custom').value +'&id='+ document.getElementById('id').value +'&maxlines='+this.options[this.selectedIndex].value"> 
     68        {/if} 
    6169        {loop name="area_ava"} 
    6270        <option value="{$value.value}" {if condition="!empty($value.selected)"}selected{/if}>{$value.text}</option> 
  • modules/branches/2.9/endpointman/templates/freepbx/template_manager.html

    r11318 r11618  
    55{if condition="$no_add == FALSE"} 
    66<center> 
    7   <h3><?=_('Add New Template')?>:</h3><form action="config.php?display=epm_templates&Submit=EditTemplate" method="POST"> 
     7  <h3><?=_('Add New Template')?>:</h3><form action="config.php?type=tool&amp;display=epm_templates&amp;Submit=EditTemplate" method="POST"> 
    88    <?=_('Template Name')?>: 
    99    <label> 
     
    4242    <td>{$value.model_clone}</td> 
    4343 
    44   <td align='center' width='9%'><a href="config.php?type=tool&edit_template=true&display=epm_templates&custom={$value.custom}&id={$value.id}"><img src='assets/endpointman/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a></td> 
     44  <td align='center' width='9%'><a href="config.php?type=tool&amp;edit_template=true&amp;display=epm_templates&amp;custom={$value.custom}&amp;id={$value.id}"><img src='assets/endpointman/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a></td> 
    4545  <td align='center' width='5%'>{if condition="$value.custom == 0"} 
    46   <a href="config.php?type=tool&delete_template=true&display=epm_templates&id={$value.id}"><img src='assets/endpointman/images/delete.png' ALT='<?=_('Delete')?>' border='0'></a>{/if}</td> 
     46  <a href="config.php?type=tool&amp;delete_template=true&amp;display=epm_templates&amp;id={$value.id}"><img src='assets/endpointman/images/delete.png' ALT='<?=_('Delete')?>' border='0'></a>{/if}</td> 
    4747  </tr> 
    4848{/loop}