Changeset 12900 for modules

Show
Ignore:
Timestamp:
11/01/11 05:33:15 (2 years ago)
Author:
tm1000
Message:

Merge branch 'develop' into freepbx210_local

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/endpointman/.gitignore

    r12759 r12900  
    11templates/freepbx/compiled/ 
     2templates/freepbx29/complied/ 
  • modules/branches/2.10/endpointman/functions.inc.php

    r12832 r12900  
    6565            if ($action == "del") { 
    6666                $sql = "SELECT mac_id,luid FROM endpointman_line_list WHERE ext = ". $extdisplay; 
    67                 $macid = $endpoint->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     67                $macid = $endpoint->eda->sql($sql,'getRow',DB_FETCHMODE_ASSOC); 
    6868                if($macid) { 
    6969                    $endpoint->delete_line($macid['luid'], TRUE); 
     
    7474                if(isset($delete)) { 
    7575                    $sql = "SELECT mac_id,luid FROM endpointman_line_list WHERE ext = ". $extdisplay; 
    76                     $macid = $endpoint->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     76                    $macid = $endpoint->eda->sql($sql,'getRow',DB_FETCHMODE_ASSOC); 
    7777                    if($macid) { 
    7878                        $endpoint->delete_line($macid['luid'], TRUE); 
     
    9797                            //SQL to get the Description of the  extension from the extension table 
    9898                            $sql = "SELECT name FROM users WHERE extension = '".$_REQUEST['deviceuser']."'"; 
    99                             $name = $db->getOne($sql); 
     99                            $name = $endpoint->eda->sql($sql,'getOne'); 
    100100 
    101101                        } 
     
    106106                    if($endpoint->mac_check_clean($mac)) { 
    107107                        $sql = "SELECT id FROM endpointman_mac_list WHERE mac = '".$endpoint->mac_check_clean($mac)."'"; 
    108                         $macid = $endpoint->db->getOne($sql); 
     108                        $macid = $endpoint->eda->sql($sql,'getOne'); 
    109109                        if($macid) { 
    110110                            //In Database already 
     111                             
    111112                            $sql = 'SELECT * FROM endpointman_line_list WHERE ext = '.$extdisplay.' AND mac_id = '. $macid; 
    112                             $lines_list =& $endpoint->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     113                            $lines_list =& $endpoint->eda->sql($sql,'getRow',DB_FETCHMODE_ASSOC); 
     114                             
    113115                            if(($lines_list) AND (isset($model)) AND (isset($line)) AND (!isset($delete)) AND (isset($temp))) { 
    114116                                //Modifying line already in the database 
     
    152154                    //Mac not set so delete 
    153155                    $sql = "SELECT mac_id,luid FROM endpointman_line_list WHERE ext = ". $extdisplay; 
    154                     $macid = $endpoint->db->getRow($sql,array(),DB_FETCHMODE_ASSOC); 
     156                    $macid = $endpoint->eda->sql($sql,'getRow',DB_FETCHMODE_ASSOC); 
    155157                    if($macid) { 
    156158                        //$endpoint->delete_line($macid['luid'], TRUE); 
     
    208210 
    209211            $sql = "SELECT mac_id,luid,line FROM endpointman_line_list WHERE ext = '".$extdisplay."' "; 
    210             $line_info =& $db->getRow($sql, array(), DB_FETCHMODE_ASSOC); 
     212            $line_info = $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    211213            if($line_info) { 
    212214 
  • modules/branches/2.10/endpointman/includes/advanced.inc

    r12899 r12900  
    77 * @package Provisioner 
    88 */ 
     9$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 
     10 
    911echo $endpoint->tpl->draw( 'global_header' ); 
    1012if(!isset($_REQUEST['subpage'])) { 
     
    2224        $endpoint->tpl->assign("exporter_address", "config.php?type=tool&display=epm_config&quietmode=1&handler=file&file=export.html.php&module=endpointman&rand=".rand()); 
    2325        //Dave B's Q&D file upload security code (http://us2.php.net/manual/en/features.file-upload.php) 
    24         if((isset($_REQUEST['action'])) AND (isset($_REQUEST['button_import'])) AND ($_REQUEST['action'] == "import")) { 
     26        if((isset($_REQUEST['button_import'])) AND ($action == "import")) { 
    2527            $allowedExtensions = array("csv","txt"); 
    2628            foreach ($_FILES as $file) { 
     
    103105        $endpoint->tpl->assign("brand_ava", $endpoint->brands_available()); 
    104106 
    105  
    106         //$provisioner_ver = filemtime(PHONE_MODULES_PATH."master.xml"); 
    107         //$provisioner_ver = date("n-j-y",$provisioner_ver) . " at " . date("g:ia",$provisioner_ver); 
    108107        $provisioner_ver = ""; 
    109108        $endpoint->tpl->assign("master_ver", $provisioner_ver); 
     
    478477                $_POST['allow_hdfiles'] = 0; 
    479478            } 
    480              
     479                         
    481480            $sql="UPDATE endpointman_global_vars SET value='" . $_POST['package_server'] . "' WHERE var_name='update_server'"; 
    482481            $endpoint->eda->sql($sql); 
  • modules/branches/2.10/endpointman/includes/functions.inc

    r12899 r12900  
    434434 
    435435    function update_device($macid,$model,$template,$luid=NULL,$name=NULL,$line=NULL,$update_lines=TRUE) { 
    436         $sql = "UPDATE endpointman_mac_list SET model = ".$model.", template_id =  ".$temp." WHERE id = ".$macid; 
     436        $sql = "UPDATE endpointman_mac_list SET model = ".$model.", template_id =  ".$template." WHERE id = ".$macid; 
    437437        $this->eda->sql($sql); 
    438438 
  • modules/branches/2.10/endpointman/includes/popup.php

    r12899 r12900  
    152152if($_REQUEST['pop_type'] == "alt_cfg_edit") { 
    153153    $value = isset($_POST['value']) ? $_POST['value'] : $_REQUEST['value']; 
    154     $res = explode("_", $value,2); 
     154    preg_match('/^(\d*)\_(.*)/i', $value, $matches); 
     155     
     156    $cfg_id = isset($matches[1]) ? $matches[1] : null; 
     157    $cfg_filename = isset($matches[2]) ? $matches[2] : null; 
     158     
    155159    if($_REQUEST['custom'] == 0) { 
    156         if($res[0] != 0) { 
     160        if($cfg_id != 0) { 
    157161            //SQL Config Files 
    158162            if(isset($_REQUEST['button_save'])) { 
    159                 $sql = "UPDATE endpointman_custom_configs SET data = '".addslashes($_REQUEST['config_text'])."' WHERE id = ".$res[0]
    160                 $endpoint->eda->sql($sql); 
    161                 $message = "Saved to Database!"; 
    162             } 
    163             $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $res[0]
     163                $sql = "UPDATE endpointman_custom_configs SET data = '".addslashes($_REQUEST['config_text'])."' WHERE id = ".$cfg_id
     164                $endpoint->eda->sql($sql); 
     165                $endpoint->message['alt_config'] = "Saved to Database!"; 
     166            } 
     167            $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $cfg_id
    164168            $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    165169            $endpoint->tpl->assign("save_as_name_value", $row['name']); 
     
    173177            //HD Config Files 
    174178            $sql = "SELECT endpointman_brand_list.directory, endpointman_product_list.cfg_dir FROM endpointman_brand_list, endpointman_product_list WHERE endpointman_brand_list.id = endpointman_product_list.brand AND endpointman_product_list.id = (SELECT product_id FROM endpointman_template_list WHERE id = ".$_REQUEST['tid'].")"; 
    175             $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    176             $file=PHONE_MODULES_PATH.'endpoint/'.$row['directory']."/".$row['cfg_dir']."/".$res[1]
     179            $row = $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
     180            $file=PHONE_MODULES_PATH.'endpoint/'.$row['directory']."/".$row['cfg_dir']."/".$cfg_filename
    177181 
    178182            if((isset($_REQUEST['button_save'])) && ($endpoint->global_cfg['allow_hdfiles'])) { 
    179                 $wfh=fopen($file,'w'); 
    180                 fwrite($wfh,$_REQUEST['config_text']); 
    181                 fclose($wfh); 
    182                 $message = "Saved to Hard Drive!"; 
    183                 $handle = fopen($file, "rb"); 
    184                 $contents = fread($handle, filesize($file)); 
    185                 fclose($handle); 
     183                file_put_contents($file, $_REQUEST['config_text']); 
     184                $endpoint->message['alt_config'] = "Saved to Hard Drive!"; 
     185                $contents = file_get_contents($file); 
    186186            } elseif((isset($_REQUEST['button_save'])) && (!$endpoint->global_cfg['allow_hdfiles'])) { 
    187187                $time = time(); 
     
    190190                $config_fs = unserialize($row['config_files_override']); 
    191191 
    192                 $sql = 'INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ("'.$row['name'].'_'.$time.'","'.addslashes($res[1]).'","'.$row['product_id'].'","'.addslashes($_REQUEST['config_text']).'")'; 
    193                 $endpoint->eda->sql($sql); 
    194                 $message = "Saved to Database!"; 
    195                 $new_id =& $endpoint->eda->sql('SELECT last_insert_id()','getOne'); 
     192                $sql = 'INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ("'.$row['name'].'_'.$time.'","'.addslashes($cfg_filename).'","'.$row['product_id'].'","'.addslashes($_REQUEST['config_text']).'")'; 
     193                $endpoint->eda->sql($sql); 
     194                $endpoint->message['alt_config'] = "Saved to Database!"; 
     195                $new_id = $endpoint->eda->sql('SELECT last_insert_id()','getOne'); 
    196196                $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $new_id; 
    197                 $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
     197                $row = $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    198198 
    199199                $contents = $row['data']; 
    200200 
    201201                $value = $new_id."_".$row['mac'].'_'.$time; 
    202  
    203                 if(!is_array($config_fs)) { 
    204                     $config_fs = array(); 
    205                 } 
     202                 
     203                $config_fs = is_array($config_fs) ? $config_fs : array(); 
    206204 
    207205                $file = $row['original_name']; 
     
    212210                $endpoint->eda->sql($sql); 
    213211            } else { 
    214                 $handle = fopen($file, "rb"); 
    215                 $contents = fread($handle, filesize($file)); 
    216                 fclose($handle); 
     212                $contents = file_get_contents($file); 
    217213            } 
    218214 
     
    226222        } 
    227223    } else { 
    228         if($res[0] != 0) { 
     224        if($cfg_id != 0) { 
    229225            if(isset($_REQUEST['button_save'])) { 
    230                 $sql = "UPDATE endpointman_custom_configs SET data = '".addslashes($_REQUEST['config_text'])."' WHERE id = ".$res[0]
    231                 $endpoint->eda->sql($sql); 
    232                 $message = "Saved to Database!"; 
    233             } 
    234             $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $res[0]
     226                $sql = "UPDATE endpointman_custom_configs SET data = '".addslashes($_REQUEST['config_text'])."' WHERE id = ".$cfg_id
     227                $endpoint->eda->sql($sql); 
     228                $endpoint->message['alt_config'] = "Saved to Database!"; 
     229            } 
     230            $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $cfg_id
    235231            $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    236232            $file = "SQL/".$row['original_name']; 
     
    245241            $sql = "SELECT endpointman_brand_list.directory, endpointman_product_list.cfg_dir FROM endpointman_brand_list, endpointman_product_list WHERE endpointman_brand_list.id = endpointman_product_list.brand AND endpointman_product_list.id = (SELECT endpointman_model_list.product_id FROM endpointman_model_list, endpointman_mac_list WHERE endpointman_mac_list.model = endpointman_model_list.id AND endpointman_mac_list.id = ".$_REQUEST['tid'].")"; 
    246242            $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    247             $file=PHONE_MODULES_PATH.'endpoint/'.$row['directory']."/".$row['cfg_dir']."/".$res[1]
     243            $file=PHONE_MODULES_PATH.'endpoint/'.$row['directory']."/".$row['cfg_dir']."/".$cfg_filename
    248244 
    249245            if((isset($_REQUEST['button_save'])) && ($endpoint->global_cfg['allow_hdfiles'])) { 
    250                 $wfh=fopen($file,'w'); 
    251                 fwrite($wfh,$_REQUEST['config_text']); 
    252                 fclose($wfh); 
    253                 $message = "Saved to Hard Drive!"; 
    254                 $handle = fopen($file, "rb"); 
    255                 $contents = fread($handle, filesize($file)); 
    256                 fclose($handle); 
     246                file_put_contents($file, $_REQUEST['config_text']); 
     247                $endpoint->message['alt_config'] = "Saved to Hard Drive!"; 
     248                $contents = file_get_contents($file); 
    257249            } elseif((isset($_REQUEST['button_save'])) && (!$endpoint->global_cfg['allow_hdfiles'])) { 
    258250                $time = time(); 
     
    261253                $config_fs = unserialize($row['config_files_override']); 
    262254 
    263                 $sql = 'INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ("'.$row['mac'].'_'.$time.'","'.addslashes($res[1]).'","'.$row['product_id'].'","'.addslashes($_REQUEST['config_text']).'")'; 
    264                 $endpoint->eda->sql($sql); 
    265                 $message = "Saved to Database!"; 
    266                 $new_id =& $endpoint->eda->sql('SELECT last_insert_id()'); 
     255                $sql = 'INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ("'.$row['mac'].'_'.$time.'","'.addslashes($cfg_filename).'","'.$row['product_id'].'","'.addslashes($_REQUEST['config_text']).'")';                 
     256                $endpoint->eda->sql($sql); 
     257                $endpoint->message['alt_config'] = "Saved to Database!"; 
     258                $new_id = $endpoint->eda->sql('SELECT last_insert_id()','getOne'); 
    267259                $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $new_id; 
    268260                $row =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
     
    271263 
    272264                $value = $new_id."_".$row['mac'].'_'.$time; 
    273  
    274                 if(!is_array($config_fs)) { 
    275                     $config_fs = array(); 
    276                 } 
     265                 
     266                $config_fs = is_array($config_fs) ? $config_fs : array(); 
    277267 
    278268                $file = $row['original_name']; 
     
    283273                $endpoint->eda->sql($sql); 
    284274            } else { 
    285                 $handle = fopen($file, "rb"); 
    286                 $contents = fread($handle, filesize($file)); 
    287                 fclose($handle); 
     275                $contents = file_get_contents($file); 
    288276            } 
    289277 
     
    307295        if(isset($_REQUEST['config_text'])) { 
    308296            if(isset($_REQUEST['button_save'])) { 
    309                 $wfh=fopen($file,'w'); 
    310                 fwrite($wfh,$_REQUEST['config_text']); 
    311                 fclose($wfh); 
    312                 $message = "Saved to Hard Drive!"; 
     297                file_put_contents($file, $_REQUEST['config_text']); 
     298                $endpoint->message['alt_config'] = "Saved to Hard Drive!"; 
    313299            }elseif(isset($_REQUEST['button_save_as'])) { 
    314300                $sql = 'INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ("'.addslashes($_REQUEST['save_as_name']).'","'.addslashes($config_files[$_REQUEST['cfg_file']]).'","'.$_REQUEST['product_select'].'","'.addslashes($_REQUEST['config_text']).'")'; 
    315301                $endpoint->eda->sql($sql); 
    316                 $message = "Saved to Database!"; 
    317             } 
    318         } 
    319  
    320         $handle = fopen($file, "rb"); 
    321         $contents = fread($handle, filesize($file)); 
    322         fclose($handle); 
     302                $endpoint->message['alt_config'] = "Saved to Database!"; 
     303            } 
     304        } 
     305         
     306        $contents = file_get_contents($file); 
    323307 
    324308        if(isset($_REQUEST['sendid'])) { 
    325             $endpoint->submit_config($row['directory'],$row['cfg_dir'],$config_files[$_REQUEST['cfg_file']],$contents); 
    326             $message = 'Sent! Thanks :-)'; 
     309            if($endpoint->submit_config($row['directory'],$row['cfg_dir'],$config_files[$_REQUEST['cfg_file']],$contents)) { 
     310                $endpoint->message['alt_config'] = 'Sent! Thanks :-)'; 
     311            } else { 
     312                $endpoint->message['alt_config'] = 'Could not send at this time'; 
     313            } 
    327314        } 
    328315        $endpoint->tpl->assign("save_as_name_value", $config_files[$_REQUEST['cfg_file']]); 
     
    339326                $sql = "UPDATE endpointman_custom_configs SET data = '".addslashes($_REQUEST['config_text'])."' WHERE id = ".$_REQUEST['sql']; 
    340327                $endpoint->eda->sql($sql); 
    341                 $message = "Saved to Database!"; 
     328                $endpoint->message['alt_config'] = "Saved to Database!"; 
    342329            }elseif(isset($_REQUEST['button_save_as'])) { 
    343330                $sql = 'SELECT original_name FROM endpointman_custom_configs WHERE id = '.$_REQUEST['sql']; 
     
    346333                $sql = "INSERT INTO endpointman_custom_configs (name, original_name, product_id, data) VALUES ('".addslashes($_REQUEST['save_as_name'])."','".addslashes($file_name)."','".$_REQUEST['product_select']."','".addslashes($_REQUEST['config_text'])."')"; 
    347334                $endpoint->eda->sql($sql); 
    348                 $message = "Saved to Database!"; 
     335                $endpoint->message['alt_config'] = "Saved to Database!"; 
    349336            } 
    350337        } 
     
    352339            $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'] ."'"; 
    353340            $row22 =& $endpoint->eda->sql($sql, 'getRow', DB_FETCHMODE_ASSOC); 
    354             $endpoint->submit_config($row22['directory'],$row22['cfg_dir'],$config_files[$_REQUEST['cfg_file']],$contents); 
    355             $message = 'Sent! Thanks! :-)'; 
     341            if($endpoint->submit_config($row22['directory'],$row22['cfg_dir'],$config_files[$_REQUEST['cfg_file']],$contents)) { 
     342                $endpoint->message['alt_config'] = 'Sent! Thanks! :-)'; 
     343            } else { 
     344                $endpoint->message['alt_config'] = 'Could not send at this time'; 
     345            } 
     346             
    356347        } 
    357348        $sql = 'SELECT * FROM endpointman_custom_configs WHERE id =' . $_REQUEST['sql']; 
     
    403394        } 
    404395 
    405  
    406  
    407396        $template_file_list[0]['value'] = "template_data_custom.xml"; 
    408397        $template_file_list[0]['text'] = "template_data_custom.xml"; 
     
    428417    } 
    429418 
    430     $error_message = NULL; 
    431     foreach($endpoint->error as $key => $error) { 
    432         $error_message .= $error; 
    433         if($endpoint->global_cfg['debug']) { 
    434             $error_message .= " Function: [".$key."]"; 
    435         } 
    436         $error_message .= "<br />"; 
    437     } 
    438     if(isset($message)) { 
    439         $endpoint->display_message_box($message,$endpoint->tpl,0); 
    440     } 
    441     if(isset($error_message)) { 
    442         $endpoint->display_message_box($error_message,$endpoint->tpl,1); 
    443     } 
     419    $endpoint->prepare_message_box(); 
    444420 
    445421    echo $endpoint->tpl->draw( 'alt_config_popup' ); 
  • modules/branches/2.10/endpointman/install.php

    r12767 r12900  
    10521052            (18, 'show_all_registrations', '0'), 
    10531053            (19, 'ntp', ''), 
    1054             (20, 'server_type', 'file')"; 
     1054            (20, 'server_type', 'file'), 
     1055            (21, 'allow_hdfiles', '0')"; 
    10551056    $db->query($sql); 
    10561057 
  • modules/branches/2.10/endpointman/module.xml

    r12899 r12900  
    33  <repo>standard</repo> 
    44  <name>PBX End Point Manager</name> 
    5   <version>2.10.0.5</version> 
     5  <version>2.10.0.9</version> 
    66  <type>setup</type> 
    77  <category>Connectivity</category> 
  • modules/branches/2.10/endpointman/templates/freepbx/advanced_settings_poce.html

    r12430 r12900  
    6565</table> 
    6666</center> 
     67<script> 
     68    $(document).ready(function() { 
     69        var editor = CodeMirror.fromTextArea(document.getElementById("textarea"), {lineWrapping: true, lineNumbers: true, mode: {name: "xml", htmlMode: true}}); 
     70    }); 
     71</script> 
  • modules/branches/2.10/endpointman/templates/freepbx/alt_config_popup.html

    r12831 r12900  
    33        <title>PBX Endpoint Configuration Manager</title> 
    44        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" language="javascript"></script> 
     5        <link href="assets/endpointman/theme/codemirror.css" rel="stylesheet" type="text/css" /> 
     6        <script type="text/javascript" src="assets/endpointman/js/codemirror.js"></script> 
     7        <script type="text/javascript" src="assets/endpointman/js/xml.js"></script> 
     8        <link href="assets/endpointman/theme/default.css" rel="stylesheet" type="text/css" /> 
    59        <link href="assets/css/mainstyle.css" rel="stylesheet" type="text/css" /> 
    610        <script language="javascript"> 
     
    1317                setTimeout("opener.Reload()",100); 
    1418            } 
     19             
     20            $(document).ready(function() { 
     21                var editor = CodeMirror.fromTextArea(document.getElementById("textarea"), {lineWrapping: true, lineNumbers: true, mode: {name: "xml", htmlMode: true}});                 
     22            }); 
    1523        </script> 
    1624    </head> 
     
    2129        <h1><face="Arial"><center><?php echo _('End Point Configuration Manager')?></center></h1> 
    2230        <hr> 
    23  {if condition="isset($show_error_box)"} 
    24  {include="message_box"} 
    25  {/if} 
     31{if condition="isset($show_error_box)"} 
     32    {include="message_box"} 
     33{/if} 
    2634  <center><h4><?php echo _("File Configuration Editor For")?>: {$file}</h4> 
    2735      <font color="red">Warning! You can really mess up your phone by messing with these settings. Potentially causing it to not boot!</font><br/> 
     
    3745      <td> 
    3846          <label> 
    39         <textarea name="config_text" id="textarea" cols="100" rows="30" wrap="off">{if condition="isset($config_data)"}{$config_data}{/if}</textarea> 
     47        <textarea name="config_text" id="textarea" cols="100">{if condition="isset($config_data)"}{$config_data}{/if}</textarea> 
    4048          </label> 
    4149          <br><div style="font-size: 15px"> 
  • modules/branches/2.10/endpointman/templates/freepbx29/advanced_settings_poce.html

    r12899 r12900  
    6565</table> 
    6666</center> 
     67<script> 
     68    $(document).ready(function() { 
     69        var editor = CodeMirror.fromTextArea(document.getElementById("textarea"), {lineWrapping: true, lineNumbers: true, mode: {name: "xml", htmlMode: true}}); 
     70    }); 
     71</script> 
  • modules/branches/2.10/endpointman/templates/freepbx29/alt_config_popup.html

    r12899 r12900  
    22    <head> 
    33        <title>PBX Endpoint Configuration Manager</title> 
    4         <script type="text/javascript" src="common/libfreepbx.javascripts.js" language="javascript"></script> 
    5         <script type="text/javascript" src="assets/endpointman/js/jquery.tools.min.js"></script> 
    6         <script type="text/javascript" src="assets/endpointman/js/jquery.easing.1.3.js"></script> 
    7         <script type="text/javascript" src="assets/endpointman/js/jquery.coda-slider-2.0.js"></script> 
    8         <link href="common/mainstyle.css" rel="stylesheet" type="text/css" /> 
     4        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" language="javascript"></script> 
     5        <link href="assets/endpointman/theme/codemirror.css" rel="stylesheet" type="text/css" /> 
     6        <script type="text/javascript" src="assets/endpointman/js/codemirror.js"></script> 
     7        <script type="text/javascript" src="assets/endpointman/js/xml.js"></script> 
     8        <link href="assets/endpointman/theme/default.css" rel="stylesheet" type="text/css" /> 
     9        <link href="assets/css/mainstyle.css" rel="stylesheet" type="text/css" /> 
    910        <script language="javascript"> 
    1011            function Close() { 
     
    1617                setTimeout("opener.Reload()",100); 
    1718            } 
     19             
     20            $(document).ready(function() { 
     21                var editor = CodeMirror.fromTextArea(document.getElementById("textarea"), {lineWrapping: true, lineNumbers: true, mode: {name: "xml", htmlMode: true}});                 
     22            }); 
    1823        </script> 
    1924    </head> 
     
    2429        <h1><face="Arial"><center><?php echo _('End Point Configuration Manager')?></center></h1> 
    2530        <hr> 
    26  {if condition="isset($show_error_box)"} 
    27  {include="message_box"} 
    28  {/if} 
     31{if condition="isset($show_error_box)"} 
     32    {include="message_box"} 
     33{/if} 
    2934  <center><h4><?php echo _("File Configuration Editor For")?>: {$file}</h4> 
    3035      <font color="red">Warning! You can really mess up your phone by messing with these settings. Potentially causing it to not boot!</font><br/> 
     
    4045      <td> 
    4146          <label> 
    42         <textarea name="config_text" id="textarea" cols="100" rows="30" wrap="off">{if condition="isset($config_data)"}{$config_data}{/if}</textarea> 
     47        <textarea name="config_text" id="textarea" cols="100">{if condition="isset($config_data)"}{$config_data}{/if}</textarea> 
    4348          </label> 
    4449          <br><div style="font-size: 15px">