Changeset 11318
- Timestamp:
- 02/07/11 17:09:22 (2 years ago)
- Files:
-
- modules/branches/2.9/endpointman/ENDPOINTMAN_LICENSE.txt (modified) (1 diff)
- modules/branches/2.9/endpointman/ari/js/ajax_req.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery-1.3.2.min.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.coda-slider-2.0.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.cookie.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.easing.1.3.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.jstree.js (added)
- modules/branches/2.9/endpointman/ari/js/jquery.tools.min.js (added)
- modules/branches/2.9/endpointman/ari/modules/phonesettings.module (added)
- modules/branches/2.9/endpointman/ari/theme (added)
- modules/branches/2.9/endpointman/ari/theme/coda-slider-2.0a.css (added)
- modules/branches/2.9/endpointman/ari/theme/reset.css (added)
- modules/branches/2.9/endpointman/ari/themes (deleted)
- modules/branches/2.9/endpointman/assets (added)
- modules/branches/2.9/endpointman/assets/images (added)
- modules/branches/2.9/endpointman/assets/images/add.png (added)
- modules/branches/2.9/endpointman/assets/images/add_old.png (added)
- modules/branches/2.9/endpointman/assets/images/ajax-loader.gif (added)
- modules/branches/2.9/endpointman/assets/images/black_arrow.png (added)
- modules/branches/2.9/endpointman/assets/images/bullet_minus.png (added)
- modules/branches/2.9/endpointman/assets/images/bullet_plus.png (added)
- modules/branches/2.9/endpointman/assets/images/collapse.png (added)
- modules/branches/2.9/endpointman/assets/images/delete.gif (added)
- modules/branches/2.9/endpointman/assets/images/delete.png (added)
- modules/branches/2.9/endpointman/assets/images/edit.gif (added)
- modules/branches/2.9/endpointman/assets/images/edit.png (added)
- modules/branches/2.9/endpointman/assets/images/expand.png (added)
- modules/branches/2.9/endpointman/assets/images/trash.gif (added)
- modules/branches/2.9/endpointman/assets/js (added)
- modules/branches/2.9/endpointman/assets/js/ajax_req.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery-1.3.2.min.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.coda-slider-2.0.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.cookie.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.easing.1.3.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.jstree.js (added)
- modules/branches/2.9/endpointman/assets/js/jquery.tools.min.js (added)
- modules/branches/2.9/endpointman/assets/theme (added)
- modules/branches/2.9/endpointman/assets/theme/coda-slider-2.0a.css (added)
- modules/branches/2.9/endpointman/assets/theme/main.css (added)
- modules/branches/2.9/endpointman/assets/theme/reset.css (added)
- modules/branches/2.9/endpointman/config.php (modified) (1 diff)
- modules/branches/2.9/endpointman/functions.inc.php (modified) (1 diff)
- modules/branches/2.9/endpointman/includes/devices_manager.inc (modified) (6 diffs)
- modules/branches/2.9/endpointman/includes/functions.inc (modified) (3 diffs)
- modules/branches/2.9/endpointman/includes/installer.php (modified) (2 diffs)
- modules/branches/2.9/endpointman/install.php (modified) (16 diffs)
- modules/branches/2.9/endpointman/install/phonesettings.module (deleted)
- modules/branches/2.9/endpointman/js (deleted)
- modules/branches/2.9/endpointman/module.xml (modified) (2 diffs)
- modules/branches/2.9/endpointman/templates/freepbx/brand_model_manager.html (modified) (4 diffs)
- modules/branches/2.9/endpointman/templates/freepbx/devices_manager.html (modified) (10 diffs)
- modules/branches/2.9/endpointman/templates/freepbx/global_footer.html (modified) (1 diff)
- modules/branches/2.9/endpointman/templates/freepbx/global_header.html (modified) (3 diffs)
- modules/branches/2.9/endpointman/templates/freepbx/javascript (deleted)
- modules/branches/2.9/endpointman/templates/freepbx/stylesheets (deleted)
- modules/branches/2.9/endpointman/templates/freepbx/template_editor.html (modified) (7 diffs)
- modules/branches/2.9/endpointman/templates/freepbx/template_manager.html (modified) (1 diff)
- modules/branches/2.9/endpointman/templates/images (deleted)
- modules/branches/2.9/endpointman/uninstall.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/endpointman/ENDPOINTMAN_LICENSE.txt
r10792 r11318 24 24 Andrew Nagy 25 25 Darren Schreiber 26 Philippe Lindheimer 26 Philippe Lindheimer 27 Andrew Miffleton 27 28 28 29 Alternatively, the contents of this file may be used under the terms of modules/branches/2.9/endpointman/config.php
r10333 r11318 22 22 23 23 $endpoint = new endpointmanager(); 24 25 if(!file_exists($amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/images/add.png')) { 26 echo "WARNING: Assets Missing! ^^Please click the Orange \"Apply Configuration Changes\" Bar"; 27 } 24 28 25 29 if(!file_exists(PHONE_MODULES_PATH."temp/")) { modules/branches/2.9/endpointman/functions.inc.php
r11086 r11318 136 136 137 137 $row = $endpoint->get_phone_info($ext_id); 138 $endpoint->prepare_configs($row,FALSE); 138 if(isset($reboot)) { 139 $endpoint->prepare_configs($row); 140 } else { 141 $endpoint->prepare_configs($row,FALSE); 142 } 139 143 } 140 144 } modules/branches/2.9/endpointman/includes/devices_manager.inc
r11086 r11318 293 293 case "rebuild_selected_phones": 294 294 if(isset($_REQUEST['selected'])) { 295 $rebooted = NULL;296 295 foreach($_REQUEST['selected'] as $key => $data) { 297 296 $phone_info = $endpoint->get_phone_info($_REQUEST['selected'][$key]); 298 297 if(isset($_REQUEST['reboot'])) { 299 298 $endpoint->prepare_configs($phone_info); 300 $rebooted = "& Rebooted";299 $rebooted_msg = "& Rebooted"; 301 300 } else { 302 301 $endpoint->prepare_configs($phone_info,FALSE); 303 $rebooted = "For";304 } 305 } 306 $message = "Rebuilt Configs ".$rebooted ." Selected Phones";302 $rebooted_msg = "For"; 303 } 304 } 305 $message = "Rebuilt Configs ".$rebooted_msg." Selected Phones"; 307 306 } else { 308 307 $message = _("No Phones Selected")."!"; … … 312 311 $sql = "SELECT endpointman_mac_list.id FROM endpointman_mac_list, endpointman_brand_list, endpointman_product_list, endpointman_model_list WHERE endpointman_brand_list.id = endpointman_product_list.brand AND endpointman_product_list.id = endpointman_model_list.product_id AND endpointman_mac_list.model = endpointman_model_list.id ORDER BY endpointman_product_list.cfg_dir ASC"; 313 312 $mac_list =& $endpoint->db->getAll($sql,array(),DB_FETCHMODE_ASSOC); 314 $rebooted = NULL;315 313 foreach($mac_list as $data) { 316 314 $phone_info = $endpoint->get_phone_info($data['id']); … … 321 319 if(isset($_REQUEST['reboot'])) { 322 320 $endpoint->prepare_configs($phone_info); 323 $rebooted= "& Rebooted";324 } else {325 $endpoint->prepare_configs($phone_info,FALSE);326 $rebooted= "For";327 }328 }329 $message = "Rebuilt Configs ".$rebooted." All Phones";321 $rebooted_msg = "& Rebooted"; 322 } else { 323 $endpoint->prepare_configs($phone_info,FALSE); 324 $rebooted_msg = "For"; 325 } 326 } 327 $message = "Rebuilt Configs ".$rebooted_msg." All Phones"; 330 328 break; 331 329 case "reboot_brand" : … … 458 456 $endpoint->prepare_configs($phone_info,FALSE); 459 457 } 460 $message = _(" Changed Model/Brand").$rebooted."!";458 $message = _("Saved").$rebooted."!"; 461 459 } 462 460 } else { … … 481 479 if(isset($_REQUEST['reboot'])) { 482 480 $endpoint->prepare_configs($phone_info); 483 $rebooted = "& Rebooted";481 $rebooted_msg = "& Rebooted Phones"; 484 482 } else { 485 483 $endpoint->prepare_configs($phone_info,FALSE); 486 $rebooted = "";484 $rebooted_msg = ""; 487 485 } 488 486 foreach($phone_info['line'] as $line) { … … 491 489 } 492 490 } 493 $message = "Rebuilt Configs " . $rebooted;491 $message = "Rebuilt Configs " . $rebooted_msg; 494 492 } 495 493 break; modules/branches/2.9/endpointman/includes/functions.inc
r11075 r11318 53 53 //end possible removal 54 54 55 define("MODULES_PATH", $this->get_modules_dir()); 56 55 57 //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 56 if(file_exists(dirname($_SERVER["SCRIPT_FILENAME"])."/modules/_ep_phone_modules/")) { 57 define("PHONE_MODULES_PATH", dirname($_SERVER["SCRIPT_FILENAME"])."/modules/_ep_phone_modules/"); 58 } else { 59 $this->error['amp_conf'] = "Phone Modules Directory doesn't exist!"; 60 $this->global_cfg['disable_epm'] = TRUE; 61 } 62 63 //Get local path information 64 define("WEB_PATH", dirname($_SERVER['SCRIPT_NAME'])."/modules/endpointman/"); 65 define("LOCAL_PATH", dirname($_SERVER["SCRIPT_FILENAME"])."/modules/endpointman/"); 58 if(file_exists(MODULES_PATH."_ep_phone_modules/")) { 59 define("PHONE_MODULES_PATH", MODULES_PATH."_ep_phone_modules/"); 60 } else { 61 die("Phone Modules Directory doesn't exist!"); 62 } 63 64 //Determine if local path is correct! 65 if(file_exists(MODULES_PATH."endpointman/")) { 66 define("LOCAL_PATH", MODULES_PATH."endpointman/"); 67 } else { 68 die("Can't Load Local Endpoint Manager Directory!"); 69 } 70 71 //include the local template class 72 if(file_exists(LOCAL_PATH."includes/rain.tpl.class.php")) { 73 require(LOCAL_PATH."includes/rain.tpl.class.php"); 74 } else { 75 die("Can't Load the Template Class"); 76 } 66 77 67 78 //Define error reporting … … 90 101 } 91 102 92 //include the local template class93 if(file_exists(LOCAL_PATH."includes/rain.tpl.class.php")) {94 require(LOCAL_PATH."includes/rain.tpl.class.php");95 } else {96 $this->error['rain_tpl'] = "Can't Load the Template Class";97 $this->global_cfg['diable_epm'] = TRUE;98 }99 103 100 104 $this->tpl = new RainTPL( LOCAL_PATH.'templates/freepbx', LOCAL_PATH.'templates/freepbx/compiled', '/admin/modules/endpointman/templates/images' ); 105 101 106 102 107 if($this->global_cfg['disable_help']) { 103 108 $this->tpl->assign("disable_help", 1); 104 109 } 105 106 $this->tpl->assign("web_path", WEB_PATH); 107 } 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 } 128 108 129 109 130 /** … … 247 268 return(TRUE); 248 269 } else { 249 //$message = _("You can't remove the only line left")."!";250 270 $this->message['delete_line'] = _("You can't remove the only line left")."!"; 251 271 return(FALSE); modules/branches/2.9/endpointman/includes/installer.php
r10792 r11318 7 7 * @package Provisioner 8 8 */ 9 9 10 require 'functions.inc'; 10 11 … … 13 14 echo "<html><head><title>Installer</title></head><body>"; 14 15 15 function out($text){ 16 echo $text."<br />"; 16 if(!function_exists("out")) { 17 function out($text){ 18 echo $text."<br />"; 19 } 17 20 } 18 21 modules/branches/2.9/endpointman/install.php
r11109 r11318 7 7 * @package Endpoint Manager 8 8 */ 9 10 // Leaving these conditional functions for now since this module is used11 // by some earlier releases of FreePBX which may not have them.12 //13 9 if (! function_exists("out")) { 14 10 function out($text) { … … 66 62 define("LOCAL_PATH", $amp_conf['AMPWEBROOT'].'/admin/modules/endpointman/'); 67 63 64 68 65 if(!file_exists(PHONE_MODULES_PATH)) { 69 mkdir(PHONE_MODULES_PATH, 0764);70 out("Creating Phone Modules Directory");66 mkdir(PHONE_MODULES_PATH, 0764); 67 out("Creating Phone Modules Directory"); 71 68 } 72 69 73 70 if(!file_exists(PHONE_MODULES_PATH."setup.php")) { 74 copy(LOCAL_PATH."install/setup.php",PHONE_MODULES_PATH."setup.php");75 out("Moving Auto Provisioner Class");71 copy(LOCAL_PATH."install/setup.php",PHONE_MODULES_PATH."setup.php"); 72 out("Moving Auto Provisioner Class"); 76 73 } 77 74 78 75 if(!file_exists(PHONE_MODULES_PATH."temp/")) { 79 mkdir(PHONE_MODULES_PATH."temp/", 0764);80 out("Creating temp folder");76 mkdir(PHONE_MODULES_PATH."temp/", 0764); 77 out("Creating temp folder"); 81 78 } 82 79 //Detect Version 83 80 84 81 function ep_table_exists ($table) { 85 global $db;82 global $db; 86 83 $sql = "SHOW TABLES FROM asterisk"; 87 84 $result = $db->getAll($sql); … … 98 95 99 96 if(ep_table_exists("endpointman_global_vars")) { 100 $global_cfg =& $db->getAssoc("SELECT var_name, value FROM endpointman_global_vars");97 $global_cfg =& $db->getAssoc("SELECT var_name, value FROM endpointman_global_vars"); 101 98 } else { 102 99 $global_cfg['version'] = '?'; … … 908 905 if ($new_install) { 909 906 910 out("Creating Brand List Table");911 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_brand_list` (907 out("Creating Brand List Table"); 908 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_brand_list` ( 912 909 `id` varchar(11) NOT NULL, 913 910 `name` varchar(255) NOT NULL, … … 918 915 PRIMARY KEY (`id`) 919 916 ) ENGINE=MyISAM DEFAULT CHARSET=latin1"; 920 $db->query($sql);921 922 out("Creating Line List Table");923 924 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_line_list` (917 $db->query($sql); 918 919 out("Creating Line List Table"); 920 921 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_line_list` ( 925 922 `luid` int(11) NOT NULL AUTO_INCREMENT, 926 923 `mac_id` int(11) NOT NULL, … … 934 931 $db->query($sql); 935 932 936 out("Creating Global Variables Table");937 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_global_vars` (933 out("Creating Global Variables Table"); 934 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_global_vars` ( 938 935 `idnum` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Index', 939 936 `var_name` varchar(25) NOT NULL COMMENT 'Variable Name', … … 941 938 PRIMARY KEY (`idnum`) 942 939 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17"; 943 $db->query($sql);944 945 out("Locating NMAP + ARP + ASTERISK Executables");946 $nmap = find_exec("nmap");947 $arp = find_exec("arp");948 $asterisk = find_exec("asterisk");949 950 out("Inserting data into the global vars Table");951 $sql = "INSERT INTO `endpointman_global_vars` (`idnum`, `var_name`, `value`) VALUES940 $db->query($sql); 941 942 out("Locating NMAP + ARP + ASTERISK Executables"); 943 $nmap = find_exec("nmap"); 944 $arp = find_exec("arp"); 945 $asterisk = find_exec("asterisk"); 946 947 out("Inserting data into the global vars Table"); 948 $sql = "INSERT INTO `endpointman_global_vars` (`idnum`, `var_name`, `value`) VALUES 952 949 (1, 'srvip', ''), 953 950 (2, 'tz', ''), … … 967 964 (16, 'endpoint_vers', '0'), 968 965 (17, 'disable_help', '0')"; 969 $db->query($sql);970 971 out("Creating mac list Table");972 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_mac_list` (966 $db->query($sql); 967 968 out("Creating mac list Table"); 969 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_mac_list` ( 973 970 `id` int(10) NOT NULL AUTO_INCREMENT, 974 971 `mac` varchar(12) DEFAULT NULL, … … 981 978 UNIQUE KEY `mac` (`mac`) 982 979 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; 983 $db->query($sql);984 985 out("Creating model List Table");986 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_model_list` (980 $db->query($sql); 981 982 out("Creating model List Table"); 983 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_model_list` ( 987 984 `id` varchar(11) NOT NULL COMMENT 'Key ', 988 985 `brand` int(11) NOT NULL COMMENT 'Brand', … … 996 993 PRIMARY KEY (`id`) 997 994 ) ENGINE=MyISAM DEFAULT CHARSET=latin1"; 998 $db->query($sql);999 1000 out("Creating oui List Table");1001 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_oui_list` (995 $db->query($sql); 996 997 out("Creating oui List Table"); 998 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_oui_list` ( 1002 999 `id` int(30) NOT NULL AUTO_INCREMENT, 1003 1000 `oui` varchar(30) DEFAULT NULL, … … 1007 1004 UNIQUE KEY `oui` (`oui`) 1008 1005 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; 1009 $db->query($sql);1010 1011 out("Creating product List Table");1012 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_product_list` (1006 $db->query($sql); 1007 1008 out("Creating product List Table"); 1009 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_product_list` ( 1013 1010 `id` varchar(11) NOT NULL, 1014 1011 `brand` int(11) NOT NULL, … … 1024 1021 PRIMARY KEY (`id`) 1025 1022 ) ENGINE=MyISAM DEFAULT CHARSET=latin1"; 1026 $db->query($sql);1027 1028 out("Creating Template List Table");1029 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_template_list` (1023 $db->query($sql); 1024 1025 out("Creating Template List Table"); 1026 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_template_list` ( 1030 1027 `id` int(11) NOT NULL AUTO_INCREMENT, 1031 1028 `product_id` varchar(11) NOT NULL, … … 1036 1033 PRIMARY KEY (`id`) 1037 1034 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; 1038 $db->query($sql);1039 1040 out("Creating Time Zone List Table");1041 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_time_zones` (1035 $db->query($sql); 1036 1037 out("Creating Time Zone List Table"); 1038 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_time_zones` ( 1042 1039 `idnum` int(11) NOT NULL auto_increment COMMENT 'Record Number', 1043 1040 `tz` varchar(10) NOT NULL COMMENT 'Time Zone', … … 1046 1043 PRIMARY KEY (`idnum`) 1047 1044 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=116"; 1048 $db->query($sql);1049 1050 out("Inserting Data into table Table");1051 $sql = "INSERT INTO `endpointman_time_zones` (`idnum`, `tz`, `gmtoff`, `gmthr`) VALUES1045 $db->query($sql); 1046 1047 out("Inserting Data into table Table"); 1048 $sql = "INSERT INTO `endpointman_time_zones` (`idnum`, `tz`, `gmtoff`, `gmthr`) VALUES 1052 1049 (1, 'USA-10', '-36000', 'GMT-10:00'), 1053 1050 (2, 'USA-9', '-32400', 'GMT-09:00'), … … 1165 1162 (114, 'NZL+12.75', '45900', 'GMT+12:00'), 1166 1163 (115, 'TON+13', '46800', 'GMT+13:00')"; 1167 $db->query($sql);1168 1169 out("Create Custom Configs Table");1170 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_custom_configs` (1164 $db->query($sql); 1165 1166 out("Create Custom Configs Table"); 1167 $sql = "CREATE TABLE IF NOT EXISTS `endpointman_custom_configs` ( 1171 1168 `id` int(11) NOT NULL AUTO_INCREMENT, 1172 1169 `name` varchar(255) NOT NULL, … … 1176 1173 PRIMARY KEY (`id`) 1177 1174 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1"; 1178 $db->query($sql);1179 1180 } else {1181 out("Update Version Number to ".$version);1182 $sql = "UPDATE endpointman_global_vars SET value = '".$version."' WHERE var_name = 'version'";1183 1175 $db->query($sql); 1184 1176 1185 1186 $sql = "UPDATE endpointman_global_vars SET value = 'http://www.provisioner.net/release3/' WHERE var_name = 'update_server'"; 1187 $db->query($sql); 1188 } 1189 1190 if(file_exists($amp_conf['AMPWEBROOT']."/recordings")) { 1191 out("Installing ARI Module"); 1177 } 1178 1179 out("Update Version Number to ".$version); 1180 $sql = "UPDATE endpointman_global_vars SET value = '".$version."' WHERE var_name = 'version'"; 1181 $db->query($sql); 1182 1183 $sql = "UPDATE endpointman_global_vars SET value = 'http://www.provisioner.net/release3/' WHERE var_name = 'update_server'"; 1184 $db->query($sql); 1185 1186 $sql = 'SELECT value FROM `admin` WHERE `variable` LIKE CONVERT(_utf8 \'version\' USING latin1) COLLATE latin1_swedish_ci'; 1187 $amp_version = $db->getOne($sql); 1188 1189 if(file_exists($amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module")) { 1192 1190 unlink($amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module"); 1193 symlink(LOCAL_PATH. "install/phonesettings.module", $amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module"); 1194 1195 if(!file_exists($amp_conf['AMPWEBROOT']."/recordings/theme/js/")) { 1196 mkdir($amp_conf['AMPWEBROOT']."/recordings/theme/js/"); 1197 } 1198 1191 } 1192 1193 if(file_exists($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.coda-slider-2.0.js")) { 1199 1194 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.coda-slider-2.0.js"); 1195 } 1196 1197 if(file_exists($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.easing.1.3.js")) { 1200 1198 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.easing.1.3.js"); 1199 } 1200 1201 if(file_exists($amp_conf['AMPWEBROOT']."/recordings/theme/coda-slider-2.0a.css")) { 1201 1202 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/coda-slider-2.0a.css"); 1202 symlink(LOCAL_PATH. "templates/freepbx/javascript/jquery.coda-slider-2.0.js", $amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.coda-slider-2.0.js"); 1203 symlink(LOCAL_PATH. "templates/freepbx/javascript/jquery.easing.1.3.js", $amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.easing.1.3.js"); 1204 symlink(LOCAL_PATH. "templates/freepbx/stylesheets/coda-slider-2.0a.css", $amp_conf['AMPWEBROOT']."/recordings/theme/coda-slider-2.0a.css"); 1205 1206 out("Fixing permissions on ARI module"); 1207 chmod($amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module", 0664); 1208 1209 } 1210 1211 out("Updating Symbolic Links for Images"); 1212 foreach (glob(LOCAL_PATH."templates/images/*.*") as $filename) { 1213 //echo "$filename size " . filesize($filename) . "<br />"; 1214 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/images/".basename($filename); 1215 //echo "\t". $newloc ."<br />"; 1216 unlink($newloc); 1217 if((!file_exists($newloc)) && (readlink($newloc) != $filename)) { 1218 symlink($filename, $newloc); 1219 } 1220 } 1221 1222 out("Updating Symbolic Links for Javascripts"); 1223 foreach (glob(LOCAL_PATH."templates/freepbx/javascript/*.*") as $filename) { 1224 //echo "$filename size " . filesize($filename) . "<br />"; 1225 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/common/".basename($filename); 1226 //echo "\t". $newloc ."<br />"; 1227 unlink($newloc); 1228 if((!file_exists($newloc)) && (readlink($newloc) != $filename)) { 1229 symlink($filename, $newloc); 1230 } 1231 } 1232 1233 out("Updating Symbolic Links for Stylesheets"); 1234 foreach (glob(LOCAL_PATH."templates/freepbx/stylesheets/*.*") as $filename) { 1235 //echo "$filename size " . filesize($filename) . "<br />"; 1236 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/common/".basename($filename); 1237 //echo "\t". $newloc ."<br />"; 1238 unlink($newloc); 1239 if((!file_exists($newloc)) && (readlink($newloc) != $filename)) { 1240 symlink($filename, $newloc); 1241 } 1242 } 1203 } 1204 1205 if($amp_version < "2.9.0") { 1206 //Do symlinks ourself because retrieve_conf is OLD 1207 1208 //images 1209 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/images'; 1210 if(!file_exists($dir)) { 1211 mkdir($dir, 0777, TRUE); 1212 } 1213 foreach (glob(LOCAL_PATH."assets/images/*.*") as $filename) { 1214 if(file_exists($dir.'/'.basename($filename))) { 1215 unlink($dir.'/'.basename($filename)); 1216 symlink($filename, $dir.'/'.basename($filename)); 1217 } else { 1218 symlink($filename, $dir.'/'.basename($filename)); 1219 } 1220 } 1221 1222 //javascripts 1223 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/js'; 1224 if(!file_exists($dir)) { 1225 mkdir($dir, 0777, TRUE); 1226 } 1227 foreach (glob(LOCAL_PATH."assets/js/*.*") as $filename) { 1228 if(file_exists($dir.'/'.basename($filename))) { 1229 unlink($dir.'/'.basename($filename)); 1230 symlink($filename, $dir.'/'.basename($filename)); 1231 } else { 1232 symlink($filename, $dir.'/'.basename($filename)); 1233 } 1234 } 1235 1236 //theme (css/stylesheets) 1237 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/theme'; 1238 if(!file_exists($dir)) { 1239 mkdir($dir, 0777, TRUE); 1240 } 1241 foreach (glob(LOCAL_PATH."assets/theme/*.*") as $filename) { 1242 if(file_exists($dir.'/'.basename($filename))) { 1243 unlink($dir.'/'.basename($filename)); 1244 symlink($filename, $dir.'/'.basename($filename)); 1245 } else { 1246 symlink($filename, $dir.'/'.basename($filename)); 1247 } 1248 } 1249 1250 //ari-theme (css/stylesheets) 1251 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme'; 1252 if(!file_exists($dir)) { 1253 mkdir($dir, 0777, TRUE); 1254 } 1255 foreach (glob(LOCAL_PATH."ari/theme/*.*") as $filename) { 1256 if(file_exists($dir.'/'.basename($filename))) { 1257 unlink($dir.'/'.basename($filename)); 1258 symlink($filename, $dir.'/'.basename($filename)); 1259 } else { 1260 symlink($filename, $dir.'/'.basename($filename)); 1261 } 1262 } 1263 1264 //ari-images 1265 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme/images'; 1266 if(!file_exists($dir)) { 1267 mkdir($dir, 0777, TRUE); 1268 } 1269 foreach (glob(LOCAL_PATH."ari/images/*.*") as $filename) { 1270 if(file_exists($dir.'/'.basename($filename))) { 1271 unlink($dir.'/'.basename($filename)); 1272 symlink($filename, $dir.'/'.basename($filename)); 1273 } else { 1274 symlink($filename, $dir.'/'.basename($filename)); 1275 } 1276 } 1277 1278 //ari-js 1279 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme/js'; 1280 if(!file_exists($dir)) { 1281 mkdir($dir, 0777, TRUE); 1282 } 1283 foreach (glob(LOCAL_PATH."ari/js/*.*") as $filename) { 1284 if(file_exists($dir.'/'.basename($filename))) { 1285 unlink($dir.'/'.basename($filename)); 1286 symlink($filename, $dir.'/'.basename($filename)); 1287 } else { 1288 symlink($filename, $dir.'/'.basename($filename)); 1289 } 1290 } 1291 1292 //ari-modules 1293 $dir = $amp_conf['AMPWEBROOT'].'/recordings/modules'; 1294 if(!file_exists($dir)) { 1295 mkdir($dir, 0777, TRUE); 1296 } 1297 foreach (glob(LOCAL_PATH."ari/modules/*.*") as $filename) { 1298 if(file_exists($dir.'/'.basename($filename))) { 1299 unlink($dir.'/'.basename($filename)); 1300 symlink($filename, $dir.'/'.basename($filename)); 1301 } else { 1302 symlink($filename, $dir.'/'.basename($filename)); 1303 } 1304 } 1305 } modules/branches/2.9/endpointman/module.xml
r11140 r11318 1 1 <module> 2 2 <rawname>endpointman</rawname> 3 <repo> extended</repo>3 <repo>standard</repo> 4 4 <name>PBX End Point Manager</name> 5 <version>2.9.0.3RC 4</version>5 <version>2.9.0.3RC5</version> 6 6 <type>tool</type> 7 7 <category>End Point Manager</category> … … 22 22 </changelog> 23 23 <info>http://projects.colsolgrp.net/projects/show/endpointman</info> 24 <location>release/2.9/endpointman-2.9.0.3RC 4.tgz</location>24 <location>release/2.9/endpointman-2.9.0.3RC2.tgz</location> 25 25 26 <md5sum> 05062b33d72877058e3a058974ebf1bb</md5sum>26 <md5sum>f4aed8221b1398a65438454786ce8089</md5sum> 27 27 </module> modules/branches/2.9/endpointman/templates/freepbx/brand_model_manager.html
r11086 r11318 22 22 --> 23 23 </style> 24 <script type="text/javascript" charset="utf-8"> 25 function check() { 26 $('#spinner').toggle(); 27 document.check.submit(); 28 } 29 </script> 24 30 <center> 25 <form action='config.php{$web_var}&display=epm_config' method='POST'>26 <input type="submit" name="button_check_for_updates" value="<?=_('Check for Updates')?>">31 <form id='check' action='config.php{$web_var}&display=epm_config' method='POST'> 32 <input type="submit" name="button_check_for_updates" onclick="check();" value="<?=_('Check for Updates')?>"> 27 33 </form> 28 34 </center> … … 31 37 32 38 {if condition="1 == 0"} 33 <script type="text/javascript" src=" common/jquery.jstree.js"></script>39 <script type="text/javascript" src="/admin/modules/endpointman/templates/javascript/jquery.jstree.js"></script> 34 40 <script type="text/javascript" class="source"> 35 41 $(function () { … … 109 115 {if condition="isset($installer)"} 110 116 <script> 117 111 118 function process_module_actions(actions) { 112 freepbx_modal_show('moduleBox'); 119 if ($.browser.msie) { 120 //This is so ugly & it doesn't even really work right, but if I don't do this then the modal box will display offscreen 121 freepbx_modal_show('moduleBox'); 122 var cssObj = { 123 'top': '40%', 124 'left': '40%', 125 'background-color':'#ff9933' 126 } 127 $('#moduleBox').css(cssObj); 128 129 var cssObj = { 130 'width':'420px', 131 'height':'400px', 132 'border':'0', 133 'padding': '0em 1em 0em 1em', 134 } 135 $('#moduleBox iframe').css(cssObj); 136 137 } else { 138 freepbx_modal_show('moduleBox'); 139 } 113 140 urlStr = "config.php?display=epm_config&quietmode=1&handler=file&file=installer.html.php&module=endpointman&type={$installer.type}&id={$installer.id}"; 114 141 urlStr += "&rand="+Math.random ( ); … … 127 154 process_module_actions(); 128 155 </script> 129 130 156 <div id="moduleBox" style="display:none;"></div> 131 132 157 {/if} 133 158 {if condition="1 == 1"} modules/branches/2.9/endpointman/templates/freepbx/devices_manager.html
r11086 r11318 10 10 } 11 11 function submit_go() { 12 $('#spinner').toggle(); 12 13 $('#go').append('<input type="hidden" name="sub_type" value="go"/>'); 13 14 document.go.submit(); … … 59 60 <center> 60 61 {if condition="$no_add == FALSE"} 61 <form id='go' action='config.php {$web_var}&display=epm_devices' method='POST'>62 <form id='go' action='config.php?type=tool&display=epm_devices' method='POST'> 62 63 <label><?=_('Search for new devices in netmask')?> 63 64 <input name="netmask" type="text" value="{$srvip}/24"> 64 <input type="Submit" name="button_go" onclick="submit_go();" value="<?=_('Go')?>">65 <input type="Submit" name="button_go" id="button_go" onclick="submit_go();" value="<?=_('Go')?>"> 65 66 </label> 66 67 <label> … … 83 84 <td align='center'></td> 84 85 </tr> 85 <form name="adding" id="adding" action='config.php {$web_var}&display=epm_devices' method='POST' />86 <form name="adding" id="adding" action='config.php?type=tool&display=epm_devices' method='POST' /> 86 87 87 88 {if condition="$no_add == FALSE"} … … 126 127 {/loop} 127 128 </select> 128 <a href="#" onclick="return popitup('config.php?display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=edit_template&edit_id={$edit_id}', 'Template Editor')"><img src=' images/edit.png' title="Edit Template Selected on the Left"></a></div>129 <a href="#" onclick="return popitup('config.php?display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=edit_template&edit_id={$edit_id}', 'Template Editor')"><img src='assets/endpointman/images/edit.png' title="Edit Template Selected on the Left" border="0"></a></div> 129 130 </label></td> 130 131 <td align='center'> … … 162 163 </td> 163 164 <td align='center'></td> 164 <td align='center'>{if condition="!isset($disabled_delete_line)"}<div id="demo"><a href="#" onclick="submit_wtype_sub('edit',{$value.luid},'delete');"><img src=" images/delete.png" title="Delete Line from Device to the Left"></div>{/if}</a></td>165 <td align='center'>{if condition="!isset($disabled_delete_line)"}<div id="demo"><a href="#" onclick="submit_wtype_sub('edit',{$value.luid},'delete');"><img src="assets/endpointman/images/delete.png" title="Delete Line from Device to the Left"></div>{/if}</a></td> 165 166 <td align='center'></td> 166 167 </tr> … … 201 202 <td align='center'> </td> 202 203 <td align='center'></td> 203 <td align='center'><div id="demo"><a href="#" onclick="submit_wtype_sub('edit',{$edit_id},'add_line_x');"><img src=" images/add.png" alt="Add Line" border="0" width="24" height="24" title="Add a Line to the device currently being edited"></a></div></td>204 <td align='center'><div id="demo"><a href="#" onclick="submit_wtype_sub('edit',{$edit_id},'add_line_x');"><img src="assets/endpointman/images/add.png" alt="Add Line" border="0" width="24" height="24" title="Add a Line to the device currently being edited"></a></div></td> 204 205 <td align='center'></td> 205 206 </tr> … … 213 214 <td align='center'> </td> 214 215 <td align='center'></td> 215 <td align='center'><a href="#" onclick="add_line();"><img src=" images/add.png" alt="Add Line" border="0" width="24" height="24"></a></td>216 <td align='center'><a href="#" onclick="add_line();"><img src="assets/endpointman/images/add.png" alt="Add Line" border="0" width="24" height="24"></a></td> 216 217 <td align='center'></td> 217 218 </tr> … … 303 304 <td align='center'><h3>Delete</h3></td> 304 305 </tr> 305 <form id="managed" action='config.php {$web_var}&display=epm_devices' method='POST'>306 <form id="managed" action='config.php?type=tool&display=epm_devices' method='POST'> 306 307 {loop name="list"} 307 308 <tr class="headerRow"> 308 <td align='center' ><div id="demo"><a><img src=" images/bullet_plus.png" id="imgrowGroup{$value.master_id}" alt="" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"><input type="checkbox" name="selected[]" value="{$value.id}"></a></div></td>309 <td align='center' ><div id="demo"><a><img src="assets/endpointman/images/bullet_plus.png" id="imgrowGroup{$value.master_id}" alt="" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"><input type="checkbox" name="selected[]" value="{$value.id}"></a></div></td> 309 310 <td align='center' width='11%'>{$value.mac}</td> 310 311 <td width="13%" align='center'>{$value.name}</td> 311 312 <td width="14%" align='center'>{$value.model}</td> 312 <td width="10%" align='center'><div id="demo"><a><img src=" images/expand.png" id="img2rowGroup{$value.master_id}" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"></a></div></td>313 <td width="19%" align='center'><div id="demo"><a><img src=" images/expand.png" id="img3rowGroup{$value.master_id}" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"></a></div></td>313 <td width="10%" align='center'><div id="demo"><a><img src="assets/endpointman/images/expand.png" id="img2rowGroup{$value.master_id}" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"></a></div></td> 314 <td width="19%" align='center'><div id="demo"><a><img src="assets/endpointman/images/expand.png" id="img3rowGroup{$value.master_id}" onclick="toggleDisplay(document.getElementById('devList'),'headerRow','rowGroup{$value.master_id}')" title="Click to Expand Line Information"></a></div></td> 314 315 <td align='center' width='15%'>{$value.template_name}</td> 315 <td align='center' width='9%'><div id="demo"><a href="#" onclick="submit_wtype('edit',{$value.id});"><img src=' images/edit.png' ALT='<?=_('Edit')?>' title='Edit Device' border='0'></a></div></td>316 <td align='center' width='7%'><div id="demo"><a href="#" onclick="delete_device({$value.id});"><img src=' images/delete.png' ALT='<?=_('Delete')?>' title='Delete Device' border='0'></a></div></td>316 <td align='center' width='9%'><div id="demo"><a href="#" onclick="submit_wtype('edit',{$value.id});"><img src='assets/endpointman/images/edit.png' ALT='<?=_('Edit')?>' title='Edit Device' border='0'></a></div></td> 317 <td align='center' width='7%'><div id="demo"><a href="#" onclick="delete_device({$value.id});"><img src='assets/endpointman/images/delete.png' ALT='<?=_('Delete')?>' title='Delete Device' border='0'></a></div></td> 317 318 </tr> 318 319 {loop name="value.line"} … … 326 327 <td align='center' width='15%'></td> 327 328 <td align='center' width='9%'></td> 328 <td align='center' width='7%'><div id="demo"><a href="#" onclick="submit_wtype('delete_line',{$value.luid});"><img src=' images/delete.png' ALT='<?=_('Delete')?>' title='Delete Line' border='0'></a></div></td>329 <td align='center' width='7%'><div id="demo"><a href="#" onclick="submit_wtype('delete_line',{$value.luid});"><img src='assets/endpointman/images/delete.png' ALT='<?=_('Delete')?>' title='Delete Line' border='0'></a></div></td> 329 330 </tr> 330 331 {/loop} … … 372 373 <option></option> 373 374 </select> 374 <input type="submit" name="button_rebuild_reboot" onclick="submit_global3('rebuild_reboot');" value="<?=_('Rebuild & Reboot')?>"><br /><input type="checkbox" name="reboot" checked>Reboot Phones375 <input type="submit" name="button_rebuild_reboot" onclick="submit_global3('rebuild_reboot');" value="<?=_('Rebuild')?>"><br /><input type="checkbox" name="reboot" checked>Reboot Phones 375 376 </label></td> 376 377 </tr> modules/branches/2.9/endpointman/templates/freepbx/global_footer.html
r10792 r11318 2 2 <h6 align='center'>The Endpoint Configuration Manager is currently maintained by <a target="_blank" href=http://www.andrewsnagy.com/>Andrew Nagy</a> 3 3 <br/><?=_("The Endpoint Configuration Manager was originally written by")?> <a target="_blank" href=http://www.mymcs.us>Ed Macri</a>, <a target="_blank" href=http://www.cohutta.com> John Mullinix.</a> and <a target="_blank" href=http://www.colsolgrp.com>Tony Shiffer</a> 4 <br/>Endpoint Configuration Manager uses code from the MPL licensed project Provisioner.net at <a href="http:// www.assembla.com/code/provisioner/git/nodes?rev=master">http://www.assembla.com/code/provisioner/git/nodes?rev=master</a> co-written by Darren Schreiber & Andrew Nagy4 <br/>Endpoint Configuration Manager uses code from the MPL licensed project Provisioner.net at <a href="http://provisioner.net" target="_blank">http://www.provisioner.net</a> co-written by Darren Schreiber & Andrew Nagy 5 5 <br> <?=_("The project is maintained at")?> 6 6 <a target="_blank" href="http://projects.colsolgrp.net/projects/show/endpointman"> CSG Software Projects.</a> modules/branches/2.9/endpointman/templates/freepbx/global_header.html
r11086 r11318 1 1 <html> 2 <head>3 <title>PBX Endpoint Configuration Manager</title>4 <script type="text/javascript" src=" common/jquery.tools.min.js"></script>2 <head> 3 <title>PBX Endpoint Configuration Manager</title> 4 <script type="text/javascript" src="assets/endpointman/js/jquery.tools.min.js"></script> 5 5 {if condition="isset($silent_mode)"} 6 <script type="text/javascript" src=" common/jquery-1.3.2.js"></script>6 <script type="text/javascript" src="assets/endpointman/js/jquery-1.3.2.min.js"></script> 7 7 <link href="common/mainstyle.css" rel="stylesheet" type="text/css" /> 8 8 {/if} … … 10 10 .tooltip { 11 11 display:none; 12 background:transparent url(' images/black_arrow.png');12 background:transparent url('assets/endpointman/images/black_arrow.png'); 13 13 font-size:12px; 14 14 height:70px; … … 17 17 color:#fff; 18 18 } 19 #spinner 20 { 21 display:none; 22 width:200px; 23 height: 200px; 24 position: fixed; 25 top: 40%; 26 left: 55%; 27 background:url('assets/endpointman/images/ajax-loader.gif') no-repeat center #fff; 28 text-align:center; 29 padding:10px; 30 font:normal 16px Tahoma, Geneva, sans-serif; 31 margin-left: -50px; 32 margin-top: -50px; 33 z-index:2; 34 overflow: auto; 35 background-color:#f8f8ff; 36 border: 1px solid #aaaaff; 37 } 19 38 </style> 20 39 {if condition="isset($template_editor_display)"} 21 <link href="common/coda-slider-2.0a.css" media="screen, projection" rel="stylesheet" type="text/css" />40 <link href="assets/endpointman/theme/coda-slider-2.0a.css" media="screen, projection" rel="stylesheet" type="text/css" /> 22 41 23 24 <!-- Begin JavaScript --> 25 <script type="text/javascript" src="common/jquery.easing.1.3.js"></script>26 <script type="text/javascript" src="common/jquery.coda-slider-2.0.js"></script>27 <script type="text/javascript"> 28 $().ready(function() {29 $('#coda-slider-9').codaSlider({30 dynamicArrows: false31 });32 });33 </script> 34 <!-- End JavaScript -->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> 46 <script type="text/javascript"> 47 $().ready(function() { 48 $('#coda-slider-9').codaSlider({ 49 dynamicArrows: false 50 }); 51 }); 52 </script> 53 <!-- End JavaScript --> 35 54 {/if} 36 <!-- config.php?type=tool&display=epm_config&quietmode=1&handler=file&module=endpointman&file=ajax_select.php?amp_conf --> 55 {if condition="isset($amp_conf_serial)"} 56 <script type="text/javascript" charset="utf-8"> 57 $(function(){ 58 $("select#brand_edit").change(function(){ 59 $.ajaxSetup({ cache: false }); 60 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 61 var options = ''; 62 for (var i = 0; i < j.length; i++) { 63 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 64 } 65 $("#model_new").html(options); 66 $('#model_new option:first').attr('selected', 'selected'); 67 $("#template_list").html('<option></option>'); 68 $('#template_list option:first').attr('selected', 'selected'); 69 }) 70 }) 71 }) 72 $(function(){ 73 $("select#product_select").change(function(){ 74 $.ajaxSetup({ cache: false }); 75 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template",{id: $(this).val()}, function(j){ 76 var options = ''; 77 for (var i = 0; i < j.length; i++) { 78 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 79 } 80 $("#template_selector").html(options); 81 $('#template_selector option:first').attr('selected', 'selected'); 82 }) 83 }) 84 }) 85 $(function(){ 86 $("select#model_new").change(function(){ 87 $.ajaxSetup({ cache: false }); 88 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template2",{id: $(this).val()}, function(j){ 89 var options = ''; 90 for (var i = 0; i < j.length; i++) { 91 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 92 } 93 $("#template_list").html(options); 94 $('#template_list option:first').attr('selected', 'selected'); 95 }), 96 $.ajaxSetup({ cache: false }); 97 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=lines",{id: $(this).val()}, function(j){ 98 var options = ''; 99 for (var i = 0; i < j.length; i++) { 100 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 101 } 102 $("#line_list").html(options); 103 $('#line_list option:first').attr('selected', 'selected'); 104 }) 105 }) 106 }) 37 107 38 108 $(function(){ 109 $("select#brand_list_selected").change(function(){ 110 $.ajaxSetup({ cache: false }); 111 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 112 var options = ''; 113 for (var i = 0; i < j.length; i++) { 114 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 115 } 116 $("#model_list_selected").html(options); 117 $('#model_list_selected option:first').attr('selected', 'selected'); 118 }) 119 }) 120 }) 121 $(function(){ 122 $("select#model_class").change(function(){ 123 $.ajaxSetup({ cache: false }); 124 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model_clone",{id: $(this).val()}, function(j){ 125 var options = ''; 126 for (var i = 0; i < j.length; i++) { 127 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 128 } 129 $("#model_clone").html(options); 130 $('#model_clone option:first').attr('selected', 'selected'); 131 }) 132 }) 133 }) 39 134 40 {if condition="isset($amp_conf_serial)"} 41 <script type="text/javascript" charset="utf-8"> 42 $(function(){ 43 $("select#brand_edit").change(function(){ 44 $.ajaxSetup({ cache: false }); 45 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 46 var options = ''; 47 for (var i = 0; i < j.length; i++) { 48 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 49 } 50 $("#model_new").html(options); 51 $('#model_new option:first').attr('selected', 'selected'); 52 $("#template_list").html('<option></option>'); 53 $('#template_list option:first').attr('selected', 'selected'); 54 }) 55 }) 56 }) 57 $(function(){ 58 $("select#product_select").change(function(){ 59 $.ajaxSetup({ cache: false }); 60 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template",{id: $(this).val()}, function(j){ 61 var options = ''; 62 for (var i = 0; i < j.length; i++) { 63 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 64 } 65 $("#template_selector").html(options); 66 $('#template_selector option:first').attr('selected', 'selected'); 67 }) 68 }) 69 }) 70 $(function(){ 71 $("select#model_new").change(function(){ 72 $.ajaxSetup({ cache: false }); 73 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=template2",{id: $(this).val()}, function(j){ 74 var options = ''; 75 for (var i = 0; i < j.length; i++) { 76 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 77 } 78 $("#template_list").html(options); 79 $('#template_list option:first').attr('selected', 'selected'); 80 }), 81 $.ajaxSetup({ cache: false }); 82 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=lines",{id: $(this).val()}, function(j){ 83 var options = ''; 84 for (var i = 0; i < j.length; i++) { 85 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 86 } 87 $("#line_list").html(options); 88 $('#line_list option:first').attr('selected', 'selected'); 89 }) 90 }) 91 }) 92 93 $(function(){ 94 $("select#brand_list_selected").change(function(){ 95 $.ajaxSetup({ cache: false }); 96 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model",{id: $(this).val()}, function(j){ 97 var options = ''; 98 for (var i = 0; i < j.length; i++) { 99 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 100 } 101 $("#model_list_selected").html(options); 102 $('#model_list_selected option:first').attr('selected', 'selected'); 103 }) 104 }) 105 }) 106 $(function(){ 107 $("select#model_class").change(function(){ 108 $.ajaxSetup({ cache: false }); 109 $.getJSON("config.php?type=tool&quietmode=1&handler=file&module=endpointman&file=ajax_select.html.php&atype=model_clone",{id: $(this).val()}, function(j){ 110 var options = ''; 111 for (var i = 0; i < j.length; i++) { 112 options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; 113 } 114 $("#model_clone").html(options); 115 $('#model_clone option:first').attr('selected', 'selected'); 116 }) 117 }) 118 }) 119 120 function toggleDisplay(tbl, tblClass, rowClass) { 121 var tblRows = tbl.rows; 122 for (i = 0; i < tblRows.length; i++) { 123 if ((tblRows[i].className != tblClass) && (tblRows[i].className == rowClass)) { 124 if( tblRows[i].style.display=='none' ){ 125 tblRows[i].style.display = ''; 126 document.getElementById("img"+rowClass).src= 'images/bullet_minus.png'; 127 document.getElementById("img2"+rowClass).src= 'images/collapse.png'; 128 document.getElementById("img3"+rowClass).src= 'images/collapse.png'; 129 }else{ 130 tblRows[i].style.display = 'none'; 131 document.getElementById("img"+rowClass).src= 'images/bullet_plus.png'; 132 document.getElementById("img2"+rowClass).src= 'images/expand.png'; 133 document.getElementById("img3"+rowClass).src= 'images/expand.png'; 134 } 135 } 136 } 135 function toggleDisplay(tbl, tblClass, rowClass) { 136 if($("#img"+rowClass).attr("src") == 'assets/endpointman/images/bullet_plus.png') { 137 $("#img"+rowClass).attr("src", "assets/endpointman/images/bullet_minus.png"); 138 $("#img2"+rowClass).attr("src", "assets/endpointman/images/collapse.png"); 139 $("#img3"+rowClass).attr("src", "assets/endpointman/images/collapse.png"); 140 $('.'+rowClass).show(); 141 } else { 142 $("#img"+rowClass).attr("src", "assets/endpointman/images/bullet_plus.png"); 143 $("#img2"+rowClass).attr("src", "assets/endpointman/images/expand.png"); 144 $("#img3"+rowClass).attr("src", "assets/endpointman/images/expand.png"); 145 $('.'+rowClass).hide(); 137 146 } 138 </script> 147 } 148 149 </script> 139 150 {/if} 140 </head> 141 <body face="Arial"> 142 <br> 143 <h1><face="Arial"><center><?=_('End Point Configuration Manager')?></center></h1> 144 <hr> 151 </head> 152 <body face="Arial"> 153 <div id="spinner"> 154 </div> 155 <br> 156 <h1><face="Arial"><center><?=_('End Point Configuration Manager')?></center></h1> 157 <hr> modules/branches/2.9/endpointman/templates/freepbx/template_editor.html
r11086 r11318 2 2 <html> 3 3 <head> 4 <link href=" /recordings/theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" />4 <link href="theme/coda-slider-2.0a.css" rel="stylesheet" type="text/css" /> 5 5 <!-- Begin JavaScript --> 6 <script type="text/javascript" src=" /recordings/theme/js/jquery.easing.1.3.js"></script>7 <script type="text/javascript" src=" /recordings/theme/js/jquery.coda-slider-2.0.js"></script>6 <script type="text/javascript" src="theme/js/jquery.easing.1.3.js"></script> 7 <script type="text/javascript" src="theme/js/jquery.coda-slider-2.0.js"></script> 8 8 <script type="text/javascript"> 9 9 $().ready(function() { … … 17 17 <body> 18 18 {else} 19 <script type="text/javascript" src="common/jquery.tooltip.v.1.1.js"></script> 20 <script type="text/javascript" src="common/jquery.tooltip.execute.js"></script> 19 <script type="text/javascript" src="assets/endpointman/js/jquery.tooltip.v.1.1.js"></script> 20 <script type="text/javascript" src="assets/endpointman/js/jquery.tooltip.execute.js"></script> 21 <link href="assets/endpointman/theme/simpletooltip.css" rel="stylesheet" type="text/css" /> 21 22 <script language="javascript" type="text/javascript"> 22 23 function popitup(url, name) { … … 36 37 <strong><?=_('Clone of Model')?>:</strong> {$model}<br /> 37 38 <strong><?=_('Display')?></strong> 38 <select name="area_list" onchange="window.location.href='config.php? edit_template=true&display=epm_templates&custom='+ document.getElementById('custom').value +'&id='+ document.getElementById('id').value +'&maxlines='+this.options[this.selectedIndex].value">39 <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"> 39 40 {loop name="area_ava"} 40 41 <option value="{$value.value}" {if condition="!empty($value.selected)"}selected{/if}>{$value.text}</option> … … 43 44 <strong><?=_('Lines')?></strong> 44 45 {/if} 45 <form action="config.php? display=epm_templates" method="post">46 <form action="config.php?type=tool&display=epm_templates" method="post"> 46 47 {if condition="isset($silent_mode)"} 47 48 <input name="silent_mode" id="silent_mode" type="hidden" value="1"> … … 57 58 </select><br/> 58 59 <strong><?=_('Display')?></strong> 59 <select name="area_list" onchange="window.location.href='config.php? edit_template=true&display=epm_templates&custom='+ document.getElementById('custom').value +'&id='+ document.getElementById('id').value +'&maxlines='+this.options[this.selectedIndex].value">60 <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"> 60 61 {loop name="area_ava"} 61 62 <option value="{$value.value}" {if condition="!empty($value.selected)"}selected{/if}>{$value.text}</option> … … 75 76 {/loop} 76 77 </select> 77 <a href="#" onclick="return popitup('config.php? display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=alt_cfg_edit', '{$value.name}')"><img src='{$web_path}templates/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a>78 <a href="#" onclick="return popitup('config.php?type=tool&display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=alt_cfg_edit', '{$value.name}')"><img src='assets/endpointman/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a> 78 79 <br/> 79 80 {/loop} … … 82 83 {loop name="only_configs"} 83 84 <strong><?=_('Edit File Configurations for:')?></strong> {$value.name} 84 <a href="#" onclick="return popitup2('config.php? display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=alt_cfg_edit', '{$value.name}')"><img src='{$web_path}templates/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a>85 <a href="#" onclick="return popitup2('config.php?type=tool&display=epm_config&quietmode=1&handler=file&file=popup.html.php&module=endpointman&pop_type=alt_cfg_edit', '{$value.name}')"><img src='assets/endpointman/images/edit.png' ALT='<?=_('Edit')?>' border='0'></a> 85 86 <br/> 86 87 {/loop} modules/branches/2.9/endpointman/templates/freepbx/template_manager.html
r11086 r11318 42 42 <td>{$value.model_clone}</td> 43 43 44 <td align='center' width='9%'><a href="config.php? edit_template=true&display=epm_templates&custom={$value.custom}&id={$value.id}"><img src='images/edit.png' ALT='<?=_('Edit')?>' border='0'></a></td>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> 45 45 <td align='center' width='5%'>{if condition="$value.custom == 0"} 46 <a href="config.php? delete_template=true&display=epm_templates&id={$value.id}"><img src='images/delete.png' ALT='<?=_('Delete')?>' border='0'></a>{/if}</td>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> 47 47 </tr> 48 48 {/loop} modules/branches/2.9/endpointman/uninstall.php
r11086 r11318 16 16 17 17 if (! function_exists("out")) { 18 function out($text) {19 echo $text."<br />";20 }18 function out($text) { 19 echo $text."<br />"; 20 } 21 21 } 22 22 23 23 if (! function_exists("outn")) { 24 function outn($text) {25 echo $text;26 }24 function outn($text) { 25 echo $text; 26 } 27 27 } 28 28 … … 62 62 $result = $db->query($sql); 63 63 64 out("Removing ARI Module"); 65 unlink($amp_conf['AMPWEBROOT']."/recordings/modules/phonesettings.module");64 $sql = 'SELECT value FROM `admin` WHERE `variable` LIKE CONVERT(_utf8 \'version\' USING latin1) COLLATE latin1_swedish_ci'; 65 $amp_version = $db->getOne($sql); 66 66 67 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.coda-slider-2.0.js"); 67 //Do unlinks ourself because retrieve_conf doesn't always remove stuff... 68 68 69 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/js/jquery.easing.1.3.js"); 69 //images 70 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/images'; 71 foreach (glob(LOCAL_PATH."assets/images/*.*") as $filename) { 72 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 73 unlink($dir.'/'.basename($filename)); 74 } 75 } 76 if(is_link($dir)) { 77 unlink($dir); 78 } 70 79 71 unlink($amp_conf['AMPWEBROOT']."/recordings/theme/coda-slider-2.0a.css");72 80 73 out("Removing Symbolic Links for Images"); 74 foreach (glob(LOCAL_PATH."templates/images/*.*") as $filename) { 75 //echo "$filename size " . filesize($filename) . "<br />"; 76 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/images/".basename($filename); 77 //echo "\t". $newloc ."<br />"; 78 if((file_exists($newloc)) && (is_link($newloc))) { 79 unlink($newloc); 81 //javascripts 82 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/js'; 83 foreach (glob(LOCAL_PATH."assets/js/*.*") as $filename) { 84 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 85 unlink($dir.'/'.basename($filename)); 86 } 87 } 88 if(is_link($dir)) { 89 unlink($dir); 90 } 91 92 //theme 93 $dir = $amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/theme'; 94 foreach (glob(LOCAL_PATH."assets/theme/*.*") as $filename) { 95 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 96 unlink($dir.'/'.basename($filename)); 97 } 98 } 99 if(is_link($dir)) { 100 unlink($dir); 101 } 102 103 //ari-modules 104 $dir = $amp_conf['AMPWEBROOT'].'/recordings/modules'; 105 foreach (glob(LOCAL_PATH."ari/modules/*.*") as $filename) { 106 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 107 unlink($dir.'/'.basename($filename)); 80 108 } 81 109 } 82 110 83 out("Removing Symbolic Links for Javascripts"); 84 foreach (glob(LOCAL_PATH."templates/freepbx/javascript/*.*") as $filename) { 85 //echo "$filename size " . filesize($filename) . "<br />"; 86 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/common/".basename($filename); 87 //echo "\t". $newloc ."<br />"; 88 if((file_exists($newloc)) && (is_link($newloc))) { 89 unlink($newloc); 111 //ari-images 112 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme/images'; 113 foreach (glob(LOCAL_PATH."ari/images/*.*") as $filename) { 114 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 115 unlink($dir.'/'.basename($filename)); 90 116 } 91 117 } 92 118 93 out("Removing Symbolic Links for Stylesheets"); 94 foreach (glob(LOCAL_PATH."templates/freepbx/stylesheets/*.*") as $filename) { 95 //echo "$filename size " . filesize($filename) . "<br />"; 96 $newloc = str_replace(stristr($filename, 'admin/'), '', $filename) . "admin/common/".basename($filename); 97 //echo "\t". $newloc ."<br />"; 98 if((file_exists($newloc)) && (is_link($newloc))) { 99 unlink($newloc); 119 //ari-js 120 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme/js'; 121 foreach (glob(LOCAL_PATH."ari/js/*.*") as $filename) { 122 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 123 unlink($dir.'/'.basename($filename)); 100 124 } 101 125 } 126 127 //ari-theme 128 $dir = $amp_conf['AMPWEBROOT'].'/recordings/theme'; 129 foreach (glob(LOCAL_PATH."ari/theme/*.*") as $filename) { 130 if(file_exists($dir.'/'.basename($filename)) && (readlink($dir.'/'.basename($filename)) == $filename)) { 131 unlink($dir.'/'.basename($filename)); 132 } 133 } 134 if(!is_link($amp_conf['AMPWEBROOT'].'/admin/assets/endpointman')) { 135 $endpoint->rmrf($amp_conf['AMPWEBROOT'].'/admin/assets/endpointman'); 136 }
