Changeset 3036
- Timestamp:
- 11/08/06 18:51:17 (7 years ago)
- Files:
-
- freepbx/branches/2.2 (modified) (1 prop)
- freepbx/branches/2.2/amp_conf/astetc/extensions.conf (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/bin/retrieve_conf (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-comp.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-daily-load.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-last-month.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-log.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_hourdetail.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_pie.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_stat.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_statbar.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/common/mainstyle.css (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/config.php (modified) (2 diffs)
- freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php (modified) (2 diffs)
- freepbx/branches/2.2/amp_conf/htdocs/admin/images/freepbx.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.2
- Property svnmerge-integrated changed from /freepbx/trunk:1-2993,2995-3012 to /freepbx/trunk:1-2993,2995-3033
freepbx/branches/2.2/amp_conf/astetc/extensions.conf
r2895 r3036 693 693 ; macro-user-callerid should be called _before_ using this macro 694 694 [macro-outbound-callerid] 695 ; Keep the original CallerID number, for failover to the next trunk. 695 696 exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start) 696 697 exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)}) 697 698 exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM}) 698 699 699 ; If this came through a ringgroup or CF, then we want to retain original CID 700 ; unless there's a TRUNK OVERRIDE. Coz that's usually there because their VSP 701 ; or PSTN provider can only accept a limited range of CID's on outbound calls. 702 703 exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 704 exten => s,n,GotoIf($["${TRUNKOUTCID:1:2}"!=""]?trunkcid) ; Don't set USEROUTCID, so UserCID won't be matched. 705 706 exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Dialparties sets this to TRUE if coming from ringgroups, CF, etc. 700 ; If this came through a ringgroup or CF, then we want to retain original CID unless 701 ; OUTKEEPCID_${trunknum} is set. 702 ; 703 exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Set to TRUE if coming from ringgroups, CF, etc. 704 exten => s,n,GotoIf($["x${OUTKEEPCID_${ARG1}}"!="xon"]?normcid) 707 705 exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid) ;if not set to anything, go through normal processing 708 706 exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM}) 709 707 710 ; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal 711 ; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device 712 ; is set for this CID, then it must be internal 713 ; 714 exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid) 708 ; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal 709 ; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device 710 ; is set for this CID, then it must be internal 711 ; 712 exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid) 715 713 716 714 exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) 717 715 exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) 716 exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 718 717 exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid) ; check EMERGENCY ROUTE 719 718 exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = ""]?trunkcid) ; empty EMERGENCY CID, so default back to trunk freepbx/branches/2.2/amp_conf/bin/retrieve_conf
r2993 r3036 361 361 } 362 362 } 363 364 // Finally, if this is an install, re-generate ASTDB entries, as they could be restoring from backup,365 // just rebuilt the machine, blah blah.366 if ($run_install) {367 outn("Re-propogating internal device/extensions database...");368 core_users2astdb();369 core_devices2astdb();370 out("OK");371 }372 373 363 374 364 freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-comp.php
r2418 r3036 198 198 //enforce restrictions for this AMP User 199 199 session_start(); 200 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];200 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 201 201 if (!isset($AMP_CLAUSE)) { 202 202 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-daily-load.php
r2418 r3036 177 177 //enforce restrictions for this AMP User 178 178 session_start(); 179 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];179 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 180 180 if (!isset($AMP_CLAUSE)) { 181 181 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-last-month.php
r2418 r3036 191 191 //enforce restrictions for this AMP User 192 192 session_start(); 193 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];193 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 194 194 if (!isset($AMP_CLAUSE)) { 195 195 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-log.php
r3007 r3036 252 252 //enforce restrictions for this AMP User 253 253 session_start(); 254 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];254 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 255 255 if (!isset($AMP_CLAUSE)) { 256 256 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_hourdetail.php
r2418 r3036 137 137 //enforce restrictions for this AMP User 138 138 session_start(); 139 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];139 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 140 140 if (!isset($AMP_CLAUSE)) { 141 141 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_pie.php
r2418 r3036 180 180 //enforce restrictions for this AMP User 181 181 session_start(); 182 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];182 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 183 183 if (!isset($AMP_CLAUSE)) { 184 184 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_stat.php
r2418 r3036 147 147 //enforce restrictions for this AMP User 148 148 session_start(); 149 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];149 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 150 150 if (!isset($AMP_CLAUSE)) { 151 151 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_statbar.php
r2418 r3036 148 148 //enforce restrictions for this AMP User 149 149 session_start(); 150 $AMP_CLAUSE = $ HTTP_SESSION_VARS['AMP_SQL'];150 $AMP_CLAUSE = $_SESSION['AMP_SQL']; 151 151 if (!isset($AMP_CLAUSE)) { 152 152 $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; freepbx/branches/2.2/amp_conf/htdocs/admin/common/mainstyle.css
r3011 r3036 71 71 72 72 .warning { 73 padding:5px 20px; 73 padding:10px 10px 0 10px; 74 margin:5px 0; 74 75 background:rgb(255,242,202); 76 border:1px dotted #ccc; 77 } 78 .warning p { 79 margin-top: 0; 80 margin-bottom:10px; 75 81 } 76 82 freepbx/branches/2.2/amp_conf/htdocs/admin/config.php
r3011 r3036 277 277 if ($astman) { 278 278 printf( "<h2>%s</h2>", dgettext("welcome page", "Welcome to freePBX.") ); 279 280 $modules_needup = module_getinfo(false, MODULE_STATUS_NEEDUPGRADE); 281 $modules_broken = module_getinfo(false, MODULE_STATUS_BROKEN); 282 if (count($modules_needup) || count($modules_broken)) { 283 echo "<div class=\"warning\">"; 284 if (count($modules_needup)) { 285 echo "<p>"._("Warning: The following modules are disabled because they need upgrading: "); 286 echo implode(", ",array_keys($modules_needup)); 287 echo "</p>"; 288 } 289 if (count($modules_broken)) { 290 echo "<p>"._("Warning: The following modules are disabled because they are broken: "); 291 echo implode(", ",array_keys($modules_broken)); 292 echo "</p>"; 293 } 294 echo "<p>", sprintf(dgettext("welcome page","You should go to the <a href='%s'>Module Admin</a> page to fix these.</p>"), "config.php?display=modules&type=tool"); 295 echo "</div>"; 296 } 297 279 298 // BETA code - remove later. 280 299 echo "<div class=\"warning\">"; … … 285 304 286 305 printf( "<!--[if IE]><p>%s</p><![endif]-->" , dgettext("welcome page", "Note, presently, Microsoft's Internet Explorer is <b>not</b> a supported web browser, and you must use a standards compliant browser, such as Firefox. There is a link on the <a href='http://www.freepbx.org'>right hand side of freePBX.org</a> that will allow you to download Firefox easily. By using that link, Google will donate US$1 to the freePBX project.") ); 306 307 if ($amp_conf['AMPMGRPASS'] == 'amp111') { 308 printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPENGINE'].dgettext("welcome page", " with the default manager pass. You should consider changing this to something else.") ); 309 } 310 if ($amp_conf['AMPDBPASS'] == 'amp109') { 311 printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPDBENGINE'].dgettext("welcome page", " with the default password ") ); 312 } 313 314 315 287 316 printf( "<p>%s</p>" , dgettext("welcome page", "If you're new to freePBX, Welcome. Here are some quick instructions to get you started") ); 288 317 freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php
r2993 r3036 895 895 } 896 896 897 // get_headers() for php4 (built in for php5) 898 if (!function_exists('get_headers')) { 899 function get_headers($url ) { 900 $url_info=parse_url($url); 901 if (isset($url_info['scheme']) && $url_info['scheme'] == 'https') { 902 $port = isset($url_info['port']) ? $url_info['port'] : 443; 903 @$fp=fsockopen('ssl://'.$url_info['host'], $port, $errno, $errstr, 10); 904 } else { 905 $port = isset($url_info['port']) ? $url_info['port'] : 80; 906 @$fp=fsockopen($url_info['host'], $port, $errno, $errstr, 10); 907 } 908 if ($fp) { 909 stream_set_timeout($fp, 10); 910 $head = "HEAD ".@$url_info['path']."?".@$url_info['query']; 911 $head .= " HTTP/1.0\r\nHost: ".@$url_info['host']."\r\n\r\n"; 912 fputs($fp, $head); 913 while(!feof($fp)) { 914 if($header=trim(fgets($fp, 1024))) { 915 $sc_pos = strpos($header, ':'); 916 if ($sc_pos === false) { 917 $headers['status'] = $header; 918 } else { 919 $label = substr( $header, 0, $sc_pos ); 920 $value = substr( $header, $sc_pos+1 ); 921 $headers[strtolower($label)] = trim($value); 922 } 923 } 924 } 925 return $headers; 926 } else { 927 return false; 928 } 929 } 930 } 897 function get_headers_assoc($url ) { 898 $url_info=parse_url($url); 899 if (isset($url_info['scheme']) && $url_info['scheme'] == 'https') { 900 $port = isset($url_info['port']) ? $url_info['port'] : 443; 901 @$fp=fsockopen('ssl://'.$url_info['host'], $port, $errno, $errstr, 10); 902 } else { 903 $port = isset($url_info['port']) ? $url_info['port'] : 80; 904 @$fp=fsockopen($url_info['host'], $port, $errno, $errstr, 10); 905 } 906 if ($fp) { 907 stream_set_timeout($fp, 10); 908 $head = "HEAD ".@$url_info['path']."?".@$url_info['query']; 909 $head .= " HTTP/1.0\r\nHost: ".@$url_info['host']."\r\n\r\n"; 910 fputs($fp, $head); 911 while(!feof($fp)) { 912 if($header=trim(fgets($fp, 1024))) { 913 $sc_pos = strpos($header, ':'); 914 if ($sc_pos === false) { 915 $headers['status'] = $header; 916 } else { 917 $label = substr( $header, 0, $sc_pos ); 918 $value = substr( $header, $sc_pos+1 ); 919 $headers[strtolower($label)] = trim($value); 920 } 921 } 922 } 923 return $headers; 924 } else { 925 return false; 926 } 927 } 928 931 929 932 930 … … 1540 1538 } 1541 1539 1542 $headers = get_headers ($url);1540 $headers = get_headers_assoc($url); 1543 1541 1544 1542 $totalread = 0;
